Questions

Find last used cell in Excel VBA

When I want to find the last used cell value, I use: ``` Dim LastRow As Long LastRow = Range("E4:E48").End(xlDown).Row Debug.Print LastRow ``` I'm getting the wrong output when I put a single eleme...

27 Jul at 11:23

An attempt was made to access a socket in a way forbidden by its access permissions. Why?

``` private void StartReceivingData(string ipAddress, int iPort) { try { if (!_bContinueReciving) { //initializeMainSocket(ipAddress, iPort)...

4 Aug at 15:33

How to print the ld(linker) search path

What is the way to print the search paths that in looked by in the order it searches.

29 Mar at 19:7

css rotate a pseudo :after or :before content:""

anyway to make a rotation work on the pseudo ``` content:"\24B6"? ``` I'm trying to rotate a unicode symbol.

21 Mar at 16:2

Disable scrolling on `<input type=number>`

Is it possible to disable the scroll wheel changing the number in an input number field? I've messed with webkit-specific CSS to remove the spinner but I'd like to get rid of this behavior altogether....

30 Jan at 17:26

Storyboard doesn't contain a view controller with identifier

I keep getting the following error: ``` Storyboard (<UIStoryboard: 0x7ebdd20>) doesn't contain a view controller with identifier 'drivingDetails' ``` This is the code: ``` - (void)tableView:(UITab...

8 Dec at 22:4

Format of the initialization string does not conform to specification starting at index 0

I have an ASP.NET application which runs fine on my local development machine. When I run this application online, it shows the following error: > Format of the initialization string does not conform ...

3 Sep at 21:7

Reset CSS display property to default value

Is it possible to override the display property with its default value? For example if I have set it to none in one style, and I want to override it in a different with its default. Or is the only wa...

22 Nov at 15:6

Choose newline character in Notepad++

I notice that when I load a text file, Notepad++ will recognize and use whatever the newline character in that file is, `\n` or `\r\n`. Is there some option where I can select which to use by default ...

9 Sep at 15:37

Using member variable in lambda capture list inside a member function

The following code compiles with gcc 4.5.1 but not with VS2010 SP1: ``` #include <iostream> #include <vector> #include <map> #include <utility> #include <set> #include <algorithm> using namespace st...

25 Oct at 21:5

Why does Git treat this text file as a binary file?

I wonder why git tells me this? ``` $ git diff MyFile.txt diff --git a/MyFile.txt b/MyFile.txt index d41a4f3..15dcfa2 100644 Binary files a/MyFile.txt and b/MyFile.txt differ ``` Aren't they text fil...

19 Nov at 14:52

Get the (last part of) current directory name in C#

I need to get the last part of current directory, for example from `/Users/smcho/filegen_from_directory/AIRPassthrough`, I need to get `AIRPassthrough`. With python, I can get it with this code. `...

27 Mar at 11:47

Extending from two classes

How can I do this: ``` public class Main extends ListActivity , ControlMenu ``` Also, I would like to know that is this approach is okay that I have made the menus in class which is ControlMenu and...

23 Jun at 16:42

How to detect the device orientation using CSS media queries?

In JavaScript the orientation mode can be detected using: ``` if (window.innerHeight > window.innerWidth) { portrait = true; } else { portrait = false; } ``` However, is there a way to dete...

15 Feb at 10:25

How do I change column default value in PostgreSQL?

How do I change column default value in PostgreSQL? I've tried: ``` ALTER TABLE ONLY users ALTER COLUMN lang DEFAULT 'en_GB'; ``` But it gave me an error: ``` ERROR: syntax error at or near "DEF...

20 Jan at 09:4

How to reset sequence in postgres and fill id column with new data?

I have a table with over million rows. I need to reset sequence and reassign id column with new values (1, 2, 3, 4... etc...). Is any easy way to do that?

13 Jan at 08:37

Converting an int to std::string

What is the shortest way, preferably inline-able, to convert an int to a string? Answers using stl and boost will be welcomed.

12 Jan at 12:26

memcpy() vs memmove()

I am trying to understand the difference between [memcpy()](http://en.cppreference.com/w/c/string/byte/memcpy) and [memmove()](http://en.cppreference.com/w/c/string/byte/memmove), and I have read the ...

15 Jan at 22:36

How to create composite primary key in SQL Server 2008

I want to create tables in SQL Server 2008, but I don't know how to create composite primary key. How can I achieve this?

30 Jun at 18:24

The Role Manager feature has not been enabled

Got the following [ProviderException](https://msdn.microsoft.com/en-us/library/system.configuration.provider.providerexception(v=vs.110).aspx) : > The Role Manager feature has not been enabled. So ...

17 Dec at 12:1

Android: How can I get the current foreground activity (from a service)?

Is there a native android way to get a reference to the currently running Activity from a service? I have a service running on the background, and I would like to update my current Activity when an e...

6 Oct at 14:51

Checking for NULL pointer in C/C++

In a recent code review, a contributor is trying to enforce that all `NULL` checks on pointers be performed in the following manner: ``` int * some_ptr; // ... if (some_ptr == NULL) { // Handle n...

4 May at 16:50

How can I use optional parameters in a T-SQL stored procedure?

I am creating a stored procedure to do a search through a table. I have many different search fields, all of which are optional. Is there a way to create a stored procedure that will handle this? L...

How do I iterate through the files in a directory and it's sub-directories in Java?

I need to get a list of all the files in a directory, including files in all the sub-directories. What is the standard way to accomplish directory iteration with Java?

6 Dec at 11:1

How do I fix the "You don't have write permissions into the /usr/bin directory" error when installing Rails?

I'm trying to install Rails 3 on a brand new MacBook Pro running OS X 10.6.3, Ruby 1.8.7, and Rails 2.3.5 and I'm wondering if I've hosed myself. So far, I've run these commands: ``` $ gem update --...

18 Nov at 18:42