PowerShell and the -contains operator
Consider the following snippet: ``` "12-18" -Contains "-" ``` You’d think this evaluates to `true`, but it doesn't. This will evaluate to `false` instead. I’m not sure why this happens, but it does. ...
- Modified
- 9 Jun at 08:58
How to prevent errno 32 broken pipe?
Currently I am using an app built in python. When I run it in personal computer, it works without problems. However, when I move it into a production server. It keeps showing me the error attached a...
- Modified
- 20 Jan at 09:38
Create a GUID in Java
What are some of the best ways to create a GUID in Java?
How to check null objects in jQuery
I'm using jQuery and I want to check the existence of an element in my page. I have written following code, but it's not working: ``` if($("#btext" + i) != null) { //alert($("#btext" + i).text())...
- Modified
- 10 Aug at 08:17
How to retrieve a file from a server via SFTP?
I'm trying to retrieve a file from a server using SFTP (as opposed to FTPS) using Java. How can I do this?
Short IF - ELSE statement
I'm trying to make my code more readable, so I decided to use some short IF statements. Here's my code which doesn't work ("not a statement"): ``` jXPanel6.isVisible() ? jXPanel6.setVisible(true) :...
- Modified
- 1 Aug at 11:54
The best way to print a Java 2D array?
I was wondering what the best way of printing a 2D array in Java was? I was just wondering if this code is good practice or not? Also any other mistakes I made in this code if you find any. ``` int ro...
- Modified
- 25 Mar at 22:53
Could not load dynamic library 'cudart64_101.dll' on tensorflow CPU-only installation
I just installed the latest version of Tensorflow via `pip install tensorflow` and whenever I run a program, I get the log message: > W tensorflow/stream_executor/platform/default/dso_loader.cc:55] C...
- Modified
- 27 May at 15:25
How do I force a DIV block to extend to the bottom of a page even if it has no content?
In the markup shown below, I'm trying to get the content div to stretch all the way to the bottom of the page but it's only stretching if there's content to display. The reason I want to do this is so...
Using Razor within JavaScript
Is it possible or is there a workaround to use Razor syntax within JavaScript that is in a view (`cshtml`)? I am trying to add markers to a Google map... For example, I tried this, but I'm getting a ...
- Modified
- 1 Jan at 16:45
Is there a WinSCP equivalent for Linux?
I love [WinSCP](https://en.wikipedia.org/wiki/WinSCP) for Windows. What is the best equivalent software for Linux? I tried to use sshfs to mount the remote file system on my local machine, but it is ...
Generating a SHA-256 hash from the Linux command line
I know the string "foobar" generates the SHA-256 hash `c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2` using [http://hash.online-convert.com/sha256-generator](http://hash.online-conv...
MongoDB SELECT COUNT GROUP BY
I am playing around with MongoDB trying to figure out how to do a simple ``` SELECT province, COUNT(*) FROM contest GROUP BY province ``` But I can't seem to figure it out using the aggregate funct...
- Modified
- 13 Apr at 15:38
How to use JQuery with ReactJS
I'm new to ReactJS. Previously I've used jQuery to set any animation or feature that I needed. But now I'm trying to use ReactJS and minimize the use of jQuery. I'm trying to build an accordion wit...
- Modified
- 10 May at 20:37
SQL Query with NOT LIKE IN
Please help me to write a sql query with the conditions as 'NOT LIKE IN' ``` Select * from Table1 where EmpPU NOT Like IN ('%CSE%', '%ECE%', '%EEE%') ``` Getting error.
- Modified
- 22 Feb at 10:55
.gitignore all the .DS_Store files in every folder and subfolder
I've added .DS_Store to the .gitignore file, but it seems that it is only ignoring .DS_Store in the root directory, not in every folder and subfolder. How do I fix this?
Proper way to make HTML nested list?
The W3 docs have a [nested list example](http://www.w3.org/TR/html401/struct/lists.html#h-10.2) prefixed by `DEPRECATED EXAMPLE:`, but they never corrected it with a non-deprecated example, nor explai...
- Modified
- 16 Nov at 13:11
How do I find all of the symlinks in a directory tree?
I'm trying to find all of the symlinks within a directory tree for my website. I know that I can use `find` to do this but I can't figure out how to recursively check the directories. I've tried this...
Count character occurrences in a string in C++
How can I count the number of `"_"` in a string like `"bla_bla_blabla_bla"`?
- Modified
- 10 Jul at 11:42
How can I stop a running MySQL query?
I connect to `mysql` from my Linux shell. Every now and then I run a `SELECT` query that is too big. It prints and prints and I already know this is not what I meant. I would like to stop the query. ...
- Modified
- 28 Dec at 22:2
Show Youtube video source into HTML5 video tag?
I'm trying to put a YouTube video source into the HTML5 `<video>` tag, but it doesn't seem to work. After some Googling, I found out that HTML5 doesn't support YouTube video URLs as a source. Can yo...
- Modified
- 19 Oct at 05:7
How to initialize array to 0 in C?
I need a big null array in C as a global. Is there any way to do this besides typing out ``` char ZEROARRAY[1024] = {0, 0, 0, /* ... 1021 more times... */ }; ``` ?
- Modified
- 10 May at 18:51
What does the "+=" operator do in Java?
Can you please help me understand what the following code means: ``` x += 0.1; ```
- Modified
- 17 Sep at 17:16
Need a good hex editor for Linux
I need a good hex editor for Linux, and by good I mean: - - - - - What can you suggest?
- Modified
- 5 Oct at 07:10
nginx.service failed because the control process exited
> nginx.service failed because the control process exited ``` $ systemctl status nginx.service nginx.service - Startup script for nginx service Loaded: loaded (/usr/lib/systemd/system/nginx.service...