"Too many values to unpack" Exception
I'm working on a project in Django and I've just started trying to extend the User model in order to make user profiles. Unfortunately, I've run into a problem: Every time I try to get the user's pr...
round() for float in C++
I need a simple floating point rounding function, thus: ``` double round(double); round(0.1) = 0 round(-0.1) = 0 round(-0.9) = -1 ``` I can find `ceil()` and `floor()` in the math.h - but not `ro...
- Modified
- 16 Mar at 01:55
What is the maximum characters for the NVARCHAR(MAX)?
I have declared a column of type `NVARCHAR(MAX)` in SQL Server 2008, what would be its exact maximum characters having the MAX as the length?
- Modified
- 21 Jun at 05:30
End of File (EOF) in C
I am currently reading the book C Programming Language by Ritchie & Kernighan. And I am pretty confused about the usage of EOF in the `getchar()` function. First, I want to know why the value of EOF...
Can we pass parameters to a view in SQL?
Can we pass a parameter to a view in Microsoft SQL Server? I tried to `create view` in the following way, but it doesn't work: ``` create or replace view v_emp(eno number) as select * from emp whe...
- Modified
- 25 Dec at 07:59
How to remove an HTML element using Javascript?
I am a total newbie. Can somebody tell me how to remove an HTML element using the original Javascript not jQuery. `index.html` ``` <html> <head> <script type="text/javascript" src="myscripts.js" > ...
- Modified
- 16 Nov at 14:24
How to restore to a different database in SQL Server?
I have a backup of from a week ago. The backup is done weekly in the scheduler and I get a `.bak` file. Now I want to fiddle with some data so I need to restore it to a different database - . I have...
- Modified
- 24 Nov at 14:14
lvalue required as left operand of assignment
Why am I getting ``` lvalue required as left operand of assignment ``` with a single string comparison? How can I fix this in `C`? ``` if (strcmp("hello", "hello") = 0) ``` Thanks!
Ajax request returns 200 OK, but an error event is fired instead of success
I have implemented an Ajax request on my website, and I am calling the endpoint from a webpage. It always returns , but executes the error event. I tried a lot of things, but I could not figure out t...
- Modified
- 17 Apr at 18:36
How to gzip all files in all sub-directories into one compressed file in bash
> [gzipping up a set of directories and creating a tar compressed file](https://stackoverflow.com/questions/3341131/gzipping-up-a-set-of-directories-and-creating-a-tar-compressed-file) [This p...
How to write log file in c#?
How would I write a log file in c#? Currently i have a timer with this statement which ticks every 20 secs: ``` File.WriteAllText(filePath+"log.txt", log); ``` For everything that i want logged i ...
How to use DISTINCT and ORDER BY in same SELECT statement?
After executing the following statement: ``` SELECT Category FROM MonitoringJob ORDER BY CreationDate DESC ``` I am getting the following values from the database: ``` test3 test3 bildung test4 ...
- Modified
- 18 Jul at 00:39
Android screen size HDPI, LDPI, MDPI
I have a background that I need fit in all screen sizes. I have three folders, `hdpi`, `ldpi` and `mdpi` for drawables, but in the emulator there isn't any referense to what resolution `hdpi` is and ...
Change Bootstrap tooltip color
What I'm trying to do is change the color to red. However, I also want to have multiple other colors so I don't simply want to replace the original tooltip's color. How would I go about doing this? ...
- Modified
- 19 Oct at 17:4
How to get docker-compose to always re-create containers from fresh images?
My docker images are built on a Jenkins CI server and are pushed to our private Docker Registry. My goal is to provision environments with docker-compose which always start the originally built state ...
- Modified
- 6 Feb at 22:14
"The Controls collection cannot be modified because the control contains code blocks"
I am trying to create a simple user control that is a slider. When I add a AjaxToolkit SliderExtender to the user control I get this (*&$#()@# error: ``` Server Error in '/' Application. The Control...
- Modified
- 27 Nov at 19:51
clearing a char array c
I thought by setting the first element to a null would clear the entire contents of a char array. ``` char my_custom_data[40] = "Hello!"; my_custom_data[0] = '\0'; ``` However, this only sets the f...
How do I run git log to see changes only for a specific branch?
I have a local branch tracking the remote/master branch. After running `git-pull` and `git-log`, the log will show all commits in the remote tracking branch as well as the current branch. However, bec...
- Modified
- 24 Jul at 11:34
How to change the Eclipse default workspace?
Where can I change the default workspace in Eclipse?
- Modified
- 8 Feb at 14:4
How to get the path of the batch script in Windows?
I know that `%0` contains the full path of the batch script, e.g. `c:\path\to\my\file\abc.bat` I would `path` to be equal to `c:\path\to\my\file` How could I achieve that ?
- Modified
- 7 Mar at 09:40
How can I select item with class within a DIV?
I have the following HTML: ``` <div id="mydiv"> <div class="myclass"></div> </div> ``` I want to be able to use a selector that selects the inside `div`, but specific for the `mydiv` container. H...
- Modified
- 21 Aug at 17:23
how to display employee names starting with a and then b in sql
i want to display the employee names which having names start with a and b ,it should be like list will display employees with 'a' as a first letter and then the 'b' as a first letter... so any bod...
- Modified
- 17 Sep at 22:6
How to use jQuery to select a dropdown option?
I was wondering if it’s possible to get jQuery to select an `<option>`, say the 4th item, in a dropdown box? ``` <select> <option></option> <option></option> <option></option> <option...
- Modified
- 29 Aug at 10:59
How to find the users list in oracle 11g db?
How to find out the users list, which is all created in the `oracle 11g` database. Is there any `command` to find out the users list which we can execute from the Command line interface!
How can building a heap be O(n) time complexity?
Can someone help explain how can building a heap be complexity? Inserting an item into a heap is , and the insert is repeated n/2 times (the remainder are leaves, and can't violate the heap property)...
- Modified
- 30 Apr at 15:34