I intend to perform opening for reading a single file from many threads using std::ifstream. My concern is if std::ifstream is thread-safe & lock-free?
Herlihy and Shavit's book (The Art of Multiprocessor Programming) solution to memory reclamation uses Java's AtomicStampedReference<T>;.
To write one in C++ for the x86_64 I imagine requires at least a 12 byte swap operation - 8 for a 64bit pointer and 4 for the int.
Is there x86 hardware support for this and if not, any pointers on how to…
Hello
I am trying to prove that the language L={a^n * b^2n A^n : n=0} is not context free but i tried the pumping theory but i can not find one state that if i pump then it is out of the language
I am looking for a well-tested, publicly available C/C++ implementation of a lock free queue.
I need at least multiple-producers/single-consumer functionality. Multiple-consumers is even better, if exists.
I'm targetting VC's _Interlocked... intrinsics, though anything which is straight forward to port would be fine.
Could anyone give any…
I wrote php code for use to contact us form
but I can not find free SMTP server to use it.
I Try to use SMTP Server For Gmail but I found this error.
Warning: mail() [function.mail]:
"sendmail_from" not set in php.ini or
custom "From:" header missing in
C:\www\htdocs\contactUs.php on line
25"
line 25 is :
mail…
I want to know if there are any free Subversion repository hosting servers where you don't need to have a 'project' to host your C++ files in.
I don't have a actual project, but I want to store my C++ in an SVN repository. I am looking for something like OpenSVN where you can upload your C++ files, but it requires you to have…
There are many scrum tools out there so my question is gonna be more specific.
Can be deploy on-site (i.e. not something like Pivotal Tracker)
Free =)
I am exploring IceScrum and XPlanner+. Any other better options?
hello every one i have to check if the following language is context free
L2={a^n * b^m * c^n * d^(n+m) :m=0 n=0 }
please help i am totally stuck and i have to hand over it till monday
hi, i want to learn c# programming language.i already know c++(console only) programming.i have downloaded visual c# express 2010 .Which free resources would you recommend me to learn c# and dot net 4.0 ?
I'm about to use the 'strategy' pattern in my iOS app, but feel like my approach violates the somehow fundamental MVC pattern.
My app is displaying visual "stories", and a Story consists (i.e. has @properties) of one Photo and one or more VisualEvent objects to represent e.g. animated circles or moving arrows on the photo.…
I have got an in memory data structure that is read by multiple threads and written by only one thread. Currently I am using a critical section to make this access threadsafe. Unfortunately this has the effect of blocking readers even though only another reader is accessing it.
There are two options to remedy this:
use…
I'm supporting some c code on Solaris, and I've seen something weird at least I think it is:
char new_login[64];
...
strcpy(new_login, (char *)login);
...
free(new_login);
My understanding is that since the variable is a local array the memory comes from the stack and does not need to be freed, and moreover since no…
Hello
I've got an application which serves an rss feed of headlines and I need to provide this rss feed to other consumers. I don't want to provide the rss directly from my server though, due to limited server resources, so I need to proxy (cache) it through some service which will handle the load.
Assuming the rss…
I am creating a pricing program. I need to calculate the amounts according to the current tax list in the US (in various places).
I want to have a button 'Update taxes' in the administrative settings of the application, so when the user clicks it, it should download from somewhere the active tax amounts.
So I…
Me and a friend are going to start development on a project soon and are looking for "source control" like free app to use, the application will be developed using visual studio.
Thanks in advance.
I create some UIElements from code behind and was anticipating the garbage collection to clear up stuff. However, the objects are not free-ed at the time I expected it. I was expecting them to be freeed at RemoveAt(0), but they are only freed at the end of the program.
How can I make the objects be freed when…
Just started trying the "Fat Free Framework"
I'm building a site using a MySQL DB with 265 fields, and 5000+ rows in the
DB;
I can load() a specific record easily, no problems.
When using find(), afind(), and even "select()", template will show
blank lines or lines with "filler" text, with the correct number…
In this paper: Lock-Free Data Structures (pdf) the following "Compare and Swap" fundamental is shown:
template <class T>
bool CAS(T* addr, T exp, T val)
{
if (*addr == exp)
{
*addr = val;
return true;
}
return false;
}
And then says
The entire procedure is atomic
But how is that…
Hi. I'm quite new to the whole field of GIS, and I'm about to make a small program that essentially overlays GPS tracks on a map together with some other annotations. I primarily need to allow scanned (thus raster) maps (although it would be nice to support proper map formats and something like OpenStreetmap…
Sooner or later, coders will feel the need to have access to "open data" in one of their projects, from knowing a city's zip to a more obscure information such as the axial tilt of Pluto.
I know data.un.org which offers access to the UN's extensive array of databases that deal with human development and…
I'm reviewing my notes for my course on theory of computation and I'm having trouble understanding how to complete a certain proof. Here is the question:
A = {0^n 1^m 0^n | n>=1, m>=1} Prove that A is not regular.
It's pretty obvious that the pumping lemma has to be used for this. So, we have…