Is there any reliable and simple priority queue (linked list preferred, not necessary) implementation for C?
More generally, what C standard libraries do you use?
Some people are saying " stack variable store its value in HEAP ", and others saying " stack variable store store its value in DATA segment". I am totally confused with these conflict answers.
Where exactly static variable stores?. I am expecting an answer with standard reference ( text books, or good author tutorial).
Is there a standard way of sending floating point values from a child process to a parent process in C.
I have a some calculations where I want to fork a process, then have the child do some busy work, the parent do something else, and then the child send its values (which are doubles) back to the parent (presumably through a pipe). Clearly the parent could parse the stream, but I'm just wondering if there's a cleaner way?
One of my users had a single error while opening a file (I'm using standard xml 1.0):
The remote name could not be resolved: 'www.w3.org'
I found a post here in StackOverflow that deals with this and it suggest setting the XmlResolver property to null. I've tried this, and all my documents still seem to load fine. However, the last thing I want is to break the file-reading mechanism of my app, so is it actually safe to disable the resolver?
I'm coming to C++ from a .Net background. Knowing how to use the Standard C++ Libraries, and all the syntax, I've never ventured further. Now I'm looking learning a bit more, such as what libraries are commonly used? I want to start getting into Threading but have no idea to start. Is there a library (similar to how .net has System.Threading) out there that will make it a bit easier? I'm specifically looking to do Linux based network programming.
What is the reason to use g:textField in Grails if you're already familiar with standard HTML form tags?
If I understand correctly the following two markup alternatives are equivalent:
<input type="text" name="name" value="${params.name}" id="name" />
<g:textField name="name" value="${params.name}" />
Are there any circumstances under which using g:textField would add value? Am I missing something?
Possible Duplicate:
Any ideas for C++1y ?
What features would you like to see in the next version of the C++ standard? Try to include a detailed description, and if possible an example of the syntax.
Please list only one feature per answer.
I have a standard wordpress blog displaying 10 posts on the index page. I'd like to show the last post from a single category in a premium spot above the other 10 posts. Can someone please tell me what i need to add to the code to do this?
Hi,
I'm trying to use this fairly standard line of code in my app:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
But am receiving the follow error:
error: invalid conversion from 'int' to 'UIRemoteNotificationType'
It works if I only use one of the notification types but fails every time if I try and use more than one. Any ideas what I'm doing wrong?
I'm trying to create a grouped table view with two sections. For the first section I would like the width to be only half the screen. For the second section it would be the standard width. Also, next to the first section I would like to put a button.
How is this done?
Thanks!
I have a C# function that does some processing and needs to return figures about what it has processed, success, failure, etc.
Can anyone tell me if there are any standard framework classes that will handle this (for example, number of records processed, number successful, failed, etc) ?
Alternatively, can anyone say how they usually handle this? Is the best way to create a class, or to use out parameters?
Hi All,
Is there any way to get CVS e-mail notifications to inlude links to my ViewCVS server where clicking a link could bring up the diff ?
Currently my loginfo file just has entries like this
^installation cat | /usr/bin/Mail -s "[cvs-update installation]" [email protected]
The e-mails we all then get (Afairly standard I imagine) contain the commit message and list of files changed.
Cheers,
Ro
I'm trying to get to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\, but the only subkey being returned in C# is MachineSettings - even though there are additional subkeys, including Games and several keys named for different user SIDs. How can I access these other keys? Even a standard user account can read the content of both Games and that account's own SID (when looking in regedit)...
Following are the contents of a sample boot.ini:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000 Professional" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /NOEXECUTE=OPTIN /FASTDETECT
The rdisk value tells the physical disk number.
So, if I have three hard disks say:
/dev/sda
/dev/sdb
/dev/sdc
Then how to know which disk (/dev/sda or /dev/sdb or /dev/sdc) is rdisk(0) and which disk is rdisk(1), etc.?
Is there a standard way to override settings from web.xml in a packaged war? I want to change filter settings for an existing library (eclipse birt) without repackaging the war.
In a standard generated scaffold project, when you are on an edit page, the URL looks like;
/something/3/edit
However, when the page doesn't validate, it runs the following code:
format.html { :action => "new" }
and the page url changes to;
/something/3
(no /edit)
Why is this is this and how to prevent it, as it looks inconsistent to me and thus confusing.
Thanks
Two quotes from the C++ standard, §1.8:
An object is a region of storage.
Base class subobjects may have zero size.
I don't think a region of storage can be of size zero. That would mean that some base class subobjects aren't actually objects. Opinions?
I put the RichTextBox in my Silverlight App. Do I have to create my own set of buttons to use it? I want to have a standard set of editing buttons for the text box.
What is the best method for tracking changes or logging the queries done to a table by a specific user when the person is using Management Studio?
I'm using 2008 R2 Express Edition and want to specifically track a single user who logs in through Management studio and runs queries to make changes manually. I want to see what query was run and thus determine what was changed and how. I am not interested in restoring the information. I considered Change Tracking but read that it is not ideal for auditing as well I am unsure how to read the data, then I considered the Bulk-Logging option on the database however I then have to consider handling the log files which may grow huge as the database is used constantly by a web app. I am wondering if there is a more concise method to do what I want?
I have a situation where I need to extract dates from the file names whose general pattern is [filename_]YYYYMMDD[.fileExtension]
e.g. "xxx_20100326.xls" or x2v_20100326.csv
The below program does the work
//Number of charecter in the substring is set to 8
//since the length of YYYYMMDD is 8
public static string ExtractDatesFromFileNames(string fileName)
{
return fileName.Substring(fileName.IndexOf("_") + 1, 8);
}
Is there any better option of achieving the same?
I am basically looking for standard practice.
I am using C#3.0 and dotnet framework 3.5
Thanks
In the days of parallel printers one used to be able to send a command on LPT1 and receive back standard info such as life count etc.
Now, with USB devices, have we lost that capability? Or is there still a way to read the info?
I need to build Boost with a non-standard set of flags (due to a conflict between Boost threading and C++/CLI). I'm adding the required flag (/clr) using CXXFLAGS, but this flag conflicts with the Boost default /EHs flag (/clr implies /EHa which is incompatible with /EHs), so that needs to be suppressed. Is there a mechanism like CXXFLAGS to suppress a default Boost flag or must I edit all of the compiler specification files by hand?
I want to display to my user how many (percent wise) of their forms are compliant with the new standard. The way I want to let them know visually is the percent amount will be colored. It will be 0xFF0000 (pure red) for 0% and 0x00FF00 (pure green) at 100%. What is the best way to calculate the color for each step along the way?
This question1 describes a way how to show list of phone numbers and select one of them if my app needs a phone number. But image if I have a huge contact list, it is not enough to just show list but possibility for filtering (by contact's name) is also needed. Is there a standard way to show phones list with picking possibility and with filtering possibility? (I wouldn't like to invent my own)
Is there a solution for the problem for sdk 2.0 and lower?
I'm making a bookmarklet, but I've encountered some wierd behaviour in IE8. The code causing the problem is this:
var els = document.getElementById("my_id").getElementsByTagName("*");
for(var i in els)
{
alert(i+","+els[i])
}
The first thing that is alerted is "length, n". This isn't the case in chrome: just in IE8.
Interestingly, it seems to behave differently depending on whether the code goes in the console/address bar or the page itself.
Is this standard behaviour?