Search Results

Search found 896 results on 36 pages for 'analyze'.

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

  • SerialPort ReadLine() after Thread.Sleep() goes crazy

    - by Mat
    Hi everybody, I've been fighting with this issue for a day and I can't find answer for it. I am trying to read data from GPS device trough COM port in Compact Framework C#. I am using SerialPort class (actually my own ComPort class boxing SerialPort, but it adds only two fields I need, nothing special). Anyway.. I am running while loop in a separate thread which reads line from the port, analyze NMEA data, print them, catch all exceptions and then I Sleep(200) the thread, cause I need CPU for other threads... Without Sleep it works fine, but uses 100% CPU.. When I dont use Sleep after few minutes the output from COM port looks like this: GPGSA,A,3,09,12,22,17,15,27,,,,,,,2.6,1.6,2.1*3F GSA,A,3,09,12,22,17,15,27,,,,,,,2.6,1.6,2.1*3F A,A,3,09,12,22,17,15,27,,,,,,,2.6,1.6,2.1*3F ,18,12,271,24,24,05,020,24,14,04,326,25,11,03,023,*76 A,3,09,12,22,17,15,27,,,,,,,2.6,1.6,2.1*3F 3,09,12,22,17,15,27,,,,,,,2.6,1.6,2.1*3F 09,12,22,17,15,27,,,,,,,2.6,1.6,2.1*3F ,12,22,17,15,27,,,,,,,2.6,1.6,2.1*3F as you can see the same message is read few times but cut. I wonder what I'm doing wrong... My port configuration: port.ReadBufferSize = 4096; port.BaudRate = 4800; port.DataBits = 8; port.Parity = Parity.None; port.StopBits = StopBits.One; port.NewLine = "\r\n"; port.ReadTimeout = 1000; port.ReceivedBytesThreshold = 100000; And my reading function: private void processGps(){ while (!closing) { //reconnect if needed try { string sentence = port.ReadLine(); //here print the sentence //analyze the sentence (this takes some time 50-100ms) } catch (TimeoutException) { Thread.Sleep(0); } catch (IOException ioex) { //handling IO exception (some info on the screen) } Thread.Sleep(200); } } There is some more stuff in this function like reconnection if the device is lost etc.. but it is not called when the GPS is connected properly.. I was trying port.DiscardInBuffer(); after some blocks of code (in TimeoutException, after read..) Did anyone had similar problem? I really dont know what I'm doing wrong.. The only way to get rig of it is removing the last Sleep... Thanks in advance! Best Regards, Mat

    Read the article

  • LRU cache design

    - by user297850
    Least Recently Used (LRU) Cache is to discard the least recently used items first How do you design and implement such a cache class? The design requirements are as follows: 1) find the item as fast as we can 2) Once a cache misses and a cache is full, we need to replace the least recently used item as fast as possible. How to analyze and implement this question in terms of design pattern and algorithm design?

    Read the article

  • Sonar integration in hudson, meet "container state was: CONSTRUCTED"

    - by larry cai
    Environment: hudson/sonar/maven2 in ubuntu locally with default parameters And I got the log from hudson below, I can't figure out where is the problem. [INFO] Sonar host: http://localhost:9000 [INFO] Sonar version: 2.0.1 [INFO] [sonar-core:internal {execution: default-internal}] [INFO] Database dialect class org.sonar.api.database.dialect.Derby [INFO] ------------- Analyzing Game of Life business logic module [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar Embedded error: Can not analyze the project Cannot stop. Current container state was: CONSTRUCTED [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar

    Read the article

  • Basic image processing question

    - by indoman
    Can you enlarge a feature so that rather than take up a certain number of pixels it actually takes up one or two times that many to make it easier to analyze? Would there be a way to generalize that in MATLAB?

    Read the article

  • How does Appcelerator Titanium Mobile Work?

    - by Darrell Brogdon
    I'm working on building an iPhone app with Titanium Mobile 1.0 and I see that it compiles down to a native iPhone binary. How does this work? Seems like it would take a lot of heavy lifting to analyze the JavaScript code and do a direct translation into Objective-C without having a subset language like 280 North's Objective-J and Cappuccino.

    Read the article

  • How to generate function call graphs for JavaScript?

    - by Jeremy Rudd
    Are there softwares that can generate graphs that show which functions call which functions? I need to analyze JavaScript source code, a language which Doxygen/Graphviz does not support, though it does support C++ and others. If there are no tools that support JavaScript out-of-the-box, is there a way to convert JS to C++ so I can use Doxygen itself?

    Read the article

  • Source for Names to use in web scraping

    - by PyNEwbie
    Can anyone suggest a good source of names that I can use to help analyze some tables on web pages. The first column of the tables I am scraping have names alone, names and titles or just titles. The names can be as varied as John Smith to Vikram Saksena. I have been poking around for a compiled list of words that can be found in proper names.

    Read the article

  • ASP.NET 2.0 - scaffolding a database table for webforms

    - by Francis Huang
    Can you recommend a tool that can analyze a SQL database table, read the table columns, and populate an .aspx page with appropriate controls (i.e. textboxes with matching labels)? See this demo of ComponentOne InputPanel for WinForms for the functionality desired. Are there any built-in tools for ASP.NET 2.0 WebForms that can help build a scaffold page for any given database table or entity? Are there any free components out there to help achieve this goal?

    Read the article

  • MSIL inspection

    - by Frank Schwieterman
    I have some MSIL in byte format (result of reflection's GetMethodBody()) that I'd like to analyze a bit. I'd like to find all classes created with the new operator in the MSIL. Any ideas on how to do that programmatically?

    Read the article

  • How to optimize my PostgreSQL DB for prefix search?

    - by asmaier
    I have a table called "nodes" with roughly 1.7 million rows in my PostgreSQL db =#\d nodes Table "public.nodes" Column | Type | Modifiers --------+------------------------+----------- id | integer | not null title | character varying(256) | score | double precision | Indexes: "nodes_pkey" PRIMARY KEY, btree (id) I want to use information from that table for autocompletion of a search field, showing the user a list of the ten titles having the highest score fitting to his input. So I used this query (here searching for all titles starting with "s") =# explain analyze select title,score from nodes where title ilike 's%' order by score desc; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- Sort (cost=64177.92..64581.38 rows=161385 width=25) (actual time=4930.334..5047.321 rows=161264 loops=1) Sort Key: score Sort Method: external merge Disk: 5712kB -> Seq Scan on nodes (cost=0.00..46630.50 rows=161385 width=25) (actual time=0.611..4464.413 rows=161264 loops=1) Filter: ((title)::text ~~* 's%'::text) Total runtime: 5260.791 ms (6 rows) This was much to slow for using it with autocomplete. With some information from Using PostgreSQL in Web 2.0 Applications I was able to improve that with a special index =# create index title_idx on nodes using btree(lower(title) text_pattern_ops); =# explain analyze select title,score from nodes where lower(title) like lower('s%') order by score desc limit 10; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------ Limit (cost=18122.41..18122.43 rows=10 width=25) (actual time=1324.703..1324.708 rows=10 loops=1) -> Sort (cost=18122.41..18144.60 rows=8876 width=25) (actual time=1324.700..1324.702 rows=10 loops=1) Sort Key: score Sort Method: top-N heapsort Memory: 17kB -> Bitmap Heap Scan on nodes (cost=243.53..17930.60 rows=8876 width=25) (actual time=96.124..1227.203 rows=161264 loops=1) Filter: (lower((title)::text) ~~ 's%'::text) -> Bitmap Index Scan on title_idx (cost=0.00..241.31 rows=8876 width=0) (actual time=90.059..90.059 rows=161264 loops=1) Index Cond: ((lower((title)::text) ~>=~ 's'::text) AND (lower((title)::text) ~<~ 't'::text)) Total runtime: 1325.085 ms (9 rows) So this gave me a speedup of factor 4. But can this be further improved? What if I want to use '%s%' instead of 's%'? Do I have any chance of getting a decent performance with PostgreSQL in that case, too? Or should I better try a different solution (Lucene?, Sphinx?) for implementing my autocomplete feature?

    Read the article

  • C++ Professional Code Analysis Tools

    - by Voulnet
    Hello there, I would like to ask about the available (free or not) Static and Dynamic code analysis tools that can be used to C++ applications ESPECIALLY COM and ActiveX. I am currently using Visual Studio's /analyze compiler option, which is good and all but I still feel there is lots of analysis to be done. I'm talking about a C++ application where memory management and code security is of utmost importance.

    Read the article

  • iPhone: CPU power to do DSP/Fourier transform/frequency domain?

    - by mahboudz
    I want to analyze MIC audio on an ongoing basis (not just a snipper or prerecorded sample), and display frequency graph and filter out certain aspects of the audio. Is the iPhone powerful enough for that? I suspect the answer is a yes, given the Google and iPhone voice recognition, Shazaam and other music recognition apps, and guitar tuner apps out there. However, I don't know what limitations I'll have to deal with. Anyone play around with this area?

    Read the article

  • .NET JIT Code Cache leaking?

    - by pitchfork
    We have a server component written in .Net 3.5. It runs as service on a Windows Server 2008 Standard Edition. It works great but after some time (days) we notice massive slowdowns and an increased working set. We expected some kind of memory leak and used WinDBG/SOS to analyze dumps of the process. Unfortunately the GC Heap doesn’t show any leak but we noticed that the JIT code heap has grown from 8MB after the start to more than 1GB after a few days. We don’t use any dynamic code generation techniques by our own. We use Linq2SQL which is known for dynamic code generation but we don’t know if it can cause such a problem. The main question is if there is any technique to analyze the dump and check where all this Host Code Heap blocks that are shown in the WinDBG dumps come from? [Update] In the mean time we did some more analysis and had Linq2SQL as probable suspect, especially since we do not use precompiled queries. The following example program creates exactly the same behaviour where more and more Host Code Heap blocks are created over time. using System; using System.Linq; using System.Threading; namespace LinqStressTest { class Program { static void Main(string[] args) { for (int i = 0; i < 100; ++ i) ThreadPool.QueueUserWorkItem(Worker); while(runs < 1000000) { Thread.Sleep(5000); } } static void Worker(object state) { for (int i = 0; i < 50; ++i) { using (var ctx = new DataClasses1DataContext()) { long id = rnd.Next(); var x = ctx.AccountNucleusInfos.Where(an => an.Account.SimPlayers.First().Id == id).SingleOrDefault(); } } var localruns = Interlocked.Add(ref runs, 1); System.Console.WriteLine("Action: " + localruns); ThreadPool.QueueUserWorkItem(Worker); } static Random rnd = new Random(); static long runs = 0; } } When we replace the Linq query with a precompiled one, the problem seems to disappear.

    Read the article

  • Why did you pick your current job?

    - by Nathan Feger
    Why are you working where you are right now? Specifically, how did you go from offer to acceptance? I have found that it is pretty difficult to figure out how to analyze a new company and I'm looking for some advice. My current choice was heavily influenced by a former mentor of mine. Yet, I'll probably need to be my own man soon enough... So, what did it for you?

    Read the article

  • Machine learning - training step

    - by palau1
    When you're using Haar-like features for your training data for an Adaboost algorithm, how do you build your data sets? Do you literally have to find thousands of positive and negative samples? There must be a more efficient way of doing this... I'm trying to analyze images in matlab (not faces) and am relatively new to image processing.

    Read the article

  • Why is postgresql update query so slow sometimes, even with index

    - by Matija
    i have a simple update query (foo column type is BOOLEAN (default false)): update tablename set foo = true where id = 234; which "id" is set to (primary) key, and if i run "explain analyze" i got: Index Cond: (id = 234) Total runtime: 0.358 ms but still, i have plenty of unexplained queries at slow log (pgfouine), which took more than 200s (?!): Times executed: 99, Av. duration (s): 70 can anyone please explain, whats the reason for that? (1.5 mio rows in table, postgresql 8.4)

    Read the article

  • Event on HTML selection

    - by jldupont
    Is there an event for situations where something is selected on an HTML page like arbitrary text within a span element? Does such a thing exist or does one need to poll at regular interval & analyze the window.getSelection() ? I would like to trap this event type from within a browser extension (Chrome).

    Read the article

  • NSString potencial leak

    - by VansFannel
    Hello. When I build and analyze my project on XCode, I obtain a 'warning' on the following line: NSString *contactEmail = (NSString *)ABMultiValueCopyValueAtIndex(emailInfo, 0); The message is: Potencial leak on object allocated on line ... and stored into contactEmail. Is there any error on that line?

    Read the article

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