Use of double underscore in C [closed]

I was studying C programming a modern approach book. I found a question in it:Why is it not a good idea for an identifier to contain more than one adjacent underscore (As in current__balance for example)?Can anyone explain to me why is it s

Qt 4.8.5 Mac Handle file dropping on dock icon

I'm porting some Qt apps to Mac OS. And have some questions because I have no experience in developing apps for Mac OS.Where Applications usually save there settings in Mac OS?How to handle file dropping on icon in dock? 1:Mac OS X appli

Reversing range-based for loop on a custom container class

I'm trying to improve my C++ skills by porting the major examples in Algorithms, 4th Edition by Sedgewick and Wayne. I wrote a generic stack implementation based on their Java example.My stack works fine, but I'd like to make a performance

Sorting a multi-dimensional array in JavaScript using a custom sort function

Sorting multi-dimensional array in JavaScript. Perused other posts, but can't figure out how to pass the array members to the custom sort function, which determines whether to sort a string or numbers.Custom sort function is this:function c

function called multiple times from template

In my template I have something like this:{{formatMyDate(date)}}but date is a scope variable that is not immediately available so this expression will call the function formatMyDate() many times (returning undefined) before returning the co is thrown while restarting Vaadin application

When I restart my Tomcat, I get the following error:2014;10;01; 15;49;47;055; WARN; com.vaadin.event.ListenerMethod;[localhost-startStop-2]; Error in serialization of the application: Class$1 must implement serializati

How do I use AJAX to upload files to ASP.NET?

I am trying to upload files using AJAX to ASP.NET. I have this Javascript:var xhr = new XMLHttpRequest();for (var i = 0; i files.length; i++) {'post', '/File/Upload', true); xhr.setRequestHeader(Content-Type, multipart/form-

How do you abort on shell command errors in makefiles?

I'm trying to write a makefile to package up some PHP scripts. I would also like it to check for syntax errors (using the built in php lint tool) before building the final zip file, to prevent any accidental errors slipping in.So far I have

having cv2.imread reading images from file objects or memory-stream-like data (here non-extracted ta

I have a .tar file containing several hundreds of pictures (.png). I need to process them via opencv. I am wondering whether - for efficiency reasons - it is possible to process them without passing by the disc. In other, words I want to re

How can I save TKinter PhotoImage to .GIF?

Can I save a tkinter PhotoImage as .gif (or any other image extension) using only Python and tkinter? 1:Assuming photo is the variable holding your image, you should be able to just say:photo.write('some_name.gif', format='gif')I couldn'

Can not send mail through PHPMailer

This is my php coderequire(class.phpmailer.php);$mail = new PHPMailer();$mail-IsSMTP(); // telling the class to use SMTP$mail-Host =; // SMTP server$mail-From =;$mail-AddAddress(

git clone. How to clone local repo by hardlinks?

I have a local git repository. I want to clone it on the local machine by hardlinked files to save disk space. How can I do it? 1:a Git repository is made, by simplification, of 3 kind of files:Database-like objects ($GIT_DIR/objects): T

Cyrillic symbols in Eclipse

I am writing a Java program with a GUI that will have Cyrillic text in some labels. When I create label JLabel lbl = new JLabel(Име на обект); everything is fine and when my program starts it is also properly displayed. But I changed the P

How can I prevent tinyMCE's paste event?

I need to prevent the paste event of tinyMCE if the length of the current content of editor plus the length of the words to be pasted exceed the specified limit. How can I do it? Thank you. 1:I was wrong. I dont need to prevent or disabl

Error building libxmljs for node.js

I'm having a problems building libxmljs on my mac os x 10.9.3.Here's what I'm getting:3 warnings generated. CC(target) Release/ LIBTOOL-STATIC Release/xml.alibtool: unrecognized option `-static'li

ConnectivityManager is crashing while getting network info

I am new to android and when i give the following snippet, my android application is crashing. ConnectivityManager manager= (ConnectivityManager)this.getSystemService(Context.CONNECTIVITY_SERVICE); manager.getNetworkInfo(ConnectivityM

R ggplot2 Using Italics and Non-Italics in the Same Category Label

For my ggplot figure, I want to label categories on a barplot with the first word being italicized, while the following words are non-italicized. I want the category labels to look like follows:Staphylococcacae (OTU 1)Streptococcus (OTU 300

404 error for mod_rewrite using SSL and MAMP

I am building an app in Zend Framework at the moment and testing it all locally. I have Mamp Pro as my web server and I have a self-signed SSL which all seems to work. My problem comes when I try to do mod_rewrite - I just get 404 pages.The

How to read html table in c# [closed]

table id=mytable runat=server thead tr td /td td Minute /td td

Sort each row in a dataframe by value of column

Say I have a dataframe like this:Date A B C D E H1/28/2013 56 51 35 44 08 18 1/25/2013 38 56 28 39 23 32 1/21/2013 36 51 45 25 40 08what I want to do is sort each row's ABCDE column by their values. So I

Writing full contents of Pandas dataframe to HTML table

I am embedding links in one column of a Pandas dataframe (table, below) and writing the dataframe to hmtl.Links in the dataframe table are formatted as shown (indexing first link in table):In: table.loc[0,'Links']Out: u'a href=http://xxx.x

How can I identify a WinRAR SFX using a binary signature of some sort?

I'm looking for an answer similar to the one in this question, but for WinRAR instead of 7zip. Essentially I want an authoritative signature that I can say at least All WinRAR generated self-extracting executables created with the Default

How to Reload DataGridView using DataTable.Load(DataReader) without duplicate records

Can anyone help me on how to avoid getting duplicated output on DataGridView. Here is the image Before change and the image After add/edit or delete.Here is the loader for my DataGridView:private DataTable data(){ using (OleDbConnection

Pentaho CDE Bar chart display

I am trying to display a simple static Bar Chart in pentaho CDE but while previewing it i am not getting any result.I am using Pentaho console chart component panel detailsI checked the Query result in mysq

What is the difference between mysqli_affected_rows and mysqli_num_rows?

The PHP docs for mysqli_num_rows says Returns the number of rows in the result set.The PHP docs for mysqli_affected_rows says Returns the number of rows affected by the last INSERT, UPDATE, REPLACE or DELETE query._num_rows is called on a