Search Results

Search found 8167 results on 327 pages for 'general tapioca'.

Page 209/327 | < Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >

  • In SQL / MySQL, what is the difference between "On" and "Where" in a join statement?

    - by Jian Lin
    The following statements give the same result (one is using "on", and the other using "where"): mysql> select * from gifts INNER JOIN sentGifts on gifts.giftID = sentGifts.giftID; mysql> select * from gifts INNER JOIN sentGifts where gifts.giftID = sentGifts.giftID; I can only see in a case of a Left Outer Join finding the "unmatched" cases: (to find out the gifts that were never sent by anybody) mysql> select name from gifts LEFT OUTER JOIN sentgifts on gifts.giftID = sentgifts.giftID where sentgifts.giftID IS NULL; In this case, it is first using "on", and then "where". Does the "on" first do the matching, and then "where" does the "secondary" filtering? Or is there a more general rule of using "on" versus "where"? Thanks.

    Read the article

  • C++ multiple definition error

    - by user231536
    Starting with sth's answer to this question: http://stackoverflow.com/questions/3023760/c-template-specialization I was wondering how to resolve multiple definition errors if the following code is put in a header file included multiple times by different .cc files and linked together: template <typename T> class C { static const int K; static ostream& print(ostream& os, const T& t) { return os << t;} }; // general case template <typename T> const int C<T>::K = 1; // specialization template <> const int C<int>::K = 2;

    Read the article

  • Detecting similar words among n text documents

    - by javanes
    Hi; I have n documents and want to find common words that are included in these documents. For example I want to say (n-3) documents include the word "web". Certainly I can do this by basic data structures but there maybe efficient algorithm or a way to handle same words with different suffix. Is there any algorithm for such purposes? I am unfamiliar with datamining world. In general manner is there a term used for efforts of finding similarities between different documents? If there is then I will make my research easily. Thanks.

    Read the article

  • dependencies linking isnt enough?

    - by Russel
    In Visual Studio (C++) the other day, I was trying to build some example code and it would not work, even though I was pointing at the right include and lib directories. (I got linker errors) I asked a friend who fixed the problem by specifying the necessary .lib files in the General Properties-Linker-Input field of the project settings. My questions: Simply pointing to the directory with the .lib files is not enough? You need to specifically tell the linker which lib files to link? By listing the .lib files in the "additional dependencies" field, am I specifying exactly which static libs get built into the exe? If the answer to this is yes, then will these be the ONLY lib files that get built into the exe? Why is it called "additional" dependencies? Is there another place to specify lib files to include? Before I thought this was done by including the necessary header file? Thanks everyone! Russel

    Read the article

  • representing graph using database

    - by prosseek
    I need to represent graph information with database. Let's say, a is connected to b, c, and d. a -- b |_ c |_ d I can have a node table for a, b, c, and d, and I can also have a link table (FROM, TO) - (a,b), (a,c), (a,d). For other implementation there might be a way to store the link info as (a,b,c,d), but the number of elements in the table is variable. Q1 : Is there a way to represent variable elements in a table? Q2 : Is there any general way to represent the graph structure using database?

    Read the article

  • What happens when a computer program runs?

    - by gaijinco
    I know the general theory but I can't fit in the details. I know that a program resides in the secondary memory of a computer. Once the program begins execution it is entirely copied to the RAM. Then the processor retrive a few instructions (it depends on the size of the bus) at a time, puts them in registers and executes them. I also know that a computer program uses two kinds of memory: stack and heap, which are also part of the primary memory of the computer. The stack is used for non-dynamic memory, and the heap for dynamic memory (for example, everything related to the new operator in C++) What I can't understand is how those two things connect. At what point is the stack used for the execution of the instructions? Instructions go from the RAM, to the stack, to the registers?

    Read the article

  • a completely decoupled OO system ?

    - by shrini1000
    To make an OO system as decoupled as possible, I'm thinking of the following approach: 1) we run an RMI/directory like service where objects can register and discover each other. They talk to this service through an interface 2) we run a messaging service to which objects can publish messages, and register subscription callbacks. Again, this happens through interfaces 3) when object A wants to invoke a method on object B, it discovers the target object's unique identity through #1 above, and publishes a message on the message service for object B 4) message services invokes B's callback to give it the message 5) B processes the request and sends the response for A on message service 6) A's callback is called and it gets the response. I feel this system is as decoupled as practically possible, but it has the following problems: 1) communication is typically asynchronous 2) hence it's non real time 3) the system as a whole is less efficient. Are there any other practical problems where this design obviously won't be applicable ? What are your thoughts on this design in general ?

    Read the article

  • Console App Mouse-Click X Y Coordinate Detection/Comparison

    - by Bloodyaugust
    I have a game that I am working on in a C# console application, purely as practice before going on to better methods. As opposed to using something such as a Windows Forms App, which has button functionality built in, I am endeavoring to grab the cursor position (which I know how to do) and compare it to a number of area's inside a console application as defined by perhaps pixel location, but I also do not know if there is some sort of built in unit of space other than pixels (this last bit is the part I am unable to figure). P.S. I know this is in general terms, with no code already provided, but I do not feel that it is needed as all I am asking for is a brief explanation of how to grab X Y coordinates inside a console application, and stick them in int variables. Many Thanks in advance! :D

    Read the article

  • The remote server returned an error: (407) Proxy Authentication Required

    - by chris
    I'm getting this error when I call a web service: "The remote server returned an error: (407) Proxy Authentication Required". I get the general idea and I can get the code to work by adding myProxy.Credentials= NetworkCredential("user", "password", "domain"); or by using DefaultCredentials in code. My problem is that the call to the web service works in production without this. It seems like there is a non code solution involving Machine.config, but what is it? At the moment I can't get to the production boxes machine.config file to see what that looks like. I tried updating my machine.config as follows, but I still get the 407 error.

    Read the article

  • Putting a simple if-then statement on one line

    - by Abizern
    I'm just getting into Python and I really like the terseness of the syntax. However; is there an easier way of writing an if-then statement so it fits on one line? For example; say I have the simple test: if count == N: count = 0 else: count = N + 1 is there a simpler way of writing this? I mean, in Objective-C I would write this as: count = count == N ? count = 0 : count = N + 1; Is there something similar for python? Edit I know that in this instance I can use count == count % N. I'm asking about the general syntax.

    Read the article

  • FlockDB - What is it? And best cases for it uses.

    - by Guru
    Just came across FlockDB graph database. Details at github /flockDB. Twitter claims it uses FlockDB for the following: Twitter runs FlockDB on a large cluster of machines. we use it to store social graphs (who follows whom, who blocks whom) and secondary indices at twitter. At first glance, setup and trying it doesn't look straight forward. Have anyone already used it / setup this? If so, please answer the following general queries. What kind of applications is it better suited for? (Twitter claims it is simple and very rough, it remains to see what it meant though) How is FlockDB better than other graph db / noSQL db. Have you setup FlockDB, used it for a application? Early advices any? Note: I am evaluating the FlockDB and other graph databases mainly for learning them. Perhaps, I will build an application for that.

    Read the article

  • How to use gems not in a Gemfile when working with bundler?

    - by arikfr
    When using bundler with a project in general and Rails specifically, you have access only to gems defined in your Gemfile. While this makes sense, it can be limiting. Mostly I find it limiting when I want to use a certain RSpec formatter that the rest of the team doesn't use. Unless it's in the Gemfile, it isn't accessible. Any way around it or I have to add it to Gemfile? Update: my problem wasn't Bundler but Spork. When running RSpec without Spork I had no problem of using whatever formatter I wanted.

    Read the article

  • how to insert page view of a node in another page in drupal

    - by sprugman
    I have a list of node ids and I want to display the 'page' view of each one. For various reasons, I don't want to do this with views, and don't think I should need a module. Just an API call to theme('node'). Something like: $nids = array(3,4,5); foreach ($nids as $nid) { $node = node_load($nid); $result .= theme('node', $node); } but I'm not getting back the full page view of the node. I added this to my node-[type].tpl.php file: if ($page) print "PAGE MODE "; else print "NOT PAGE "; if ($teaser) print "TEASER MODE "; else print "NOT TEASER "; and got: NOT PAGE NOT TEASER I seem to be in some kind of limbo. I suspect there's an argument that I add to the theme function, but the terms are all so general (theme, teaser, page, node), I'm having trouble with my google-fu.

    Read the article

  • IOS SDK : first advices for beginners

    - by VdesmedT
    I too often answer the same kind of questions regarding basic topics like memory management, UITableView, Interface Orientation, MVC, etc... I understand very well that everyone starting with that SDK is too exited about getting its hand on it but a few reading would save them hours of debugging and the frustration that come along with the feeling that "We miss something here". I'd like experience users to share the few small articles, white papers, docs, book chapters that helps other save their time and avoid frustration. My first vote would be for : IOS Memory Management Guide View Controller Programming Guide Table View Guide And as a General recommendation, read the Overview section that come along with every class documention in the reference library, they contains most of what you need to know to avoid big traps !

    Read the article

  • Is a program compiled with -g gcc flag slower than the same program compiled without -g?

    - by e271p314
    I'm compiling a program with -O3 for performance and -g for debug symbols (in case of crash I can use the core dump). One thing bothers me a lot, does the -g option results in a performance penalty? When I look on the output of the compilation with and without -g, I see that the output without -g is 80% smaller than the output of the compilation with -g. If the extra space goes for the debug symbols, I don't care about it (I guess) since this part is not used during runtime. But if for each instruction in the compilation output without -g I need to do 4 more instructions in the compilation output with -g than I certainly prefer to stop using -g option even at the cost of not being able to process core dumps. How to know the size of the debug symbols section inside the program and in general does compilation with -g creates a program which runs slower than the same code compiled without -g?

    Read the article

  • How to use GWT on mobile devices?

    - by Chris
    hi I have a fairly large web application developed with GWT (and EJB). However on mobile devices (like windows mobile, black berry and such) the GWT start page remains simply white. I'm using GWT 1.6 and also tried 1.7 but nothing helps. It seems that the java script isn't executing and also isn't the noscript tag. Do you know how to make it working without rewriting the whole application in e.g. PHP?? I think it may be a general prob with GWT apps and not with my specific app. thx

    Read the article

  • How to receive packets on the MCU's serial port?

    - by itisravi
    Hello, Consider this code running on my microcontroller unit(MCU): while(1){ do_stuff; if(packet_from_PC) send_data_via_gpio(new_packet); //send via general purpose i/o pins else send_data_via_gpio(default_packet); do_other_stuff; } The MCU is also interfaced to a PC via a UART.Whenever the PC sends data to the MCU, the *new_packet* is sent, otherwise the *default_packet* is sent.Each packet can be 5 or more bytes with a pre defined packet structure. My question is: 1.Should i receive the entire packet from PC using inside the UART interrut service routine (ISR)? In this case, i have to implement a state machine inside the ISR to assemble the packet (which can be lengthy with if-else or switch-case blocks). 2.Detect a REQUEST command (one byte)from the PC in my ISR set a flag, diable UART interrupt alone and form the packet in my while(1) loop by polling the UART?

    Read the article

  • Is multithreading the right way to go for my case?

    - by Julien Lebosquain
    Hello, I'm currently designing a multi-client / server application. I'm using plain good old sockets because WCF or similar technology is not what I need. Let me explain: it isn't the classical case of a client simply calling a service; all clients can 'interact' with each other by sending a packet to the server, which will then do some action, and possible re-dispatch an answer message to one or more clients. Although doable with WCF, the application will get pretty complex with hundreds of different messages. For each connected client, I'm of course using asynchronous methods to send and receive bytes. I've got the messages fully working, everything's fine. Except that for each line of code I'm writing, my head just burns because of multithreading issues. Since there could be around 200 clients connected at the same time, I chose to go the fully multithreaded way: each received message on a socket is immediately processed on the thread pool thread it was received, not on a single consumer thread. Since each client can interact with other clients, and indirectly with shared objects on the server, I must protect almost every object that is mutable. I first went with a ReaderWriterLockSlim for each resource that must be protected, but quickly noticed that there are more writes overall than reads in the server application, and switched to the well-known Monitor to simplify the code. So far, so good. Each resource is protected, I have helper classes that I must use to get a lock and its protected resource, so I can't use an object without getting a lock. Moreover, each client has its own lock that is entered as soon as a packet is received from its socket. It's done to prevent other clients from making changes to the state of this client while it has some messages being processed, which is something that will happen frequently. Now, I don't just need to protect resources from concurrent accesses. I must keep every client in sync with the server for some collections I have. One tricky part that I'm currently struggling with is the following: I have a collection of clients. Each client has its own unique ID. When a client connects, it must receive the IDs of every connected client, and each one of them must be notified of the newcomer's ID. When a client disconnects, every other client must know it so that its ID is no longer valid for them. Every client must always have, at a given time, the same clients collection as the server so that I can assume that everybody knows everybody. This way if I'm sending a message to client #1 telling "Client #2 has done something", I know that it will always be correctly interpreted: Client 1 will never wonder "but who is Client 2 anyway?". My first attempt for handling the connection of a new client (let's call it X) was this pseudo-code (remember that newClient is already locked here): lock (clients) { foreach (var client in clients) { lock (client) { client.Send("newClient with id X has connected"); } } clients.Add(newClient); newClient.Send("the list of other clients"); } Now imagine that in the same time, another client has sent a packet that translates into a message that must be broadcasted to every connected client, the pseudo-code will be something like this (remember that the current client - let's call it Y - is already locked here): lock (clients) { foreach (var client in clients) { lock (client) { client.Send("something"); } } } An obvious deadlock occurs here: on one thread X is locked, the clients lock has been entered, started looping through the clients, and at one moment must get Y's lock... which is already acquired on the second thread, itself waiting for the clients collection lock to be released! This is not the only case like this in the server application. There are other collections which must be kept in sync with the clients, some properties on a client can be changed by another one, etc. I tried other types of locks, lock-free mechanisms and a bunch of other things. Either there were obvious deadlocks when I'm using too much locks for safety, or obvious race conditions otherwise. When I finally find a good middle point between the two, it usually comes with very subtle race conditions / dead locks and other multi-threading issues... my head hurts very quickly since for any single line of code I'm writing I have to review almost the whole application to ensure everything will behave correctly with any number of threads. So here's my final question: how would you resolve this specific case, the general case, and more importantly: aren't I going the wrong way here? I have little problems with the .NET framework, C#, simple concurrency or algorithms in general. Still, I'm lost here. I know I could use only one thread processing the incoming requests and everything will be fine. However, that won't scale well at all with more clients... But I'm thinking more and more to go this simple way. What do you think? Thanks in advance to you, StackOverflow people which have taken the time to read this huge question. I really had to explain the whole context if I want to get some help.

    Read the article

  • Python editor/IDE for OS X

    - by TheJuice
    As a (reasonably) new Python programmer, what IDEs or editors would you recommend for Python programming on OS X and why (i.e. what features/capabilities/workflow techniques really help)? I've used Xcode and played a bit with TextMate but I can't really say that either have really hit the spot for me (although TextMate's code completion is pretty neat, I think i've been spoilt with code-completion facilities provided by editors for statically-typed languages so maybe i'm subconsciously comparing apples and oranges) I'm looking to increase my efficacy with Python and any tips would be appreciated. I know people have asked similar questions for Python IDEs in general but I am specifically concentrating on OS X and the 'Mac way'. If Xcode or TextMate are thought highly of, perhaps some suggestions as to how I could get the most benefit from the tools would help.

    Read the article

  • migrating C++ code from structures to classes

    - by eSKay
    I am migrating some C++ code from structures to classes. I was using structures mainly for bit-field optimizations which I do not need any more (I am more worried about speed than saving space now). What are the general guidelines for doing this migration? I am still in the planning stage as this is a very big move affecting a major part of the code. I want to plan everything first before doing it. What are all the essential things I should keep in mind?

    Read the article

  • In CQRS (event-sourced), do you need a global sequence counter in the event store?

    - by Jon M
    In trying to get my head around CQRS (and DDD in general) I have come across situations when two events occur on different aggregates but the order of them has domain meaning. If so then they could happen so close together that a timestamp (as used by the sample implementations I have seen) cannot differentiate them, meaning the event store doesn't contain a 'complete' representation of the domain as there is ambiguity over the order in which events occurred. As an example, the domain could fire a CustomerCreatedEvent which applies to the Customer aggregate, and then a CustomerAssignedToAgent event on the Agent aggregate. The CustomerAssignedToAgent event doesn't make sense if it occurs before the CustomerCreatedEvent, but typically both of these might be fired as a result of one operation which makes it likely that the timestamps would effectively be the same. So am I just modelling things badly? Should there ever be a situation where the sequence of events across different aggregates is important? Or should you keep a global sequence number on your event store, so that you can identify the exact sequence in which events occurred?

    Read the article

  • Does introducing foreign keys to MySQL reduce performance

    - by Tam
    I'm building Ruby on Rails 2.3.5 app. By default, Ruby on Rails doesn't provide foreign key contraints so I have to do it manually. I was wondering if introducing foreign keys reduces query performance on the database side enough to make it not worth doing. Performance in this case is my first priority as I can check for data consistency with code. What is your recommendation in general? do you recommend using foreign keys? and how do you suggest I should measure this?

    Read the article

  • How do you make your Java application memory efficient?

    - by Boune
    How do you optimize the heap size usage of an application that has a lot (millions) of long-lived objects? (big cache, loading lots of records from a db) Use the right data type Avoid java.lang.String to represent other data types Avoid duplicated objects Use enums if the values are known in advance Use object pools String.intern() (good idea?) Load/keep only the objects you need I am looking for general programming or Java specific answers. No funky compiler switch. Edit: Optimize the memory representation of a POJO that can appear millions of times in the heap. Use cases Load a huge csv file in memory (converted into POJOs) Use hibernate to retrieve million of records from a database Resume of answers: Use flyweight pattern Copy on write Instead of loading 10M objects with 3 properties, is it more efficient to have 3 arrays (or other data structure) of size 10M? (Could be a pain to manipulate data but if you are really short on memory...)

    Read the article

  • Good File Organization Suggestions for Developer

    - by Paul
    I am struggling a little with folder organization to organize the many projects that I work on. I work on OS X - right now I am using ~/Development/ as the root folder, and I have many types of projects. For example, I have my iPhone apps under ~/Development/Xcode I develop in many languages, from PHP, to Ruby, to Python, to Objective-C. So, for example, I might have a couple of open-source apps based on PHP where I am using the Zend framework. Some of these projects are for clients, others are tests/experiments when learning a new language or general experimenting. I am really interested in how other developers have organized code/projects and could pass along some advice to make it very easy to navigate through code/projects related to many languages and types of projects.

    Read the article

  • What's a good way to throw and handle events in PHP?

    - by techexpert
    Hi everyone, I am just trying to get a general idea about the event prcessing mechanism in PHP5 in as neat way as possible. First of all I understand that a PHP application is not exactly a persistent type, so the events may not make a lot of sense, but from the OO perspective it might be a very elegant way to "communicate" between the objects. So I am thinking that it would make sense to separate the events on the external events, such as $_POST & $_GET and the internal ones, i.e. function callbacks. As far as the external ones, is it a good idea to process the $_GETs and $_POSTs directly, or is it better to wrap them into an event of some sort? Also, in order to process the internal events, do you have to pass the reference to the event handler/dispatcher to each class so they know how to throw them? I was thinking to use the PEAR EventDispatcher to do the work, but I am open to other suggestions. Thank you!

    Read the article

< Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >