Search Results

Search found 13737 results on 550 pages for 'asynchronous programming'.

Page 11/550 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • What are the different branches of Programming? [closed]

    - by clueless
    I just want a very general overview about what are the actual 'branches' of programming in the industry. What are different paths one can choose as a programmer and what are the common frameworks/languages/platforms in those paths. Currently I'm well versed with C/C++ and Python and I'm a beginner with Django. I want to know this because I can't decide what to proceed with after this, which route to take. Hope it's not a very general question. Thanks!

    Read the article

  • Programming for Digital frames

    - by spartan2417
    A project has recently come to my attention but i have no idea where to start or even if its possible. The idea revolves around programming a clock that is displayed inside a digital photo frame. The user would then be able to put different pictures corresponding to different times inside a usb pen for example, which would load as soon as you put the usb in. The project itself would be a really neat project - if it was just on a computer. I have no idea if what im talking about it even possible on a digital photo frame and if it is what language? Anyone who has any input at all would be great. My current idea is to maybe have a small device at the back, SSD, that runs the program through a screen, completely by passing standard digital photo frames, again though i dont know how to begin with this. And yes ive tried google (although it helps to know what to google).

    Read the article

  • Programming language for simple program?

    - by jamherst
    I am wondering about which programming languages people see fit to create a program idea that I had. I am looking to create a fairly simple program whose main functions are adding to, managing, and searching through a database of people, all through a polished GUI. It will be for use in the business world, so I think Windows would be the priority, but Mac and Linux support wouldn't be bad. Also, eventually I would like to add the ability for an instance of one program on a computer to interact with other instances on the same network, mainly through the sharing of a database. Most of my experience is in Java, but I don't particularly like the appearance of Java GUIs, so I'm looking for an alternative. I noticed that a lot of people have suggested C++ or C# in similar posts, so what are some of the advantages/disadvantages of one or both if that is your suggestion. Thanks for any help in advance.

    Read the article

  • Programming C++ using Qt4

    - by DaGhostman Dimitrov
    Hey guys I am really new to the C++ programing I have a little knowledge in C and a bit more in C++, but I do not know them enough to call myself a programmer. I am working as a PHP Web Developer I like being a crafts man and creating things so that is the reason to combine the programming with web development. I think that I could really benefit from both of them and so... My question is: Is it a good Idea to learn C++ with Qt or not? Can you give me pros and cons of both? Note: I do not want to become a programmer and give up the web development I want to combine them both.

    Read the article

  • How are Programming Languages Designed?

    - by RectangleTangle
    After doing a bit of programming, I've become quite curious on language design itself. I'm still a novice (I've been doing it for about a year), so the majority of my code pertains to only two fields (GUI design in Python and basic algorithms in C/C++). I have become intrigued with how the actual languages themselves are written. I mean this in both senses. Such as how it was literally written (ie, what language the language was written in). As well as various features like white spacing (Python) or object orientation (C++ and Python). Where would one start learning how to write a language? What are some of the fundamentals of language design, things that would make it a "complete" language?

    Read the article

  • Beginner's steps to game programming [on hold]

    - by CodeTrasher
    I have graduated from university less than 6 months ago and became a B.Eng in Software Engineering. I have moderate understanding of programming experience from languages like C++, Java and C#. But mostly on simple desktop and mobile applications. I've tried some simple Pong-like games but never finished even the smallest game. I have a couple of nice ideas growing (IMO, at least...) in my mind but don't really know where to begin. 2D is way to go, of course, at the beginning. I just want to hear from more experienced game devs how they started out. Should I make a rough outline of the core idea and mechanics and start working on a prototype of core gameplay? Or should I just practice more by making Pong, Asteroids and that sort of games and get an understanding of those before moving on? Thanks to all!

    Read the article

  • Looking for a dynamic programming solution

    - by krammer
    Given a sequence of integers in range 1 to n. Each number can appear at most once. Let there be a symbol X in the sequence which means remove the minimum element from the list. There can be an arbitrarily number of X in the sequence. Example: 1,3,4,X,5,2,X The output is 1,2. We need to find the best way to perform this operation. The solution I have been thinking is: Scan the sequence from left to right and count number of X which takes O(n) time. Perform partial sorting and find the k smallest elements (k = number of X) which takes O(n+klogk) time using median of medians. Is there a better way to solve this problem using dynamic programming or any other way ?

    Read the article

  • Programming error in 'aptdaemon' [closed]

    - by Real
    Using Ubuntu 11.10 While performing updates through the update manager I get the following message: An unhandlable error occured There seems to be a programming error in aptdaemon, the software that allows you to install/remove software and to perform other package management related tasks. Details Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 968, in simulate trans.unauthenticated = self._simulate_helper(trans) File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 1092, in _simulate_helper return depends, self._cache.required_download, \ File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 235, in required_download pm.get_archives(fetcher, self._list, self._records) SystemError: E:Method has died unexpectedly!, E:Sub-process returned an error code (100), E:Method /usr/lib/apt/methods/ did not start correctly Tried some of the fixes that were posted but did not work. What shall I do to fix this issue?

    Read the article

  • Get Asynchronous HttpResponse through Silverlight (F#)

    - by jack2010
    I am a newbie with F# and SL and playing with getting asynchronous HttpResponse through Silverlight. The following is the F# code pieces, which is tested on VS2010 and Window7 and works well, but the improvement is necessary. Any advices and discussion, especially the callback part, are welcome and great thanks. module JSONExample open System open System.IO open System.Net open System.Text open System.Web open System.Security.Authentication open System.Runtime.Serialization [<DataContract>] type Result<'TResult> = { [<field: DataMember(Name="code") >] Code:string [<field: DataMember(Name="result") >] Result:'TResult array [<field: DataMember(Name="message") >] Message:string } // The elements in the list [<DataContract>] type ChemicalElement = { [<field: DataMember(Name="name") >] Name:string [<field: DataMember(Name="boiling_point") >] BoilingPoint:string [<field: DataMember(Name="atomic_mass") >] AtomicMass:string } //http://blogs.msdn.com/b/dsyme/archive/2007/10/11/introducing-f-asynchronous-workflows.aspx //http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!194.entry type System.Net.HttpWebRequest with member x.GetResponseAsync() = Async.FromBeginEnd(x.BeginGetResponse, x.EndGetResponse) type RequestState () = let mutable request : WebRequest = null let mutable response : WebResponse = null let mutable responseStream : Stream = null member this.Request with get() = request and set v = request <- v member this.Response with get() = response and set v = response <- v member this.ResponseStream with get() = responseStream and set v = responseStream <- v let allDone = new System.Threading.ManualResetEvent(false) let getHttpWebRequest (query:string) = let query = query.Replace("'","\"") let queryUrl = sprintf "http://api.freebase.com/api/service/mqlread?query=%s" "{\"query\":"+query+"}" let request : HttpWebRequest = downcast WebRequest.Create(queryUrl) request.Method <- "GET" request.ContentType <- "application/x-www-form-urlencoded" request let GetAsynResp (request : HttpWebRequest) (callback: AsyncCallback) = let myRequestState = new RequestState() myRequestState.Request <- request let asyncResult = request.BeginGetResponse(callback, myRequestState) () // easy way to get it to run syncrnously w/ the asynch methods let GetSynResp (request : HttpWebRequest) : HttpWebResponse = let response = request.GetResponseAsync() |> Async.RunSynchronously downcast response let RespCallback (finish: Stream -> _) (asynchronousResult : IAsyncResult) = try let myRequestState : RequestState = downcast asynchronousResult.AsyncState let myWebRequest1 : WebRequest = myRequestState.Request myRequestState.Response <- myWebRequest1.EndGetResponse(asynchronousResult) let responseStream = myRequestState.Response.GetResponseStream() myRequestState.ResponseStream <- responseStream finish responseStream myRequestState.Response.Close() () with | :? WebException as e -> printfn "WebException raised!" printfn "\n%s" e.Message printfn "\n%s" (e.Status.ToString()) () | _ as e -> printfn "Exception raised!" printfn "Source : %s" e.Source printfn "Message : %s" e.Message () let printResults (stream: Stream)= let result = try use reader = new StreamReader(stream) reader.ReadToEnd(); finally () let data = Encoding.Unicode.GetBytes(result); let stream = new MemoryStream() stream.Write(data, 0, data.Length); stream.Position <- 0L let JsonSerializer = Json.DataContractJsonSerializer(typeof<Result<ChemicalElement>>) let result = JsonSerializer.ReadObject(stream) :?> Result<ChemicalElement> if result.Code<>"/api/status/ok" then raise (InvalidOperationException(result.Message)) else result.Result |> Array.iter(fun element->printfn "%A" element) let test = // Call Query (w/ generics telling it you wand an array of ChemicalElement back, the query string is wackyJSON too –I didn’t build it don’t ask me! let request = getHttpWebRequest "[{'type':'/chemistry/chemical_element','name':null,'boiling_point':null,'atomic_mass':null}]" //let response = GetSynResp request let response = GetAsynResp request (AsyncCallback (RespCallback printResults)) () ignore(test) System.Console.ReadLine() |> ignore

    Read the article

  • Is copy paste programming bad ?

    - by ring bearer
    With plain google as well as google code search tools it is easy to find how to program using some resource or solve certain problems ( such as a Java class, or a ftp block in perl etc) and so developers are so tempted to just purely copy paste the code (in a way re-use) - is this an incompetency? I have done this myself though I think I am a better programmer than many others I have seen. Who has the time to RTFM? In this age of information abundance, I do not think that copy paste programming is bad. Isn't that what sites like stackoverflow do anyway? People ask - ok here is my problem - how to solve it? now someone will post complete code and the person who asked the question would simply copy paste the most voted answer. No matter how small the problem is. I am working with a bunch of young coders who heavily rely on internet to get their job done. I see convenience (for example, you may be quite good with algorithms and such but you may not know how to use a BufferedReader in Java - would you read complete Javadoc for BufferedReader or look up some example of using it somewhere??) in copy pasting and modifying code to get the job done. What are the real dangers of copy paste coding that can impact their competency?

    Read the article

  • Functional programming and stateful algorithms

    - by bigstones
    I'm learning functional programming with Haskell. In the meantime I'm studying Automata theory and as the two seem to fit well together I'm writing a small library to play with automata. Here's the problem that made me ask the question. While studying a way to evaluate a state's reachability I got the idea that a simple recursive algorithm would be quite inefficient, because some paths might share some states and I might end up evaluating them more than once. For example, here, evaluating reachability of g from a, I'd have to exclude f both while checking the path through d and c: So my idea is that an algorithm working in parallel on many paths and updating a shared record of excluded states might be great, but that's too much for me. I've seen that in some simple recursion cases one can pass state as an argument, and that's what I have to do here, because I pass forward the list of states I've gone through to avoid loops. But is there a way to pass that list also backwards, like returning it in a tuple together with the boolean result of my canReach function? (although this feels a bit forced) Besides the validity of my example case, what other techniques are available to solve this kind of problems? I feel like these must be common enough that there have to be solutions like what happens with fold* or map. So far, reading learnyouahaskell.com I didn't find any, but consider I haven't touched monads yet. (if interested, I posted my code on codereview)

    Read the article

  • Thread safe GUI programming

    - by James
    I have been programming Java with swing for a couple of years now, and always accepted that GUI interactions had to happen on the Event Dispatch Thread. I recently started to use GTK+ for C applications and was unsurprised to find that GUI interactions had to be called on gtk_main. Similarly, I looked at SWT to see in what ways it was different to Swing and to see if it was worth using, and again found the UI thread idea, and I am sure that these 3 are not the only toolkits to use this model. I was wondering if there is a reason for this design i.e. what is the reason for keeping UI modifications isolated to a single thread. I can see why some modifications may cause issues (like modifying a list while it is being drawn), but I do not see why these concerns pass on to the user of the API. Is there a limit imposed by an operating system? Is there a good reason these concerns are not 'hidden' (i.e. some form of synchronization that is invisible to the user)? Is there any (even purely conceptual) way of creating a thread safe graphics library, or is such a thing actually impossible? I found this http://blogs.operationaldynamics.com/andrew/software/gnome-desktop/gtk-thread-awareness which seems to describe GTK differently to how I understood it (although my understanding was the same as many people's) How does this differ to other toolkits? Is it possible to implement this in Swing (as the EDT model does not actually prevent access from other threads, it just often leads to Exceptions)

    Read the article

  • C# Threading Background Process - Programming - How to?

    - by Magic
    Hello...I have been given the horrible task of doing this. Launch the website Take a screenshot Fill in the form details, click on Next Take a screenshot ... ... ... Rinse. Repeat. Now, with various combinations, this comes up to 300 screenshots. And I have to do this for 4 different browsers. Chrome, Firefox, IE 6 and IE 7. I cannot use tools which will capture the screenshot and store them, such as, SnagIT. I need to take a screenshot, copy it to a Word Document and take the second screenshot and take it to a Word Document. I thought, I will write a tiny utility which will help me do this. Here is the requirement spec that I put up for it - An executable which once launched seats itself in the System Tray. While it is active, all instances of Key Press (Print Scrn), it should write the contents to a Word Document as defined (either a default path or a user defined one). Save the document periodically. Now, my question is - if I am going to develop this using C# (Winforms application), how do I go about doing this. I can do a fair bit of C# programming and I am willing to learn. But I am not able to locate the references for how to do a background process so that it runs in the background. And while it runs, it has to capture the Print Scrn command. Can you folks point me to the right material where I can learn this? Theoretical references should suffice. But if there are practical references, then nothing like it. Thanks!

    Read the article

  • Callbacks in Thrift Asynchronous Functions?

    - by Roberto Aloi
    Hi all, In Thrift it is possible to use the oneway modifier to specify a call as asynchronous. Apparently, it's not possible to define a callback, though, to be executed when the execution of the function is completed. It seems that the only possibility I have is to give my Thrift client (PHP) some "server" capabilities, so that, when the heavy computation is completed on the server side, I can send a notification to it. This means that I should have a new .thrift file, with new definitions, new services and all the rest and that I should generate php-server side code with Thrift. Even if this is feasible, it looks like an overkill to me and I'm wondering if there's a more clever way to implement the callback. Looking forward for some feedback from you, guys.

    Read the article

  • Ignoring old multiple asynchronous ajax requests

    - by Travis
    I've got a custom javascript autocomplete script that hits the server with multiple asynchronous ajax requests. (Everytime a key gets pressed.) I've noticed that sometimes an earlier ajax request will be returned after a later requests, which messes things up. The way I handle this now is I have a counter that increments for each ajax request. Requests that come back with a lower count get ignored. I'm wondering: Is this proper? Or is there a better way of dealing with this issue? Thanks in advance, Travis

    Read the article

  • Asynchronous Silverlight WCF callback

    - by Matt
    I've created my own WCF service and I've successfully been able to talk to it via my Silverlight client. I ran into an interesting problem on my asynchronous callbacks though. When my callback is invoked, I can't update any UI controls with the dreaded invalid cross thread access Here's what my callback function looks like private void GetTimeCallBack( object sender, Talk.ClientBase<IService>.ClientEventArgs e ) { lblDisplay.Text = e.Object.ToString(); } A quick google search showed me that I have to do this instead. private void GetTimeCallBack( object sender, Talk.ClientBase<IService>.ClientEventArgs e ) { Dispatcher.BeginInvoke( () => lblDisplay.Text = e.Object.ToString() ); } Now everything works fine, but I wasn't expecting my callback to be running on a different thread. Will I always have to use the Dispatcher class in order to modify anything within my class or is this just limited to UI elements? I've not familiar with the Dispatcher class at all so I'm looking to understand it more.

    Read the article

  • Asynchronous Sockets - Handling false socket.AcceptAsync values

    - by David
    The Socket class has a method .AcceptAsync which either returns true or false. I'd thought the false return value was an error condition, but in the samples Microsoft provide for Async sockets they call the callback function synchronously after checking for failure, as shown here: public void StartAccept(SocketAsyncEventArgs acceptEventArg) { if (acceptEventArg == null) { acceptEventArg = new SocketAsyncEventArgs(); acceptEventArg.Completed += new EventHandler<SocketAsyncEventArgs>(AcceptEventArg_Completed); } else { // socket must be cleared since the context object is being reused acceptEventArg.AcceptSocket = null; } m_maxNumberAcceptedClients.WaitOne(); bool willRaiseEvent = listenSocket.AcceptAsync(acceptEventArg); if (!willRaiseEvent) { ProcessAccept(acceptEventArg); } } /// <summary> /// This method is the callback method associated with Socket.AcceptAsync operations and is invoked /// when an accept operation is complete /// </summary> void AcceptEventArg_Completed(object sender, SocketAsyncEventArgs e) { ProcessAccept(e); } Why do they do this? It defeats the purpose of asynchronous sockets and stops the method from returning.

    Read the article

  • ASP.NET Asynchronous Tasks - Worker Thread Not Releasing?

    - by user296752
    I am having an issue with testing asynchronous tasks in ASP.NET & IIS7. From what I have read, the worker thread should be released back into the thread pool while the I/O thread performs the async work, allowing ASP.NET to server other incoming requests. But when I simulate heavy load on the web application by making 20 simultaneous requests to a page (async.aspx) that performs long running async tasks, I am unable to browse to some other normal aspx page until the requests are just about done. Am I misunderstanding or missing something here? I am running Vista Biz x64, VS2008 + IIS7. I have the Async attribute applied to the Page directive.

    Read the article

  • Javascript ajax asynchronous question...

    - by Polaris878
    Hello, I'm wondering if anyone can help me understand some asynchronous javascript concepts... Say I make an asynch ajax call like so: xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange= myFoo; xmlhttp.open("GET",url,true); Here is my callback function: function myFoo() { if (xmlhttp.readyState==4) { if (xmlhttp.status==200) { // Success message } else { // some error message } } } Now, where and when does the execution path start again? Once I make the call to open(), does execution continue directly below the open() and another "thread" enters the asynch function once the ajax request has been completed? Or, does the browser wait for the request to complete, make the Asynch call, and then execution continues right after the open? Thanks!

    Read the article

  • javascript: execute a bunch of asynchronous method with one callback

    - by Samuel Michelot
    I need to execute a bunch of asynchronous methods (client SQLite database), and call only one final callback. Of course, the ugly way is: execAll : function(callBack) { asynch1(function() { asynch2(function() { ... asynchN(function() { callBack(); }) }) }); } But I know there are better ways to do it. Intuitively I would detect when all call back has been called with a counter to call the final callback. I think this is a common design-pattern, so if someone could point me in the right direction... Thanks in advance !

    Read the article

  • Making an asynchronous interface appear synchronous to mod_python users

    - by Trey
    I have a Python-driven web interface powered by Apache 2.2 with mod_python and Python 2.4. I need to make an asynchronous process appear synchronous to users of this web interface. When users access one module on this website: An external SOAP interface will be contacted with a unique identifier and will respond with a number N The external interface will respond asynchronously by contacting a SOAP server on my machine between 1 and 10 times (the number N tells us how many responses we will receive) I need to somehow aggregate these responses and pass them to the original module which will display the information back to the user. The goal is to make the process appear synchronous to the user. What is the best way to handle this synchronization issue? Is this something Twisted would be well-suited for? I am not restricting myself to Python for the solution, though it is preferred because everything else on the server is in Python. I prefer a solution that is both scalable and will take a minimal amount of programming time (though I understand that these attributes are somewhat at odds).

    Read the article

  • Dowloading a bunch of files asynchronous wait till last finished

    - by Casper Broeren
    I'm trying to download a lot of files after downloading a sql statement must insert a record. I'm using System.Net.Client to download each file synchronously, still it could be done asynchronous. There's no relation or dependency between each download. At first I just tried to use WebClient.DownloadFileAsync but that shutted the program down and killed all the download processes/threads. Second I tried to create a wait routine something like this; while (processedFiles < totalFiles) Thread.Sleep(1000) This freezed everything. So could someone tell me which aproach to take to implement this Async?

    Read the article

  • C# Asynchronous Sockets questions.

    - by ccppjava
    Based on my reading and testing, with asynchronous sockets, the socket itself can be passed using state object (IAsyncResult result), also if store the socket as a private field, it would be captured by the callback methods. I am wondering how the IAysnResult is kepted between the BeginXXX and ReceiveXXX? It looks to me that after the BeginXXX call and the method ends, the state object would be disposed by GC if there is no reference to it. In the case of private field, how the private field is shared between threads? (As far as I know, a callback is executed using a thread from the default thread pool, which would be considered as a new thread.) Many thanks, hope the questions themselves are clear.

    Read the article

  • High performance distributed asynchronous RPC in java

    - by unludo
    I would like to do RPC to a list of clients with the following requirements: the server does not know the clients (implies a kind of broker?) and the cleints do not know the server there may be several clients - they share the load to treat the RPC The RPC is asynchronous very fast (round-trip < 1ms) optional : offers a fail-over mechanism. It can be done with underlying tools which are not really intended for that (Hazelcast is an example). What would you use for such requirements? Thanks!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >