Questions

T-SQL: Selecting rows to delete via joins

Scenario: Let's say I have two tables, TableA and TableB. TableB's primary key is a single column (BId), and is a foreign key column in TableA. In my situation, I want to remove all rows in TableA ...

24 Mar at 20:46

How do I center an SVG in a div?

I have an SVG that I am trying to center in a div. The div has a width of 900px. The SVG has a width of 400px. The SVG has its margin-left and margin-right set to auto. Doesn't work, it just acts as i...

29 May at 11:24

CSS Div stretch 100% page height

I have a navigation bar on the left hand side of my page, and I want it to stretch to 100% of the page height. Not just the height of the viewport, but including the areas hidden until you scroll. I d...

3 Apr at 05:50

How to get back to the latest commit after checking out a previous commit?

I sometimes check out some previous version of the code to examine or test. I have seen instructions on what to do if I wish to modify previous commits -- but suppose I make no changes. After I've d...

31 May at 15:55

Detect changes in the DOM

I want to execute a function when some div or input are added to the html. Is this possible? For example, a text input is added, then the function should be called.

How can I suppress all output from a command using Bash?

I have a Bash script that runs a program with parameters. That program outputs some status (doing this, doing that...). There isn't any option for this program to be quiet. How can I prevent the scri...

21 Feb at 19:50

Android global variable

How can I create global variable keep remain values around the life cycle of the application regardless which activity running.

7 Jun at 09:19

How to convert string to boolean php

How can I convert string to `boolean`? ``` $string = 'false'; $test_mode_mail = settype($string, 'boolean'); var_dump($test_mode_mail); if($test_mode_mail) echo 'test mode is on.'; ``` it return...

20 Jan at 15:27

How to bind a List to a ComboBox?

I want to connect a `BindingSource` to a list of class objects and then objects value to a ComboBox. Can anyone suggest how to do it? ``` public class Country { public string Name { get; set; } ...

14 Dec at 00:59

How to create User/Database in script for Docker Postgres

I have been trying to set up a container for a development postgres instance by creating a custom user & database. I am using the [official postgres docker image](https://registry.hub.docker.com/_/pos...

13 Feb at 04:52

A generic list of anonymous class

In C# 3.0 you can create anonymous class with the following syntax ``` var o = new { Id = 1, Name = "Foo" }; ``` Is there a way to add these anonymous class to a generic list? Example: ``` var o ...

6 Sep at 20:39

Replace part of a string with another string

How do I replace part of a string with another string using the ? ``` QString s("hello $name"); // Example using Qt. s.replace("$name", "Somename"); ```

4 Jul at 20:52

Generating an MD5 checksum of a file

Is there any simple way of generating (and checking) MD5 checksums of a list of files in Python? (I have a small program I'm working on, and I'd like to confirm the checksums of the files).

13 Apr at 02:52

create a white rgba / CSS3

I'm customizing a plugin that uses css3's rgba throughout, I'm trying to figure out how to toggle it for it to render white with the opacity. At default it's near the shade of `#333`, and my attempts ...

29 Jun at 21:49

Removing numbers from string

How can I remove digits from a string?

10 Oct at 04:16

Why `PagerAdapter::notifyDataSetChanged` is not updating the View?

I'm using the ViewPager from the compatibility library. I have succussfully got it displaying several views which I can page through. However, I'm having a hard time figuring out how to update the Vi...

Right align text in android TextView

I have a `TextView` in my application. I want to align the text in it to the right. I tried adding: ``` android:gravity="right" ``` But this doesn't work for me. What might I be doing wrong?

23 Feb at 14:14

Tracking CPU and Memory usage per process

I suspect that one of my applications eats more CPU cycles than I want it to. The problem is - it happens in bursts, and just looking at the task manager doesn't help me as it shows immediate usage on...

1 Jun at 17:56

Unable to login to SQL Server + SQL Server Authentication + Error: 18456

I have created login account on my localhost\sql2008 Server (Eg. User123) Mapped to Database (default) Authentication Mode on SQL Server is set to both (Windows and SQL) But login to SQL Server fai...

4 Jan at 06:41

How to get the seconds since epoch from the time + date output of gmtime()?

How do you do reverse `gmtime()`, where you put the time + date and get the number of seconds? I have strings like `'Jul 9, 2009 @ 20:02:58 UTC'`, and I want to get back the number of seconds between...

14 Jan at 03:41

How do I pass a class as a parameter in Java?

Is there any way to pass class as a parameter in Java and fire some methods from that class? ``` void main() { callClass(that.class) } void callClass(???? classObject) { classObject.somefunc...

29 Oct at 15:58

Visual Studio "Could not copy" .... during build

I keep getting this error during the build of my VS2012 C# project ``` Error 41 Could not copy "obj\Debug\WeinGartner.WeinCad.exe" to "bin\Debug\WeinGartner.WeinCad.exe". Exceeded retry count o...

1 Jul at 19:17

how to use ng-option to set default value of select element

I've seen the documentation of the Angular select directive here: [http://docs.angularjs.org/api/ng.directive:select](http://docs.angularjs.org/api/ng.directive:select). I can't figure how to set the...

19 Sep at 13:10

How do you create a dropdownlist from an enum in ASP.NET MVC?

I'm trying to use the `Html.DropDownList` extension method but can't figure out how to use it with an enumeration. Let's say I have an enumeration like this: ``` public enum ItemTypes { Movie = ...

27 Feb at 10:26

Why isn't my Pandas 'apply' function referencing multiple columns working?

I have some problems with the Pandas apply function, when using multiple columns with the following dataframe ``` df = DataFrame ({'a' : np.random.randn(6), 'b' : ['foo', 'bar'] * 3,...