Search Results

Search found 3286 results on 132 pages for 'piece'.

Page 40/132 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Understanding of a C Code Required..

    - by RBA
    int Size(struct node* node) { if(node == NULL) { return 0; } else if(node != NULL) { return (Size(node->left) + 1 + Size(node->right)); } } Hi, Can Anybody please post the stack trace for the following piece of code. Lets say if we insert the values 2, 1, 10, 5... Then what could be the stack representation during the recursion process.. Please, its very urgent, and its very confusing too...

    Read the article

  • Unicode filenames on windows in ruby

    - by delivarator
    I have a piece of code that looks like this: Dir.new(path).each do |entry| puts entry end The problem comes when I have a file named ???????.txt in the directory that I list. On a Windows 7 machine I get the output: ???????.txt From googling around, properly reading this filename on windows seems to be an impossible task. Any suggestions?

    Read the article

  • Source Code Browser

    - by James Fielding
    Hello I'm looking for a piece of relatively simple software to browse large C++ project. What I would like is something that is somewhere between a simple text editor and a full-blown IDE like Eclipse. I would like syntax highlighting, a way to see all classes/methods defined in a file, a way to find where a particular method is called from and where a variable is declared/defined. Any ideas? Thank you!

    Read the article

  • ID generator with local static variable - thread-safe?

    - by Poseidon
    Will the following piece of code work as expected in a multi-threaded scenario? int getUniqueID() { static int ID=0; return ++ID; } It's not necessary that the IDs to be contiguous - even if it skips a value, it's fine. Can it be said that when this function returns, the value returned will be unique across all threads?

    Read the article

  • writing 'bits' to c++ file streams

    - by Sorush Rabiee
    How can i write 'one bit' into a file stream or file structure each time? is it possible to write to a queue and then flush it ? is it possible with c# or java? this was needed when i try to implement an instance of Huffman codding. i can't write bits into files. so write them to a bitset and then (when compression was completed) write 8-bit piece of it each time (exclude last one).

    Read the article

  • Find word using JQuery

    - by tinti
    I need a little piece of advice. I have a test page with 2 fields: word number and URL Also i have a button Push. When i push the button i want to open the specified URL (it's local html files) and highlight the word at the "word number" position Of course the code must ignore element nodes (<p>,<b>,<table> and so on)

    Read the article

  • I got the address of a large managed object in WinDbg, what next?

    - by Mahen
    I created a high memory utilization dump and using !dumpheap -stat and !dumpheap -mt I got the address of two large string generic list of 30 MB each. I want to know more about these lists. What they contain or which piece of code is using them. Is there a way to find them out? 0:000 !do 2b370038 Name: System.Object[] MethodTable: 71e240bc EEClass: 71c0da54 Size: 33554448(0x2000010) bytes Array: Rank 1, Number of elements 8388608, Type CLASS Element Type: System.Collections.Generic.List`1[[System.String, mscorlib]] Fields: None

    Read the article

  • Object allocation in C++

    - by Poiuyt
    char *myfunc() { char *temp = "string"; return temp; } In this piece of code, where does the allocation of the object pointed to by temp happen and what would be its scope? Is this function a valid way to return a char* pointer?

    Read the article

  • Are there any C++ style and/or standard example files available?

    - by Harvey
    While there are lots of questions about coding style, beautifying, and enforcement, I haven't found any example C++ files that are used as a quick reference for style. The file should be one or two pages long and exemplify a given coding standard/style. For example, the Google C++ Style Guide is a great reference, but I think a one to two page piece of code written in their style pinned to a wall would be more useful in day-to-day use. Do any of these already exist?

    Read the article

  • C# reads wrong registry data on 64-bit OS

    - by baal80
    I'm working on a 64-bit Windows and my applicaiton runs with elevated privileges. I have a problem with the following very simple piece of code: myKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"); if (myKey != null) { string[] HKLMvaluenames = myKey.GetValueNames(); } But for some reason HKLMvaluenames array is populated with values from the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run Is there a way around this problem?

    Read the article

  • Find a complete word in a string java

    - by Shekhar
    Hello, I am writing a piece of code in which i have to find only complete words for example if i have String str = "today is tuesday"; and i am searching for "t" then i should not find any word. Can anybody tell how can i write such a program in java?

    Read the article

  • How to use #if directives in C#(3.0)

    - by Newbie
    I just found two piece of code #if CONSOLE // defined by the console version using ournamespace.FactoryInitializer; #endif and #if _NET_1_1 log4net.Config.DOMConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) ); #else log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) ); #endif Can any one please tell me with a running sample( please provide a simple one) what is the significance of those code snippets and when and how to use those? Thanks.

    Read the article

  • Forcing driver to device match

    - by shodanex
    I have a piece of usb hardware, for which I know the driver. However, the vendor id and product id do not match the VID, PID pair registered in the driver. Is there a way in linux to force a driver to be associated with a known device, that do not involve kernel module recompilation to add a PID / VID pair ?

    Read the article

  • In the Enterprise Library, how does the abstract Validator.cs have a method definition?

    - by Soham
    Consider this piece of code: public abstract class Validator { protected Validator() { } protected abstract void ValidateCore(object instance, string value, IList<ValidationResult> results); public void Validate(object instance, string value, IList<ValidationResult> results) { if (null == instance) throw new ArgumentNullException("instance"); if (null == results) throw new ArgumentNullException("results"); ValidateCore(instance, value, results); } } Look at the Validate() overload, how can an abstract class have definitions like this?

    Read the article

  • What are the techniques to implement evaluation period and ensure it is not tempered?

    - by understack
    I've a simple product installer for windows OS, which could be evaluated for a month. What are the techniques I can use so that this piece of software is not used after a month? I've seen that several s/w use system date to check it but it's very primitive and easily forge-able. I think a key based system based on registry or online verification could be an option but I don't know much about these. Please help.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >