Search Results

Search found 5543 results on 222 pages for 'legacy terms'.

Page 88/222 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • C++[MSVC2010]: How does switch compile and how optimized and fast is it?

    - by ekul
    As I found out that I can use only numerical values in C++'s switch statements, I thought that there then must be some deeper difference between it and a bunch of if-else's. Therefore I asked myself: (How) does switch differ from if-elseif-elseif in terms of runtime speed, compile time optimization and general compilation? I'm mainly speaking of MSVC here.

    Read the article

  • Converting Numpy Lstsq residual value to R^2

    - by whatnick
    I am performing a least squares regression as below (univariate). I would like to express the significance of the result in terms of R^2. Numpy returns a value of unscaled residual, what would be a sensible way of normalizing this. field_clean,back_clean = rid_zeros(backscatter,field_data) num_vals = len(field_clean) x = field_clean[:,row:row+1] y = 10*log10(back_clean) A = hstack([x, ones((num_vals,1))]) soln = lstsq(A, y ) m, c = soln [0] residues = soln [1] print residues

    Read the article

  • Which to learn first: Java/J2EE or .NET ?

    - by Eric Gustavson
    Is there an advantage to learning Java or .NET first? (ie. would the transition from J2EE to .NET be significantly easier than the reverse?) Do you think that one platform has overtaken the other in terms of industry use? (feel free to be as biased or as objective as you like) see also: Java or .NET?

    Read the article

  • Android setContentView operation

    - by stormin986
    I've read that it's important to call setContentView() early in an activity since it builds the view objects that may be manipulated by subsequent code in onCreate(). In terms of lifecycle, does the view get drawn to screen as soon as setContentView() is called, or does it allow the onCreate() function to build/populate the information in the view objects, and wait to actually draw it after onCreate() completes? Thanks!

    Read the article

  • Local variable vs parameter

    - by Dhana
    function doIt(param) { var localVar = param; //do lots of stuff with localVar } function doIt(param) { //do lots of stuff with param } Is there any difference in terms of efficiency between the code above?

    Read the article

  • Flash / Actionscript wheel

    - by Shaun
    Hi, I have been asked to create a wheel for navigation similar to on the Visit Provence website. However, I don't know where to start and my Googling effort have been unsuccessful - I guess that I am searching using the wrong terms. It the the way that the wheel moves and interacts with the other segments around it that interests me. I'd really appreciate any tutorials / help that anyone can share.

    Read the article

  • Can I Have Polymorphic Containers With Value Semantics in C++11?

    - by John Dibling
    This is a sequel to a related post which asked the eternal question: Can I have polymorphic containers with value semantics in C++? The question was asked slightly incorrectly. It should have been more like: Can I have STL containers of a base type stored by-value in which the elements exhibit polymorphic behavior? If you are asking the question in terms of C++, the answer is "no." At some point, you will slice objects stored by-value. Now I ask the question again, but strictly in terms of C++11. With the changes to the language and the standard libraries, is it now possible to store polymorphic objects by value in an STL container? I'm well aware of the possibility of storing a smart pointer to the base class in the container -- this is not what I'm looking for, as I'm trying to construct objects on the stack without using new. Consider if you will (from the linked post) as basic C++ example: #include <iostream> using namespace std; class Parent { public: Parent() : parent_mem(1) {} virtual void write() { cout << "Parent: " << parent_mem << endl; } int parent_mem; }; class Child : public Parent { public: Child() : child_mem(2) { parent_mem = 2; } void write() { cout << "Child: " << parent_mem << ", " << child_mem << endl; } int child_mem; }; int main(int, char**) { // I can have a polymorphic container with pointer semantics vector<Parent*> pointerVec; pointerVec.push_back(new Parent()); pointerVec.push_back(new Child()); pointerVec[0]->write(); pointerVec[1]->write(); // Output: // // Parent: 1 // Child: 2, 2 // But I can't do it with value semantics vector<Parent> valueVec; valueVec.push_back(Parent()); valueVec.push_back(Child()); // gets turned into a Parent object :( valueVec[0].write(); valueVec[1].write(); // Output: // // Parent: 1 // Parent: 2 }

    Read the article

  • How to implement callback functions inside classes (PHP)

    - by sombe
    I need to use a class callback method on an array inside another method (the callback function belongs to the class). class Database { public function escape_string_for_db($string){ return mysql_real_escape_string($string); } public function escape_all_array($array){ return array_filter($array,"$this->escape_string_for_db"); } } Is this the right way to go about that? (I mean, in terms of the second parameter passed to array_filter)

    Read the article

  • YUI vs jQuery, for css style layouts

    - by tony
    Hi Complete novice question. I've used jQuery a bit, YUI not at all and know very little about it. I work on a website thats IE specific, we're now looking at making it cross browser. jQuery seems great at hiding the differences between browsers from a javascript point of view. However in terms of css layout is it YUI that I should really be looking at? thanks

    Read the article

  • How Does Modulus Divison Work

    - by NSWOA
    I don't really understand how modulus division works. I was calculating 27 % 16 and wound up with 11 and I don't understand why. I can't seem to find an explanation in layman's terms online. Can someone elaborate on a very high level as to what's going on here? EDIT: Thanks for all your answers. You guys are incredibly quick. It all makes sense now.

    Read the article

  • Estimating the size of a tree

    - by Full Decent
    I'd like to estimate the number of leaves in a large tree structure for which I can't visit every node exhaustively. Is this algorithm appropriate? Does it have a name? Also, please pedant if I am using any terms improperly. sum_trials = 0 num_trials = 0 WHILE time_is_not_up bits = 0 ptr = tree.root WHILE count(ptr.children) > 0 bits += log2(count(ptr.children)) ptr = ptr.children[rand()%count(ptr.children)] sum_trials += bits num_trials++ estimated_tree_size = 2^(sum_trials/num_trials)

    Read the article

  • How to make a VB exception handling for no value in a Textbox

    - by Twocold
    I want to catch an exception when user enter no value in a Textbox and try to process further by press a button, I know I can use "If else" statement to make it. but in terms of "Try and Catch" block, I dont know how. Here is the code sample. Dim NameString As String Try NameString = OperatorNameTextBox.Text Catch ex As ArgumentException MessageBox.Show("Enter a String Value") End Try

    Read the article

  • Optimizing grep (or using AWK) in a shell script

    - by Ode
    Hi - In my shell script, I am trying to search using terms found in a $sourcefile against the same $targetfile over and over. My $sourcefile is formatted as such: pattern1 pattern2 etc... The inefficient loop I have to search with is: for line in $(< $sourcefile);do fgrep $line $targetfile | fgrep "RID" >> $outputfile done I understand it would be possible to improve this by either loading the whole $targetfile into memory, or perhaps by using AWK? Thanks

    Read the article

  • What's the best way to make a mobile friendly site?

    - by Frew
    Speaking entirely in technology-free terms, what is the best way to make a mobile friendly site? That is, I want to make a site that will work on a regular computer but also have mobile versions of the pages. Should I rewrite each page? The pages will probably have different functionality, so should I rewrite the backend code? Should it be an effectively different site with the same database?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >