Questions

Visual Studio 2010 always thinks project is out of date, but nothing has changed

I have a very similar problem as described [here](https://stackoverflow.com/questions/2640339/vs2010-always-relinks-the-project). I also upgraded a mixed solution of C++/CLI and C# projects from Visu...

7 Nov at 17:45

Using Linq to group a list of objects into a new grouped list of list of objects

I don't know if this is possible in Linq but here goes... I have an object: ``` public class User { public int UserID { get; set; } public string UserName { get; set; } public int GroupID { ge...

2 Jan at 21:9

pinpointing "conditional jump or move depends on uninitialized value(s)" valgrind message

So I've been getting some mysterious uninitialized values message from valgrind and it's been quite the mystery as of where the bad value originated from. Seems that valgrind shows the place where th...

10 Apr at 06:41

Finding the direction of scrolling in a UIScrollView?

I have a `UIScrollView` with only horizontal scrolling allowed, and I would like to know which direction (left, right) the user scrolls. What I did was to subclass the `UIScrollView` and override the ...

23 Apr at 06:9

Will Dispose() be called in a using statement with a null object?

Is it safe to use the `using` statement on a (potentially) null object? Consider the following example: ``` class Test { IDisposable GetObject(string name) { // returns null if not found ...

20 Dec at 16:30

How to do an INNER JOIN on multiple columns

I'm working on a homework project and I'm supposed to perform a database query which finds flights either by the city name or the airport code, but the `flights` table only contains the airport codes ...

15 Sep at 02:41

Should enums in C# have their own file?

I have a class which uses an enumeration, the enum is currently in its own file which seems wasteful. What is the general opinion on enums being placed within the namespace of a file that they are co...

8 Dec at 19:27

'typeid' versus 'typeof' in C++

I am wondering what the difference is between `typeid` and `typeof` in C++. Here's what I know: - `typeid` is mentioned in the documentation for [type_info](http://www.cplusplus.com/reference/typein...

30 May at 22:37

Could not load file or assembly 'xxx' or one of its dependencies. An attempt was made to load a program with an incorrect format

I just checked out a revision from Subversion to a new folder. Opened the solution and I get this when run: > Could not load file or assembly 'xxxx' or one of its dependencies. An attempt was made to...

30 May at 15:5

How can I wait for a thread to finish with .NET?

I've never really used threading before in C# where I need to have two threads, as well as the main UI thread. Basically, I have the following. ``` public void StartTheActions() { // Starting thread...

14 Aug at 01:23

Any way to clear python's IDLE window?

I know there's a similar topic about python console, but I do not know if they are the same. I tried system("clear") and it didn't work here. How do I clear python's IDLE window?

19 Apr at 00:42

Return all enumerables with yield return at once; without looping through

I have the following function to get validation errors for a card. My question relates to dealing with GetErrors. Both methods have the same return type `IEnumerable<ErrorInfo>`. ``` private static ...

24 Oct at 16:53

IntelliJ IDEA way of editing multiple lines

I've seen this done in TextMate and I was wondering if there's a way to do it in IDEA. Say I have the following code: ``` leaseLabel = "Lease"; leaseLabelPlural = "Leases"; portfolioLabel = "Portf...

Open a folder using Process.Start

I saw the [other topic](//stackoverflow.com/q/334630) and I'm having another problem. The process is starting (saw at task manager) but the folder is not opening on my screen. What's wrong? ``` Syste...

6 Dec at 19:31

SSH library for Java

Does anyone have an example of an SSH library connection using Java.

5 Feb at 15:24

Git undo changes in some files

While coding I added print statements into some files to keep track of what was going on. When I am done, is it possible to revert changes in some files, but commit the file I actually worked on? S...

11 Jan at 10:48

Insert Update trigger how to determine if insert or update

I need to write an Insert, Update Trigger on table A which will delete all rows from table B whose one column (say Desc) has values like the value inserted/updated in the table A's column (say Col1). ...

12 Apr at 08:9

Using Intent in an Android application to show another activity

In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicked, but I get an error. Here are the classes: ``` public class...

Better techniques for trimming leading zeros in SQL Server?

I've been using [this](https://stackoverflow.com/questions/92093/removing-leading-zeroes-from-a-field-in-a-sql-statement) for some time: ``` SUBSTRING(str_col, PATINDEX('%[^0]%', str_col), LEN(str_co...

How to get the type of a variable in MATLAB

Does MATLAB have a function/operator that indicates the type of a variable (similar to the `typeof` operator in JavaScript)?

28 Mar at 17:15

How to subtract X days from a date using Java calendar?

Anyone know a simple way using Java calendar to subtract X days from a date? I have not been able to find any function which allows me to directly subtract X days from a date in Java. Can someone poi...

8 Oct at 08:30

How do I reset a sequence in Oracle?

In [PostgreSQL](http://en.wikipedia.org/wiki/PostgreSQL), I can do something like this: ``` ALTER SEQUENCE serial RESTART WITH 0; ``` Is there an Oracle equivalent?

25 Aug at 15:48

Algorithm to find Largest prime factor of a number

What is the best approach to calculating the largest prime factor of a number? I'm thinking the most efficient would be the following: 1. Find lowest prime number that divides cleanly 2. Check if r...

9 Sep at 07:10

Errors: Data path ".builders['app-shell']" should have required property 'class'

I am getting this error while running my application. Here are the details of my application. ``` Angular CLI: 7.3.3 Node: 10.15.1 Angular: 7.2.7 @angular-devkit/architect -0.13.3 @angular-devki...

9 Jan at 06:41

Update some specific field of an entity in android Room

I am using android room persistence library for my new project. I want to update some field of table. I have tried like in my `Dao` - ``` // Method 1: @Dao public interface TourDao { @Update ...

24 Oct at 18:20