Questions

How to get element by class name?

Using JavaScript, we can get element by id using following syntax: ``` var x=document.getElementById("by_id"); ``` I tried following to get element by class: ``` var y=document.getElementByClass("...

31 Jul at 09:4

Can you change a path without reloading the controller in AngularJS?

It's been asked before, and from the answers it doesn't look good. I'd like to ask with this sample code in consideration... My app loads the current item in the service that provides it. There are s...

20 Feb at 11:45

WAMP shows error 'MSVCR100.dll' is missing when install

When I tried to install , that popped up the following alert, ![MSVCR100.dll is missing](https://i.stack.imgur.com/C1dkH.png) I clicked , it continued to install WAMP. When I start, the WAMP logo is ...

5 Mar at 09:14

What is the difference between id and class in CSS, and when should I use them?

``` #main { background: #000; border: 1px solid #AAAAAA; padding: 10px; color: #fff; width: 100px; } ``` ``` <div id="main"> Welcome </div> ``` Here I gave an `id` to the `...

7 Mar at 11:22

What is the __DynamicallyInvokable attribute for?

Looking through `System.Linq.Enumerable` in DotPeek I notice that some methods are flavoured with a `[__DynamicallyInvokable]` attribute. What role does this attribute play? Is it something added by ...

23 Sep at 08:12

Remote branch is not showing up in "git branch -r"

I have been pushing to a remote Bitbucket repository and recently a colleague has pushed a new branch he created to the same repository. I'm trying to fetch the changes he uploaded. ``` $ git branch...

6 Dec at 11:15

Changes in import statement python3

I don't understand the following from [pep-0404](http://www.python.org/dev/peps/pep-0404/) > In Python 3, implicit relative imports within packages are no longer available - only absolute imports a...

29 Aug at 07:24

If list index exists, do X

In my program, user inputs number `n`, and then inputs `n` number of strings, which get stored in a list. I need to code such that if a certain list index exists, then run a function. This is made m...

21 Jan at 18:4

POST JSON fails with 415 Unsupported media type, Spring 3 mvc

I am trying to send a POST request to a servlet. Request is sent via jQuery in this way: ``` var productCategory = new Object(); productCategory.idProductCategory = 1; productCategory.description = "D...

How can I tell when HttpClient has timed out?

As far as I can tell, there's no way to know that it's specifically a timeout that has occurred. Am I not looking in the right place, or am I missing something bigger? ``` string baseAddress = "http:/...

20 Jun at 09:12

How to get ER model of database from server with Workbench

Is there any way to get an ER model of a database from the server that is connected to my MySQL Workbench?

Difference between jQuery parent(), parents() and closest() functions

I have been using jQuery for a while. I wanted to use the `parent()` selector. I also came up with the `closest()` selector. Could not find any difference between them. Is there any? If yes, what? Wh...

22 Jun at 05:54

Is gcc's __attribute__((packed)) / #pragma pack unsafe?

In C, the compiler will lay out members of a struct in the order in which they're declared, with possible padding bytes inserted between members, or after the last member, to ensure that each member i...

23 Aug at 06:8

How do you run a SQL Server query from PowerShell?

Is there a way to execute an arbitrary query on a SQL Server using Powershell on my local machine?

7 Dec at 22:27

Test if an element is present using Selenium WebDriver

Is there a way how to test if an element is present? Any method would end in an exception, but that is not what I want, because it can be that an element is not present and that is okay. That is not ...

13 Nov at 20:46

Clear text from textarea with selenium

I've got some tests where I'm checking that the proper error message appears when text in certain fields are invalid. One check for validity is that a certain textarea element is not empty. If this ...

List all virtualenv

In virtualenvwrapper, is there a simple way to list all virtualenv on my machine? (like what yolk -l does to list all python packages in the current virtual environment?) "ls -la" in my env direct...

Full Screen DialogFragment in Android

I'm trying to show an almost fullscreen DialogFragment. But I'm somehow not able to do so. The way I am showing the Fragment is straight from the android developer documentation ``` FragmentManager ...

24 Feb at 21:49

How do I run msbuild from the command line using Windows SDK 7.1?

I'm setting up .NET 4.0 support on our CI server. I've installed .NET 4.0, and the .NET tools from the Windows 7.1 SDK. On .NET 2.0 and 3.5, that just worked. With .NET 4, when I run the "Windows SDK...

12 Jun at 00:1

Get week of year in JavaScript like in PHP

How do I get the current weeknumber of the year, like PHP's `date('W')`? It should be the [ISO-8601](http://en.wikipedia.org/wiki/ISO_8601) week number of year, weeks starting on Monday.

4 Jun at 07:8

Basic example of using .ajax() with JSONP?

Please could someone help me work out how to get started with JSONP? Code: ``` $('document').ready(function() { var pm_url = 'http://twitter.com/status'; pm_url += '/user_timeline/stephenfry...

9 May at 23:33

What is difference between Errors and Exceptions?

> [Differences betweeen Exception and Error](https://stackoverflow.com/questions/912334/differences-betweeen-exception-and-error) How can I differentiate between Errors and Exceptions in Java?...

23 May at 11:47

Mix Razor and Javascript code

I'm pretty confused with how to mix razor and js. This is the current function I am stuck with: ``` <script type="text/javascript"> var data = []; @foreach (var r in Model.rows) ...

23 Sep at 23:19

Capture Video of Android's Screen

Forget screenshots, is it posible to capture a video of the running application in android? Rooted or non-rooted, I don't care, I want atleast 15fps. Update: I don't want any external hardware. The i...

22 Mar at 05:22

When to use DataContract and DataMember attributes?

I am very confused about the `DataContract` attribute in WCF. As per my knowledge it is used for serializating user defined type like classes. I wrote one class which is exposed at client side like th...