Questions

I can not find my.cnf on my windows computer

My computer is Windows XP. I need to find `my.cnf` to get all privileges back to the root user. I accidentally removed some privileges of the root user. I still have the password and there is no pro...

12 Aug at 04:16

Android Studio: Plugin with id 'android-library' not found

I've been trying to get ActionBarSherlock to work and having some issue. One issue I've come across is the following message when trying to build it: ``` Plugin with id 'android-library' not found `...

The entity cannot be constructed in a LINQ to Entities query

There is an entity type called `Product` that is generated by entity framework. I have written this query ``` public IQueryable<Product> GetProducts(int categoryID) { return from p in db.Products ...

3 Jul at 13:39

Python convert decimal to hex

I have a function here that converts decimal to hex but it prints it in reverse order. How would I fix it? ``` def ChangeHex(n): if (n < 0): print(0) elif (n<=1): print(n) ...

26 Apr at 20:46

Apache and Node.js on the Same Server

I want to use Node because it's swift, uses the same language I am using on the client side, and it's non-blocking by definition. But the guy who I hired to write the program for file handling (savin...

8 Oct at 16:20

Default text which won't be shown in drop-down list

I have a `select` which initially shows until the user selects a language. When the user opens the select, I don't want it to show a option, because it's not an actual option. How can I achieve thi...

28 Feb at 16:41

How to know Laravel version and where is it defined?

How to know Laravel version and where is it defined? Is Laravel version is defined inside my application directory or somewhere in global server side directory? Sorry, the main question is where t...

20 Jun at 07:26

What is the question mark for in a Typescript parameter name

``` export class Thread { id: string; lastMessage: Message; name: string; avatarSrc: string; constructor(id?: string, name?: string, avatarSrc?: string) { th...

25 Mar at 14:0

How to best display in Terminal a MySQL SELECT returning too many fields?

I'm using [PuTTY](https://www.putty.org/) to run: ``` mysql> SELECT * FROM sometable; ``` `sometable` has many fields and this results in many columns trying to be displayed in the terminal. The fi...

17 Feb at 14:58

Why would you use Expression<Func<T>> rather than Func<T>?

I understand lambdas and the `Func` and `Action` delegates. But expressions stump me. In what circumstances would you use an `Expression<Func<T>>` rather than a plain old `Func<T>`?

19 Apr at 13:53

HTML <input type='file'> File Selection Event

Let's say we have this code: ``` <form action='' method='POST' enctype='multipart/form-data'> <input type='file' name='userFile'><br> <input type='submit' name='upload_btn' value='upload'> </f...

28 Aug at 14:54

javax vs java package

What's the rationale behind the javax package? What goes into java and what into javax? I know a lot of enterprise-y packages are in javax, but so is Swing, the new date and time api (JSR-310) and ot...

7 Apr at 22:28

convert strtotime to date time format in php

i need to convert strtotime to date btime format (from 1307595105 to 06/08/2011 09:51:45 PM PDT) in php Could you please give me an answer

14 Mar at 10:47

POST: sending a post request in a url itself

I have been given a url .. `www.abc.com/details` and asked to send my name and phone number on this url using `POST`. They have told me to set the content-type as application/json and the body as vali...

26 Apr at 06:12

How do I add default parameters to functions when using type hinting?

If I have a function like this: ``` def foo(name, opts={}): pass ``` And I want to add type hints to the parameters, how do I do it? The way I assumed gives me a syntax error: ``` def foo(name: ...

6 Oct at 13:41

How can I use an http proxy with node.js http.Client?

I want to make an outgoing HTTP call from node.js, using the standard `http.Client`. But I cannot reach the remote server directly from my network and need to go through a proxy. How do I tell node....

5 Oct at 10:32

How to check if element in groovy array/hash/collection/list?

How do I figure out if an array contains an element? I thought there might be something like `[1, 2, 3].includes(1)` which would evaluate as `true`.

4 Apr at 05:24

Context.startForegroundService() did not then call Service.startForeground()

I am using `Service` Class on the Android O OS. I plan to use the `Service` in the background. The [Android documentation](https://developer.android.com/guide/components/services#StartingAService)...

How to create materialized views in SQL Server?

I am going to design a Data Warehouse and I heard about materialized views. Actually I want to create a view and it should update automatically when base tables are changed. Can anyone explain with a ...

Oracle: how to add minutes to a timestamp?

I need to add 30 minutes to values in a Oracle date column. I do this in my SELECT statement by specifying `to_char(date_and_time + (.000694 * 31)` which works fine most of the time. But not when...

10 Feb at 15:24

PowerShell - Start-Process and Cmdline Switches

I can run this fine: ``` $msbuild = "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe" start-process $msbuild -wait ``` But when I run this code (below) I get an error: ``` $msbuild = "C:\WIND...

"Invalid signature file" when attempting to run a .jar

My java program is packaged in a jar file and makes use of an external jar library, [bouncy castle](http://www.bouncycastle.org/). My code compiles fine, but running the jar leads to the following err...

16 Jun at 03:49

What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?

I'm trying to run `npm install` in the angular project folder I got from [ASP.NET Boilerplate](https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template-Angular) and I'm getting an error tha...

How can I scroll to a specific location on the page using jquery?

Is it possible to scroll to a specific location on the page using jQuery? Does the location I want to scroll to have to have: ``` <a name="#123">here</a> ``` Or can it just move to a specific DOM ...

No Multiline Lambda in Python: Why not?

I've heard it said that multiline lambdas can't be added in Python because they would clash syntactically with the other syntax constructs in Python. I was thinking about this on the bus today and re...

5 Aug at 14:0