Search Results

Search found 4126 results on 166 pages for 'bitwise operations'.

Page 102/166 | < Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >

  • Network message serialization for game

    - by George R
    Exit-games make a network library product called photon, and they have and actively develop a limited mmo demo. Rather than shooting off json or XML, etc. saying "MovePlayer" (with associated params), they nut that message down to a 2 digit int, via an enum - something like Operations.MovePlayer. There's no denying that a 2 digit int is smaller than a longer string, however I really hate the idea of statically burning each and every message into an enum. Would there be an alternative way to have a MessageID property assign itself a unique 2 digit int based on a lookup table or something? Has anyone dealt with this kind of thing before?

    Read the article

  • desktop module for existing web application

    - by maxxxee
    My client has a running web application which has been online for more than a year. Recently the client has introduced smart cards for his employees. Because of the difficulty in integrating smart card with its api on a web interface(i will post another detailed question on this later) we are planning to have desktop interface for this. There are 10-20 terminals which will use the desktop interface. 3 approaches for doing this that I have considered : Direct connection and operations on DB-Not using this because of data integrity and consistency issues. Build web service end points and use it from desktop interface Build a dll with common functions and use from both web and desktop Questions: 1. What are your opinions based on 2 and 3 approach? 2. Any other approach that I should consider? Note: I am using .Net framework, web application in asp.net

    Read the article

  • Git - will the file moves be detected?

    - by Ben Aston
    I performed some modifications on a branch (A). I then decided to create a brand new branch (B) based on the state of my existing working copy and commit and push to that. There were a number of files that had been moved during my earlier refactoring, and hence were now not included in version control having been moved directly in the filesystem. By accident I did not add these files to git before committing and pushing to the new branch (B). If I now add these files and commit and push, will Git be able to detect the file move operations?

    Read the article

  • Is passing a Command object/Reader to a function a good idea?

    - by Cyril Gupta
    I've been getting some inexplicable errors (running out of connections from the connection pool) with MySql database with .Net 4 (C#). Till now all my attempts at finding a reason for this have been in vain. Now I also have a situation in which a lock on a table is not cleared for a long time even though all I have been doing is read operations from it. My code looks okay (I've put all readers and connections in using blocks). The only anomaly I have is that I've been passing MySqlCommand and MySqlDataReader objects as parameters to functions who work with them. That doesn't seem like a bad idea for me because it avoids some repetition (DRY!). But since I can't find any other explanation I have to suspect that this is causing the problem. What do you think?

    Read the article

  • ContextSwitchDeadlock Was Detected error in C#

    - by assassin
    Hi, I am running a C# application, and during run-time I get the following error: The CLR has been unable to transition from COM context 0x20e480 to COM context 0x20e5f0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. Can anyone please help me out with the problem here? Thanks a lot.

    Read the article

  • How do I count the number of bytes read by TextReader.ReadLine()?

    - by Steve Guidi
    I am parsing a very large file of records (one per line, each of varying length), and I'd like to keep track of the number of bytes I've read in the file so that I may recover in the event of a failure. I wrote the following: string record = myTextReader.ReadLine(); bytesRead += record.Length; ParseRecord(record); However this doesn't work since ReadLine() strips any CR/LF characters in the line. Furthermore, a line may be terminated by either CR, LF, or CRLF characters, which means I can't just add 1 to bytesRead. Is there an easy way to get the actual line length, or do I write my own ReadLine() method in terms of the granular Read() operations?

    Read the article

  • Global variable not stable after platform changed.

    - by user350555
    Our embedded system is built on a hw/sw platform made by enea. After the platform updated recently, we found some operations on the global variable keep crashing the system. For example, we have a global map structure holding some data. We can insert/iterate the map once or twice, then the address of the elements in the map suddenly changed to some forbidden addresses like 0x0 or 0x1d, the system just crash. The only different before/after the platform update is : 1) sw part: It's a c++ software and We changed the compiler from diab cc to gcc. 2) hw part: we have a new board, but the cpu is still powerpc405s. I tried every possible way but still can't figure out the reason. Any thoughts?

    Read the article

  • Balanced Search Tree Query, Asymtotic Analysis..

    - by AGeek
    Hi, The situation is as follows:- We have n number and we have print them in sorted order. We have access to balanced dictionary data structure, which supports the operations serach, insert, delete, minimum, maximum each in O(log n) time. We want to retrieve the numbers in sorted order in O(n log n) time using only the insert and in-order traversal. The answer to this is:- Sort() initialize(t) while(not EOF) read(x) insert(x,t); Traverse(t); Now the query is if we read the elements in time "n" and then traverse the elements in "log n"(in-order traversal) time,, then the total time for this algorithm (n+logn)time, according to me.. Please explain the follow up of this algorithm for the time calculation.. How it will sort the list in O(nlogn) time?? Thanks.

    Read the article

  • Running applictions via ruby and multi-core support? (OSX)

    - by Nick Faraday
    Hi All, I'm looking for some tutorials/resources/tips that will show me how to run applications via a ruby script. I have several small tools that we use in our day to day operations that I want to manage their tasks in one ruby script. Basically what I'm trying to do is: run app via ruby script. (wait for result) get result code (success, or error msg) if ok, start the app on its next task. Also each of the tasks are independent so I'd like to take advantage of the 8 cores on my MacPro and run 8 instances at a time. Any resources you could point me towards would be greatly appreciated!

    Read the article

  • Python CSV file processing

    - by kingwarchief
    I just got introduced to python, the first language I get to learn, and I have this question below: I have an excel based CSV file with two columns (or rows, Pythonically) that I am working on. What I need to do is to perform some operations so that I can compare the two data entries in each 'row'. To be more precise, one column has constant numbers all the way down, whereas the other column varies. So I need to count the number of times the varying column data entry values crosses the constant value on the other column. For example: Varying Column; Constant Column 24 25 26 25 crosses 27 25 26 25 25.5 25 23 25 crossed 26 25 crossed So in this case the number of times there is a cross

    Read the article

  • Arguments to convince to switch from CVS to SVN

    - by ereOn
    Hi, The UNIX department of my company currently uses CVS as source-version control system. They use it in a very strange way: different repositories for development/testing/production code (for the same project), no one tags anything, weird directory architecture, and so on. The system has been set for ages but now, I have an opportunity to organize a meeting where I have to suggest changes. I'd like to make them change from CVS to SVN (Mercurial or Git might be even better, however I can't really recommand using a system I don't know well, and switching to SVN will already be a great step forward). I don't have much experience with CVS so I can't compare them efficiently: I just know it doesn't support atomic operations and that it is deprecated. What killer arguments would you use to convince my collegues to do the switch ? Thank you very much.

    Read the article

  • Rollback to a specific moment with PostgreSQL

    - by mada54
    Hi, Is there a way to rollback to a specific starting point. Im looking for something like this. Start specific_point; Now after this, an other application connected with the SAME login will insert & delete datas (webservices with crud operations) for about 2 minutes doing tests. Each webservice call is declared as a transaction with Spring Ws. After that i want to rollback to the specific_point to have a clean database to a known previous state. I was thinking that ROLLBACK TO SAVEPOINT foo; was the solution but not unfortunately? Any idea ? Configuration: PostgreSQL 8.4 / windows XP Regards

    Read the article

  • Is this bad style of programming(C#) ?

    - by m0s
    Hi, so in my program I have parts where I use try catch blocks like this try { DirectoryInfo dirInfo = new DirectoryInfo(someString); //I don't know if that directory exists //I don't know if that string is valid path string... it could be anything //Some operations here } catch(Exception iDontCareWhyItFailed) { //Didn't work? great... we will say: somethings wrong, try again/next one } Of course I probably could do checks to see if the string is valid path (regex), then I would check if directory exists, then I could catch various exceptions to see why my routine failed and give more info... But in my program it's not really necessary. Now I just really need to know if this is acceptable, and what would a pro say/think about that. Thanks a lot for attention.

    Read the article

  • How to call an xslt transform into an xsl stylesheet

    - by Mycol
    I have written an xslt that reads some xml file names and does some operations on them. I use a for-each to work them one-by-one. I have each path inside a parameter $path. But now I would like to output the result of applying an external stylesheet to those files. I would write something like <div> <something like xsl-transform($extern-xslt,$path)> </div> to have the result tree of the transformation inside the main html output. It is possible?

    Read the article

  • How does Ruby's Enumerator object iterate externally over an internal iterator?

    - by Salman Paracha
    As per Ruby's documentation, the Enumerator object uses the each method (to enumerate) if no target method is provided to the to_enum or enum_for methods. Now, let's take the following monkey patch and its enumerator, as an example o = Object.new def o.each yield 1 yield 2 yield 3 end e = o.to_enum loop do puts e.next end Given that the Enumerator object uses the each method to answer when next is called, how do calls to the each method look like, every time next is called? Does the Enumeartor class pre-load all the contents of o.each and creates a local copy for enumeration? Or is there some sort of Ruby magic that hangs the operations at each yield statement until next is called on the enumeartor? If an internal copy is made, is it a deep copy? What about I/O objects that could be used for external enumeration? I'm using Ruby 1.9.2.

    Read the article

  • How to host your own http-like server using ServiceHost?

    - by Ole Jak
    I use ServiceHost for hosting WCF cervices. I want to host near to my WCF services my own tcp programm (like WCF service but with out WCF) for direct sockets operations (like lien to some sort of broadcasting TCP stream) I want to use ServiceHost for somehow simplyfiing proces of creating my TCP sender\listener, to somehow control namespaces (so I would be able to let my clients to send TCP streams directly into my service using some nice URLs like www.example.com:34123/myserver/stream?id=1 or www.example.com:34123/myserver/stream?id=222 and so that I will not be bothered with Idea of 1 client for 1 socket at one time moment, BTW I realy want to keep my WCF services on the same port as my own server or what it is...) Can any body please hrlp me with this?

    Read the article

  • Benefits of arrays

    - by Vitalii Fedorenko
    As I see it, the advantages of List over array are pretty obvious: Generics provide more precise typing: List<Integer>, List<? extends Number>, List<? super Integer>. List interface has a bunch useful methods: addAll, remove etc. While for arrays all standard operations except get/set must be performed in a procedure manner by passing it to a static method. Collections offer different implementations like ArrayList, LinkedList, unmodifieable and synchronized lists, which can be hidden under common List interface. OOB length control. As disadvantages I can only mention absence of syntactic sugar and runtime type check. At the same time supporting of both structures requires frequent using of asList and toArray methods, which makes code less readable. So I am curious if there are any important benefits of using arrays that I miss.

    Read the article

  • NHibernate auditing in disconnected mode

    - by Ciaran
    I'm developing an app with a Silverlight UI, transferring my domain objects over WCF and persisting them via NHibernate. I'm therefore working with NHibernate in a disconnected mode. I'm already using the NHibernate PreUpdate and PreInsert EventListeners to perform some metadata operations (updating Create/Update date, created/updated by etc) and they are working fine. I now have a requirement to perform data logging on some of my domain objects. So I will need to have an audit table that has a before-save and after-save state of certain entities. I had wanted to use the @event.Persister.OldState and @event.Persister.NewState to perform this logging, but because I am in a disconnected scenario (using different Sessions from when data is retrieved to when it is persisted), @event.Persister.OldState is null when I am saving my changes back to the database. How is anyone else doing data logging in a disconnected scenario with NHibernate?

    Read the article

  • Organization of simple project.

    - by Neir0
    Hi I want to create a simple mvc application. It's typical task and very simular with phpmyadmin. I have a table and a few operations delete, edit, create new row. Name Gender Age [delete] [edit] Alex Male 20 [delete] [edit] Elza Female 23 [New person] When edit or New person clicked by user application show the following page Name [........] Gender [........] Age [........] [Save] I'm very new in asp.net and mvc, can anyone suggest a right project organization or give links to simular applications?

    Read the article

  • Windows Phone: Updating backend datastore (via web service) while keeping UI very responsive

    - by will
    I am developing a Windows Phone app where users can update a list. Each update, delete, add etc need to be stored in a database that sits behind a web service. As well as ensuring all the operations made on the phone end up in the cloud, I need to make sure the app is really responsive and the user doesn’t feel any lag time whatsoever. What’s the best design to use here? Each check box change, each text box edit fires a new thread to contact the web service? Locally store a list of things that need to be updated then send to the server in batch every so often (what about the back button)? Am I missing another even easier implementation? Thanks in advance,

    Read the article

  • c++11 atomic ordering: extended total order memory_order_seq_cst for locks

    - by itaj
    There's this note in c++11 29.3-p3: [ Note: Although it is not explicitly required that S include locks, it can always be extended to an order that does include lock and unlock operations, since the ordering between those is already included in the "happens before" ordering. - end note ] What does it mean by "always"? I can understand that any certain implementation can be designed to support such an extended S. But in some general implementation that wasn't designed for it, I don't see that S can be extended so. I had sent this question to comp.std.c++ but got no answers there. http://groups.google.com/group/comp.std.c++/browse_frm/thread/5242fa70d0594d1b#

    Read the article

  • How to handle images folder with many images

    - by Billy
    I'm developing a new aspnet website with 200k images in a /Images/ -folder. Many operations in Visual Studio is slow because it access the folder, adding a web service takes 10 minutes. The images is not checked into scm (svn). How should I structure the tree of code, to improve performance in VS? It would also be neat if not all developers needed to copy 200k images to their local disk to be able to develop on the site. Images as DB blobs is not an option.

    Read the article

  • C#: Oracle Data Type Equivalence with OracleDbType

    - by Partial
    Situation: I am creating an app in C# that uses Oracle.DataAccess.Client (11g) to do certain operations on a Oracle database with stored procedures. I am aware that there is a certain enum (OracleDbType) that contains the Oracle data types, but I am not sure which one to use for certain types. Questions: What is the equivalent Oracle PL/SQL data type for each enumerated type in the OracleDbType enumeration? There are three types of integer (Int16, Int32, Int64) in the OracleDbType... how to know which one to use or are they all suppose to work?

    Read the article

  • Books on data-intensive enterprise integration patterns

    - by Tristan
    I'm trying to understand design patterns used by data-intensive enterprise applications. A classic example is the financial industry, where system must consume, analyze, and execute on real-time financial data while providing information and configuration options to a broad set of traders and analysts. One can imagine similar system in airlines, major supply chain operations, and utility providers. Are there good books that provide and inside view of how these systems work? Enterprise Integration Patterns is one example, but I'm looking for something with more real-world applications, particularly in finance.

    Read the article

  • Code Golf: All +-*/ Combinations for 3 integers

    - by Flash84x
    Write a program that takes 3 integers separated by spaces and perform every single combination of addition, subtraction, multiplication and division operations possible and display the result with the operation combination used. Example: $./solution 1 2 3 Results in the following output 1+2+3 = 6 1-2-3 = -4 1*2*3 = 6 1/2/3 = 0 (integer answers only, round up at .5) 1*2-3 = -1 3*1+2 = 5 etc... Order of operation rules apply, assume there will be no parenthesis used i.e. (3-1)*2 = 4 is not a combination, although you could implement this for "extra credit" For results where a divide by 0 occurs simply return NaN

    Read the article

< Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >