How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
Can anyone explain how to implement one-to-one, one-to-many and many-to-many relationships while designing tables with some examples?
- Modified
- 28 Jan at 22:4
Custom CSS Scrollbar for Firefox
I want to customize a scrollbar with CSS. I use this WebKit CSS code, which works well for Safari and Chrome: ``` ::-webkit-scrollbar { width: 15px; height: 15px; } ::-webkit-scrollbar-track-piec...
How can I change the thickness of my <hr> tag
I want to change the thickness of my horizontal rule (`<hr>`)in CSS. I know it can be done in HTML like so - ``` <hr size="10"> ``` But I hear that this is [deprecated](https://www.w3.org/TR/html4...
- Modified
- 15 Jul at 06:18
Total memory used by Python process?
Is there a way for a Python program to determine how much memory it's currently using? I've seen discussions about memory usage for a single object, but what I need is total memory usage for the proce...
- Modified
- 28 Aug at 15:16
Use of Finalize/Dispose method in C#
C# 2008 I have been working on this for a while now, and I am still confused about the use of finalize and dispose methods in code. My questions are below: 1. I know that we only need a finalizer w...
- Modified
- 25 Nov at 14:42
Is "else if" faster than "switch() case"?
I'm an ex Pascal guy, currently learning C#. My question is the following: Is the code below faster than making a switch? ``` int a = 5; if (a == 1) { .... } else if(a == 2) { .... } else i...
- Modified
- 2 Feb at 13:31
Why is super.super.method(); not allowed in Java?
I read [this question](https://stackoverflow.com/questions/580984/how-do-you-get-the-object-reference-of-an-object-in-java-when-tostring-and-hash) and thought that would easily be solved (not that it ...
- Modified
- 23 May at 12:10
Casting vs using the 'as' keyword in the CLR
When programming interfaces, I've found I'm doing a lot of casting or object type conversion. Is there a difference between these two methods of conversion? If so, is there a cost difference or how ...
Test if object implements interface
What is the simplest way of testing if an object implements a given interface in C#? (Answer to this question [in Java](https://stackoverflow.com/questions/766106/test-if-object-implements-interface)...
- Modified
- 23 May at 12:3
Why can't I have "public static const string S = "stuff"; in my Class?
When trying to compile my class I get an error: > The constant `'NamespaceName.ClassName.CONST_NAME'` cannot be marked static. at the line: ``` public static const string CONST_NAME = "blah"; ```...
What is the lifetime of a static variable in a C++ function?
If a variable is declared as `static` in a function's scope it is only initialized once and retains its value between function calls. What exactly is its lifetime? When do its constructor and destruct...
When do I use the PHP constant "PHP_EOL"?
When is it a good idea to use [PHP_EOL](http://us3.php.net/manual/en/reserved.constants.php)? I sometimes see this in code samples of PHP. Does this handle DOS/Mac/Unix endline issues?
time.sleep -- sleeps thread or process?
In Python for *nix, does `time.sleep()` block the thread or the process?
- Modified
- 25 Jan at 03:20
How to determine if .NET Core is installed
I know that for older versions of .NET, you can determine if a given version is installed by following ``` https://support.microsoft.com/en-us/kb/318785 ``` Is there an official method of determin...
- Modified
- 31 Jan at 13:24
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...
- Modified
- 1 Jul at 19:17
pandas: filter rows of DataFrame with operator chaining
Most operations in `pandas` can be accomplished with operator chaining (`groupby`, `aggregate`, `apply`, etc), but the only way I've found to filter rows is via normal bracket indexing ``` df_filtere...
How do I get the last four characters from a string in C#?
Suppose I have a string: ``` "34234234d124" ``` I want to get the last four characters of this string which is `"d124"`. I can use `SubString`, but it needs a couple of lines of code, including nam...
Printing all global variables/local variables?
How can I print all global variables/local variables? Is that possible in gdb?
- Modified
- 31 Jul at 00:44
Convert boolean to int in Java
What is the most accepted way to convert a `boolean` to an `int` in Java?
I want my android application to be only run in portrait mode?
I want my android application to be only run in portrait mode? How can I do that?
- Modified
- 27 Nov at 17:20
What is the difference between the HashMap and Map objects in Java?
What is the difference between the following maps I create (in another question, people answered using them seemingly interchangeably and I'm wondering if/how they are different): ``` HashMap<String,...
- Modified
- 5 Jan at 09:50
How to get the file name from a full path using JavaScript?
Is there a way that I can get the last value (based on the '\' symbol) from a full path? Example: `C:\Documents and Settings\img\recycled log.jpg` With this case, I just want to get `recycled log.j...
- Modified
- 25 Jan at 15:34
What can I use for good quality code coverage for C#/.NET?
I wonder what options there are for .NET (or C# specifically) code coverage, especially in the lower priced segment? I am not looking for recommendations, but for a comparison of products based on fa...
- Modified
- 30 Apr at 03:16
Best database field type for a URL
I need to store a url in a MySQL table. What's the best practice for defining a field that will hold a URL with an undetermined length?