equivalent

srand((unsigned)(time(NULL))); (rand())/(RAND_MAX/2) - 1 C# equivalent

What is the c# equivalent of the following c++: srand((unsigned)(time(NULL))); weight=(double)(rand())/(RAND_MAX/2) - 1; ...

C++ .NET equivalent to java public static void main()?

In java I can simply test classes directly with public static void main() I then just add quick code and under Eclipse "Run" the class. Is there anything similar in C++ .NET ? Right now I have to create an empty project, reference the correct headers then set that project as start up project. ...

Java TreeMap equivalent in C#?

Most places I've consulted say to use SortedList, but the problem is that the program I'm porting actually uses duplicate keys (differentiated by order), which is permissible with TreeMap, but not SortedList. Any advice? ...

How would you do the equivalent of preprocessor directives in Python?

Is there a way to do the following preprocessor directives in Python? #if DEBUG < do some code > #else < do some other code > #endif ...

What alternatives exist for CSharpOptParse?

I've previously asked a question about an issue I have been experiencing with CSharpOptParse that didn't get much of a response. Since I haven't been able to resolve the issue, I'm looking around for an alternative library. While the issue I'm experiencing isn't really enough of a compulsion for me to search for an alternative...the fac...

equivalent number of instruction

Hi everybody, I've a question (just like me)... but...if I've a choosen algorithm written in C or C++ or whatever code you want...fixed a compiler I can determine the number of instructions but these intructions are different each other: x ADD, y MUL, z MOV, f FADD, t FMUL (F stands for FLOATING)...Is there a methodology or equation or ...

pure javascript equivalent of jquery click() ?

Hello, I am building a small apps which has to capture mouse click. I wrote the prototype in jquery. Since it is a small apps focusing on speed, embedding jquery.js to use just one function would be an overkill. I am not very experienced in pure javascript, would you show me some hints on writing pure javascript code to serve this fun...

What is C# equivalent of preg_match_all?

The theme is i opened a file and get all it's data into string and i am matching this string with the regex returning none. But the same regex in PHP is returning values for the same text using preg_match_all. Anyone having a idea? ...

What is the Java equivalent for LINQ?

What is Java equivalent for LINQ? ...

Ruby/Rails eqv PHP get_meta_tags

Is there an equivalent ruby/RoR method for PHP get_meta_tags. I am looking to read the meta tag information of a given url ...

What is the IsNested equivalent compact framework?

What could I use in replace of IsNested since it is not supported in the compact framework? ...

jQuery equivalents to ExtJS functions extend(), apply() and namespace()?

ExtJS provides some great helper functions like: Ext.extend() Ext.apply() Ext.namespace() Are there any equivalents in jQuery? I know I could port all three to jQuery since I like them so much, but maybe I'm missing something that's already there. I would like to avoid mingling with prototypes myself if possible. Endresult Ext.app...

Is there an equivalent to Java Media Framework in C#?

Is there an equivalent to Java Media Framework in C#? ...

XSLT equivalent for JSON

Is there an XSLT equivalent for JSON? Something to allow me to do transformations on JSON like XSLT does to XML. ...

Is there a mono (.Net) equivalent to the Scanner-class in Java

In Java there is a nice class called Scanner for reading strings and streams of a certain format to data-structures like integers, floats,... Is there any equivalent in Mono? In .Net there is a binary-reader, but it reads the data as binaries. I want a class that read the data by parsing it from a string. EDIT: reaction on the current a...

How to know if all the cells have the same value in some column

How to know if all the cells have the same value in some column (title changed) I want to have a bit scalar value that tells me if all the values in a column equal something: DECLARE @bit bit SELECT @bit = TRUEFORALL(Name IS NOT NULL) FROM Contact UPDATE I now realized that I actually don't need the TrueForAll, what I do need is to ...

Python equivalent of IDL's stop and .reset

Hi there, I'm relatively new to python but have a bit of experience using IDL. I was wondering if anyone knows if there are equivalent commands in python for IDL's stop and .reset commands. If I'm running some IDL script I wrote that I put a stop command in, essentially what it does is stop the script there and give me access to the com...

What is the XAML equivalent for binding SelectedIndexProperty in .cs .net silverlight code?

I have been playing with bindings in silverlight, and have figured out how to bind in code, but would prefer to keep the binding in the XAML. This is the code that works in my .cs file: System.Windows.Data.Binding IDBinding = new System.Windows.Data.Binding("ID"); IDBinding.Source = MyTrans; IDBinding.Mode = S...

Response.End in php

is there any equivalent to response.end in PHP? ...

Running Javascript function after variables are set

Hi and thanks. I have the following functions: // NATION var x, y, z; function flag(nation,area) { x = nation; this.nation=nation; var el=document.getElementById("desc"); el.innerHTML='The region you have selected is <b>'+area+'</b>'; document.getElementById("flag").innerHTML='<img src="images/flags/'+nation+'.jpg">'; } // SERVICE func...