Questions

Pandas convert dataframe to array of tuples

I have manipulated some data using pandas and now I want to carry out a batch save back to the database. This requires me to convert the dataframe into an array of tuples, with each tuple correspondin...

4 Jan at 21:49

CSV in Python adding an extra carriage return, on Windows

``` import csv with open('test.csv', 'w') as outfile: writer = csv.writer(outfile, delimiter=',', quoting=csv.QUOTE_MINIMAL) writer.writerow(['hi', 'dude']) writer.writerow(['hi2', 'dude2...

13 Mar at 13:3

MySQL maximum memory usage

I would like to know how it is possible to set an upper limit on the amount of memory MySQL uses on a Linux server. Right now, MySQL will keep taking up memory with every new query requested so that...

15 Jan at 08:7

Invalid length for a Base-64 char array

As the title says, I am getting: > Invalid length for a Base-64 char array. I have read about this problem on here and it seems that the suggestion is to store ViewState in SQL if it is large. I...

20 Jan at 17:46

Missing Microsoft RDLC Report Designer in Visual Studio

In Visual Studio 2015, I cannot find the designer for reports anymore. Does anyone know if this is only a bug and if it is provided later on or if Microsoft wants to kill the RDLC or if they want us ...

Convert dictionary to list collection in C#

I have a problem when trying to convert a dictionary to list. Example if I have a dictionary with template string as key and string as value. Then I wish to convert the dictionary key to list collect...

11 Mar at 13:42

Finding the id of a parent div using Jquery

I have some html like this: ``` <div id="1"> <p> Volume = <input type="text" /> <button rel="3.93e-6" class="1" type="button">Check answer</button> </p> <div></div> </div>...

13 Feb at 13:46

TNS-12505: TNS:listener does not currently know of SID given in connect descriptor

I'm trying to connect to Oracle 10.2.0 from NetBeans, using the following connection string: ``` jdbc:oracle:thin:@localhost:1521:XE ``` The weirdest part is that everything worked fine, until the ...

10 Sep at 18:37

jQuery - disable selected options

Need to disable already selected options in select box using jQuery. I'd like it to grey out like [asmselect](http://www.ryancramer.com/projects/asmselect/examples/example1.html). Test my example [he...

3 Mar at 02:48

Does bootstrap have builtin padding and margin classes?

Does Bootstrap have built-in padding and margin classes like `pad-10`, `mar-left-10` or I have to add my own custom classes? For example, similar to the ones [here](http://seantheme.com/color-admin-v1...

9 Feb at 17:10

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

How to iterate std::set?

I have this code: ``` std::set<unsigned long>::iterator it; for (it = SERVER_IPS.begin(); it != SERVER_IPS.end(); ++it) { u_long f = it; // error here } ``` There is no `->first` value. How I c...

21 Apr at 16:40

SQL WHERE condition is not equal to?

Is it possible to negate a where clause? e.g. ``` DELETE * FROM table WHERE id != 2; ```

15 Nov at 05:33

How do you create a Distinct query in HQL

Is there a way to create a Distinct query in HQL. Either by using the "distinct" keyword or some other method. I am not sure if distinct is a valid keywork for HQL, but I am looking for the HQL equi...

4 Nov at 23:17

Why aren't programs written in Assembly more often?

It seems to be a mainstream opinion that assembly programming takes longer and is more difficult to program in than a higher level language such as C. Therefore it seems to be recommend or assumed tha...

1 May at 04:9

How to read single Excel cell value

I have excel file with sheet1 that has a value I need to read on row 2 and column 10. Here is my code. ``` Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", f...

24 Sep at 23:57

How do I pass multiple parameters in Objective-C?

I have read several of the post about Objective-C method syntax but I guess I don't understand multiple names for a method. I'm trying to create a method called `getBusStops` with `NSString` and `NST...

Using HeapDumpOnOutOfMemoryError parameter for heap dump for JBoss

I was told I can add the `-XX:+HeapDumpOnOutOfMemoryError` parameter to my JVM start up options to my JBoss start up script to get a heap dump when we get an out of memory error in our application. I...

13 Jun at 21:25

ASP.NET DateTime Picker

is there any good free/open source time picker control that goes well with ASP.NET Calendar control?

7 Oct at 10:48

Among $_REQUEST, $_GET and $_POST which one is the fastest?

Which of these code will be faster? ``` $temp = $_REQUEST['s']; ``` or ``` if (isset($_GET['s'])) { $temp = $_GET['s']; } else { $temp = $_POST['s']; } ```

10 Jan at 17:41

How to break out of a loop in Bash?

I want to write a Bash script to process text, which might require a while loop. For example, a while loop in C: ``` int done = 0; while(1) { ... if(done) break; } ``` I want to write a Bash ...

18 Sep at 03:53

log4j logging hierarchy order

What is the hierarchy of log4j logging? ``` DEBUG INFO WARN ERROR FATAL ``` Which one provides the highest logging which would be helpful to troubleshoot issues? Can any one provide the order or hi...

12 Oct at 20:6

Can I override and overload static methods in Java?

I'd like to know: 1. Why can't static methods be overridden in Java? 2. Can static methods be overloaded in Java?

20 Aug at 13:30

Powershell: Get FQDN Hostname

I want to retrieve the FQDN name of windows server via powershell script. I have found 2 solution so far: ``` $server = Invoke-Command -ScriptBlock {hostname} ``` Above line will print just the sh...

10 Nov at 04:13

Format numbers in thousands (K) in Excel

In MS Excel, I would like to format a number in order to show only thousands and with 'K' in from of it, so the number 123000 will be displayed in the cell as It is easy to format to show only thous...

12 Feb at 03:12