Search Results

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

Page 81/130 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • Using Range Function

    - by Michael Alexander Riechmann
    My goal is to make a program that takes an input (Battery_Capacity) and ultimately spits out a list of the (New_Battery_Capacity) and the Number of (Cycle) it takes for it ultimately to reach maximum capacity of 80. Cycle = range (160) Charger_Rate = 0.5 * Cycle Battery_Capacity = float(raw_input("Enter Current Capacity:")) New_Battery_Capacity = Battery_Capacity + Charger_Rate if Battery_Capacity < 0: print 'Battery Reading Malfunction (Negative Reading)' elif Battery_Capacity > 80: print 'Battery Reading Malfunction (Overcharged)' elif float(Battery_Capacity) % 0.5 !=0: print 'Battery Malfunction (Charges Only 0.5 Interval)' while Battery_Capacity >= 0 and Battery_Capacity < 80: print New_Battery_Capacity I was wondering why my Cycle = range(160) isn't working in my program?

    Read the article

  • DOs and DON'Ts of a technical presentation

    - by TG
    I am preparing a technical presentation for my team. Audience : Our team Topic : Introduction to a new technology So I want to know about the primary necessary things for a good technical presentation and also DOs and DON'Ts for the same. some of my concerns are, 1. Whether to have slides or not (if needed then how many of them) 2. Coding a sample during presentation or preparing it before going for the presentation 3. Maximum duration of an technical presentation What is your thoughts on technical presentations from your past experience either as a presenter or as a listener.

    Read the article

  • C#: How to detect . in string and insert a space after it/How to insert space after n chars?

    - by Sam Gentile
    Suppose I have a long string like "4600airportburlingame150anzablvd.burlingamecalifornia94010". My code is breaking on this string. This is UNUSUAL. 99% of entries will NOT have a period. The CSS in the browser wraps IF there are spaces in the string and there isn't any here. How do I detect the period (".") and insert a space directly after it? Remember 99% of strings will NOT have a period in them. The code has to detect if it has a period and if so, do the insertion, otherwise not. If I determine a maximum string length, how do I insert a space at some length? Thanks

    Read the article

  • PHP given a series of arbitrary numbers, how can I choose a logical max value on a line graph?

    - by stormist
    I am constructing a line graph in PHP. I was setting the max value of the line graph to the max value of my collection of items, but this ended up making the graph less readable you are unable to view the highest line on the graph as it intersects with the top of it. So what I need is basically a formula to take a set of numbers and calculate what the logical max value of on the line graph should be.. so some examples 3500 250 10049 45394 434 312 Max value on line graph should probably be 50000 493 412 194 783 457 344 max value on line graph would ideally be 1000 545 649 6854 5485 11545 In this case, 12000 makes sense as max value So something as simple as rounding upward to the nearest thousandth might work but I'd need it to progressively increase as the numbers got bigger. (50000 instead of 46,000 in first example) The maximum these numbers will ever be is about a million. Any recommendations would be greatly appreciated, thank you.

    Read the article

  • Restoring using SyncBack without profiles

    - by Thomas Matthews
    I backed up my internal hard drive (C:) using SyncBack onto an external (USB) hard drive with maximum compression. I then performed a clean install of Windows Vista onto the computer. I forgot to copy the SyncBack logs before the clean install. And now when ever I try to restore a directory, the RAR/ZIP files are copied to the system hard drive instead of extracting their contents to the hard drive. Also, SyncBack is not traversing the folders during the Restore process. How can I tell SyncBack to expand the compressed files? I am running the freeware version of SyncBack. I have to create new log files (unless SyncBack put them somewhere on the external drive). My alternative is to write a program that traverses the folders on the external drive and extracts files from the RAR/ZIP files. I am using Windows Vista, Service Pack 2, and the data size prior to backup was about 200 GB. (The backup process took over 72 hours due to "hiccups").

    Read the article

  • Right floated div within a liquid-width div. How do I get this to work?

    - by DavidR
    I have a div, within the div is a name in an <h4> tag (it's semantically correct with the layout) and a div with some values describing that <h4> value. I want the nested div to be on the right side, and the only way I can get this to work is a fixed-width container and float: right;. As you can guess, the object breaks when the value of the <h4> causes the nested div to overflow. I've tried min-width, but it ends up stretching to the maximum size of the div containing the container div.

    Read the article

  • Resharper code format linebreaks

    - by mizipzor
    Im trying to setup the code formatting in ReSharper. Limiting each line to a maximum count of characters, it seems to want to place casts on a separate line. Like so: string mystring = (string) MyStringConverter.convert(toconvert, typeof(string), null, null); I cant seem to be able to find the correct combination of settings to not have this on three lines. Im looking for something like this: string mystring = (string) MyStringConverter.convert( toconvert, typeof(string), null, null); Where the linebreak occurs is not that important, I guess I cant be to picky when I want to limit the line length. But three lines is a bit much. Does anyone know the/any correct combination of settings to make it only cut the line once?

    Read the article

  • Facebook Hacker Cup: Power Overwhelming

    - by marcog
    A lot of people at Facebook like to play Starcraft II™. Some of them have made a custom game using the Starcraft II™ map editor. In this game, you play as the noble Protoss defending your adopted homeworld of Shakuras from a massive Zerg army. You must do as much damage to the Zerg as possible before getting overwhelmed. You can only build two types of units, shield generators and warriors. Shield generators do no damage, but your army survives for one second per shield generator that you build. Warriors do one damage every second. Your army is instantly overrun after your shield generators expire. How many shield generators and how many warriors should you build to inflict the maximum amount of damage on the Zerg before your army is overrun? Because the Protoss value bravery, if there is more than one solution you should return the one that uses the most warriors. Constraints 1 = G (cost for one shield generator) = 100 1 = W (cost for one warrior) = 100 G + W = M (available funds) = 1000000000000 (1012)

    Read the article

  • Getting user data from Active Directory using PL/SQL

    - by David Neale
    I had a discussion today regarding an Oracle procedure I wrote some time ago. I wanted to get 7500 user email addresses from Active Directory using PL/SQL. AD will return a maximum of 1000 rows and the LDAP provider used by Oracle will not support paging. Therefore, my solution was to filter on the last two characters of the sAMAccountName (*00,*01,*02...etc.). This results in 126 queries (100 for account names ending in digits, 26 for those ending in a letter...this was sufficient for my AD setup). The person I was speaking to (it was a job interview by the way) said he could have done it a better way, but he would not tell me what that method was. Could anybody hazard a guess at what this method was?

    Read the article

  • Change a Recursive function that has a for loop in it into an iterative function?

    - by Bill
    So I have this function that I'm trying to convert from a recursive algorithm to an iterative algorithm. I'm not even sure if I have the right subproblems but this seems to determined what I need in the correct way, but recursion can't be used you need to use dynamic programming so I need to change it to iterative bottom up or top down dynamic programming. The basic recursive function looks like this: Recursion(i,j) { if(i>j) return 0; else { //This finds the maximum value for all possible subproblems and returns that for this problem for(int x = i; x < j; x++) { if(some subsection i to x plus recursion(x+1,j) is > current max) max = some subsection i to x plus recursion(x+1,j) } } } This is the general idea, but since recursions typically don't have for loops in them I'm not sure exactly how I would convert this to iterative. Does anyone have any ideas?

    Read the article

  • Need some testcases on solving this problem

    - by user285825
    I am trying to solve the minesweeper problem of acm problemset archive, http://uva,onlinejudge,org/index,php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1130 I tested with all the possible cases that I can imagine of: 1, minimum 1 1 , 1 1 # 2, maximum upto 100 upto 100 repeat until 100 3, for each position I test for mine 4 4 ,,, ,,,, ,,,, 4 4 ,#,, ,,,, ,,,, ,,,, lastly 4 4 ,,,, ,,,, ,,,, ,,,# 4, for each postion I put a ',' and surround it with mines 4 4 ,### # # # 4 4 , # # # lastly 4 4 # # # , I thought that these are reasonable and representative sets of testcases, But still Wrong answer, I am not sure what else could I test for, I would be glad if someone throw some light on further strategy to test this thing,

    Read the article

  • Enable/disable zoom on iPhone safari with Javascript?

    - by msqr
    I have 1 page which has 2 DIV elements which is shown/hidden based on user click on action buttons with javascript, I would like to toggle scaling on action button click. I tried with below javascript and it is changing viewport meta but getting no effect. Any suggestions? Blockquote var ViewPortAllowZoom = 'width=device-width;'; var ViewPortNoZoom = 'width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no;'; function AllowZoom(flag) { if (flag == true) { $('meta[name*=viewport]').attr('content', ViewPortAllowZoom); } else { $('meta[name*=viewport]').attr('content', ViewPortNoZoom); } }

    Read the article

  • I need to know how to create a custom webform template in ASP.NET that allows me to pick a master pa

    - by Pete
    Using Visual Studio 2008, I need to create a custom web form that when picked acts like the web content form, by providing a dialog that lets you pick a master page. I have looked through the webform.zip template and thought I had a clue, but trying different combinations has baffled me as it either doesn't appear or doesn't work. Also when you set the project type to Web and sub project type to CSharp it doesn't appear, so I don't know if this part of the cause, because I would of hoped that the SupportsMasterPage element would of caused this dialog to appear, if it is a web item, but no luck. Frown Any ideas? p.s. I have used my googling resources to the maximum so unsure what to do.

    Read the article

  • what is the best setting for using lighttpd on 8G ram?

    - by user299415
    I have running 8GB ram and 8 x Xeon 3361 system! What is the best setting for running simultaneous connection! What is the maximum? Is setting like this correct? server.max-keep-alive-requests = 0 server.max-keep-alive-idle = 10 server.max-read-idle = 60 server.max-write-idle = 60 server.event-handler = "linux-sysepoll" server.max-fds = 2048 fastcgi.server = ( ".php" = ( "localhost" = ( "socket" = "/tmp/php-fastcgi.socket", "bin-path" = "/usr/bin/php-cgi", "max-procs" = 20, "bin-environment" = ( "PHP_FCGI_CHILDREN" = "40", "PHP_FCGI_MAX_REQUESTS" = "800" ), "broken-scriptfilename" = "enable" ) ) ) please help me!

    Read the article

  • How do I control script execution time in PHP

    - by mathew
    for example I do have 5 PHP functions on a page which execute when loading. each functions has its own processing time and some of them take more time sometimes to complete the task. hence the total loading time of the said page is slow. my question is how do I control execution time for each script and set time limit for the same. I am aware that there is an in built function in PHP called set_time_limit(); but it gives fatal error if time is beyond the maximum limit...

    Read the article

  • help me understand cuda

    - by scatman
    i am having some troubles understanding threads in NVIDIA gpu architecture with cuda. please could anybody clarify these info: an 8800 gpu has 16 SMs with 8 SPs each. so we have 128 SPs. i was viewing stanford's video presentation and it was saying that every SP is capable of running 96 threads cuncurrently. does this mean that it (SP) can run 96/32=3 warps concurrently? moreover, since every SP can run 96 threads and we have 8 SPs in every SM. does this mean that every SM can run 96*8=768 threads concurrently?? but if every SM can run a single Block at a time, and the maximum number of threads in a block is 512, so what is the purpose of running 768 threads concurrently and have a max of 512 threads? a more general question is:how are blocks,threads,and warps distributed to SMs and SPs? i read that every SM gets a single block to execute at a time and threads in a block is divided into warps (32 threads), and SPs execute warps.

    Read the article

  • SQL Compact Edition database corruption

    - by jdv
    Hi, Our product is using MS SQL Compact Edition on a Windows machine (laptop). It's basically a metadata index for files we have on the filesystem. Recently we have seen databases getting corrupted. This happens when the machine is very busy moving files around and has to do a tiny bit of database changes at the same time. I was somewhat shocked that was at all possible. It was my expectation that the database would stay coherent whatever the circumstances. Of course we are doing something wrong. Things we have checked so far are: Use of only one db connection per thread specify the maximum size when opening the database The database is accessed only by one application, a .net based windows service. Are there other gotcha's?

    Read the article

  • Caveats to be aware of when using threading in Python?

    - by knorv
    I'm quite new to threading in Python and have a couple of beginner questions. When starting more than say fifty threads using the Python threading module I start getting MemoryError. The threads themselves are very slim and not very memory hungry, so it seems like it is the overhead of the threading that causes the memory issues. Is there something I can do to increase the memory capacity or otherwise make Python allow for a larger number of threads? What is the maximum number of threads you've been able to run in your Python code using the threading module? Did you do any tricks to achieve that number? Are there any other caveats to be aware of when using the threading module?

    Read the article

  • need for tcp fine-tuning on heavily used proxy server

    - by Vijay Gharge
    Hi all, I am using squid like Internet proxy server on RHEL 4 update 6 & 8 with quite heavy load i.e. 8k established connections during peak hour. Without depending much on application provider's expertise I want to achieve maximum o/p from linux. W.r.t. that I have certain questions as following: How to find out if there is scope for further tcp fine-tuning (without exhausting available resources) as the benchmark values given by vendor looks poor! Is there any parameter value that is available from OS / network stack that will show me the results. If at all there is scope, how shall I identify & configure OS tcp stack parameters i.e. using sysctl or any specific parameter Post tuning how shall I clearly measure performance enhancement / degradation ?

    Read the article

  • Joomla article not showing in the frontend but its visible in administrative part.

    - by user248674
    I have a very big article to be put into our joomla site. At first I was getting "Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 285487 bytes) in..." . But then I increased the memory_limit in php.ini . And I was able to create the article. Now I can view the article by logging into backend. But the article is not at all visible in the front end. If I click on the menu item pointing to that article, all I can see is a blank page with nothing in it. All other articles in the site are visible properly. Any idea? ps: I have enabled the error reporting to maximum, also ran the site in debugging mode. But saw nothing unusual.

    Read the article

  • SQL Server 2005 - Find minimum unused value within a range

    - by Geo Ego
    I have a situation similar to the following question: Insert Data Into SQL Table Where my scenario differs is that I have a non-auto-incrementing primary key field that can have a range between 1000 and 1999. We only have about a hundred values in it thus far, but the maximum value has already been taken (1999), and there are gaps in the numbering sequence. Thus, I need to find a value that is between 1000-1999 and not taken. For instance, if my current values are, for example, 1000, 1001, 1003, and 1999, I would want the query to return 1002.

    Read the article

  • SQL Time(2) to Array in C#?

    - by Jacob Huggart
    Hello all, I am using ASP MVC and SQL Server and I have a database that is updated intermittently with expected wait times for some event. Also, I am using some ajax and jquery. I need to display the average and maximum wait times. How can I take the entire list of time from the server and get the average time? Also, what would be the best method to simply grab a new time from the server when it is updated without having to pull the whole list again? Thanks!

    Read the article

  • Chess board position numbers in 6-rooted-binary tree?

    - by HH
    The maximum number of adjacent vertices is 6 that corresponds to the number of roots. By the term root, I mean the number of children for each node. If adjacent square is empty, fill it with Z-node. So every square will have 6 nodes. How can you formulate it with binary tree? Is the structure just 6-rooted-binary tree? What is the structure called if nodes change their positions? Suppose partially ordered list where its units store a large randomly expanding board. I want a self-adjusting data structure, where it is easy to calculate distances between nodes. What is its name?

    Read the article

  • Changing the width of dropdown area in flex combobox.

    - by DineshDu
    I have a combobox which gets populated by a remote method. I need to set the dropdownwidth of the combobox to the maximum length of the item in the combobox. I am able to achieve it by the following code. But if the resolution of the screen changes, the result is not similar. Is there any way to find the display width of the text in the dropdown? private function getGroupData(resultEvent:ResultEvent):void{ viewCbx.dataProvider = resultEvent.result as ArrayCollection; var comboDp:ArrayCollection = viewCbx.dataProvider as ArrayCollection; var dropWidth:int = 0; for each(var obj:Object in comboDp){ if(obj.groupName.length > dropWidth){ dropWidth = obj.groupName.length; } } viewCbx.dropdownWidth = dropWidth*6; }

    Read the article

  • Upload image with Tumblr API in PHP

    - by John
    I'm having trouble uploading a photo from my computer to tumblr using their API. http://www.tumblr.com/docs/en/api photo - Requires either source or data, but not both. If both are specified, source is used. * source - The URL of the photo to copy. This must be a web-accessible URL, not a local file or intranet location. * data - An image file. See File uploads below. * caption (optional, HTML allowed) * click-through-url (optional) I need to use data File uploads can be done in a data parameter where specified above. You may use either of the common encoding methods: multipart/form-data method, like a file upload box in a web form. Maximum size: o 50 MB for videos o 10 MB for photos o 10 MB for audio I would post my code but it's not showing up correctly for me.

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >