Is there a GetLastInputInfo() equivalent that can be used in Linux?
The intention is to detect the last input time (keyboard or mouse) of the user.
Am using python to script the program.
What is the Url.Content() of asp.net mvc equivalent in php?
I have a file that use my style.css from both pathes:
'artciles/123/name'
'artciles/123'
How can I use links to static content, witout using absolute urls?
Used to be quite happy with the Ctrl+Shift+F10 shortcut in VS2008 to get at the right click menu after typing something that wasn't recognised to quickly resolve it. This doesn't work in VS2010! Anyone know the VS2010 equivalent?
I'd like to do the equivalent of the following in LINQ, but I can't figure out how:
IEnumerable<Item> items = GetItems();
items.ForEach(i => i.DoStuff());
What is the real syntax?
I'm trying to put some code examples in a pdf, but copying them out messes up the formatting and rearranges the lines, there's a lot of manual cleanup needed after pasting.
Is there a equivalent to html's pre for PDFs? For "this" block of text respect line breaks, spacing, and copy as plain text like its shown. The closest thing I can see is…
In Javascript I can do this:
function A(x) { return x || 3; }
This returns 3 if x is a "non-truthful" value like 0, null, false, and it returns x otherwise. This is useful for empty arguments, e.g. I can do A() and it will evaluate as 3.
Does Python have an equivalent? I guess I could make one out of the ternary operator a if b else c but…
In prototype the cumbersome for:
for (i=0; i<10; i++) { ... }
can be written as
$R(0, 10).each(function(i){ ... });
Is there an equivalent of range in JQuery ?
What is equivalent LDAP attributes for Active Directory
I am looking for password using Net::LDAP.
I dont know to how to set the user password using Net::LDAP
Hi,
I am having a mind-freeze here, but I cant seem to find the equivalent lambda syntax for -
string[] a = {"a","b","c"};
string[] b = {"1","2","3"};
var x = from a1 in a
from b1 in b
select new{a1, b1};
Is this equivalent to a LEFT JOIN?
SELECT DISTINCT a.name, b.name
FROM tableA a,
(SELECT DISTINCT name FROM tableB) as b
It seems as though there is no link between the two tables.
Is there an easier / more efficient way to write this?
Is there a mod_rewrite equivalent for IIS 7.0 that's
a) more or less complete
b) suitable for a production environment, i.e. battle-tested/dependable/secure
Do you have an experience-based recommendation?
I'm converting some code written for a linux system to a windows system. I'm using C++ for my windows system and wanted to know the equivalent of the function inet_aton.
In Haskell, there is a function "take n list" which returns the first n elements from a list. For example "sum (take 3 xs)" sums up the first three elements in the list xs. Does F# have an equivalent? I expected it to be one of the List-functions, but I can't spot anything that seems to match.
Hi
In LINQ to SQL, you can override SubmitChanges and use the method this.GetChangeSet() to get all the inserts, updates and deletes so that you can make last minute changes before it is committed to the database.
Can this be done in EF 4.0? I see there is a override for SaveChanges but I need to know the equivalent for GetChangeSet()
Is there a functional-programming equivalent to the Gang of Four Design Patterns book? That is, is there a book that explains and gives examples of how commonly-needed code structures are implemented functionally? I think seeing that would give me a better idea of how to go about using in practice the functional concepts whose theory I…
My question is simple.
Is there an equivalent of PHP's pack() and unpack() function in C++?
If no, is there an alternative to achieve the same goal?
http://us.php.net/pack
Thanks.
Does Ruby have an equivalent to .NET's Encoding.ASCII.GetString(byte[])?
Encoding.ASCII.GetString(bytes[]) takes an array of bytes and returns a string after decoding the bytes using the ASCII encoding.
I have code which works on windows, that calls LocalAlloc as follows:
LocalAlloc(LMEM_ZEROINIT, size)
I need the equivalent malloc or calloc call to get this to work on Unix systems, through Mono. Simple answer?
I was trying to add a method to the String class. This method should mutate the current string (of course it would be possible to write a not mutating version but I'd prefer the mutating one). I had no idea how to do this and after some googling I found the method rb_str_modify which makes a given string mutable. That's exactly what I…
Hi all,
Does anyone know what or if there exists a replacement utility for the Server 2000/Server 2003 command line tool ntrights on Server 2008? More info on this utility (for those that don't know what it is) is in MSDN KB 315276.