Search Results

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

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

  • Should I use multiple ListViews?

    - by janfsd
    Hi to everybody! I have a RelativeLayout with different elements. I was planning to have two ListViews on it, but I have noticed there are some problems with scrolling. Since each ListView only shows a maximum of 5 rows should I try to make some kind of custom adapter to merge those ListViews? Or is it better to replace the ListView with a LinearLayout/RelativeLayout and add the rows as I get them manually? (like the first answer in here: http://stackoverflow.com/questions/1778485/android-listview-display-all-available-items-without-scroll-with-static-header ). Which should be the proper way on doing this? or is there another way? Also, each row will have an OnClickListener.

    Read the article

  • How can I call a module in a Perl one-liner?

    - by Zaid
    Say I have a data file that I want to process; I want to take the maximum value of each of the column and append it to the end of each line. INPUT: T1 T2 T3 35.82 34.67 31.68 32.20 34.52 33.59 37.41 38.64 37.56 OUTPUT: T1 T2 T3 35.82 34.67 31.68 35.82 32.20 34.52 33.59 34.52 37.41 38.64 37.56 38.64 I'm trying to implement this as a one-liner. So far, this is what I've come up with, although it complains that &main::max is undefined: perl -MList::Util -ani.bak -e "print qq(@F).q( ).max(@F).qq(\n)" file1.txt It seems that I haven't loaded the List::Util module. What's wrong? And is the header column an issue? perlrun doesn't have a decent example on how to do this (actually it does now, my documentation was a little out-of-date).

    Read the article

  • How to use DoG Pyramid in SIFT

    - by Ahmet Keskin
    Hi all, I am very new in image processing and pattern recognition. I am trying to implement SIFT algorithm where I am able to create the DoG pyramid and identify the local maximum or minimum in each octave. What I don't understand is that how to use these local max/min in each octave. How do I combine these points? My question may sound very trivial. I have read Lowe's paper, but could not really understand what he did after he built the DoG pyramid. Any help is appreciated. Thank you

    Read the article

  • print css: fit in one page

    - by user281521
    Hi. In my page there's only one image. Kind of 1500x3000 px. In the printer, I need that this image's maximum width to be the width of the page, so I did: width 100% in the css, and it works. But the height... the old bullshit of height 100% will never work. Because it always will be 100% of the parent container, then someone must have height defined. Or html or body. So, my question is: make this image fit in one page. Any ideas?

    Read the article

  • Update Rule in Temporal difference

    - by Betamoo
    The update rule TD(0) Q-Learning: Q(t-1) = (1-alpha) * Q(t-1) + (alpha) * (Reward(t-1) + gamma* Max( Q(t) ) ) Then take either the current best action (to optimize) or a random action (to explorer) Where MaxNextQ is the maximum Q that can be got in the next state... But in TD(1) I think update rule will be: Q(t-2) = (1-alpha) * Q(t-2) + (alpha) * (Reward(t-2) + gamma * Reward(t-1) + gamma * gamma * Max( Q(t) ) ) My question: The term gamma * Reward(t-1) means that I will always take my best action at t-1 .. which I think will prevent exploring.. Can someone give me a hint? Thanks

    Read the article

  • class method or named_scope?

    - by Hadi
    i would like to have your opinion in a project i am currently working on. class Product has_many :orders end class Order attr_accessor :deliverable # to contain temporary data on how many items can be delivered for this order belongs_to :product end somehow i want to have Order.all_deliverable that will calculate the Product's quantity, subtract from list of Orders until the Product is empty or there is no more Order for this Product to illustrate Product A, quantity: 20 Product B, quantity: 0 Order 1, require Product A, quantity: 12 Order 2, require Product B, quantity: 10 Order 3, require Product A, quantity: 100 so if i call Order.all_deliverable, it will give Order 1, deliverable:12 Order 3, deliverable: 8 #(20-12) i have been thinking on using named_scope, but i think the logic will be too complex to be put in a named_scope. Any suggestion? the pseudo code for all_deliverable will be something like this: go to each orders find the remaining quantity for specific product deduct the product to max amount of order, if product is not enough, add the maximum product add to the order end From what i read around in the web, named_scope deal mostly like find and have not many method calling and looping.

    Read the article

  • operating systems - TLBs

    - by stabGreeol
    I'm trying to get my head round this (okay, tbh cramming a night before the exams :) but i can't figure out (nor find a good high level overview on the net) of this: 'page table entries can be mapped to more than one TLB entry.. if for example every page table entry is mappped to two TLB entries, this is know as 2-way set associative TLB' My question is, why would we want to map this more than once? surely we want to have the maximum number of possible entries represented in the TLB, and duplication would waste space right ? What am i missing? Many thanks

    Read the article

  • Load a MySQL innodb database into memory

    - by jack
    I have a MySQL innodb database at 1.9GB, showed by following command. SELECT table_schema "Data Base Name", -> sum( data_length + index_length ) / 1024 / -> 1024 "Data Base Size in MB", -> sum( data_free )/ 1024 / 1024 "Free Space in MB" -> FROM information_schema.TABLES -> GROUP BY table_schema ; +--------------------+----------------------+------------------+ | Data Base Name | Data Base Size in MB | Free Space in MB | +--------------------+----------------------+------------------+ | database_name | 1959.73437500 | 31080.00000000 | My questions are: Does it mean if I set the innodb_buffer_pool_size to 2GB or larger, the whole database can be loaded into memory so much fewer read from disk requests are needed? What does the free space of 31GB mean? If the maximum RAM can be allocated to innodb_buffer_pool_size is 1GB, is it possible to specify which tables to loaded into memory while keep others always read from disk? Thanks in advance.

    Read the article

  • Detecting Infinite recursion in Python or dynamic languages

    - by drozzy
    Recently I tried compiling program something like this with GCC: int f(int i){ if(i<0){ return 0;} return f(i-1); and it ran just fine. When I inspected the stack frames the compiler optimized the program to use only one frame, by just jumping back to the beginning of the function and only replacing the arguments to f. And - the compiler wasn't even running in optimized mode. Now, when I try the same thing in Python - I hit maximum recursion wall (or stack overflow). Is there way that a dynamic language like python can take advantage of these nice optimizations? Maybe it's possible to use a compiler instead of an interpreter to make this work? Just curious!

    Read the article

  • Database connection management in Spring

    - by ria
    Do we have to explicitly manage database resources when using Spring Framework.. liking closing all open connections etc? I have read that Spring relieves developer from such boiler plate coding... This is to answer an error that I am getting in a Spring web app: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: ORA-00020: maximum number of processes (150) exceeded The jdbcTemplate is configured in the xml file and the DAO implementation has reference to this jdbcTemplate bean which is used to query the database.

    Read the article

  • Encode complex number as RGB pixel and back

    - by Vi
    How is it better to encode a complex number into RGB pixel and vice versa? Probably (logarithm of) an absolute value goes to brightness and an argument goes to hue. Desaturated pixes should receive randomized argument in reverse transformation. Something like: 0 - (0,0,0) 1 - (255,0,0) -1 - (0,255,255) 0.5 - (128,0,0) i - (255,255,0) -i - (255,0,255) (0,0,0) - 0 (255,255,255) - e^(i * random) (128,128,128) - 0.5 * e^(i *random) (0,128,128) - -0.5 Are there ready-made formulas for that? Edit: Looks like I just need to convert RGB to HSB and back. Edit 2: Existing RGB - HSV converter fragment: if (hsv.sat == 0) { hsv.hue = 0; // ! return hsv; } I don't want 0. I want random. And not just if hsv.sat==0, but if it is lower that it should be ("should be" means maximum saturation, saturation that is after transformation from complex number).

    Read the article

  • Custom Validation on jquery validate plugin, need to count element in a multiple select

    - by 0plus1
    I have a multiple select, and I need to force the user to choose maximum two options, nothing more. I'm trying this: jQuery.validator.addMethod("morethantwo", function(value, element) { var foo = []; $(element+' :selected').each(function(i, selected){ foo[i] = $(selected).text(); alert(foo[i]); }); return true; },"Max two options." ); The problem is that I get a: uncaught exception: Syntax error, unrecognized expression: [object HTMLSelectElement] error. While if I do this: $(element).each(function(i, selected){ foo[i] = $(selected).text(); alert(foo[i]); }); It works but I get all the options in the select. Why is that? Is this the correct road to walk? Are there better ways to do this kind of check? Thank you very much!

    Read the article

  • Recieving server broadcast on mobile in real time

    - by Manjoor
    I have to write a simple mobile application that is able to recieve broadcast from a server, connected using GPRS, over a secure SSL connection. The amount of data mobile need to recieve is very small (about 100 character string for a single broadcast and maximum 10 broadcast per minute) I need to display it on screen and generate a alert sound (and vibrate the device). Client need not to send anything back to server. (ofcourse at the time of intialization the client app need to send some data for authorization) The target mobile plateform is symbion S60 and Blackberry. How can i do this? What tools, SDK and Third party framework (if needed) i should use? I am familier with java and network programming but not for mobile device.

    Read the article

  • ADO.NET Commands and SQL query plans

    - by ingredient_15939
    I've been reading up on query plans and how to minimise duplicate plans being created by SQL Server for the same basic query. For example, if I understand correctly, sending both these query strings will result in 2 different query plans: "SELECT FirstName FROM Members WHERE LastName = 'Lee'" "SELECT FirstName FROM Members WHERE LastName = 'MacGhilleseatheanaich'" Using a stored procedure avoids this, as the query plan is the same, and "LastName" is passed as a variable, eg: CREATE PROCEDURE sp_myStoredProcedure @LastName varchar(100) AS SELECT FirstName FROM Members WHERE LastName = @LastName Go Now, my question is whether the same applies to the Command object (eg. SQLClient.SQLCommand in ADO.NET). The reason I ask is that string parameters don't have a defined max length, as in the code above. Take the following code: MyCmd.CommandText = "SELECT FirstName FROM Members WHERE LastName = @LastName" MyCmd.Parameters.AddWithValue("@LastName", "Lee") Then later: MyCmd.Parameters.Clear() MyCmd.Parameters.AddWithValue("@LastName", "MacGhilleseatheanaich") Since @LastName hasn't been declared to SQL Server as having a defined maximum length, will SQL Server create a new query plan for every different value when I execute the command this way?

    Read the article

  • VB.net Cross-Thread

    - by PandaNL
    Hello, I have a cmd command that needs to be executed, when the command starts it starts to fill a progressbar. When the cmd command is done the progressbar needs to fill up to 100. This is the code i use, but it gives me an error when the progressbar.Value = 100 comes up. Public Class Form1 Dim teller As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerProgressbar.Tick teller += 1 ProgressBar1.Value = teller If ProgressBar1.Value = ProgressBar1.Maximum Then TimerProgressbar.Stop() End If End Sub This are the tow commands in another private sub where the app is crashing on ProgressBar1.Value = 100 TimerProgressbar.Stop() When i debug it and i try it out it crashes on ProgressBar1.Value = 100 But when i build it under Windows 7 it runs fine without crashing, however a few people reported me it crashes on there Windows xp system. VB gives me a suggestions about Cross Thread, but i don't know how i could make it work with this.

    Read the article

  • sort data in c language

    - by ANIL MANE
    Hello C experts, I need little help on following requirement, as I know very little about C syntaxes. I have data in a file like this 73 54 57 [52] 75 73 65 [23] 65 54 57 [22] 22 59 71 [12] 22 28 54 [2] 65 22 54 73 [12] 65 28 54 73 [52] 22 28 65 73 [42] 65 54 57 73 [22] 22 28 54 73 [4] Where values in bracket denotes the occurrence of that series. I need to sort this data based on the occurrence of the data descending with maximum elements on the top as follows 65 28 54 73 [52] 22 28 65 73 [42] 65 54 57 73 [22] 65 22 54 73 [12] 22 28 54 73 [4] 28 59 71 [122] 73 54 57 [52] 22 28 65 [26] .. . . . and so on... Can someone give me a quick code for this. Thanks in advance.

    Read the article

  • PHP: Coding long-running scripts when servers impose an execution time limit

    - by thomasrutter
    FastCGI servers, for example, impose an execution time limit on PHP scripts which cannot be altered using set_time_limit() in PHP. IIS does this too I believe. I wrote an import script for a PHP application that works well under mod_php but fails under FastCGI (mod_fcgid) because the script is killed after a certain number of seconds. I don't yet know of a way of detecting what your time limit is in this case, and haven't decided how I'm going to get around it. Doing it in small chunks with redirects seems like one kludge, but how? What techniques would you use when coding a long-running task such as an import or export task, where an individual PHP script may be terminated by the server after a certain number of seconds? Please assume you're creating a portable script, so you don't necessarily know whether PHP will eventually be run under mod_php, FastCGI or IIS or whether a maximum execution time is enforced at the server level.

    Read the article

  • Creating an Excel file using .NET (C#) - Problems with columns headers!

    - by tsocks
    Hello, I want to create & fill a .xls file using ADO.NET or LINQ, but I do not want to have the columns names in the first row. I just want to insert rows starting in row no. 1. I know I have to insert colums first, but... is there a way to 'hide' those columns headers? The problem is that, in first row of my spreadsheet, I must have only two values (one in A1 and the other in B1), but in the remaining rows I'll be inserting more than just two values (maximum 15 columns). I'm open to suggestions/hacks/tricks even if that's not the best way of doing this. Thanks!

    Read the article

  • Extracting text from a file where date -time is the index

    - by Soham
    I have got around 800 files of maximum 55KB-100KB each where the data is in this format Date/Time/Float1/Float2/Float3/Float4/Integer Date is in DD/MM/YYYY format and Time is in the format of HH:MM Here the date ranges from say 1st May to 1June and each day, the Time varies from 09:00 to 15:30. I want to run a program so that, for each file, it extracts the data pertaining to a particular given date and writes to a file. I will not face any problem in writing into directory operations. I am trying to get around, to form a to do a search and extract operation. I dont know, how to do it, would like to have some idea. Thanks Soham

    Read the article

  • Estimate gaussian (mixture) density from a set of weighted samples

    - by Christian
    Assume I have a set of weighted samples, where each samples has a corresponding weight between 0 and 1. I'd like to estimate the parameters of a gaussian mixture distribution that is biased towards the samples with higher weight. In the usual non-weighted case gaussian mixture estimation is done via the EM algorithm. Does anyone know an implementation (any language is ok) that permits passing weights? If not, does anyone know how to modify the algorithm to account for the weights? If not, can some one give me a hint on how to incorporate the weights in the initial formula of the maximum-log-likelihood formulation of the problem? Thanks!

    Read the article

  • Complicated idea - how to create car racing for my RPG game's players

    - by Donator
    So, I want to create car racing for my RPG game's players. Player can create race and choose how many participants can participate in race. After race is being created, other people can join it. When the maximum participants are collected, race begins. My idea, when the last participant joins, then instantly choose the winner (who's car is the best, that person wins), but how can I do it? If I choose to pick the winner after the last participant joins, then I have to put many queries in one page (select data from table, then delete the race, then select players' cars' statistics and pick the winner and then again, using mysql, send message to everyone). But this idea is really not optimal and it will lag cruelly for that last person. Maybe you have any ideas how I can avoid lag and make it more optimal. Thank you very much.

    Read the article

  • Find top "n" nearby coordinates.

    - by John Hamelink
    I have a coordinate. I want to find the top "n" (n being a variable value) nearest coordinates out of several thousand rows stored on a MySQL database. I also want to be able to define maximum and minimum distances between the coordinate in question and the coordinates in the database. How best am I to go about this? Would it be bonkers to use PHP as I understand the syntax much better than MySQL? If I use a MySQL function, how do I move it between databases if I choose to switch servers? How is it stored? Lastly, what is the most efficient method of getting through all these coordinates accurately - the coordinates are all relatively close to one another? Thanks for your time, John.

    Read the article

  • How to properly use CoreData validation & error framework ?

    - by Xav
    I've created a model in Xcode, and for various attributes I have minimum & maximum values defined and that are enforced by coreData at runtime. I'm using NSManagedObject validateValue:forKey:error to check for user input values. I was a bit disappointed to see that the localized error message is not specific, and I get a "The operation couldn't be completed. (Cocoa error 1620)" for too small values and a "The operation couldn't be completed. (Cocoa error 1610)" for too large values. It's written in the coreData documentation that "you can localize most aspects of a managed object model, including entity and property names and error messages". Unfortunately it's not very detailed on how you implement it for error messages. So How do you customize error message ? How do you localize them ? Is it possible to customize it in a way where it will mentioned the reference value ex: "Value should be lower than %@" or "Value should be higher than %@" ?

    Read the article

  • after XOR operation find C (and XOR reversability)

    - by Jason z
    Assume: unsigned char A = 10; unsigned char B = 11; unsigned char C = 12; unsigned char Diff1 = A ^ B; unsigned char Diff2 = B ^ C; //find any of A or B or C using Diff1 and Diff2 Question is: There were 3 values initially for which we found 2 differences. Is there any way we can find any if A or B or C using 2 differences Diff1 and Diff2? I know XOR is not reversible unless you know the key, but keeping in view that unsigned __int8 is 0...255 maximum 256 different values. stay well.

    Read the article

  • Equalize column javascript not working in Chrome

    - by alimango
    Hi, I'm using this mootools javascript snippet to equalize the height of my columns: window.addEvent('domready', function() { var columns = $$('.equalize'); var max_height = 0; columns.each(function(item) { max_height = Math.max(max_height, item.getSize().y); }); columns.setStyle('height', max_height); }); Problem is it's not working properly on Chrome. It's getting the minimum height of the 2 columns instead of getting the maximum. What seems to be the problem and how do I fix it? Thanks in advance!

    Read the article

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