Questions

Combining "LIKE" and "IN" for SQL Server

Is it possible to combine `LIKE` and `IN` in a SQL Server-Query? So, that this query ``` SELECT * FROM table WHERE column LIKE IN ('Text%', 'Link%', 'Hello%', '%World%') ``` Finds any of these pos...

12 Jan at 16:15

Check whether a request is GET or POST

> [PHP detecting request type (GET, POST, PUT or DELETE)](https://stackoverflow.com/questions/359047/php-detecting-request-type-get-post-put-or-delete) This should be an easy one. I have a sc...

23 May at 12:26

How do I see active SQL Server connections?

I am using SQL Server 2008 Enterprise. I want to see any active SQL Server connections, and the related information of all the connections, like from which IP address, connect to which database or som...

21 Jan at 21:33

How do I clone a range of array elements to a new array?

I have an array X of 10 elements. I would like to create a new array containing all the elements from X that begin at index 3 and ends in index 7. Sure I can easily write a loop that will do it for me...

8 Jul at 22:56

Set object property using reflection

Is there a way in C# where I can use reflection to set an object property? Ex: ``` MyObject obj = new MyObject(); obj.Name = "Value"; ``` I want to set `obj.Name` with reflection. Something like: ...

27 Mar at 13:25

Submitting a form by pressing enter without a submit button

Well I am trying to submit a form by pressing enter but not displaying a submit button. I don't want to get into JavaScript if possible since I want everything to work on all browsers (the only JS way...

14 Jun at 20:5

Ignore python multiple return value

Say I have a Python function that returns multiple values in a tuple: ``` def func(): return 1, 2 ``` Is there a nice way to ignore one of the results rather than just assigning to a temporary ...

10 Jan at 22:12

What is the difference between a static and a non-static initialization code block

My question is about one particular usage of static keyword. It is possible to use `static` keyword to cover a code block within a class which does not belong to any function. For example following co...

2 Nov at 13:10

How to convert date to timestamp in PHP?

How do I get timestamp from e.g. `22-09-2008`?

4 Aug at 15:32

AngularJS ui-router login authentication

I am new to AngularJS, and I am a little confused of how I can use angular-"ui-router" in the following scenario: I am building a web application which consists of two sections. The first section is ...

Show and hide a View with a slide up/down animation

I have a `LinearLayout` that I want to show or hide with an `Animation` that pushes the layout upwards or downwards whenever I change its visibility. I've seen a few samples out there but none of the...

21 Aug at 08:36

How can I search for a commit message on GitHub?

Not [in a Git repository](https://stackoverflow.com/questions/7124914/how-to-search-a-git-repository-by-commit-message), but rather in [GitHub](http://github.com/) specifically - how do I search just ...

16 May at 12:28

Display current path in terminal only

I'm SSH'd into a computer, so I can't use a GUI to access the path name. Is there a way that you can see the path directly on terminal without having to use Nautilus?

8 Apr at 15:8

JavaScript sleep/wait before continuing

I have a JavaScript code that I need to add a sleep/wait function to. The code I am running is already in a function, eg: ``` function myFunction(time) { alert('time starts now'); //code to m...

1 Aug at 20:52

Connect to Amazon EC2 file directory using Filezilla and SFTP

I have created an AWS EC2 Instance and I want to be able to upload files to the server directory using FileZilla in the simplest and most straightforward fashion possible.

Keep only date part when using pandas.to_datetime

I use `pandas.to_datetime` to parse the dates in my data. Pandas by default represents the dates with `datetime64[ns]` even though the dates are all daily only. I wonder whether there is an elegant/cl...

22 Oct at 16:12

Pass variables by reference in JavaScript

How do I pass variables by reference in JavaScript? I have three variables that I want to perform several operations to, so I want to put them in a for loop and perform the operations to each one. Pse...

Find object in list that has attribute equal to some value (that meets any condition)

I've got a list of objects. I want to find one (first or whatever) object in this list that has an attribute (or method result - whatever) equal to `value`. What's the best way to find it? Here's a te...

10 Apr at 08:37

How do I fetch only one branch of a remote Git repository?

I'd like to grab a single branch (not all of them) of a remote repository and create a local tracking branch that can track further updates to that remote branch. The other branches in the remote rep...

3 Aug at 21:23

Reset auto increment counter in postgres

I would like to force the auto increment field of a table to some value, I tried with this: ``` ALTER TABLE product AUTO_INCREMENT = 1453 ``` AND ``` ALTER SEQUENCE product RESTART WITH 1453; ERROR:...

29 Dec at 00:48

Convert SVG to image (JPEG, PNG, etc.) in the browser

I want to convert SVG into bitmap images (like JPEG, PNG, etc.) through JavaScript.

17 Nov at 02:0

How do I make a Git commit in the past?

I'm converting everything over to Git for my own personal use and I found some old versions of a file already in the repository. How do I commit it to the history in the correct order according the f...

How can I output only captured groups with sed?

Is there a way to tell `sed` to output only captured groups? For example, given the input: ``` This is a sample 123 text and some 987 numbers ``` And pattern: ``` /([\d]+)/ ``` Could I get only 123 ...

19 Apr at 15:58

Reduce git repository size

I tried looking for a good tutorial on reducing repo size, but found none. How do I reduce my repo size...it's about 10 MB, but the thing is Heroku only allows 50 MB and I'm no where near finished dev...

15 Nov at 12:55

Is there a way to make mv create the directory to be moved to if it doesn't exist?

So, if I'm in my home directory and I want to move foo.c to ~/bar/baz/foo.c , but those directories don't exist, is there some way to have those directories automatically created, so that you would on...

13 Feb at 21:15