Search Results

Search found 332 results on 14 pages for 'anon'.

Page 10/14 | < Previous Page | 6 7 8 9 10 11 12 13 14  | Next Page >

  • Linux C++: how to profile time wasted due to cache misses?

    - by anon
    I know that I can use gprof to benchmark my code. However, I have this problem -- I have a smart pointer that has an extra level of indirection (think of it as a proxy object). As a result, I have this extra layer that effects pretty much all functions, and screws with caching. Is there a way to measure the time my CPU wastes due to cache misses? Thanks!

    Read the article

  • Percent of internet running Google Native Client?

    - by anon
    Anyone have numbers on how many machines / % of internet uses have Google Native Client? I'm curious about google NaCL as a platform: it seems to combine the best of the web (just a webpage, accessible on any machine) and desktop apps (OpenGL, C/C++ power). The only question is -- what percent of the world actually use it. Anyone have data on this? Thanks!

    Read the article

  • lua jump to right line

    - by anon
    I have a makefile that looks like: default: lua blah.lua Now, in vim, I type ":make" There's an error in my lua code; it gives a file name + line number. I would like vim to jump to the right file/line. How do I make this happen? Thanks!

    Read the article

  • Pass a variable to new page

    - by Anon
    I am trying to pass a variable from one page, load another and enter that information. something Like this: When 127.0.0.1/test.html&ID=1234 location.href = "127.0.0.1/newpage.html" if (location.href == newpage.html){ var e = document.GetElementById("Loginbx"); e.Value = ID } I don't have access to modify 127.0.0.1/test.html nor newpage.html but would like to pass variables to them from another. Is this possible?

    Read the article

  • C++ compile time purity checks?

    - by anon
    Is it possible to specify compile time "purity" checks in C++? I.e.: this function does not read from anything other than it's arguments this function does not write to anything; it only returns the return value

    Read the article

  • small & readable scheme interpreter in C++ ?

    - by anon
    Anyone know of a good / small scheme interpreter in C++? Perferably something < 2000 LOC, with a simple garbage collectro (either compacting or mark & sweep), no need to support all of R5RS, just basics of if/lambda/set!/cons/car/cdr and some basic operations. Thanks!

    Read the article

  • Sorting a 2 dimensional array on multiple columns

    - by Anon
    I need to sort a 2 dimensional array of doubles on multiple columns using either C or C++. Could someone point me to the algorithm that I should use or an existing library (perhaps boost?) that has this functionality? I have a feeling that writing a recursive function may be the way to go but I am too lazy to write out the algorithm or implement it myself if it has been done elsewhere. :-) Thanks

    Read the article

  • c++ volatile multithreading variables

    - by anon
    I'm writing a C++ app. I have a class variable that more than one thread is writing to. In C++, anything that can be modified without the compiler "realizing" that it's being changed needs to be marked volatile right? So if my code is multi threaded, and one thread may write to a var while another reads from it, do I need to mark the var volaltile? [I don't have a race condition since I'm relying on writes to ints being atomic] Thanks!

    Read the article

  • C int, float, double

    - by anon
    There are certain int values that a float can not represent. However, can a double represent all values a float can represent? (My intuition says yes, since double has more fractional bits & more exponent bits, but there might be some silly gotchas that I'm missing). Thanks!

    Read the article

  • C++ choose function by return type.

    - by anon
    I realize standard C++ only picks functions by argument type, not return type. I.e I can do something like: void func(int); void func(double); but not double func(); int func(); Where in the former, it's clear, in the latter, it's ambigious. Are there any extensions that lets me tell C++ to pick which function to use also by return type? Thanks!

    Read the article

  • Hash Table v/s STL map in C++

    - by anon
    Hi, I am trying to learn C++ maps. Was just wondering about the implementation of STL map. I read it employs Binary search tree. Is there a implementation of hash table in STL? How exactly do STL map stores Key Value pairs?

    Read the article

  • InfoPath Getting SharePoint Group Information

    - by anon
    I have an InfoPath form embedded in an aspx page on a SharePoint site. How do I bind the SharePoint user groups to a drop-down list on my form? What I've tried so far is to create a data connection to a web service (method GetGroupCollectionFromWeb) to pull the data. Next, I open the list box properties, select "Look up values from an external data source", select the data source, assign the entries, and I get the following error: "You must select a repeating group or field." What I don't understand is that since the method I am calling is called GetGroupCollectionFromWeb, isn't the return value a collection? And aren't collections repeating by definition? What am I missing, and is there a workaround? Thank you.

    Read the article

  • C++ Variable declarable in function body, but not class member?

    - by anon
    I want to create a C++ class with the following type: It can be declared inside of a function. It can be declared inside of a member function. It can not be declared as a class member. The use of this: think "Root" objects for a GC. Is this possible in C++? In particular, I'm using g++. Willing to switch to clang. Either templates or macro solution fine. Thanks!

    Read the article

  • g++ -fsyntax-only unit test

    - by anon
    I'm trying to figure out if g++ -fsyntax-only does only syntax checking or if it expands templates too. Thus, I ask stack overflow for help: is there to write a program so that syntactically it's valid, but when template expansion is done, an error occurs? Thanks!

    Read the article

  • fastest way to copy a table in mysql

    - by Anon
    which one is the fastest way to completely copy a table on mysql ? CREATE TABLE copy LIKE original; INSERT INTO copy SELECT * FROM original; or CREATE TABLE copy SELECT * FROM original; ALTER TABLE copy ADD PRIMARY KEY (id); or theres another way ? PS. can't use command-line tools like mysqldump, must be on-the-fly.

    Read the article

  • How to use all the cores in Windows 7?

    - by Anon
    I am not sure if this belongs to Stackoverflow or Superuser but I thought I would ask here. I have a console based application written in C which currently takes about an hour to terminate in Windows 7 64-bit OS. The task manager reports that the application is using only 25% of the available CPU. I would like to reduce the run time by increasing cpu usage. Is there any way to let the application use all four cores (the laptop has Core i5) instead of just one? I am assuming that task manager reports 25% because only one core is allocated to the program.

    Read the article

  • What am I missing in my compilation / linking stage of this C++ FreeType GLFW application?

    - by anon
    g++ -framework OpenGL GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw -lfreetype - pthread `freetype-config --cflags` Undefined symbols: "_GetEventKind", referenced from: __glfwKeyEventHandler in libglfw.a(macosx_window.o) __glfwMouseEventHandler in libglfw.a(macosx_window.o) __glfwWindowEventHandler in libglfw.a(macosx_window.o) "_ShowWindow", referenced from: __glfwPlatformOpenWindow in libglfw.a(macosx_window.o) "_MenuSelect", referenced from: This is on Mac OS X. I am trying to get GLFT_FONT to work on MacOSX with GLFW and FreeType2. This is not the standard Makefile. I changed parts of it myself (like the "-framework OpenGL" I am from Linux land, a bit new to Mac. I am on Mac OS X 10.5.8; using XCode 3.1.3 Thanks!

    Read the article

  • c++ figuring out memory layout of members programatically

    - by anon
    Suppose in one program, I'm given: class Foo { int x; double y; char z; }; class Bar { Foo f1; int t; Foo f2; }; int main() { Bar b; bar.f1.z = 'h'; bar.f2.z = 'w'; ... some crap setting value of b; FILE *f = fopen("dump", "wb"); // c-style file fwrite(&b, sizeof(Bar), 1, f); } Suppose in another program, I have: int main() { File *f = fopen("dump", "rb"); std::string Foo = "int x; double y; char z;"; std::string Bar = "Foo f1; int t; Foo f2;"; // now, given this is it possible to read out // the value of bar.f1.z and bar.f2.z set earlier? } WHat I'm asking is: given I have the types of a class, can I figure out how C++ lays it out?

    Read the article

  • C++: type Length from float

    - by anon
    This is kinda like my earlier question: http://stackoverflow.com/questions/2451175/c-vector3-type-wall Except, now, I want to do this to a builtin rather then a user created type. So I want a type "Length" that behaves just like float -- except I'm going to make it's constructor explicit, so I have to explicitly construct Length objects (rather than have random conversions flying around). Basically, I'm going into the type-a-lot camp.

    Read the article

  • Is there anyway to write the following as a C/C++ macro?

    - by anon
    my_macro << 1 << "hello world" << blah->getValue() << std::endl; should expand into: std::ostringstream oss; oss << 1 << "hello world" << blah->getValue() << std::endl; ThreadSafeLogging(oss.str()); Thanks! EDIT: the accepted answer is awesome. Can we upvote 8 more times and win this responder a badge? (The answer only needs 6 more upvotes). 4 more votes to go from 21 to 25. 3 more. :-) Victory. :-)

    Read the article

  • lua userdata c++ destructor

    - by anon
    In lua, for memory allocated with lua_newuserdata, is it possible to register a destructor, so that the destructor is called when the memory region is garbage collected by lua? Thanks!

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14  | Next Page >