Find indices of elements equal to zero in a NumPy array
NumPy has the efficient function/method [nonzero()](http://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html) to identify the indices of non-zero elements in an `ndarray` object. What is...
How to get object size in memory?
I need to know how much bytes my object consumes in memory (in C#). for example how much my `Hashtable`, or `SortedList`, or `List<String>`.
- Modified
- 13 Jun at 10:28
Hour from DateTime? in 24 hours format
So i have this DateTime? and what i want to do is to obtain the hour but show it in 24 hours format. For example: If the hour is 2:20:23 p.m. i want to convert it to 14:20 and that's it. I'm working ...
ReactJS convert HTML string to JSX
I'm having trouble dealing with facebook's ReactJS. Whenever I do ajax and want to display an html data, ReactJS displays it as text. (See figure below) ![ReactJS render string](https://i.stack.imgur...
- Modified
- 4 Jul at 06:23
Lodash - difference between .extend() / .assign() and .merge()
In the [Lodash](http://www.lodash.com) library, can someone provide a better explanation of [merge](http://lodash.com/docs#merge) and [extend / assign](http://lodash.com/docs#assign). Its a simple ...
- Modified
- 21 Mar at 14:21
Get the position of a div/span tag
Can someone show me how to get the `top` & `left` position of a `div` or `span` element when one is not specified? ie: ``` <span id='11a' style='top:55px;' onmouseover="GetPos(this);">stuff</span> <sp...
- Modified
- 30 Aug at 21:45
CMake how to set the build directory to be different than source directory
I'm pretty new to CMake, and read a few tutorials on how to use it, and wrote some complicated 50 lines of CMake script in order to make a program for 3 different compilers. This probably concludes al...
- Modified
- 19 Sep at 07:9
Get exception description and stack trace which caused an exception, all as a string
How to convert a caught `Exception` (its description and stack trace) into a `str` for external use? ``` try: method_that_can_raise_an_exception(params) except Exception as e: print(complete_e...
- Modified
- 18 Jan at 02:59
SQL RANK() versus ROW_NUMBER()
I'm confused about the differences between these. Running the following SQL gets me two idential result sets. Can someone please explain the differences? ``` SELECT ID, [Description], RANK() ...
- Modified
- 15 May at 21:37
How to Empty Caches and Clean All Targets Xcode 4 and later
Jonathan suggest here: [Xcode Includes .xib files that have been deleted!](https://stackoverflow.com/questions/4980296/xcode-includes-xib-files-that-have-been-deleted/4980405#4980405) that cleaning al...
"Uncaught (in promise) undefined" error when using with=location in Facebook Graph API query
I am currently developing a web application with the Facebook Graph API. My current goal is to retrieve only posts which have a location attached. While retrieving posts with and without location is...
- Modified
- 23 May at 12:26
Custom bullet symbol for <li> elements in <ul> that is a regular character, and not an image
I realize one can specify a custom graphic to be a replacement bullet character, using CSS attribute: ``` list-style-image ``` And then giving it a URL. However, in my case, I just want to use the...
- Modified
- 8 Oct at 18:11
Definition of "downstream" and "upstream"
I've started playing with Git and have come across the terms "upstream" and "downstream". I've seen these before but never understood them fully. What do these terms mean in the context of SCMs ([So...
- Modified
- 7 Jun at 14:17
How to set .net Framework 4.5 version in IIS 7 application pool
I installed the Visual Studio 11 Beta and suddenly all the async action methods I had created under the VS 11 Developer preview started hanging (apparently this issue: [http://blogs.msdn.com/b/pfxteam...
- Modified
- 4 Mar at 22:21
Getting the folder name from a full filename path
``` string path = "C:\folder1\folder2\file.txt"; ``` What objects or methods could I use that would give me the result `folder2`?
- Modified
- 27 Jun at 21:56
How could I convert data from string to long in c#
How could i convert data from string to long in C#? I have data ``` String strValue[i] ="1100.25"; ``` now i want it in ``` long l1; ```
- Modified
- 27 Jun at 04:40
nginx error connect to php5-fpm.sock failed (13: Permission denied)
I update nginx to and php to , After that I got the . Before I update everything works fine. nginx-error.log ``` 2014/05/03 13:27:41 [crit] 4202#0: *1 connect() to unix:/var/run/php5-fpm.sock faile...
How do I get formatted JSON in .NET using C#?
I am using .NET JSON parser and would like to serialize my config file so it is readable. So instead of: ``` {"blah":"v", "blah2":"v2"} ``` I would like something nicer like: ``` { "blah":"v", ...
- Modified
- 10 May at 10:0
How can I convert radians to degrees with Python?
In the [math](https://docs.python.org/3/library/math.html) module, I could only find `math.cos(x)`, with cos/sin/tan/acos/asin/atan. This returns the answer in radians. How can I get the answer in deg...
CSS '>' selector; what is it?
I've seen the "greater than" (`>`) used in CSS code a few times, but I can't work out what it does. What does it do?
- Modified
- 2 Feb at 13:36
About "*.d.ts" in TypeScript
I am curious about `.d.ts` declaration files because I am new to the TypeScript programming language. I was told by someone that `.d.ts` files are are similar to `.h` header files in the C & C++ progr...
- Modified
- 29 Apr at 05:13
Display back button on action bar
I'm trying to display a `Back button` on the `Action bar` to move previous page/activity or to the main page (first opening). And I can not do it. my code. ``` ActionBar actionBar = getActionBar(); ...
- Modified
- 14 Oct at 07:2
Error "Root composer.json requires php ^7.3 but your php version (8.0.0) does not satisfy that requirement"
I have an unusual error while running the `composer install` command. It requires PHP 7.3 while I have PHP 8.0.0. This question is different from [Override PHP base dependency in composer](https://sta...
- Modified
- 4 Aug at 13:7
How do change the color of the text of an <option> within a <select>?
I am trying to change the color of the first option to grey color, that only the text (select one option) but here it's not working here: ``` .grey_color { color: #ccc; font-size: 14px; } ``` ```...