Search Results

Search found 5176 results on 208 pages for 'max fraser'.

Page 129/208 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • Boost.Program_Options not working with short options

    - by inajamaica
    I have the following options_description: po::options_description config("Configuration File or Command Line"); config.add_options() ("run-time,t", po::value(&runTime_)-default_value(1440.0), "set max simulation duration") ("starting-iteration,i", po::value(&startingIteration_)-default_value(1), "set starting simulation iteration") ("repetitions,r", po::value(&repetitions_)-default_value(100), "set number of iterations") ... ; As you can see the three shown have a long,short names employed. The long versions all work. However, none of the short ones do, and each time I try a -t 12345.0 or a -i 12345, etc., I get the following from Program_Options: std::logic_error: in option 'starting-iteration': invalid option value I'm using Boost 1.42 on Win32. Any thoughts on what might be going on here? Thanks!

    Read the article

  • How does .NET determine the week in a TimeZoneInfo.TransitionTime ?

    - by Travis Brooks
    Greetings I'm trying to do some DateTime math for various time zones and I wanted to take daylight savings into account. Lets say I have a TimeZoneInfo and i've determined the appropriate AdjustmentRule for a given DateTime. Lets also say the particular TimeZoneInfo i'm dealing with is specified as rule.DaylightTransitionStart.IsFixedDateRule == false, so I need to figure out if the given DateTime falls within the start/end TransitionTime.Week values. This is where I'm getting confused, what is .NET considering as a "week"? My first thought was it probably used something like DayOfWeek thisMarksWeekBoundaries = Thread.CurrentThread.CurrentUICulture.DateTimeFormat.FirstDayOfWeek; and went through the calendar assigning days to week, incrementing week every time it crossed a boundary. But, if I do this for May 2010 there are 6 week boundary buckets, and the max valid value for TransitionTime.Week is 5 so this can't be right. Whats the right way to slice up May 2010?

    Read the article

  • Django aggregation query on related one-to-many objects

    - by parxier
    Here is my simplified model: class Item(models.Model): pass class TrackingPoint(models.Model): item = models.ForeignKey(Item) created = models.DateField() data = models.IntegerField() In many parts of my application I need to retrieve a set of Item's and annotate each item with data field from latest TrackingPoint from each item ordered by created field. For example, instance i1 of class Item has 3 TrackingPoint's: tp1 = TrackingPoint(item=i1, created=date(2010,5,15), data=23) tp2 = TrackingPoint(item=i1, created=date(2010,5,14), data=21) tp3 = TrackingPoint(item=i1, created=date(2010,5,12), data=120) I need a query to retrieve i1 instance annotated with tp1.data field value as tp1 is the latest tracking point ordered by created field. That query should also return Item's that don't have any TrackingPoint's at all. If possible I prefer not to use QuerySet's extra method to do this. That's what I tried so far... and failed :( Item.objects.annotate(max_created=Max('trackingpoint__created'), data=Avg('trackingpoint__data')).filter(trackingpoint__created=F('max_created')) Any ideas?

    Read the article

  • JFormattedTextField : input time duration value

    - by bguiz
    I want to use a JFormattedTextField to allow the user to input time duration values into a form. Sample valid values are: 2h 30m 72h 15m 6h 0h However I am having limited success with this. Can some one please suggest how this can be accomplished? I am OK if this result can be achieved using a JTextField as well. Thanks! If it is worth anything, here's my current attempt: mFormattedText.setFormatterFactory( new DefaultFormatterFactory( new DateFormatter( new SimpleDateFormat("H mm")))); This sorta works except that: I cannot get h and m to appear as plain text (I tried escaping) * The number of hours has a max *: See @nanda's answer

    Read the article

  • Gorm findAllBy inside gsp doubt

    - by xain
    Hi, can anybody tell me why this works <g:each var="n" in="${com.pp.News.list()}"> <h2>${n.t}</h2> <p>${n.tx}</p> </g:each> but this doesn't ? <g:set var="news" value="${com.pp.News.findAllByShow(true,[sort:'prio', order:'desc',max:5])}" /> <g:each var="n" in="news"> <h2>${n.t}</h2> <p>${n.tx}</p> </g:each> Part of the exception is Exception Message: No such property: t for class: java.lang.String How can I make it work? Thanks

    Read the article

  • Linq to SQL and SQL Server Compact Error: "There was an error parsing the query."

    - by Jeremy
    I created a SQL server compact database (MyDatabase.sdf), and populated it with some data. I then ran SQLMetal.exe and generated a linq to sql class (MyDatabase.mdf) Now I'm trying to select all records from a table with a relatively straightforward select, and I get the error: "There was an error parsing the query. [ Token line number = 3,Token line offset = 67,Token in error = MAX]" Here is my select code: public IEnumerable ListItems() { MyDatabase db_m = new MyDatabase("c:\mydatabase.sdf"); return this.db_m.TestTable.Select(test = new Item() { .... } } I've read that Linq to SQL works with Sql Compact, is there some other configuration I need to do?

    Read the article

  • Advantages of Thread pooling in embedded systems

    - by Microkernel
    I am looking at the advantages of threadpooling design pattern in Embedded systems. I have listed few advantages, please go through them, comment and please suggest any other possible advantages that I am missing. Scalability in systems like ucos-2 where there is limit on number of threads. Increasing capability of any task when necessary like Garbage collection (say in normal systems if garbage collection is running under one task, its not possible to speed it up, but in threadpooling we can easily speed it up). Can set limit on the max system load. Please suggest if I am missing anything.

    Read the article

  • M a java developer struggling with jQuery :(

    - by Mustafa
    Guys i am very new to jQuery.I have started using the auto complete feature.What i want is while i click on an item provided by the auto complete the page should submit to another page.I am using : $().ready(function() { $("#name").autocomplete("contacts.jsp"); $("#name").result(function(event, data, formatted) { if (data) $(this).parent().next().find("input").val(data[1]); }); $("#name").setOptions({ mustMatch : false, max: 8, onClick:selectItem, autoFill: false }); }); And this gives me good data like :Aditi XaveirAsif Garhietc for 'A'Now what i want is on clicking Aditi Xaveir, the page should submit to AditiXaveir's profile page.How do i do that?

    Read the article

  • Clear default values using onsubmit

    - by Thomas
    I need to clear the default values from input fields using js, but all of my attempts so far have failed to target and clear the fields. I was hoping to use onSubmit to excute a function to clear all default values (if the user has not changed them) before the form is submitted. <form method='get' class='custom_search widget custom_search_custom_fields__search' onSubmit='clearDefaults' action='http://www.example.com' > <input name='cs-Price-2' id='cs-Price-2' class='short_form' value='Min. Price' /> <input name='cs-Price-3' id='cs-Price-3' class='short_form' value='Max Price' /> <input type='submit' name='search' class='formbutton' value=''/> </form> How would you accomplish this?

    Read the article

  • I'm a java developer struggling with jQuery

    - by Mustafa
    Guys i am very new to jQuery.I have started using the auto complete feature.What i want is while i click on an item provided by the auto complete the page should submit to another page.I am using : $().ready(function() { $("#name").autocomplete("contacts.jsp"); $("#name").result(function(event, data, formatted) { if (data) $(this).parent().next().find("input").val(data[1]); }); $("#name").setOptions({ mustMatch : false, max: 8, onClick:selectItem, autoFill: false }); }); And this gives me good data like :Aditi XaveirAsif Garhietc for 'A'Now what i want is on clicking Aditi Xaveir, the page should submit to AditiXaveir's profile page.How do i do that?

    Read the article

  • Optimizing Oracle query

    - by Omnipresent
    SELECT MAX(verification_id) FROM VERIFICATION_TABLE WHERE head = 687422 AND mbr = 23102 AND RTRIM(LTRIM(lname)) = '.iq bzw' AND TO_CHAR(dob,'MM/DD/YYYY')= '08/10/2004' AND system_code = 'M'; This query is taking 153 seconds to run. there are millions of rows in VERIFICATION_TABLE. I think query is taking long because of the functions in where clause. However, I need to do ltrim rtrim on the columns and also date has to be matched in MM/DD/YYYY format. How can I optimize this query?

    Read the article

  • mysql query the latest date

    - by user295189
    I am running this query SEL ECT sh.*, u.initials AS initals FROM database1.table1 AS sh JOIN database2.user AS u ON u.userID = sh.userid WHERE id = 123456 AND dts = ( SELECT MAX(dts) from database1.table1 ) ORDER BY sort_by, category In the table1 I have records like this dts status category sort_by 2010-04-29 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:54 Married Marital Status 2 2010-04-28 12:21:15 Smoker Tobbaco 3 2010-04-27 12:20:27 Civil Engineers Occupation 1 2010-04-27 12:20:54 Married Marital Status 2 2010-04-27 12:21:15 Smoker Tobbaco 3 2010-04-26 12:20:27 Civil Engineers Occupation 1 2010-04-26 12:20:54 Married Marital Status 2 2010-04-26 12:21:15 Smoker Tobbaco 3 so if you look at my data, I am choosing the latest entry by category and sort_id. however in some case such as on 29th (2010-04-29 12:20:27) I have only one record. So in this case I want to show occupation for latest and then the rest of them (latest). But currently it displays only one row. Thanks

    Read the article

  • SubSonic-based app that connects to multiple databases

    - by Fervelas
    Hello there, I currently developed an app that connects to SQL Server 2005 database, so my DAL objects where generated using information from that DB. It will also be possible to connect to an Oracle and MySQL db, all with the same table structures (aside from the normal differences in fields, such as varbinary(max) in SQL Server and BLOB in Oracle, and so on). For this purpose, I already defined multiple connection strings and multiple SubSonic providers for the different DB's the app will run on. My question is, if I generated my objects using a SQL Server database, should the generated objects work transparently with the other DB's or do I need to generate a different DAL for each database engine I use? Should I be aware of any possible bugs I may encounter while performing these operations? Thanks in advance for any advice on this issue.

    Read the article

  • Cocos2D SpriteSheet animation problem, my number of frames is much larger.

    - by vaibhav-tekam
    Hello, I am trying to use SpriteSheet to run an animation. My frames are of 320x480 in size each, So I am able to put max 6 frames on the texture image. But my animation consists of frame number ranging from 50 to 200 sometimes, and all are of size 320x480. But this much number of frames cannot be added on the Texture image as the size is restricted to 1024x1024. Is there any other approach I can try out. Can I play one animation after the other.And won't it be hampering the performance. Please, I need suggestions. Best, Vaibhav Tekam.

    Read the article

  • Problem with DWR and Android-Browser

    - by moxn
    Hello everyone, I am experiencing a problem with accessing an application from the Android-browser. The application uses DWR to persist connections to the clients that are connected with it. Everything works fine for me, except that if the application does not send any data to the client on the Android-phone for 2 minutes, the connection seems to be lost and no data arrive at the client. The same scenario works just fine on Firefox, Opera and Chrome. If the pause between two data transfers is less than 2 minutes, it works just fine. So, now my question: Is there some timeout setting for the android browser that I am missing? Or is this some built-in bug/feature/whatever that I cannot circumvent? I know that I could prevent this from happening with some sort of heartbeat, I would just like to why this is happening. Thanks in advance, Max btw: Everything (server, clients) runs on my machine and I am testing this on the android emulator with Windows XP Android emulator version 1.10 (build_id CUPCAKE-150240)

    Read the article

  • ImageView scale type not working in list activity

    - by Justin
    I have used ImageView's before and understand the different scale types that can be set... However I am having an incredibly difficult time trying to get an ImageView to scale properly in the row of a ListActivity or an ExpandableListActivity. I have tried setting the android:scaleType property to every single value but the image never scales down. I have set the min and max sizes as well and they don't seem to have any effect. I have done both of these things in both the XMl and in code to no avail... Does anyone have any ideas or perhaps a workaround? Thanks in advance!

    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

  • Java dropping half of UDP packets

    - by Andrew Klofas
    Greetings, I have a simple client/server setup. The server is in C and the client that is querying the server is Java. My problem is that, when I send bandwidth-intensive data over the connection, such as Video frames, it drops up to half the packets. I make sure that I properly fragment the udp packets on the server side (udp has a max payload length of 2^16). I verified that the server is sending the packets (printf the result of sendto()). But java doesn't seem to be getting half the data. Furthermore, when I switch to TCP, all the video frames get through but the latency starts to build up, adding several seconds delay after a few seconds of runtime. Is there anything obvious that I'm missing? I just can't seem to figure this out. Thanks, Andrew

    Read the article

  • jQuery UI Slider - Animation of handle and scroll content not in sync

    - by Mayko
    Im having troubles getting the jQuery UI Slider customized for my purposes. On load the slider and its content should automatically animate to a certain position. Ideally it should animate to the very right, then stop and then animate back (as a loop) as long as the user doesn't hovers over scroll content or slider. Following my default slider setup (http://jsfiddle.net/mayko/j6WuE/1/): var scrollbar = $("#slider").slider({ animate: 3000, min: 0, max: $("#timeline_content .items").width(), change: handleSlider, slide: handleSlider }); function handleSlider(e, ui) { $("#timeline_content").stop().animate({scrollLeft: ui.value}, scrollbar.slider("option", "animate")); } If i now try to set the value like this: $('#slider').slider({'value': 1000}); The scroll content nicely animates, but the handle just jumps to that new position. Even if I click on the slider track itself the animation of scroll content and slider handle are not in sync. Does anyone got a solution?

    Read the article

  • why cacti is showing empty graph.??.even if rrd file created..

    - by Divya mohan Singh
    hii, i have develop my own snmp service..and i want to plot a graph of an OID provided. so, i have create graph in cacti. -) Its is showing device up. -) It is creating rrd file.(RRDTool says OK). -) showing the graph but its empty. but when i check it say rrdtool fetch AVERAGE it showing me all the values nan only..the monitored OID is having value 47 and i have set min=0 and max=100 i am using cacti appliance by rpath http://www.rpath.org/ui/#/appliances?id=http://www.rpath.org/api/products/cacti-appliance still i can show value on graph.. where is the problem??can anyone plz tell me??

    Read the article

  • NULL handling with subselect in Hibernate Criteria API

    - by Jens Schauder
    I'm constructing a Hibernate Criterion, using a subselect as follows DetachedCriteria subselect = DetachedCriteria.forClass(NhmCode.class, "sub"); // the subselect selecting the maximum 'validFrom' subselect.add(Restrictions.le("validFrom", new Date())); // it should be in the past (null needs handling here) subselect.add(Property.forName("sub.lifeCycle").eqProperty("this.id")); // join to owning entity subselect.setProjection(Projections.max("validFrom")); // we are only interested in the maximum validFrom Conjunction resultCriterion = Restrictions.conjunction(); resultCriterion.add(Restrictions.ilike(property, value)); // I have other Restrictions as well resultCriterion.add(Property.forName("validFrom").eq(subselect)); // this fails when validFrom and the subselect return NULL return resultCriterion; It works ok so far, but the restriction on the last line before the return statement is false when validFrom and subselect result in NULL. What I need is a version which handles this case as true. Possibly by applying a NVL or coalesce or similar. How do I do this?

    Read the article

  • JVM memory initializazion error after windows update

    - by Pier Luigi
    Hi all, I have three Windows Server 2003 with 2 GB RAM. Server1 tomcat 5.5.25 jvm version SUN 1.6.0_11-b03 Server2 tomcat 5.5.25 jvm version SUN 1.6.0_14-b08 Server3 tomcat 6.0.18 jvm version SUN 1.6.0_14-b08 For the three servers JVM parameters are: -XX:MaxPermSize=256m -Dcatalina.base=C:\Apache Group\apache-tomcat-5.5.25 -Dcatalina.home=C:\Apache Group\apache-tomcat-5.5.25 -Djava.endorsed.dirs=C:\Apache Group\apache-tomcat-5.5.25\common\endorsed -Djava.io.tmpdir=C:\Apache Group\apache-tomcat-5.5.25\temp vfprintf -Xms512m -Xmx1024m For some months everithing worked fine. Last friday we installed some windows updates. After the reboot tomcat doesn't start anymore, with error: Error occurred during initialization of VM Could not reserve enough space for object heap We reduced the parameter -Xmx1024m to -Xmx768m and now tomcat starts. But we need greater max heap size What happened to our servers ? Thanks in advance.

    Read the article

  • WPF Validation in an ElementHost control

    - by Jon Mitchell
    I've got a WinForms form that contains an ElementHost control (which contains a WPF UserControl) and a Save button. In the WPF UserControl I've got a text box with some validation on it. Something like this... <TextBox Name="txtSomething" ToolTip="{Binding ElementName=txtSomething, Path=(Validation.Errors).[0].ErrorContent}"> <Binding NotifyOnValidationError="True" Path="Something"> <Binding.ValidationRules> <commonWPF:DecimalRangeRule Max="1" Min="0" /> </Binding.ValidationRules> </Binding> </TextBox> This all works fine. What I want to do however, is disable the Save button while the form is in an invalid state. Any help would be greatly appreciated.

    Read the article

  • updateBinaryStream on ResultSet with FileStream

    - by Lieven Cardoen
    If I try to update a FileStream column I get following error: com.microsoft.sqlserver.jdbc.SQLServerException: The result set is not updatable. Code: System.out.print("Now, let's update the filestream data."); FileInputStream iStream = new FileInputStream("c:\\testFile.mp3"); rs.updateBinaryStream(2, iStream, -1); rs.updateRow(); iStream.close(); Why is this? Table in Sql Server 2008: CREATE TABLE [BinaryAssets].[BinaryAssetFiles]( [BinaryAssetFileId] [int] IDENTITY(1,1) NOT NULL, [FileStreamId] [uniqueidentifier] ROWGUIDCOL NOT NULL, [Blob] [varbinary](max) FILESTREAM NULL, [HashCode] [nvarchar](100) NOT NULL, [Size] [int] NOT NULL, [BinaryAssetExtensionId] [int] NOT NULL, Query used in Java: String strCmd = "select BinaryAssetFileId, Blob from BinaryAssets.BinaryAssetFiles where BinaryAssetFileId = 1"; stmt = con.createStatement(); rs = stmt.executeQuery(strCmd);

    Read the article

  • How many javascript link I can have in Facebook?

    - by Murvinlai
    Is there a limit of how many js file I can include () in facebook? I include 5 files. no problem.. the 6th one not loaded. Then I have to put the code in the 6th one into the 5th file. then works. so, is it 5 files in max? BY THE WAY, I'm developing the apps now, not in production. so it is not in the stage of compressing JS / minizing it. :) so it is kinda annoying to got missing js files or files not loaded..etc so, what is the limit from FB? what is the file size limit? I know that the JSON request call back data limit is 5000.. but not sure about the js include.

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >