Questions

How to check a string for specific characters?

How can I check if a string has several specific characters in it using Python 2? For example, given the following string: > The criminals stole $1,000,000 in jewels. How do I detect if it has doll...

15 Jan at 02:3

Are "from Table1 left join Table2" and "from Table2 right join Table1" interchangeable?

For example, there are two tables: ``` create table Table1 (id int, Name varchar (10)) create table Table2 (id int, Name varchar (10)) ``` Table1 data as follows: ``` Id Name ----------...

2 Jul at 01:9

How do I compare two files using Eclipse? Is there any option provided by Eclipse?

How do I compare two files using Eclipse? (Currently I am using [WinMerge](http://en.wikipedia.org/wiki/WinMerge).)

29 May at 09:32

How can I increase the cursor speed in terminal?

How can I increase the cursor speed in terminal? I have Mac OS X by the way. It would also be interesting to know it for Linux. I don't know what I should search for in Google (or what you like).

22 Dec at 19:24

ASP.NET MVC 3 Razor: Include JavaScript file in the head tag

I'm trying to figure out the proper Razor syntax to get a JavaScript file for a particular *.cshtml to be in the head tag along with all the other include files that are defined in _Layout.cshtml.

super() in Java

Is `super()` used to call the parent constructor? Please explain `super()`.

18 Sep at 03:10

Fastest hash for non-cryptographic uses?

I'm essentially preparing phrases to be put into the database, they may be malformed so I want to store a short hash of them instead (I will be simply comparing if they exist or not, so hash is ideal)...

25 Jan at 15:43

How do I catch an Ajax query post error?

I would like to catch the error and show the appropriate message if the Ajax request fails. My code is like the following, but I could not manage to catch the failing Ajax request. ``` function getA...

22 Jul at 11:36

Finding the max/min value in an array of primitives using Java

It's trivial to write a function to determine the min/max value in an array, such as: ``` /** * * @param chars * @return the max value in the array of chars */ private static int maxValue(char[]...

13 Mar at 07:32

Format date and time in a Windows batch script

In a Windows (Windows XP) batch script I need to format the current date and time for later use in files names, etc. It is similar to Stack Overflow question [How to append a date in batch files](htt...

Editing dictionary values in a foreach loop

I am trying to build a pie chart from a dictionary. Before I display the pie chart, I want to tidy up the data. I'm removing any pie slices that would be less than 5% of the pie and putting them in a ...

23 Jul at 15:35

Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?

I would like to know when do we need to place a file under C:\Windows\System32 or C:\Windows\SysWOW64, on a 64-bits windows system. I had two DLL's, one for 32-bit, one for 64-bit. Logically, I th...

4 Mar at 16:41

What's the best free C++ profiler for Windows?

I'm looking for a profiler in order to find the bottleneck in my C++ code. I'd like to find a free, non-intrusive, and good profiling tool. I'm a game developer, and I use PIX for Xbox 360 and found i...

7 Dec at 21:9

Good Java graph algorithm library?

Has anyone had good experiences with any Java libraries for Graph algorithms. I've tried [JGraph](http://www.jgraph.com/jgraph.html) and found it ok, and there are a lot of different ones in google. A...

7 Dec at 12:47

How can I use multiple refs for an array of elements with hooks?

As far as I understood I can use refs for a single element like this: ``` const { useRef, useState, useEffect } = React; const App = () => { const elRef = useRef(); const [elWidth, setElWidth] =...

11 Feb at 15:18

When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)

I am getting this error while running `sudo npm install`. On my server, npm was installed earlier. I've tried to delete the `package-lock.json` file, and ran `npm cache clean --force`, but it didn't w...

31 Jan at 08:10

Assert an Exception using XUnit

I am a newbie to XUnit and Moq. I have a method which takes string as an argument.How to handle an exception using XUnit. ``` [Fact] public void ProfileRepository_GetSettingsForUserIDWithInvalidArgum...

10 Jul at 16:47

Visual studio code - keyboard shortcuts - expand/collapse all

Trying to find the equivalent to + + in Intellij that collapses/expands all functions.

2 Sep at 09:59

How can I one hot encode in Python?

I have a machine learning classification problem with 80% categorical variables. Must I use one hot encoding if I want to use some classifier for the classification? Can i pass the data to a classifie...

Visual Studio Code - Convert spaces to tabs

I have both TypeScript and HTML files in my project, in both files tabs are converted to spaces. I want to turn the auto-conversion off and make sure that my project has only tabs. Edit: With this set...

9 Sep at 08:31

Leader Not Available Kafka in Console Producer

I am trying to use Kafka. All configurations are done properly but when I try to produce message from console I keep getting the following error ``` WARN Error while fetching metadata with correlatio...

29 Mar at 11:32

Chrome:The website uses HSTS. Network errors...this page will probably work later

I am developing against localhost. This morning right after I used fiddler I started getting this error on chrome (works correctly in firefox) "You cannot visit localhost right now because the websit...

29 Mar at 06:3

How to set background color of view transparent in React Native

This is the style of the view that i have used ``` backCover: { position: 'absolute', marginTop: 20, top: 0, bottom: 0, left: 0, right: 0, } ``` Currently it has a white background. I c...

20 Sep at 12:56

What is the shortest way to simply sort an array of structs by (arbitrary) field names?

I just had a problem where I had an array of structs, e.g. ``` package main import "log" type Planet struct { Name string `json:"name"` Aphelion float64 `json:"aphelion"` // in m...

3 Oct at 03:19

PHP - SSL certificate error: unable to get local issuer certificate

I'm running PHP Version 5.6.3 as part of XAMPP on Windows 7. When I try to use the Mandrill API, I'm getting the following error: > Uncaught exception 'Mandrill_HttpError' with message 'API call to ...

25 May at 23:26