Search Results

Search found 972 results on 39 pages for 'highest'.

Page 23/39 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • jQuery - get a list of values of an attribute from elements of a class

    - by Ankur
    I have a class called object which has an element called 'level'. I want to get a list of all the different values of level on the page so I can select the highest one. If I do something like: $(".object").attr("level") will that get me a list of values that are the values of the level attribute? I suspect not, but then how do you do something like that. Note: I don't want to select an HTML object for manipulation as is more common, rather I want to select values of the attribute.

    Read the article

  • Mouse move and thread

    - by bsebi
    When I move the mouse over the window, the program runs much faster (cc. 3 times). This is a real time webcam .Net/Mono application running on a MacBook. On Windows works perfect. Is this maybe a power saving function of the laptop? The code: Thread t = new Thread(Foo); t.Priority = ThreadPriority.Highest; // I've tried without priority too, doesn't matter t.Start(); ... void Foo() { while (true) { ++k; // then write k to the window somehow } }

    Read the article

  • Why is there no Microsoft Certified Master program targetted at developers?

    - by Jason Coyne
    In the lower level certifications, developer technology is all over the place. At the highest level (Microsoft Certified Architect), the Solutions track appears to be a good fit for high level application designers and architects. MCA requires an MCM as a prerequisite. However, none of the MCM tracks are targeted towards development. Obviously to be a good architect you need to have knowledge of other technologies, servers, sql, messaging etc. But those seem like things that should be part of the course load, and not the sole focus. Are the lower tiers really as high as you can go for application focused professionals? For most developers, the SQL MCM seems to be the best fit. Are the MCM and MCA really targeted ad more administrators and not developers?

    Read the article

  • Postgresql sequences

    - by Dylan
    When I delete all records from a Postgresql table and then try to reset the sequence to start a new record with number 1 when it is inserted, i get different results : SELECT setval('tblname_id_seq', (SELECT COALESCE(MAX(id),1) FROM tblname)); This sets the current value of the sequence to 1, but the NEXT record (actually the first because there are no records yet) gets number 2! And I can't set it to 0, because the minimum value in the sequence is 1! When I use : ALTER SEQUENCE tblname_id_seq RESTART WITH 1; the first record that is inserted actually gets number 1 ! But the above code doesn't accept a SELECT as a value instead of 1. I wish to reset the sequence to number 1 when there are no records, and the first record then should start with 1. But when there ARE already records in the table, I want to reset the sequence so that the next record that is inserted will get {highest}+1 Does anyone have a clear solution for this?

    Read the article

  • Assign multiple css classes to a table element in Rails

    - by Eric K
    I'm trying to style a table row using both cycle and a helper, like shown: <tr class= <%= cycle("list-line-odd #{row_class(item)}", "list-line-even #{row_class(item)}")%> > However, when I do this, the resulting HTML is: <tr class = "list-line-odd" lowest-price> with the return from the helper method not enclosed in the quotes, and therefore not recognized. Here's the helper I'm using: def row_class(item) if item.highest_price > 0 and item.lowest_price > 0 and item.highest_price != item.lowest_price if item.current_price >= item.highest_price "highest-price" elsif item.current_price <= item.lowest_price "lowest-price" end end end I must be missing something obvious, but I just can't figure out how to wrap both the result of cycle and the helper method return in the same set of quotes. Any help would be greatly appreciated!

    Read the article

  • can i add textfields in the code other than in the init?

    - by themanepalli
    Im a 15 year old noob to java. I am trying to make a basic program trader that asks for the stock price, the stock name, the stock market value and the type of order. Based on the type of order, i want a new textfield to appear. do i have to add the textfield in the init first or can i do it in the action performed. I googled someother ones but they are a little too complicated for me. heres my code. import java.awt.*; import java.applet.*; // import an extra class for the ActionListener import java.awt.event.*; public class mathFair extends Applet implements ActionListener { TextField stockPrice2; TextField stockName2; TextField orderType2; TextField marketValue2; TextField buyOrder2; TextField sellOrder2; TextField limitOrder2; TextField stopLossOrder2; Label stockPrice1; Label stockName1; Label orderType1; Label marketValue1; Label buyOrder1; Label sellOrder1; Label limitOrder1; Label stopLossOrder1; Button calculate; public void init() { stockPrice1 = new Label ("Enter Stock Price:"); stockName1 = new Label ("Enter Name of Stock: "); orderType1 = new Label ("Enter Type of Order: 1 for Buy, 2 for Sell, 3 for Stop Loss, 4 for Limit"); marketValue1= new Label("Enter The Current Price Of The Market"); stopLossOrder1 = new Label ("Enter The Lowest Price The Stock Can Go"); limitOrder1 = new Label ("Enter The Highest Price The Stock Can Go"); stockPrice2 = new TextField (35); stockName2 = new TextField (35); orderType2 = new TextField (35); marketValue2= new TextField(35); calculate= new Button("Start The Simulation"); add (stockPrice1); add (stockPrice2); add (stockName1); add (stockName2); add (marketValue1); ; add(marketValue2); add (orderType1); add (orderType2); add(calculate); ; calculate.addActionListener(this); } public void actionPerformed (ActionEvent e) { String stock= stockPrice2.getText(); int stockPrice= Integer.parseInt(stock); stockPrice2.setText(stockPrice +""); String marketV= marketValue2.getText(); int marketValue= Integer.parseInt(marketV); marketValue2.setText(marketValue+""); String orderT= orderType2.getText(); int orderType= Integer.parseInt(orderT); orderType2.setText(orderType+""); if((e.getSource()==calculate)&& (orderType==1)) { buyOrder2= new TextField(35); buyOrder1 = new Label("Enter Price You Would Like To Buy At"); add(buyOrder2); add(buyOrder1); } else if((e.getSource()==calculate)&& (orderType==2)) { sellOrder2= new TextField(35); sellOrder1 = new Label("Enter Price You Would Like To Sell At"); add(sellOrder2); add(sellOrder1); } else if((e.getSource()==calculate)&& (orderType==3)) { stopLossOrder2= new TextField(35); stopLossOrder1=new Label("Enter The Lowest Price The Stock Can Go"); add(stopLossOrder2); add(stopLossOrder1); } else if((e.getSource()==calculate)&& (orderType==4)) { limitOrder2=new TextField(35); limitOrder1= new Label("Enter the Highest Price The Stock Can Go"); add(limitOrder2); add(limitOrder1);; } } }

    Read the article

  • Microphone input

    - by George
    I'm trying to build a gadget that detects pistol shots using Android. It's a part of a training aid for pistol shooters that tells how the shots are distributed in time and I use a HTC Tattoo for testing. I use the MediaRecorder and its getMaxAmplitude method to get the highest amplitude during the last 1/100 s but it does not work as expected; speech gives me values from getMaxAmplitude in the range from 0 to about 25000 while the pistol shots (or shouting!) only reaches about 15000. With a sampling frequency of 8kHz there should be some samples with considerably high level. Anyone who knows how these things work? Are there filters that are applied before registering the max amplitude. If so, is it hardware or software? Thanks, /George

    Read the article

  • What would happen to GC if I run process with priority = RealTime?

    - by Bobb
    I have a C# app which runs with priority RealTime. It was all fine until I made few hectic changes in past 2 days. Now it runs out of memory in few hours. I am trying to find whether it is a memory leak I created of this is because I consume lot more objects than before and GC simply cant collect them because it runs with same priority. My question is - what could happen to GC when it tries to collect objects in application with RealTime priority (there is also at least one thread running with Highest thread priority)? (P.S. by realtime priority I mean Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime) Sorry forgot to tell. GC is in Server mode

    Read the article

  • escape double quote in vb string

    - by JKS
    i have used following piece of code to execute schtasks command from vb6 while executing it ignores folder if it contains space For example "C:\program files\test\test.exe" will be converted to "c:\program " how do i solve this issue? MyAppname = Chr(34) & App.Path & "\" & App.EXEName & ".exe" & Chr(34) StrCommand = "schtasks /create /sc ONLOGON /RL HIGHEST /tn myapp /tr " & MyAppname Shell StrCommand, vbHide thanks in advance

    Read the article

  • MySQL User AutoIncrement Permissions Restriction

    - by psayre23
    I have two databases that need to have their auto increment ids on various tables synced. Right now, I have a PHP function that checks the current auto increment id for both tables and then sets the lowest to the highest. If there is a better way to do this, I'm all ears. I really don't want to give the web user alter permissions, as a SQL injection could clear all passwords (or something else silly). Is there any way to restrict a MySQL user to changing auto increment without opening it up to alter statements?

    Read the article

  • C# - How to convert 10 bytes to unsigned long

    - by Justin
    Hey, I have 10 bytes - 4 bytes of low order, 4 bytes of high order, 2 bytes of highest order - that I need to convert to an unsigned long. I've tried a couple different methods but neither of them worked: Try #1: var id = BitConverter.ToUInt64(buffer, 0); Try #2: var id = GetID(buffer, 0); long GetID(byte[] buffer, int startIndex) { var lowOrderUnitId = BitConverter.ToUInt32(buffer, startIndex); var highOrderUnitId = BitConverter.ToUInt32(buffer, startIndex + 4); var highestOrderUnitId = BitConverter.ToUInt16(buffer, startIndex + 8); return lowOrderUnitId + (highOrderUnitId * 100000000) + (highestOrderUnitId * 10000000000000000); } Any help would be appreciated, thanks!

    Read the article

  • C# What would happen to GC if I run process with priority = RealTime?

    - by Bobb
    I have a C# app which runs with priority RealTime. It was all fine until I made few hectic changes in past 2 days. Now it runs out of memory in few hours. I am trying to find whether it is a memory leak I created of this is because I consume lot more objects than before and GC simply cant collect them because it runs with same priority. My question is - what could happen to GC when it tries to collect objects in application with RealTime priority (there is also at least one thread running with Highest thread priority)? (P.S. by realtime priority I mean Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime)

    Read the article

  • Hyperlinks within a table - '<a href="">'.$row['username'].'</a>'

    - by Taimur
    Hi, I have made a leaderboard table on my site, which returns the users in the MySQL database with the highest scores (score is a separate field). The fields in the leaderboard table are 'rank' 'username' and 'score'. I would like to link each username in the table to it's own profile page. The profile pages are in the format /profile.php?user=$username. How would I go about adding an <a href> within the table (which is echoed in php): echo '<tr><td>' .$a. '</td><td><a href="profile.php?user=' .$row['username']. '">' .$row['username']. '</a></td><td>'.$row['count'].'</td></tr>'; I've tried the above, but it doesn't seem to work. It shows the usernames, but they don't have any hyperlinks. Thanks

    Read the article

  • Extended maxima transform in Matlab

    - by garvin
    I use imtophat to apply a filter to an m x n array. I then find the local max using imextendedmax(). I get mostly 0's everywhere except for 1's in the general areas where I am expecting a local max. The weird thing is, though, that I don't get just one local max. Instead in these places I get MANY elements with 1's such as 00011100000 00111111000 00000110000 yet the values there are close but NOT equal so I would expect that there would be one that is higher than all of the rest. So I'm wondering a) if this is a bug and how I might fix it and b) how you would choose choose the element of these 1's with the highest value.

    Read the article

  • Microphone input

    - by George
    I'm trying to build a gadget that detects pistol shots using Android. It's a part of a training aid for pistol shooters that tells how the shots are distributed in time and I use a HTC Tattoo for testing. I use the MediaRecorder and its getMaxAmplitude method to get the highest amplitude during the last 1/100 s but it does not work as expected; speech gives me values from getMaxAmplitude in the range from 0 to about 25000 while the pistol shots (or shouting!) only reaches about 15000. With a sampling frequency of 8kHz there should be some samples with considerably high level. Anyone who knows how these things work? Are there filters that are applied before registering the max amplitude. If so, is it hardware or software? Thanks, /George

    Read the article

  • Is there a way to determine gaps in try/catch coverage?

    - by Mike Pateras
    I'm debugging a service that's experiencing some problems on start-up. To aid me in this, I'm wrapping pretty much everything in a try/catch block, and writing any errors to a file. I don't want to put them in every method, I just want to put them in the highest level methods so that they catch exceptions from other methods. Something is getting through, though, as the service does stop under some conditions. Is there a way to determine where the gaps in my try/catch coverage are, other than by sight?

    Read the article

  • Searching and comparing ActiveRecord attributes to find largest value

    - by NS
    I have a model that would look something like: my_diet = Diet.new my_diet.food_type_1 = "beef" my_diet.food_type_1_percentage = 40 my_diet.food_type_2 = "carrots" my_diet.food_type_2_percentage = 50 my_diet.food_type_3 = "beans" my_diet.food_type_3_percentage = 5 my_diet.food_type_4 = "chicken" my_diet.food_type_4_percentage = 5 I need to find which food_type has the highest percentage. So far I've tried creating a hash out of the attibutes and percentages then sorting the hash (see below) but it feels like there must be a cleaner way to do it. food_type_percentages = { :food_type_1 => my_diet.foo_type_percentage_1_percentage.nil? ? 0 : my_dient.food_type_1_percentage, :food_type_2 => my_diet.foo_type_percentage_2_percentage.nil? ? 0 : my_dient.food_type_2_percentage, :food_type_3 => my_diet.foo_type_percentage_3_percentage.nil? ? 0 : my_dient.food_type_3_percentage, :food_type_4 => my_diet.foo_type_percentage_4_percentage.nil? ? 0 : my_dient.food_type_4_percentage } food_type_percentages.sort {|a,b| a[1]<=>b[1]}.last Any ideas? Thanks!

    Read the article

  • Sorting an NSArray of NSString

    - by Robert Eisinger
    Can someone please show me the code for sorting an NSMutableArray? I have the following NSMutableArray: NSMutableArray *arr = [[NSMutableArray alloc] init]; with elements such as "2", "4", "5", "1", "9", etc which are all NSString. I'd like to sort the list in descending order so that the largest valued integer is highest in the list (index 0). I tried the following: [arr sortUsingSelector:@selector(compare:)]; but it did not seem to sort my values properly. Can someone show me code for properly doing what I am trying to accomplish? Thanks!

    Read the article

  • What program should I write to use up the 3,472 minutes on my iPhone 3GS?

    - by billmaya
    Something slightly off-topic but bear with me. I've got an iPhone 3GS that I use only for development and over the months I've accumulated 3,472 rollover minutes (my primary phone is an Android G-1). It seems a shame to let these minutes go to "waste." What cool iPhone app would you like to see that uses these minutes up in a productive, interesting, and possibly cool way. I'll code whichever suggestion has the highest vote, providing it's not illegal and doesn't violate Apple's SDK, and release it for free on the AppStore.

    Read the article

  • How to set Single GtkLebel Color to while using gtkrc?

    - by PP
    How to set Single GtkLebel Color to while using gtkrc? I tried to set as follows: In rc file: style "tc-theme-label-white" { xthickness = 1 ythickness = 1 font_name = "Sans Bold 8" text[NORMAL] = "#FFFFFF" text[INSENSITIVE] = "#434346" text[PRELIGHT] = "#FFFFFF" text[SELECTED] = "#FFFFFF" text[ACTIVE] = "#FFFFFF" } widget "*.my-theme-label" style:highest "my-theme-label" //And in code i have written. Gtk *label = gtk_new_label(null); gtk_widget_set_name(label_ptr, "my-theme-label"); Is this the write way of doing it? as usual it is not working. :p Thanks, PP.

    Read the article

  • convert javascript number to css value -- maximum number of trailing decimals

    - by philipp
    I am about to have some fun with the css transform matrix and javascript. At the moment everything is cool, except when a number becomes something like 0.000034e3344 after the to string conversion. Than the transform does not work. So I know that there is the Number.toFixed() method which actually solves the problem, but i ask myself how many trailing decimals make sense. So what is the highest value i can pass to the toFixed() method to get the most precise results? EDIT::: the exact number output was: 9.685539407532573e-20

    Read the article

  • python convert 12 bit image encoded in a string to 8 bit png

    - by ks
    I have a string that is read from a usb apogee camera that is a 12-bit grayscale image with the 12-bits each occupying the lowest 12 bits of 16-bits words. I want to create a 8-bit png from this string by ignoring the lowest 4 bits. I can convert it to a 16-bit image where the highest 4 bits are always zero using PIL with import Image imageStr is the image string imageSize is the image size img=Image.fromstring("I", imageSize, imageStr, "raw", "I;16", 0,1) img.save("MyImage.png", "PNG") Anyway I can do something similar to create a 8-bit image without completely unpacking the string doing arithmetic and making a new string?

    Read the article

  • How do I pick the most beneficial combination of items from a set of items?

    - by Chu
    I'm designing a piece of a game where the AI needs to determine which combination of armor will give the best overall stat bonus to the character. Each character will have about 10 stats, of which only 3-4 are important, and of those important ones, a few will be more important than the others. Armor will also give a boost to 1 or all stats. For example, a shirt might give +4 to the character's int and +2 stamina while at the same time, a pair of pants may have +7 strength and nothing else. So let's say that a character has a healthy choice of armor to use (5 pairs of pants, 5 pairs of gloves, etc.) We've designated that Int and Perception are the most important stats for this character. How could I write an algorithm that would determine which combination of armor and items would result in the highest of any given stat (say in this example Int and Perception)?

    Read the article

  • Problem using Min(field)

    - by Todd
    have these two queries: SELECT classroomid AS crid, startdate AS msd FROM unitTemplates where classroomid = 6 GROUP BY classroomid and: SELECT classroomid AS crid, Min(startdate) AS msd FROM unitTemplates where classroomid = 6 GROUP BY classroomid The second query uses the minimum function. There is only one record in my table with a classroomid of 6. The first query returns msd = 20100505, the second query returns msd = 0 (instead of the expected 20100505). If I change the "Min" to "Max" it returns the highest (and only) startdate (20100505). Why doesn't MySQL like the Min function I'm using?

    Read the article

  • Select lowest nested selector when clicked

    - by rikAtee
    I would like to click $('.sub-menu') selector and return the lowerst nested item that was clicked, rather than the highest. e.g., when I click "enlish", "root" is returned becasue "english" is a child of "root". I want "english" returned when I select "english". <div ID="browse_container"> <div class="sub-menu">Root <div class="sub-menu">English</div> <div class="sub-menu">Maths <div class="sub-menu">Year 1</div> <div class="sub-menu">Year 2</div> </div> <div class="sub-menu">? Science</div> </div> </div> my script is simply: $('.sub-menu, #root').on('click', function(event){ alert($(this).text()) });

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >