Search Results

Search found 9484 results on 380 pages for 'np complete'.

Page 15/380 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Random Complete System Unresponsiveness Running Mathematical Functions

    - by Computer Guru
    I have a program that loads a file (anywhere from 10MB to 5GB) a chunk at a time (ReadFile), and for each chunk performs a set of mathematical operations (basically calculates the hash). After calculating the hash, it stores info about the chunk in an STL map (basically <chunkID, hash>) and then writes the chunk itself to another file (WriteFile). That's all it does. This program will cause certain PCs to choke and die. The mouse begins to stutter, the task manager takes 2 min to show, ctrl+alt+del is unresponsive, running programs are slow.... the works. I've done literally everything I can think of to optimize the program, and have triple-checked all objects. What I've done: Tried different (less intensive) hashing algorithms. Switched all allocations to nedmalloc instead of the default new operator Switched from stl::map to unordered_set, found the performance to still be abysmal, so I switched again to Google's dense_hash_map. Converted all objects to store pointers to objects instead of the objects themselves. Caching all Read and Write operations. Instead of reading a 16k chunk of the file and performing the math on it, I read 4MB into a buffer and read 16k chunks from there instead. Same for all write operations - they are coalesced into 4MB blocks before being written to disk. Run extensive profiling with Visual Studio 2010, AMD Code Analyst, and perfmon. Set the thread priority to THREAD_MODE_BACKGROUND_BEGIN Set the thread priority to THREAD_PRIORITY_IDLE Added a Sleep(100) call after every loop. Even after all this, the application still results in a system-wide hang on certain machines under certain circumstances. Perfmon and Process Explorer show minimal CPU usage (with the sleep), no constant reads/writes from disk, few hard pagefaults (and only ~30k pagefaults in the lifetime of the application on a 5GB input file), little virtual memory (never more than 150MB), no leaked handles, no memory leaks. The machines I've tested it on run Windows XP - Windows 7, x86 and x64 versions included. None have less than 2GB RAM, though the problem is always exacerbated under lower memory conditions. I'm at a loss as to what to do next. I don't know what's causing it - I'm torn between CPU or Memory as the culprit. CPU because without the sleep and under different thread priorities the system performances changes noticeably. Memory because there's a huge difference in how often the issue occurs when using unordered_set vs Google's dense_hash_map. What's really weird? Obviously, the NT kernel design is supposed to prevent this sort of behavior from ever occurring (a user-mode application driving the system to this sort of extreme poor performance!?)..... but when I compile the code and run it on OS X or Linux (it's fairly standard C++ throughout) it performs excellently even on poor machines with little RAM and weaker CPUs. What am I supposed to do next? How do I know what the hell it is that Windows is doing behind the scenes that's killing system performance, when all the indicators are that the application itself isn't doing anything extreme? Any advice would be most welcome.

    Read the article

  • appstore launch request unable to complete

    - by Joey
    I am trying to launch an appstore page with either of the calls: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/us/app/myappname/id999999999?mt=8"]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.itunes.com/apps/myappname"]]; Both of these urls work when I enter them in a browser. However, from both simulator and device, I get a "Your request could not be completed" error dialog right after it appears to try to launch the appstore. Is there something obvious that I'm doing wrong?

    Read the article

  • auto complete asp.net

    - by lodun
    Why my autocomplete ajax script does not work: This is my WebService.cs: using System; using System.Data; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Services.Protocols; using System.ComponentModel; using System.Data.SqlClient; using System.Collections.Generic; using System.Configuration; using System.Web.Script.Services; [ScriptService] [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. public class WebService : System.Web.Services.WebService { public WebService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string[] GetCountryInfo(string prefixText, int count) { string sql = "Select * from questions Where username like @prefixText"; SqlDataAdapter da = new SqlDataAdapter(sql,"estudent_piooConnectionString"); da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText + "%"; DataTable dt = new DataTable(); da.Fill(dt); string[] items = new string[dt.Rows.Count]; int i = 1; foreach (DataRow dr in dt.Rows) { items.SetValue(dr["username"].ToString(),i); i++; } return items; } } my css: /*AutoComplete flyout */ .autocomplete_completionListElement { margin : 0px!important; background-color : inherit; color : windowtext; border : buttonshadow; border-width : 1px; border-style : solid; cursor : 'default'; overflow : auto; height : 200px; text-align : left; list-style-type : none;padding:0px; } /* AutoComplete highlighted item */ .autocomplete_highlightedListItem { background-color: #ffff99; color: black; padding: 1px; } /* AutoComplete item */ .autocomplete_listItem { background-color : window; color : windowtext; padding : 1px; } and textbox: <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" CompletionListCssClass="autocomplete_completionListElement" CompletionListItemCssClass="autocomplete_listItem" CompletionSetCount="20" CompletionInterval="1000" DelimiterCharacters=";,:" CompletionListHighlightedItemCssClass="autocomplete_highlightedList MinimumPrefixLength="1" ServiceMethod="GetCountryInfo" ShowOnlyCurrentWordInCompletionListItem="true" TargetControlID="TextBox2" ServicePath="WebService.asmx" runat="server"></cc1:AutoCompleteExtender>

    Read the article

  • Auto complete from database using CodeIgniter (Active Record)

    - by Ralph David Abernathy
    I have a form on my website in which one is able to submit a cat. The form contains inputs such as "Name" and "Gender", but I am just trying to get the auto completion to work with the "Name" field. Here is what my jquery looks like : $(document).ready(function() { $( "#tags" ).autocomplete({ source: '/Anish/auto_cat' }); }); Here is what my model looks like: public function auto_cat($search_term) { $this->db->like('name', $search_term); $response = $this->db->get('anish_cats')->result_array(); // var_dump($response);die; return $response; } } Here is my controller: public function auto_cat(){ $search_term = $this->input->get('term'); $cats = $this->Anish_m->auto_cat($search_term); } And here is my view: <head> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> </head> <h1>Anish's Page</h1> <form action="/Anish/create" method="POST"> <div class="ui-widget"> <label for="tags">Name</label><input id="tags" type="text" name="name"> </div> <div> <label>Age</label><input type="text" name="age"> </div> <div> <label>Gender</label><input type="text" name="gender"> </div> <div> <label>Species</label><input type="text" name="species"> </div> <div> <label>Eye Color</label><input type="text" name="eye_color"> </div> <div> <label>Color</label><input type="text" name="color"> </div> <div> <label>Description</label><input type="text" name="description"> </div> <div> <label>marital status</label><input type="text" name="marital_status"> </div> <br> <button type="submit" class="btn btn-block btn-primary span1">Add cat</button> </form> <br/><br/><br/><br/> <table class="table table-striped table-bordered table-hover"> <thead> <tr> <th>Name</th> <th>Gender</th> <th>Age</th> <th>Species</th> <th>Eye Color</th> <th>Color</th> <th>Description</th> <th>Marital Status</th> <th>Edit</th> <th>Delete</th> </tr> </thead> <tbody> <?php foreach ($cats as $cat):?> <tr> <td> <?php echo ($cat['name']);?><br/> </td> <td> <?php echo ($cat['gender']);?><br/> </td> <td> <?php echo ($cat['age']);?><br/> </td> <td> <?php echo ($cat['species']);?><br/> </td> <td> <?php echo ($cat['eye_color']);?><br/> </td> <td> <?php echo ($cat['color']);?><br/> </td> <td> <?php echo ($cat['description']);?><br/> </td> <td> <?php echo ($cat['marital_status']);?><br/> </td> <td> <form action="/Anish/edit" method="post"> <input type="hidden" value="<?php echo ($cat['id']);?>" name="Anish_id_edit"> <button class="btn btn-block btn-info">Edit</button> </form> </td> <td> <form action="/Anish/delete" method="post"> <input type="hidden" value="<?php echo ($cat['id']);?>" name="Anish_id"> <button class="btn btn-block btn-danger">Delete</button> </form> </td> </tr> <?php endforeach;?> </tbody> </table> I am stuck. In my console, I am able to see this output when I type the letter 'a' if I uncomment the var_dump in my model: array(4) { [0]=> array(9) { ["id"]=> string(2) "13" ["name"]=> string(5) "Anish" ["gender"]=> string(4) "Male" ["age"]=> string(2) "20" ["species"]=> string(3) "Cat" ["eye_color"]=> string(5) "Brown" ["color"]=> string(5) "Black" ["description"]=> string(7) "Awesome" ["marital_status"]=> string(1) "0" } [1]=> array(9) { ["id"]=> string(2) "16" ["name"]=> string(5) "Anish" ["gender"]=> string(2) "fe" ["age"]=> string(2) "23" ["species"]=> string(2) "fe" ["eye_color"]=> string(2) "fe" ["color"]=> string(2) "fe" ["description"]=> string(2) "fe" ["marital_status"]=> string(1) "1" } [2]=> array(9) { ["id"]=> string(2) "17" ["name"]=> string(1) "a" ["gender"]=> string(1) "a" ["age"]=> string(1) "4" ["species"]=> string(1) "a" ["eye_color"]=> string(1) "a" ["color"]=> string(1) "a" ["description"]=> string(1) "a" ["marital_status"]=> string(1) "0" } [3]=> array(9) { ["id"]=> string(2) "18" ["name"]=> string(4) "Matt" ["gender"]=> string(6) "Female" ["age"]=> string(2) "80" ["species"]=> string(6) "ferret" ["eye_color"]=> string(4) "blue" ["color"]=> string(4) "pink" ["description"]=> string(5) "Chill" ["marital_status"]=> string(1) "0" } }

    Read the article

  • Complete Math Library for use in OpenGL ES 2.0 Game?

    - by Bunkai.Satori
    Are you aware of a complete (or almost complete) cross platform math library for use in OpenGL ES 2.0 games? The library should contain: Matrix2x2, Matrix 3x3, Matrix4x4 classes Quaternions Vector2, Vector3, Vector4 Classes Euler Angle Class Operations amongh the above mentioned classes, conversions, etc.. Standardly used math operations in 3D graphics (Dot Product, Cross Product, SLERP, etc...) Is there such Math API available either standalone or as a part of any package? Programming Language: Visual C++ but planned to be ported to OS X and Android OS.

    Read the article

  • jquery load php file - result is not complete

    - by Mark Nolan
    I'm trying to load or better reload a DIV with content from an included php file. so the file is included in the webadmin.php from the location webadmin/pages.php. Then i alter some data in the DB through serializing. Now I would like to reload the pages.php from the callback of the serialize POST with load();. This all works fine up until the moment the data is supposed to be displayed in the div - i believe its because the php file is loaded from a different location, so the include paths for the DB Connection etc are probably wrong... Should I really write an extra PHP File for jquery or is there a way to tell jquery where to load it from? Its the first time I'm doing this - so bear with me for a moment on this one... Thanks! I guess it wont be much use, but heres the load code: $("#right").load("webadmin/pages.php");

    Read the article

  • Get location of object when animation is complete in android

    - by bgm
    Is there a way to find out the final location of my animated "object" after the animation? Let's say I am animating an ImageView with location in parent as (0,0 - 20,20) using TranslateAnimation and ScaleAnimation over 1 second with setFillAfter(true). How to I find the final location of this "object" (since the View location itself does not move)? I need to continue the animation from this point based on an user input.

    Read the article

  • Are non Turing-complete languages considered programming languages at all?

    - by user1598390
    Reading a recent question: Is it actually possible to have a 'useful' programming language that isn't Turing complete?, I've come to wonder if non Turing-complete programming languages are considered programming languages at all. Since Turing-completeness means a language has to have variables to store values as well as control structures ( for, while )... Is a language that lacks these features considered a programming language ?

    Read the article

  • How to create a complete generic TreeView like data structure

    - by Nima Rikhtegar
    I want to create a completely generic treeview like structure. some thing like this: public class TreeView<T, K, L> { public T source; public K parent; public List<L> children; } as you can see in this class source, parent and also the children, all have a different generic data type. also i want my tree view to have unlimited number of levels (not just 3). this way when i want to work with my nodes in the code, all of them are going to be strongly typed. not just objects that i need to convert them to their original type. is it possible to create this kind of structure in c#, a treeview which all of its nodes are strongly typed? thanks

    Read the article

  • Handover document for complete systems

    - by viraptor
    Hi, I need to create a handover document for a fairly large system consisting of all the stuff you'd expect from a telecom deployment: many servers, database clusters which copy some data between them in specific ways, tons of log files, both off-the-shelf and locally developed software, scripts, network configurations, local know-how, etc. It's really got as many sysadmin-typical elements, as development ones. The target of this document are in the first place sysadmins who take over the day-to-day operation tasks and some problem resolving, and in the second place people who want to learn about the system in general. Is there some place I can learn about how to write something like that? It could just as easily be a 10 page "what's where", as a 500 pages book about "all things telephony". Maybe it should be more than one document really. Please link some useful resources / books I could use for this task. PS: this is intended to be internal only, customer interactions etc. are out of scope here

    Read the article

  • Really minimum lisp

    - by Mgccl
    What is the minimum set of primitives required such that a language is Turing complete and a lisp variant? Seems like car, cdr and some flow control and something for REPL is enough. It be nice if there is such list. Assume there are only 3 types of data, integers, symbols and lists.(like in picolisp)

    Read the article

  • array loop not complete

    - by user217582
    Whenever the cursor move over the note, it would call getCollision() function to store the name of the sprite. Can store more than one sprite in array but the normalNote() function failed to work correctly? When I click a button which called normalNote(), it would only loop once (one note was redraw) before the pop. After the pop, it should have continue to loop until the rest of the notes from getChildbyname is redraw. Wonder if there any missing code? private function getCollision(x:int, pt:int):void { for(var i:int=pt;i<tickArray.length;i++) { if(typeArray[i]=="eighth") { var getCurrentNote:String = "note"+i; var child:Sprite = c.getChildByName(getCurrentNote) as Sprite; drawEighthUp(child,"-","-",0xff0000); tempNote.push(getCurrentNote); } } } private function normalNote():void { for(var iii:int=0;iii<tempNote.length;iii++) { var child:Sprite = c.getChildByName(tempNote[iii]) as Sprite; trace("tt",tempNote.length); trace("iii",iii); var asd:String = tempNote[iii].toString(); var idx:int = int(asd.substr(4)); if(typeArray[idx]=="eighth") { drawEighthUp(child,"-","-",0x000000); tempNote.pop(); } } }

    Read the article

  • getting complete sql query in jython

    - by kdev
    result=sqlstring.executeQuery("select distinct table_name,owner from all_tables ") rs.append(str(i)+' , '+result.getString("table_name")+' , '+result.getString("owner")) If i want to display the query select * from all_tables or ' select count(*) from all_tables' how can i get the output to display . Please suggest thanks

    Read the article

  • Change the complete KDE Desktop Look like a Theme?

    - by piedro
    Is there any application to change the complete look of KDE like a theme in gnome? Without changing the colors, icons, styles, backgrounds, decorators and so forth individually but in one process instead? Something like a theme manager? I would like to create a complete KDE Desktop look & style and then share it with friends without setting up 8 sets of settings with all kinds of importing files and setups.

    Read the article

  • Why it's important to specify the complete class name in your association when using namespaces

    - by Carmine Paolino
    In my Rails application there is a model that has some has_one associations (this is a fabricated example): class Person::Admin < ActiveRecord::Base has_one :person_monthly_revenue has_one :dude_monthly_niceness accepts_nested_attributes_for :person_monthly_revenue, :dude_monthly_niceness end class Person::MonthlyRevenue < ActiveRecord::Base belongs_to :person_admin end class Dude::MonthlyNiceness < ActiveRecord::Base belongs_to :person_admin end The application talks to a backend that computes some data and returns a piece of JSON like this: { "dude_monthly_niceness": { "february": 1.1153232569518972, "october": 1.1250217200558268, "march": 1.3965786869658541, "august": 1.6293418014601631, "september": 1.4062771500697835, "may": 1.7166279693955291, "january": 1.0086401628086725, "june": 1.5711510228365859, "april": 1.5614525597326563, "december": 0.99894169970474289, "july": 1.7263264324994585, "november": 0.95044938418509506 }, "person_monthly_revenue": { "february": 10.585596551505297, "october": 10.574823016656749, "march": 9.9125274764852787, "august": 9.2111604702328922, "september": 9.7905249446675153, "may": 9.1329712474607962, "january": 10.479614016604238, "june": 9.3710235926961936, "april": 9.5897372624830304, "december": 10.052587677671438, "july": 8.9508877843925561, "november": 10.925339756096172 }, } To deserialize it, I use ActiveRecord's from_json, but instead of a Person::Admin object with all the associations in place, I get this error: >> Person::Admin.new.from_json(json) NameError: uninitialized constant Person::Admin::DudeMonthlyNiceness Am I doing something wrong? Is there a better way to deserialize data? (I can modify the backend easily) UPDATE: the original title was "How to deserialize from json to ActiveRecord objects with associations?" but it ended up being my mistake in specifying associations so I changed the title.

    Read the article

  • Complete list of Fonts which support

    - by Yan Cheng CHEOK
    Currently, if I change the locale setting of my application by Locale.setDefault(Locale.ENGLISH); Locale.setDefault(Locale.SIMPLIFIED_CHINESE); What I understand from this JFreeChart forum is that, I am not using correct font. Once you get the reference of the LegentTitle, you can set it to any font. Apparently, JFreeChart's default is "Tahoma" and it doesn't support Chinese characters. May I know, how I can programmatic determine, as list of available Fonts in my system, which support Chinese? I can hard code it to Serif (It fully support Chinese, doesn't it?), its look n feel doesn't looks good to me. I would like to have more choices.

    Read the article

  • setting syntax on in vim with large C file makes complete very slow

    - by skeept
    when I have syntax on in a large C file (about 8000) lines the completion ctrl-p and ctrl-n are very slow (more than 20). When I turn syntax off then completion takes less than a second. Any ideas on how to solve this? Thanks! EDIT: I figured out a minimal way of reproducing this behaviour: with an empty .vimrc and .vim folder the only changed settings are :set syntax on :set foldmethod=syntax and a large C file to edit, completion (and even general editing) becomes very very slow.

    Read the article

  • Ensuring all waiting threads complete

    - by Daniel
    I'm building a system where the progress of calling threads is dependent on the state of two variables. One variable is updated sporadically by an external source (separate from the client threads) and multiple client threads block on a condition of both variables. The system is something like this TypeB waitForB() { // Can be called by many threads. synchronized (B) { while (A <= B) { B.wait(); } A = B; return B; { } void updateB(TypeB newB) { // Called by one thread. synchronized (B) { B.update(newB); B.notifyAll(); // All blocked threads must receive new B. } } I need all the blocked threads to receive the new value of B once it has been updated. But the problem is once a single thread finishes and updates A, the waiting condition becomes true again so some of the other threads become blocked and don't receive the new value of B. Is there a way of ensuring that only the last thread that was blocked on B updates A, or another way of getting this behaviour?

    Read the article

  • Strange behavior with ajax call complete in JavaScript modules

    - by user2598794
    I have 3 simple modules with JavaScript code and JQuery ajax call. First module lots.js: var Lots = (function ($) { var self = this; var processIsRunning; return { getLots: function (lotsUrl) { var items = []; self.processIsRunning = true; var request = $.ajax({ url: lotsUrl, type: 'POST', success: function (data) { //some code } }); $.when(request).done(function() { //some code self.processIsRunning = false; }); }, isComplete: function () { return !self.processIsRunning; } }; }(jQuery)); Module bids.js: var Bids = (function ($) { return { makeBids: function (bidUrl) { //some code } }; }(jQuery)); Module app.js which bundles all together: var App = (function () { var lots_url = null; var bid_url = null; var self = this; return { if (!self.lots_url) { self.lots_url = lotsUrl; } GetLots: function (lotsUrl) { Lots.getLots(self.lots_url); }, MakeBids: function makeBid(bidUrl) { //some code var isComp = Lots.isComplete(); while (!isComp) { isComp = Lots.isComplete(); } Bids.makeBids(self.bid_url); } }; }()); But in the 'while' loop I always get 'isComplete=false'. In debug I see that 'processIsRunning' in Lots module is always true. What's the problem?

    Read the article

  • PHP - complete url parser help

    - by Mark
    I have been trying to find an effective url parser, php's own does not include subdomain or extension. On php.net a number of users had contributed and made this: function parseUrl($url) { $r = "^(?:(?P<scheme>\w+)://)?"; $r .= "(?:(?P<login>\w+):(?P<pass>\w+)@)?"; $r .= "(?P<host>(?:(?P<subdomain>[-\w\.]+)\.)?" . "(?P<domain>[-\w]+\.(?P<extension>\w+)))"; $r .= "(?::(?P<port>\d+))?"; $r .= "(?P<path>[\w/]*/(?P<file>\w+(?:\.\w+)?)?)?"; $r .= "(?:\?(?P<arg>[\w=&]+))?"; $r .= "(?:#(?P<anchor>\w+))?"; $r = "!$r!"; // Delimiters preg_match ( $r, $url, $out ); return $out; } Unfortunately it fails on paths with a '-' and I can't for the life of me workout how to amend it to accept '-' in the path name. Thanks

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >