Questions

How do you get the list of targets in a makefile?

I've used rake a bit (a Ruby make program), and it has an option to get a list of all the available targets, eg ``` > rake --tasks rake db:charset # retrieve the charset for your data... rake db...

6 Jan at 13:22

Making Maven run all tests, even when some fail

I have a project with several modules. When all tests pass, Maven test runs them all. When tests fail in the first module, maven will not continue to the next project. I have testFailureIgnore set to ...

24 Mar at 21:27

How to convert all tables from MyISAM into InnoDB?

I know I can issue an alter table individually to change the table storage from MyISAM to InnoDB. I am wondering if there is a way to quickly change all of them to InnoDB?

15 Jan at 06:35

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. ...

28 Dec at 22:2

Python Create unix timestamp five minutes in the future

I have to create an "Expires" value 5 minutes in the future, but I have to supply it in UNIX Timestamp format. I have this so far, but it seems like a hack. ``` def expires(): '''return a UNIX s...

18 Feb at 19:42

Visual Studio 64 bit?

Is there any 64 bit Visual Studio at all? Why not?

21 Feb at 10:29

Injecting Mockito mocks into a Spring bean

I would like to inject a Mockito mock object into a Spring (3+) bean for the purposes of unit testing with JUnit. My bean dependencies are currently injected by using the `@Autowired` annotation on pr...

jQuery select all except first

In jQuery how do I use a selector to access all but the first of an element? So in the following code only the second and third element would be accessed. I know I can access them manually but there c...

13 Feb at 22:44

What is the PostgreSQL equivalent for ISNULL()

In MS SQL-Server, I can do: `SELECT ISNULL(Field,'Empty') from Table` But in PostgreSQL I get a syntax error. How do I emulate the `ISNULL()` functionality ?

14 Jan at 02:34

Logical operators ("and", "or") in DOS batch

How would you implement logical operators in DOS Batch files?

How to prevent XSS with HTML/PHP?

How do I prevent XSS (cross-site scripting) using just HTML and PHP? I've seen numerous other posts on this topic but I have not found an article that clear and concisely states how to actually preve...

3 Jan at 20:9

How can I use Ruby to colorize the text output to a terminal?

Using Ruby, how can I perform background and foreground text colorization for output in the terminal? I remember, when programming Pascal we all used to write our own `textcolor(…)` procedures to make...

22 Jan at 19:55

"Keep Me Logged In" - the best approach

My web application uses sessions to store information about the user once they've logged in, and to maintain that information as they travel from page to page within the app. In this specific applicat...

27 Jun at 11:16

How to exit from Python without traceback?

I would like to know how to I exit from Python without having an traceback dump on the output. I still want want to be able to return an error code but I do not want to display the traceback log. I...

26 Jan at 20:25

What is the difference between varchar and varchar2 in Oracle?

What is the difference between varchar and varchar2?

2 Sep at 13:14

Creating hard and soft links using PowerShell

Can PowerShell 1.0 create hard and soft links analogous to the Unix variety? If this isn't built in, can someone point me to a site that has a ps1 script that mimics this? This is a necessary funct...

28 May at 22:5

SQL select join: is it possible to prefix all columns as 'prefix.*'?

I'm wondering if this is possible in SQL. Say you have two tables A and B, and you do a select on table A and join on table B: ``` SELECT a.*, b.* FROM TABLE_A a JOIN TABLE_B b USING (some_id); ``` I...

30 Aug at 11:54

When using Spring Security, what is the proper way to obtain current username (i.e. SecurityContext) information in a bean?

I have a Spring MVC web app which uses Spring Security. I want to know the username of the currently logged in user. I'm using the code snippet given below . Is this the accepted way? I don't li...

What’s the best way to reload / refresh an iframe?

I would like to reload an `<iframe>` using JavaScript. The best way I found until now was set the iframe’s `src` attribute to itself, but this isn’t very clean. Any ideas?

31 Aug at 07:33

Best practices for catching and re-throwing .NET exceptions

What are the best practices to consider when catching exceptions and re-throwing them? I want to make sure that the `Exception` object's `InnerException` and stack trace are preserved. Is there a diff...

12 Oct at 09:41

Are PHP Variables passed by value or by reference?

Are PHP variables passed by value or by reference?

Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release

`react-native run-android` command terminates by leaving a message in android simulator. The message is as follows: > Unable to load script.Make sure you are either running a Metro server or that your...

Axios handling errors

I'm trying to understand javascript promises better with Axios. What I pretend is to handle all errors in Request.js and only call the request function from anywhere without having to use `catch()`. ...

22 Apr at 15:45

TypeScript filter out nulls from an array

TypeScript, `--strictNullChecks` mode. Suppose I have an array of nullable strings `(string | null)[]`. What would be a way to remove all nulls in a such a way that the result has type `string[]`? ``...

5 Jul at 12:55

What are passive event listeners?

While working around to boost performance for progressive web apps, I came across a new feature `Passive Event Listeners` and I find it hard to understand the concept. What are `Passive Event Listene...