Search Results

Search found 3240 results on 130 pages for 'groupwise maximum'.

Page 75/130 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • iPhone Safari localStorage does not persist after device reboot

    - by Tom
    Hi, I write a simple iPhone web app using HTML5's localStorage. Tests on a 2G device show the data does not persist after an iPhone reboot. This is a test code: <html> <head> <meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> </head> <body> <script> alert("1:" + localStorage.getItem("test")); localStorage.setItem("test", "123"); alert("2:" + localStorage.getItem("test")); </script> </body> As far as I understand the data should persist even after a device reboot. Can anyone shed some light on this behavior? Thanks! Tom.

    Read the article

  • Issues with Ext-JS 1.1 date fields and Firefox 3.x / IE 8

    - by Cruachan
    I'm modifying an older website for a client that uses Ext-JS 1.1 and I'm having issues with display of date fields in IE and particularly Firefox. The site was left in a semi-implemented state previously, so there's not been a perceived problem before. In Chrome and Safari everything looks fine and the datepicker drops down and displays correctly. However in Firefox the picker is displayed widened to cover the maximum scrollable brower width (very wide indeed), and in IE it's truncated to about two thirds of the width it should be. I am somewhat uncertain that this is due to our css, but because Chrome and Safari work fine I think it might be a problem with Ext-js itself. I realise that this is an old version of Ext-JS, but because everything else works fine I don't want to go to the trouble of upgrading unless that would be very straightforward (but how difficult would that be?) I don't myself use ExtJS and this is the only website my client has with it - so I'm really looking for the simplest possible solution.

    Read the article

  • jQuery: how to produce a ProgressBar from given markup

    - by Richard Knop
    So I'm using the ProgressBar JQuery plugin (http://t.wits.sg/misc/jQueryProgressBar/demo.php) to create some static progress bars. What I want to achieve is to from this markup: <span class="progress-bar">10 / 100</span> produce a progress bar with maximum value of 100 and current value of 10. I am using html() method to get the contents of the span and then split() to get the two numbers: $(document).ready(function() { $(".progress-bar").progressBar($(this).html().split(' / ')[0], { max: $(this).html().split(' / ')[1], textFormat: 'fraction' }); }); That doesn't work, any suggestions? I'm pretty sure the problem is with $(this).html().split(' / ')[0] and $(this).html().split(' / ')[1], is that a correct syntax?

    Read the article

  • Distributing points over a surface within boundries

    - by vise
    I'm interested in a way (algorithm) of distributing a predefined number of points over a 4 sided surface like a square. The main issue is that each point has got to have a minimum and maximum proximity to each other (random between two predefined values). Basically the distance of any two points should not be closer than let's say 2, and a further than 3. My code will be implemented in ruby (the points are locations, the surface is a map), but any ideas or snippets are definitely welcomed as all my ideas include a fair amount of brute force.

    Read the article

  • Specify which row to return on SQLite Group By

    - by lozzar
    I'm faced with a bit of a difficult problem. I store all the versions of all documents in a single table. Each document has a unique id, and the version is stored as an integer which is incremented everytime there is a new version. I need a query that will only select the latest version of each document from the database. While using GROUP BY works, it appears that it will break if the versions are not inserted in the database in the order of version (ie. it takes the maximum ROWID which will not always be the latest version). Note, that the latest version of each document will most likely be a different number (ie. document A is at version 3, and document B is at version 6). I'm at my wits end, does anybody know how to do this (select all the documents, but only return a single record for each document_id, and that the record returned should have the highest version number)?

    Read the article

  • Programatically detect number of physical processors/cores or if hyper-threading is active on Window

    - by HTASSCPP
    I have a multithreaded c++ application that runs on Windows, Mac and a few Linux flavours. To make a long story short: Inorder for it to run at maximum efficiency I have to be able to instantiate a single thread per physical processor/core. Creating more threads than there are physical processors/cores degrades the performance of my program considerably. I can already correctly detect the number of logical processors/cores correctly on all three of these platforms. To be able to detect the number of physical processors/cores correctly I'll have to detect if hyper-treading is supported AND active. My question therefore is if there is a way to detect whether hyperthreading is supported AND ENABLED? If so, how exactly.

    Read the article

  • Why is my masm32 program crashing whenever I try using interrupts?

    - by incrediman
    Here's the code: .386 ;target for maximum compatibility .model small,stdcall ;model .code main: int 20h END main Result: http://img705.imageshack.us/img705/3738/resultom.png "test.exe has stopped working" - always right when it reaches the interrupt. This is the interrupt I'm trying to use. It should simply exit the program. Others I've tried include character input/output, etc.. Nothing works. I'm on windows 7, using masm32 with the WinAsm IDE. There are so many cool things it seems I should be able to do with interrupts... however, it crashes whenever I try to use an interrupt - always the same way. This seems related and possibly useful: http://stackoverflow.com/questions/1414260/dos-interrupt-in-masm-x86-assembly-crashing ...but I haven't really been able to figure anything out from it. Any suggestions?

    Read the article

  • Declaring data types in SQLite

    - by dan04
    I'm familiar with how type affinity works in SQLite: You can declare column types as anything you want, and all that matters is whether the type name contains "INT", "CHAR", "FLOA", etc. But is there a commonly-used convention on what type names to use? For example, if you have an integer column, is it better to distinguish between TINYINT, SMALLINT, MEDIUMINT, and BIGINT, or just declare everything as INTEGER? So far, I've been using the following: INTEGER REAL CHAR(n) -- for strings with a known fixed with VARCHAR(n) -- for strings with a known maximum width TEXT -- for all other strings BLOB BOOLEAN DATE -- string in "YYYY-MM-DD" format TIME -- string in "HH:MM:SS" format TIMESTAMP -- string in "YYYY-MM-DD HH:MM:SS" format (Note that the last three are contrary to the type affinity.)

    Read the article

  • how to preload more than one but not all images of a slideshow with jquery

    - by wtip
    I'd like to create a web based stop motion video player. Basically a slideshow that shows 2-4 images per second. Each image might be a maximum of 20KB. I don't want to preload all images in the slideshow as there might be thousands, however I need to preload more than just the next image in the show as this will not playback fast enough (because of the playback speed the browser needs to be loading more than one image at a time). I've been looking at using the jQuery Cycle Plugin (http://malsup.com/jquery/cycle/) with a addSlide type function but don't know how to make it work. Would something like this might work? -Slideshow starts -image is played back -preloader will attempt to load up to the next 60 images -playback will wait for the next image in line to completely load, but will not wait for all 59 others. The playback / preloading order is important for this application.

    Read the article

  • How to deal with RGB to YUV conversion

    - by maximus
    The formula says: Y = 0.299 * R + 0.587 * G + 0.114 * B; U = -0.14713 * R - 0.28886 * G + 0.436 * B; V = 0.615 * R - 0.51499 * G - 0.10001 * B; What if, for example, the U variable becomes negative? U = -0.14713 * R - 0.28886 * G + 0.436 * B; Assume maximum values for R and G (ones) and B = 0 So, I am interested in implementing this convetion function in OpenCV, So, how to deal with negative values? Using float image? anyway please explain me, may be I don't understand something..

    Read the article

  • Are there any JSF components for implementing breadcrumb navigation?

    - by kazanaki
    As far as I know there are two "kinds" of breadcrumbs. The static/hierarchy one Works like a stack Entries are pushed when a user goes "deeper" into the site Entries are poped when user goes "up" into the site Is the same for all users (for a given page) Shows location rather than history A simple Example would be HOME - BIG CATEGORY - SMALL CATEGORY - ARTICLE The dynamic/historical one Works like a queue Entries are pushed at the end when a user goes to another page Entries are removed from the front when the maximum size is reached Is different for each user, since it is personalized. Shows timeline/history instead of location. A simple example would be SMALL CATEGORY - HOME - BIG CATEGORY - HOME The question is: Are there any ready-made JSF component for these types of navigation?

    Read the article

  • Why does jruby complain about valid java_opts

    - by brad
    I have set my java min/max heap size to be the same as outlined in the Sun Docs for precise heap sizing using the following: -Xms768m -Xmx768m This works fine when I start tomcat, but if I run jruby from the command line it complains saying: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes specified I read in the jruby docs about some -J-X params but it seems silly that I would need to explicitly override my normal jvm settings. The problem arises when I do a deploy. I try running jruby -S rake db:migrate on my server and it complains. Is it true that I need to explicitly override my JVM settings when running jruby? It seems as though ANY Xms/Xmx values cause jruby to complain. Update So it seems that some settings do in fact work. For instance all of these work: Xmx256m Xms256m Xmx512m Xms256m Xmx512m Xms500m But these don't: Xmx512m Xms512m Xmx512m Xms501m Xmx768m Xms512m

    Read the article

  • Predict Stock Market Values

    - by mrlinx
    I'm building a web semantic project that gathers the maximum ammount of historic data about a certain company and tries to predict its future market stock values. For data I have the historic stock values (not normalized), news (0 to 1 polarity) and subjective content (also a 0 to 1 polarity). What is the best AI system to train and use for this kind of objective? Is a simple NN with back-propagation training the best I can hope for? update: Everyone is concerned about the quality of this system. Although I'm pretty sure the system is as good as a random prediction (or even worse), this is a school project around artificial intelligence and web semantics. Therefore I'm only concerned in picking the best kind of train method for the data I have (NN, RBF, SVM, Bayes, neuro-fuzzy, etc). Its not about making money.

    Read the article

  • Scala regex Named Capturing Groups

    - by Brent
    In scala.util.matching.Regex trait MatchData I see that there support for groupnames (Named Capturing Groups) But since Java does not support groupnames until version 7 as I understand it, Scala version 2.8.0.RC4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6. gives me this exception: scala> val pattern = """(?<login>\w+) (?<id>\d+)""".r java.util.regex.PatternSyntaxException: Look-behind group does not have an obvio us maximum length near index 11 (?<login>\w+) (?<id>\d+) ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.group0(Pattern.java:2488) at java.util.regex.Pattern.sequence(Pattern.java:1806) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) So the question is Named Capturing Groups supported in Scala? If so any examples out there? If not I might look into the Named-Regexp lib from clement.denis.

    Read the article

  • Java App Engine - ranked counter

    - by Richard
    I understand the sharded counter, here: http://code.google.com/appengine/articles/sharding_counters.html The problem is that a simple counter will not work in my application. I am sorting my entities by a particular variable so I am returned not so much a count, but more of a rank. My current method is: SELECT COUNT(this) FROM Entity.class WHERE value <= ? Result + 1 is then the rank of the parameter in relation to the value variable in the persistent Entity objects. The limitation of this is the highest rank being returned is 1001 because count() can give a maximum of 1000. The reason I cannot store the rank on the Entity object is that the ranks are updated very often, and re-setting this rank variable would be much too costly. Any ideas on the best way to accomplish this?

    Read the article

  • Using numeric_limits::max() in constant expressions

    - by FireAphis
    Hello, I would like to define inside a class a constant which value is the maximum possible int. Something like this: class A { ... static const int ERROR_VALUE = std::numeric_limits<int>::max(); ... } This declaration fails to compile with the following message: numeric.cpp:8: error: 'std::numeric_limits::max()' cannot appear in a constant-expression numeric.cpp:8: error: a function call cannot appear in a constant-expression I understand why this doesn't work, but two things look weird to me: It seems to me a natural decision to use the value in constant expressions. Why did the language designers decide to make max() a function thus not allowing this usage? The spec claims in 18.2.1 that For all members declared static const in the numeric_limits template, specializations shall define these values in such a way that they are usable as integral constant expressions. Doesn't it mean that I should be able to use it in my scenario and doesn't it contradict the error message? Thank you.

    Read the article

  • computing "node closure" of graph with removal

    - by Fakrudeen
    Given a directed graph, the goal is to combine the node with the nodes it is pointing to and come up with minimum number of these [lets give the name] super nodes. The catch is once you combine the nodes you can't use those nodes again. [first node as well as all the combined nodes - that is all the members of one super node] The greedy approach would be to pick the node with maximum out degree and combine that node with nodes it is pointing to and remove all of them. Do this every time with the nodes which are not removed yet from graph. The greedy is O(V), but this won't necessarily output minimum number super nodes. So what is the best algorithm to do this?

    Read the article

  • Web Services: more frequent "small" calls, or less frequent "big" calls

    - by Klay
    In general, is it better to have a web application make lots of calls to a web service getting smaller chunks of data back, or to have the web app make fewer calls and get larger chunks of data? In particular, I'm building a Silverlight app that needs to get large amounts of data back from the server in response to a query created by a user. Each query could return anywhere from a few hundred records to a few thousand. Each record has around thirty fields of mostly decimal-type data. I've run into the situation before where the payload size of the response exceeded the maximum allowed by the service. I'm wondering whether it's better (more efficient for the server/client/web service) to cut this payload vertically--getting all values for a single field with each call--or horizontally--getting batches of complete records with each call. Or does it matter?

    Read the article

  • word frequency problem

    - by davit-datuashvili
    hi in programming pearls i have meet following problem question is this:print words in decreasing frequency or as i understand probllem is this suppose there is given string array let call it s words i have taken randomly it does not matter String s[]={"cat","cat","dog","fox","cat","fox","dog","cat","fox}; and we see that string cat occurs 4 times fox 3 times and dog 2 times so result will be such cat fox dog i have following code in java mport java.util.*; public class string { public static void main(String[] args){ String s[]={"fox","cat","cat","fox","dog","cat","fox","dog","cat"}; Arrays.sort(s); int counts; int count[]=new int[s.length]; for (int i=0;i } } or i have sorted array and create count array where i write number of each word in array problem is that somehow index of integer array element and string array element is not same how to do such that print words according tu maximum elements of integer array? please help me

    Read the article

  • Consolidate data from many different databases into one with minimum latency

    - by NTDLS
    I have 12 databases totaling roughly 1.0TB, each on a different physical server running SQL 2005 Enterprise - all with the same exact schema. I need to offload this data into a separate single database so that we can use for other purposes (reporting, web services, ect) with a maximum of 1 hour latency. It should also be noted that these servers are all in the same rack, connected by gigabit connections and that the inserts to the databases are minimal (Avg. 2500 records/hour). The current method is very flakey: The data is currently being replicated (SQL Server Transactional Replication) from each of the 12 servers to a database on another server (yes, 12 different employee tables from 12 different servers into a single employee table on a different server). Every table has a primary key and the rows are unique across all tables (there is a FacilityID in each table). What are my options, these has to be a simple way to do this.

    Read the article

  • Good way to get the key of the highest value of a Dictionary in C#

    - by Arda Xi
    I'm trying to get the key of the maximum value in the Dictionary<double, string> results. This is what I have so far: double max = results.Max(kvp => kvp.Value); return results.Where(kvp => kvp.Value == max).Select(kvp => kvp.Key).First(); However, since this seems a little inefficient, I was wondering whether there was a better way to do this.

    Read the article

  • prevent bots to query my database several times

    - by Alain
    Hi all, I'm building an application that is a kind of registry. Think about the dictionary: you lookup for a word and it return something if the word is founded. Now, that registry is going to store valuable informations about companies, and some could be tempted to get the complete listing. My application use EJB 3.0 that replies to WS. So I was thinking about permits a maximum of 10 query per IP address per day. Storing the IP address and a counter on a table that would be empty by a script every night. Is it a good idea/practice to do so? If yes, how can I get the IP address on the EJB side? Is there a better way to prevent something to get all the data from my database? I've also though about CAPTCHA but I think it's a pain for the user, and sometime, they are difficult to read even for real human. Hope it's all clear since I'm not english... Thanks Alain

    Read the article

  • Laws of Computer Science and Programming

    - by Jonas
    We have Amdahl's law that basically states that if your program is 10% sequential you can get a maximum 10x performance boost by parallelizing your application. Another one is Wadler's law which states that In any language design, the total time spent discussing a feature in this list is proportional to two raised to the power of its position. 0. Semantics 1. Syntax 2. Lexical syntax 3. Lexical syntax of comments My question is this: What are the most important (or at least significant / funny but true / sad but true) laws of Computer Science and programming? I want named laws, and not random theorems, So an answer should look something like Surname's (law|theorem|conjecture|corollary...) Please state the law in your answer, and not only a link. Edit: The name of the law does not need to contain it's inventors surname. But I do want to know who stated (and perhaps proved) the law

    Read the article

  • Specifying --host1 as localhost with port 8983 in autobench

    - by mamatha
    I am using autobench for benchmarking in ubuntu 8.10 autobench --single_host --host1 localhost --uri1 /solr/admin --low_rate 20 --high_rate 200 --rate_step 20 --num_call 10 --num_conn 5000 --timeout 5 --file bench1.tsv This is the command which I gave. It is taking the default port as 80 and the number of replies and requests are as shown below **Errors: total 5000 client-timo 0 socket-timo 0 connrefused 5000 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 Zero replies received, test invalid: rate 20 httperf --timeout=5 --client=0/1 --server=localhost --port=80 --uri=/solr/admin --rate=40 --send-buffer=4096 --recv-buffer=16384 --num-conns=5000 --num-calls=10 Maximum connect burst length: 4 Total: connections 5000 requests 0 replies 0 test-duration 124.976 s** But, I want the port to be 8983. In all the examples that I have seen in the autobench tutorial, --host1 is a website (such as, www.test.com). Can anyone suggest how to use localhost taking the port as 8983? Thanks, in advance.

    Read the article

  • zlib memory usage / performance. With 500kb of data.

    - by unixman83
    Is zLib Worth it? Are there other better suited compressors? I am using an embedded system. Frequently, I have only 3MB of RAM or less available to my application. So I am considering using zlib to compress my buffers. I am concerned about overhead however. The buffer's average size will be 30kb. This probably won't get compressed by zlib. Anyone know of a good compressor for extremely limited memory environments? However, I will experience occasional maximum buffer sizes of 700kb, with 500kb much more common. Is zlib worth it in this case? Or is the overhead too much to justify? My sole considerations for compression are RAM overhead of algorithm and performance at least as good as zlib.

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >