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?
Consider I have an array of elements out of which I want to create a new 'iterable' which on every next applies a custom 'transformation'. What's the proper way of doing it under python 2.x?
For people familiar with Java, the equivalent is Iterables#transform from google's collections framework.
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?
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?
How do I convert a DateTime structure to its equivalent RFC 822 date-time formatted string representation and parse this string representation back to a DateTime structure? The RFC-822 date-time format is used in a number of specifications such as the RSS Syndication Format.
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
Hi folks,
Real quick question - what's the cleanest way of editing the characters in a string in C#?
i.e. what is cleanest C# equivalent of c++:
std::string myString = "boom";
myString[0] = "d";
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?
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?
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?
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)
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 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'
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.
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?
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?
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?