lundi 31 août 2015

Firefox is blocking insecure content

I am running a UI automation script on a https site. I get 'Firefox is blocking insecure content" warning every-time on a particular page. for now i am manually disabling protection from options but, how to set protection disabled permanently so that my scripts won't break when i run them for regression?

enter image description here



via Chebli Mohamed

SQL query to make distinct lines with case being used

Here is what my data looks like on the table I am querying

Table 1

ITEM     SEQUENCE     CODE
Item1       1            A 
Item1       2            B
Item2       1            B
Item2       2            C
Item2       3            D

My current Query looks like

  Select Distinct Table1.ITEM, 
  case when Table1.SEQUENCE = '1' Then Table2.DSC end As FirstDSC,
  Case When Table1.SEQUENCE = '2' then Table2.DSC End As SecondDSC,
  Case When Table1.SEQUENCE = '3' Then Table2.DSC End As ThirdDSC
    From Table1
    Join Table2 on Table2.Code = Table1.Code
    Where Table1.Item In (Subquery here to find distinct values that Item can be)

It currently returns the data looking like

ITEM  FIRSTDSC SECONDDSC THIRDDSC
Item1   DSC-A     NULL      NULL
Item1   NULL     DSC-B      NULL 

I was wondering how to make the data return looking like

ITEM FIRSTDSC  SECONDDSC  THIRDDSC
Item1  DSC-A      DSC-B       NULL
Item2  DSC-B      DSC-C       DSC-D

Is there a good way to do this or am I going in the completely wrong direction with my query currently?



via Chebli Mohamed

On mouseout animate line to disappear

Right now, I've got it to draw a line when you mouseon but I want it so that when you mouseout the line disappears left to right.

http://ift.tt/1IA9dl9

$( "#name" ).mouseover(function() { 

$('.slider').animate({
    width: $('#name').width()
}, 1000);

});



via Chebli Mohamed

Access to GitHub only possible with

I can successfully add files to a local repository and push it to github using github desktop. When I try to commit to github using the git commandline or GitExtensions I get an error

"C:\Program Files\Git\bin\git.exe" push --recurse-submodules=check --progress "origin" refs/heads/master:refs/heads/master
remote: Invalid username or password.
fatal: Authentication failed for 'http://ift.tt/1EtNNuM'
Done

I dont have 2fa enabled. What is github desktop doing different that it can login?



via Chebli Mohamed

Are there Powershell cmdlets that install and remove Windows drivers?

Note: For this question, when I refer to "Windows drivers" I mean .inf and associated files which can otherwise be installed by right-clicking the .inf and clicking "Install" in Windows Explorer. I do not mean any kind of setup.exe-style executable which might install a driver.


There exists the following:

I have not, however, found a corresponding Powershell Cmdlet that supports installing and uninstalling drivers on the running system. I'm sure I could wrap dpinst.exe in some powershell, but I'd like to avoid mapping command line parameters and parsing output if a more Powershell-native method exists.

Do Powershell Cmdlets exist that install and uninstall Windows drivers on the running system? Is there some other way to install and uninstall Windows drivers using Powershell that does not involve dpinst.exe?



via Chebli Mohamed

Accessing audio input while loading a project from file://

I wonder to know if it is possible to somehow prevent Chrome from blocking my project audio input because I'm not loading it from a local host but from file://... a.k.a. my HDD. I'm asking about this because I've understood that when the script is non-server but loaded from file:// Chrome automatically blocks it and it can't reach the asking for mic usage permission step. I'm playing around with annyang, so yeah, if someone knows how to enable the described above, please share, as I still have no idea of php, mysqul and others for establishing a local host environment.



via Chebli Mohamed

Which index is needed for a Mongoid order_by and find_by query?

To find the most recently created user named "Jeff",

User.order_by(created_at: :desc)
    .find_by(name: "Jeff")

Which indexes should be created for this query? Would it be 2 indexes, on created_at and name?

Or a compound index on both?



via Chebli Mohamed