From the java sources, it look like to drops into native code. Is the cost roughly equivalent to a volatile read or does it need to acquire a lock of some type?
This code works well in Mac/Linux, but not in Windows.
import mmap
import os
map = mmap.mmap(-1, 13)
map.write("Hello world!")
pid = os.fork()
if pid == 0: # In a child process
print 'child'
map.seek(0)
print map.readline()
map.close()
else:
print 'parent'
What's the equivalent function of os.fork() on Windows?
This is in the context of a local Processing program. I would like to run an external program to get some data. Is there a popen() or equivalent function I can use?
How would I execute a query equivalent to "select top 10" in couch db?
For example I have a "schema" like so:
title body modified
and I want to select the last 10 modified documents.
As an added bonus if anyone can come up with a way to do the same only per category. So for:
title category body modified
return a list of latest 10 documents in each category.
I am just wandering if such a query is possible in couchdb.
I want to get the list of window titles of the currently running applications.
On windows I have EnumWndProc and GetWindowText.
On Linux I have XGetWindowProperty and XFetchName.
What is the Native Mac equivalent?
Anyone know how to do this - just what would be the equivalent to this:
"select * from YOUR_TABLE order by rand() limit 1"
in mysql??
Maybe not possible in SDB?
Hello all,
Is there an equivalent of MySQLs on update field for SQL server?
With both DEFAULT CURRENT_TIMESTAMP
and ON UPDATE CURRENT_TIMESTAMP
clauses, the column has the current
timestamp for its default value, and
is automatically updated.
What I am looking for is to have a date/time field and every time I update a record it updates the field with the date/time it was updated automatically?
If it doesn't exist, I guess I'll have to go manual.
Thanks all
What would be matlab's equivalent of
write(1,'("Speed, resistance, power",3f8.2)')(a(i),i=1,3)
I've tried
a = [10. 20. 200.]
fprintf(unit1,'a = 3%8.1e',a)
but I'm still having trouble with it (the whole matlab output formatting thing).
Edit for Kenny: for the values of a as given above, it would give (in a new row):
Speed, resistance, power 10.00 20.00 200.00
When I worked mostly in Windows, I used Stylus Studio to test out XPath on my XML files. Now that I primarily use OS X, I haven't found an equivalent tool.
What tools for OS X do you recommend for XPath work?
I'm looking for a language that will parse mathematical expressions for me pretty easily, but also be able to call functions and reference variables as needed. Jeval looks to be what I'm looking for, but unfortunately I'm working in C#. Is there a .Net based equivalent to jeval?
All windows in Aero have this kind of whiteish background on their text. I'd like to create an equivalent of this effect for a GlassWindow I'm using that has a TextBlock in the label area, but I'm not really a designer so I have no idea how to approach this. How can I reproduce this background effect?
According to this: http://code.google.com/appengine/docs/whatisgoogleappengine.html
it seems that GAE only uses Datastore to store data, which is equivalent with Table service on Windows Azure Platform.
Does anyone know that which RDBMS it uses? or such thing exists or not?
What's the cleanest way of editing the characters in a string in C#?
What's the C# equivalent of this in C++:
std::string myString = "boom";
myString[0] = "d";
I've been searching examples for the Win32 API C++ function TerminateProcess() but couldn't find any.
I'm not that familiar with the Win32 API in general and so I wanted to ask if someone here who is better in it than me could show me an example for,
Retrieving a process handle by its PID required to terminate it and then call TerminateProcess with it.
If you aren't familiar with C++ a C# equivalent would help too.
Not completely a programming question, but its close enough so here goes:
In Mac OS I'll put user-specific files for my app in ~/Library/Application Data/{MyApp}/ and in *nix I'll put them in ~/.{MyApp}/ - where should I put them for Windows?
I'll be using Ruby's File.expand_path to get to this directory, so if there's a windows equivalent of ~ then that's fine.
(Answers for Windows XP, Vista and 7 would be appreciated if they're not the same)
I have a C++ string. I need to pass this string to a function accepting char* parameter,
for example - strchr().
a) How do I get that pointer?
b) Is there some funtion equivalent to strschr() that works for C++ strings?
I want to apply a filter to an advantage table using multiple values for an Integer field.
The equivalent SQL would be:
SELECT * FROM TableName WHERE FieldName IN (1, 2, 3)
Is it possible to do the same on an AdsTable within having to repeat the field using an "OR"?
I want to something like:
Filter := 'FieldName IN (1, 2, 3)'
Instead of:
Filter := 'FieldName = 1 OR FieldName = 2 OR FieldName = 3'
Hi,
I'm considering purchasing a resharper license but would like to know if there are any possible alternatives to resharper and how would you rate these compared to reharper?
It doesn't necessarily have to be a free alternative but I would just like to know how good equivalent products are.
Thanks in advance,
Zaps.
From the java sources, it look like to drops into native code. Is the cost roughly equivalent to a volatile read or does it need to acquire a lock of some type?
WPF's TextBox (System.Windows.Controls.TextBox) appears to highlight selected text only when it has the focus. I need to make a TextBox continue to show the selection when focus is lost.
In a standard Win32 EDIT control I could achieve this with ES_NOHIDESEL. How can I get the equivalent in WPF?