Questions

How to list all properties of a PowerShell WMI object

When I look at the [Win32_ComputerSystem class](http://msdn.microsoft.com/en-us/library/aa394102%28v=VS.85%29.aspx), it shows loads of properties like `Status`, `PowerManagementCapabilities`, etc. How...

16 Sep at 05:57

Read a XML (from a string) and get some fields - Problems reading XML

I have this XML (stored in a C# string called `myXML`) ``` <?xml version="1.0" encoding="utf-16"?> <myDataz xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XML...

6 Dec at 14:20

How can I get npm start at a different directory?

I usually `cd` into the app directory and then run `npm start`. It is my feeling that there ought to be some way to run `npm start` with a path parameter. But, the [npm start documentation](https://d...

10 Feb at 08:32

How to select the first, second, or third element with a given class name?

How can I select a certain element in a list of elements? I have the following: ``` <div class="myclass">my text1</div> <!-- some other code follows --> <div> <p>stuff</p> </div> <div> <p>mor...

25 Feb at 03:35

TensorFlow, "'module' object has no attribute 'placeholder'"

I've been trying to use tensorflow for two days now installing and reinstalling it over and over again in python2.7 and 3.4. No matter what I do, I get this error message when trying to use tensorflo...

23 May at 06:24

How to select rows in a DataFrame between two values, in Python Pandas?

I am trying to modify a DataFrame `df` to only contain rows for which the values in the column `closing_price` are between 99 and 101 and trying to do this with the code below. However, I get the er...

26 Jul at 14:14

Python: How to get stdout after running os.system?

I want to get the `stdout` in a variable after running the `os.system` call. Lets take this line as an example: ``` batcmd="dir" result = os.system(batcmd) ``` `result` will contain the error cod...

Initializing IEnumerable<string> In C#

I have this object : ``` IEnumerable<string> m_oEnum = null; ``` and I'd like to initialize it. Tried with ``` IEnumerable<string> m_oEnum = new IEnumerable<string>() { "1", "2", "3"}; ``` but ...

31 Jul at 07:46

Setting custom UITableViewCells height

I am using a custom UITableViewCell which has some labels, buttons and image views to be displayed. There is one label in the cell whose text is a `NSString` object and the length of string could be v...

How to map/collect with index in Ruby?

What is the easiest way to convert ``` [x1, x2, x3, ... , xN] ``` to ``` [[x1, 2], [x2, 3], [x3, 4], ... , [xN, N+1]] ```

10 May at 13:1

Arrays in unix shell?

How do I create an array in unix shell scripting?

11 Jun at 09:56

how to get the 30 days before date from Todays Date

How do you get the 30 days before today in SQL.

23 Feb at 15:24

Removing the first 3 characters from a string

What is the most efficient way to remove the first 3 characters of a string? For example:

14 Dec at 00:8

How to preview selected image in input type="file" in popup using jQuery?

In my code, I am allowing the user to upload an image. Now I want to show this selected image as a preview in this same popup. How can I do it using jQuery? The following is the input type I am using...

28 Jul at 01:6

Split List into Sublists with LINQ

Is there any way I can separate a `List<SomeObject>` into several separate lists of `SomeObject`, using the item index as the delimiter of each split? Let me exemplify: I have a `List<SomeObject>` a...

17 Mar at 17:38

ImportError: No module named MySQLdb

I am referring the following tutorial to make a login page for my web application. [http://code.tutsplus.com/tutorials/intro-to-flask-signing-in-and-out--net-29982](http://code.tutsplus.com/tutorials/...

Uncaught TypeError: undefined is not a function while using jQuery UI

I haven't used jQuery before, and I wanted to use `DateTimePicker` plugin on my web page. I downloaded the plugin file and placed them in the same directory as the HTML files. I directly applied the...

19 Mar at 20:44

Differences between unique_ptr and shared_ptr

> [pimpl: shared_ptr or unique_ptr](https://stackoverflow.com/questions/5576922/pimpl-shared-ptr-or-unique-ptr) [smart pointers (boost) explained](https://stackoverflow.com/questions/569775/smart...

Connecting to remote URL which requires authentication using Java

How do I connect to a remote URL in Java which requires authentication. I'm trying to find a way to modify the following code to be able to programatically provide a username/password so it doesn't th...

18 Jun at 05:46

Powershell Multidimensional Arrays

I have a way of doing Arrays in other languagues like this: ``` $x = "David" $arr = @() $arr[$x]["TSHIRTS"]["SIZE"] = "M" ``` This generates an error.

24 Jun at 02:14

long long in C/C++

I am trying this code on GNU's C++ compiler and am unable to understand its behaviour: ``` #include <stdio.h>; int main() { int num1 = 1000000000; long num2 = 1000000000; long long num3...

14 May at 12:10

Efficient way to determine number of digits in an integer

What is a very way of determining how many digits there are in an integer in C++?

28 Sep at 23:20

Error:could not create the Java Virtual Machine Error:A fatal exception has occured.Program will exit

I have just installed Java SE Development Kit 8u91 on my 64 bit Windows-10 OS. I set my variables . I tried in my command prompt it gave me an error. ``` c:\Users\Onlymanu>java --version Unrecogniz...

12 May at 11:57

How to initialize var?

Can I initialize var with null or some empty value?

16 Jan at 10:19

Command dotnet ef not found

I'm following [the docs](https://learn.microsoft.com/en-us/aspnet/core/data/ef-mvc/migrations?view=aspnetcore-3.0#create-an-initial-migration) in order to create an initial migration. When I execute `...