Questions

stale element reference: element is not attached to the page document

I have list which has multiple links under each section. Each section has same links I need to click a particular link under each section. I have written the below code but when it executes it gives m...

11 Jan at 15:0

How can I remove all CSS classes using jQuery/JavaScript?

Instead of individually calling `$("#item").removeClass()` for every single class an element might have, is there a single function which can be called which removes all CSS classes from the given ele...

7 Aug at 21:36

Conversion of System.Array to List

Last night I had dream that the following was impossible. But in the same dream, someone from SO told me otherwise. Hence I would like to know if it it possible to convert `System.Array` to `List` ``...

23 Jun at 10:2

Updating Python on Mac

I wanted to update my python 2.6.1 to 3.x on mac but I was wondering if it's possible to do it using the terminal or I have to download the installer from python website? I am asking this question bec...

22 Jul at 21:13

How to load up CSS files using Javascript?

Is it possible to import css stylesheets into a html page using Javascript? If so, how can it be done? P.S the javascript will be hosted on my site, but I want users to be able to put in the `<head>`...

22 Feb at 13:48

Custom CSS Scrollbar for Firefox

I want to customize a scrollbar with CSS. I use this WebKit CSS code, which works well for Safari and Chrome: ``` ::-webkit-scrollbar { width: 15px; height: 15px; } ::-webkit-scrollbar-track-piec...

18 Nov at 06:27

Determining type of an object in ruby

I'll use python as an example of what I'm looking for (you can think of it as pseudocode if you don't know Python): ``` >>> a = 1 >>> type(a) <type 'int'> ``` I know in ruby I can do : ``` 1.9.3p1...

25 Oct at 21:10

What is the "N+1 selects problem" in ORM (Object-Relational Mapping)?

The "N+1 selects problem" is generally stated as a problem in Object-Relational mapping (ORM) discussions, and I understand that it has something to do with having to make a lot of database queries fo...

23 May at 14:49

How to set focus on input field?

What is the 'Angular way' to set focus on input field in AngularJS? More specific requirements: 1. When a Modal is opened, set focus on a predefined <input> inside this Modal. 2. Every time <input> b...

22 Jun at 23:33

Really killing a process in Windows

Occasionally a program on a Windows machine goes crazy and just hangs. So I'll call up the task manager and hit the "End Process" button for it. However, this doesn't always work; if I try it enough...

7 Sep at 08:20

Is there a simple way to remove multiple spaces in a string?

Suppose this string: ``` The fox jumped over the log. ``` Turning into: ``` The fox jumped over the log. ``` What is the simplest (1-2 lines) to achieve this, without splitting and going ...

3 Jun at 23:15

What is the Difference Between Mercurial and Git?

I've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, ...

How can I change the version of npm using nvm?

I've been using NVM to install the latest versions of Node.js for my Node.js work. It works totally fine for installing separate versions and switching between them. It also installs the latest versio...

9 Aug at 19:32

How to get C# Enum description from value?

I have an enum with Description attributes like this: ``` public enum MyEnum { Name1 = 1, [Description("Here is another")] HereIsAnother = 2, [Description("Last one")] LastOne = 3...

20 Jun at 11:47

How to increase maximum execution time in php

I want to increase in php , not by changing `php.ini` file. I want to Increase it from my php file. Is this possible?

28 Aug at 14:0

Pandas DataFrame column to list

I am pulling a subset of data from a column based on conditions in another column being met. I can get the correct values back but it is in pandas.core.frame.DataFrame. How do I convert that to list...

1 May at 11:31

sql server invalid object name - but tables are listed in SSMS tables list

I am attempting to create a `Stored Procedure` for a newly created database. However the `SSMS` intellisense does not recognize more than half of the tables which have been created. For example whil...

28 Mar at 11:26

What is the most efficient way to loop through dataframes with pandas?

I want to perform my own complex operations on financial data in dataframes in a sequential manner. For example I am using the following MSFT CSV file taken from [Yahoo Finance](http://finance.yahoo....

Override body style for content in an iframe

How can I control the background image and colour of a body element within an `iframe`? Note, the embedded body element has a class, and the `iframe` is of a page that is part of my site. The reason...

3 Jun at 21:40

What is the difference between an abstract method and a virtual method?

What is the difference between an abstract method and a virtual method? In which cases is it recommended to use abstract or virtual methods? Which one is the best approach?

SSH Key: “Permissions 0644 for 'id_rsa.pub' are too open.” on mac

I generate a ssh key pair on my mac and add the public key to my ubuntu server(in fact, it is a virtual machine on my mac),but when I try to login the ubuntu server,it says: ``` @@@@@@@@@@@@@@@@@@@@@...

29 Apr at 15:31

Pythonic way to combine for-loop and if-statement

I know how to use both for loops and if statements on separate lines, such as: ``` >>> a = [2,3,4,5,6,7,8,9,0] ... xyz = [0,12,4,6,242,7,9] ... for x in xyz: ... if x in a: ... print(x) 0...

8 May at 17:47

Scatter plot with different text at each data point

I am trying to make a scatter plot and annotate data points with different numbers from a list. So, for example, I want to plot `y` vs `x` and annotate with corresponding numbers from `n`. ``` y = [2...

List to array conversion to use ravel() function

I have a list in python and I want to convert it to an array to be able to use `ravel()` function.

29 Jun at 21:18

Difference between primary key and unique key

I'm using a MySQL database. In which situations should I create a unique key or a primary key?