Search Results

Search found 12674 results on 507 pages for 'programming competitions'.

Page 171/507 | < Previous Page | 167 168 169 170 171 172 173 174 175 176 177 178  | Next Page >

  • Has anyone "learned how to program in 21 days?"

    - by Sheehan Alam
    I'm not a fan of these learn how to program in X amount of days books. Some even boast, learn how to program in 24 hours. This is a joke and an insult to me as a software engineer who went through a rigorous discipline in computer science and mathematics. So a question to the community, have you benefited from these become a programmer quick books?

    Read the article

  • Creating a project, from Makefile to static/dynamic libraries in UNIX

    - by Sasha
    Guys, would you describe a few things about c++ building blocks, on unix. I want to create an application that links against static libs and dynamic libs (.so). Question 1: How do I create static library using gcc/g++ ?How do I make my app link against it. Question 2: How to specify it in the makefile, linking against static and dynamic libs, assuming that both libraries have header files Summary: I have been using makefiles and libraries for years, written by someone else. Thus every time I modified it, I simply cut-and-pasted things around, without really understanding it. Now I want to get down to the ground and understand the building/linking/Creating Makfile process in-depth. What is a good book describing these concepts in intimate details? Thanks

    Read the article

  • problems with cut (unix)

    - by lego69
    hello everybody, I've got strange problem with cut I wrote script, there I have row: ... | cut -d" " -f3,4 >! out cut recieves this data (I checked it with echo) James James 033333333 0 0.00 but I recieve empty lines in out, can somebody explain why?

    Read the article

  • How can I dial the default connexion on Pocket PC 2003 ?

    - by Jalil
    I am working on a PPC2003 application. The devices on which the application has to run have a modem and VPN connection set. I want to automatically dial the system default "work" connection, which is the VPN one, which dial the modem one first. The user has another application who does automatically make the system dial the default connection. But I can't undertand how to do it from my Compact .NET application. I tried using OpenNETCF net package, but I could not make it work.

    Read the article

  • java string detection of ip

    - by user384706
    Hi, Assume a java string that contains an IP (v4 or v6) or a hostname. What is the best way to detect among these cases? I am not interested so much on whether the IP is in valid range (e.g. 999.999.999.999 for IPv4). I am interested in just a way to detect if a String is a hostname or an IP (v4 or v6). Initially I though this: if(theString.indexOf("@")!=-1){ //Not an Ip } but I am not sure if I should always expect a format containing @ always. Thanks

    Read the article

  • Network Security and Encryption explained in laymen terms

    - by Ehrann Mehdan
    Although I might pretend very well that I known a thing about networks or security and it might help me pass an interview, or fix a bug, I don't really feel I'm fooling anyone. I'm looking for a laymen terms explanation of nowadays network security concepts and solutions. The information is scattered around and I didn't find a resource for "dummies" like me (e.g experienced Java developers that can speak the jargon but have no real clue what it means) Topics I have a weak notion about and want to understand better as a Java developer PGP Public / Private keys RSA / DES SSL and 2 way SSL (keystore / trustore) Protecting against Man in the middle fraud Digital Signature and Certificates Is there a resource out there that really explains it in a way that doesn't require a Cisco certificate / Linux lingo / know what is subnet masking or other plumbing skills?

    Read the article

  • paket drop and splits in udp tunnel

    - by sr-dusad
    hi guys ! Currently I am working on video conferencing project.For this i m using pwnat for nat traversing. pwnat is based on udp tunneling.I m using the TCP connection for data transmission. My problem is that when i send a packet , it does not reach properly at its destination side . Sometime it drops the packet and many times it breaks ( split ) the packet into pieces. Please Help me .. How can i send and recieve a packet into single piece. So, i can draw image properly and play sound. Any kind of help will be appriciated . Thanks in advance

    Read the article

  • How to replace for-loops with a functional statement in C#?

    - by Lernkurve
    A colleague once said that God is killing a kitten every time I write a for-loop. When asked how to avoid for-loops, his answer was to use a functional language. However, if you are stuck with a non-functional language, say C#, what techniques are there to avoid for-loops or to get rid of them by refactoring? With lambda expressions and LINQ perhaps? If so, how? Questions So the question boils down to: Why are for-loops bad? Or, in what context are for-loops to avoid and why? Can you provide C# code examples of how it looks before, i.e. with a loop, and afterwards without a loop?

    Read the article

  • How can I define a verb in J that applies a different verb alternately to each atom in a list?

    - by Gregory Higley
    Imagine I've defined the following name in J: m =: >: i. 2 4 5 This looks like the following: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 I want to create a monadic verb of rank 1 that applies to each list in this list of lists. It will double (+:) or add 1 (>:) to each alternate item in the list. If we were to apply this verb to the first row, we'd get 2 3 6 5 10. It's fairly easy to get a list of booleans which alternate with each item, e.g., 0 1 $~{:$ m gives us 0 1 0 1 0. I thought, aha! I'll use something like +:`>: @. followed by some expression, but I could never quite get it to work. Any suggestions? UPDATE The following appears to work, but perhaps it can be refactored into something more elegant by a J pro. poop =: monad define (($ y) $ 0 1 $~{:$ y) ((]+:)`(]:) @. [)"0 y )

    Read the article

  • Using pointers, references, handles to generic datatypes, as generic and flexible as possible

    - by Patrick
    In my application I have lots of different data types, e.g. Car, Bicycle, Person, ... (they're actually other data types, but this is just for the example). Since I also have quite some 'generic' code in my application, and the application was originally written in C, pointers to Car, Bicycle, Person, ... are often passed as void-pointers to these generic modules, together with an identification of the type, like this: Car myCar; ShowNiceDialog ((void *)&myCar, DATATYPE_CAR); The 'ShowNiceDialog' method now uses meta-information (functions that map DATATYPE_CAR to interfaces to get the actual data out of Car) to get information of the car, based on the given data type. That way, the generic logic only has to be written once, and not every time again for every new data type. Of course, in C++ you could make this much easier by using a common root class, like this class RootClass { public: string getName() const = 0; }; class Car : public RootClass { ... }; void ShowNiceDialog (RootClass *root); The problem is that in some cases, we don't want to store the data type in a class, but in a totally different format to save memory. In some cases we have hundreds of millions of instances that we need to manage in the application, and we don't want to make a full class for every instance. Suppose we have a data type with 2 characteristics: A quantity (double, 8 bytes) A boolean (1 byte) Although we only need 9 bytes to store this information, putting it in a class means that we need at least 16 bytes (because of the padding), and with the v-pointer we possibly even need 24 bytes. For hundreds of millions of instances, every byte counts (I have a 64-bit variant of the application and in some cases it needs 6 GB of memory). The void-pointer approach has the advantage that we can almost encode anything in a void-pointer and decide how to use it if we want information from it (use it as a real pointer, as an index, ...), but at the cost of type-safety. Templated solutions don't help since the generic logic forms quite a big part of the application, and we don't want to templatize all this. Additionally, the data model can be extended at run time, which also means that templates won't help. Are there better (and type-safer) ways to handle this than a void-pointer? Any references to frameworks, whitepapers, research material regarding this?

    Read the article

  • What does a linux device need to be seen by Hal?

    - by Jaime Soriano
    I'm trying to learn about device drivers on Linux Kernel, for that I've created three modules with: A bus type A device driver A fake device that does nothing now, only is registered Everything works fine, I can load the bus, the driver and the module that creates the device. Everything appears on sysfs, including the link between the device and the device driver that indicates that they are binded. And when the driver and device are loaded, I can see using udevadm monitor that also some events are provoked: KERNEL[1275564332.144997] add /module/bustest_driver (module) KERNEL[1275564332.145289] add /bus/bustest/drivers/bustest_example (drivers) UDEV [1275564332.157428] add /module/bustest_driver (module) UDEV [1275564332.157483] add /bus/bustest/drivers/bustest_example (drivers) KERNEL[1275564337.656650] add /module/bustest_device (module) KERNEL[1275564337.656817] add /devices/bustest_device (bustest) UDEV [1275564337.658294] add /module/bustest_device (module) UDEV [1275564337.664707] add /devices/bustest_device (bustest) But after everything, the device doesn't appear on hal. What else need a device to be seen by hal?

    Read the article

  • IE to show Full URL path in the Title bar as in Status Bar

    - by Slavin
    Windows XP and IE8. Tabbed Browsing is OFF. So every single web page has its own title. I want to see in the title the same as I see in the Status bar i.e. I want the full URL of the web page I am viewing to be displayed in the Title bar, and so in the Task bar button too. How to achieve this? Thanks for all the answers in advance. Looks like this is rare case.

    Read the article

  • Which design is better (OO Design)?

    - by Tattat
    I have an "Enemy" object, that have many "gun" . Each "gun" can fire "bullet". Storing "gun" is using an array. when the "gun" is fired, the "bullet" will be created. And the enemy object will have an array to store the "bullet". So, I am thinking about the fire method. I am think making a firebulletFromGun in the "enemy". It need have a parameter: "gun". while this method is called. The "enemy" 's bullet will be added in the Array. Another design is writing the fire method in the "gun". The "enemy" use the "gun"'s fire method. And the "gun" will return a "bullet" object, and it will be added in the Array of "enemy". Both method can work, but which way is better? or they are similar the same? plx drop ur ideas/suggestions. thz.

    Read the article

  • How to Format Code in Research Reports

    - by RoseOfJericho
    I am currently writing a formal research report, and I'll be including code with this report. Question: Is there an accepted way of displaying code in research reports? I'm thinking both in terms of font, spacing, et cetera, and whether the code should be displayed inside the document, or in an appendix. The code will be JavaScript and PHP. None of the sections of code will be more than 25 lines (so they're mere snippets). There will be approx. half a dozen snippets. Each of the snippets will have a couple of paragraphs explaining what is happening in the code, and a discussion on its pros/cons. I have no contact with the body the report will be submitted to, and they have no published guidelines on how to format code (please do not question these points). Any help considered and appreciated.

    Read the article

  • Other ternary operators besides ternary conditional (?:)

    - by Malcolm
    The "ternary operator" expression is now almost equivalent to the ternary conditional operator: condition ? trueExpression : falseExpression; However, "ternary operator" only means that it takes three arguments. I'm just curious, are there any languages with any other built-in ternary operators besides conditional operator and which ones?

    Read the article

  • Simple IF statement question

    - by JGreig
    How can I simply the below if statements? if ( isset(var1) & isset(var2) ) { if ( (var1 != something1) || (var2 != something2) ) { // ... code ... } } Seems like this could be condensed to only one IF statement but am not certain if I'd use an AND or OR

    Read the article

  • How exactly do MbUnit's [Parallelizable] and DegreeOfParallelism work?

    - by BenA
    I thought I understood how MbUnit's parallel test execution worked, but the behaviour I'm seeing differs sufficiently much from my expectation that I suspect I'm missing something! I have a set of UI tests that I wish to run concurrently. All of the tests are in the same assembly, split across three different namespaces. All of the tests are completely independent of one another, so I'd like all of them to be eligible for parallel execution. To that end, I put the following in the AssemblyInfo.cs: [assembly: DegreeOfParallelism(8)] [assembly: Parallelizable(TestScope.All)] My understanding was that this combination of assembly attributes should cause all of the tests to be considered [Parallelizable], and that the test runner should use 8 threads during execution. My individual tests are marked with the [Test] attribute, and nothing else. None of them are data-driven. However, what I actually see is at most 5-6 threads being used, meaning that my test runs are taking longer than they should be. Am I missing something? Do I need to do anything else to ensure that all of my 8 threads are being used by the runner? N.B. The behaviour is the same irrespective of which runner I use. The GUI, command line and TD.Net runners all behave the same as described above, again leading me to think I've missed something. EDIT: As pointed out in the comments, I'm running v3.1 of MbUnit (update 2 build 397). The documentation suggests that the assembly level [parallelizable] attribute is available, but it does also seem to reference v3.2 of the framework despite that not yet being available. EDIT 2: To further clarify, the structure of my assembly is as follows: assembly - namespace - fixture - tests (each carrying only the [Test] attribute) - fixture - tests (each carrying only the [Test] attribute) - namespace - fixture - tests (each carrying only the [Test] attribute) - fixture - tests (each carrying only the [Test] attribute) - namespace - fixture - tests (each carrying only the [Test] attribute) - fixture - tests (each carrying only the [Test] attribute)

    Read the article

  • What is the best Linux distribution as a Xen host?

    - by St3fan
    I ordered a server for the home office and I would like to partition it with Xen. I think this will keep things clean and easier to maintain. I will be running things like MySQL, PostgreSQL, Tomcat and my own code on this machine. My question is: what freely available Linux distribution has the best Xen hosting facilities?

    Read the article

  • Explain ML type inference to a C++ programmer

    - by Tsubasa Gomamoto
    How does ML perform the type inference in the following function definition: let add a b = a + b Is it like C++ templates where no type-checking is performed until the point of template instantiation after which if the type supports the necessary operations, the function works or else a compilation error is thrown ? i.e. for example, the following function template template <typename NumType> NumType add(NumType a, NumType b) { return a + b; } will work for add<int>(23, 11); but won't work for add<ostream>(cout, fout); Is what I am guessing is correct or ML type inference works differently? PS: Sorry for my poor English; it's not my native language.

    Read the article

  • Controlling shell command line wildcard expansion in C or C++

    - by Adrian McCarthy
    I'm writing a program, foo, in C++. It's typically invoked on the command line like this: foo *.txt My main() receives the arguments in the normal way. On many systems, argv[1] is literally *.txt, and I have to call system routines to do the wildcard expansion. On Unix systems, however, the shell expands the wildcard before invoking my program, and all of the matching filenames will be in argv. Suppose I wanted to add a switch to foo that causes it to recurse into subdirectories. foo -a *.txt would process all text files in the current directory and all of its subdirectories. I don't see how this is done, since, by the time my program gets a chance to see the -a, then shell has already done the expansion and the user's *.txt input is lost. Yet there are common Unix programs that work this way. How do they do it? In Unix land, how can I control the wildcard expansion? (Recursing through subdirectories is just one example. Ideally, I'm trying to understand the general solution to controlling the wildcard expansion.)

    Read the article

  • How to change internal buffer size of DataInputStream

    - by Gaks
    I'm using this kind of code for my TCP/IP connection: sock = new Socket(host, port); sock.setKeepAlive(true); din = new DataInputStream(sock.getInputStream()); dout = new DataOutputStream(sock.getOutputStream()); Then, in separate thread I'm checking din.available() bytes to see if there are some incoming packets to read. The problem is, that if a packet bigger than 2048 bytes arrives, the din.available() returns 2048 anyway. Just like there was a 2048 internal buffer. I can't read those 2048 bytes when I know it's not the full packet my application is waiting for. If I don't read it however - it'll all stuck at 2048 bytes and never receive more. Can I enlarge the buffer size of DataInputStream somehow? Socket receive buffer is 16384 as returned by sock.getReceiveBufferSize() so it's not the socket limiting me to 2048 bytes. If there is no way to increase the DataInputStream buffer size - I guess the only way is to declare my own buffer and read everything from DataInputStream to that buffer? Regards

    Read the article

< Previous Page | 167 168 169 170 171 172 173 174 175 176 177 178  | Next Page >