Search Results

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

Page 84/130 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • MediaWiki: workaround for watchlist restricted to 7 days?

    - by Mark Robinson
    I'm running MediaWiki 1.13.2. When I go to my watchlist, I'm limited to only viewing the last 7 days (though MediaWiki should permit me to view the last 30 days). I've tried: Clicking the all button Changing the URL Changing the settings under MY PREFERENCES-WATCHLIST. When I save (e.g. 30 days) it resets back to 7 days! Googling for an answer... Anyone heard of this bug before? Is there a workaround? I can't see a setting anywhere for this to be a maximum.

    Read the article

  • Convert Decimal number into Fraction

    - by alankrita
    I am trying to convert decimal number into its fraction. Decimal numbers will be having a maximum 4 digits after the decimal place. example:- 12.34 = 1234/100 12.3456 = 123456/10000 my code :- #include <stdio.h> int main(void) { double a=12.34; int c=10000; double b=(a-floor(a))*c; int d=(int)floor(a)*c+(int)b; while(1) { if(d%10==0) { d=d/10; c=c/10; } else break; } printf("%d/%d",d,c); return 0; } but I am not getting correct output, Decimal numbers will be of double precision only.Please guide me what I should do.

    Read the article

  • why my ProgressBar can't capture the mouse down event?

    - by donarlee
    I use a custom skin as the track skin, but i can't get the mouse down event protected function application1_creationCompleteHandler(event:FlexEvent):void { pBar.addEventListener(MouseEvent.MOUSE_DOWN, onEvent, true); } protected function onEvent(event:MouseEvent):void { trace("mouse down"); } ]]> </fx:Script> <s:layout> <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" /> </s:layout> <mx:ProgressBar id="pBar" width="518" height="15" labelPlacement="center" trackSkin="skins.CustomTrackSkin" mode="manual" label="" minimum="0" maximum="100"/>

    Read the article

  • get the list and input from one function and run them in different function

    - by rookie
    i have a programm that generate the list and then i ask them to tell me what they want to do from the menu and this is where my problem start i was able to get the input form the user to different function but when i try to use the if else condition it doesn't check, below are my code def menu(x,l): print (x) if x == 1: return make_table(l) if x == 2: y= input("enter a row (as a number) or a column (as an uppercase letter") if y in [ "1",'2','3']: print("Minmum is:",minimum(y,l)) if x== 3: print ('bye') def main(): bad_filename = True l =[] while bad_filename == True: try: filename = input("Enter the filename: ") fp = open(filename, "r") for f_line in fp: f_str=f_line.strip() f_str=f_str.split(',') for unit_str in f_str: unit=float(unit_str) l.append(unit) bad_filename = False except IOError: print("Error: The file was not found: ", filename) #print(l) condition=True while condition==True: print('1- open\n','2- maximum') x=input("Enter the choice") menu(x,l) main() from the bottom function i can get list and i can get the user input and i can get the data and move it in second function but it wont work after that.thank you

    Read the article

  • I need to create a very large array of bits/boolean values. How would I do this in C/C++?

    - by Eddy
    Is it even possible to create an array of bits with more than 100000000 elements? If it is, how would I go about doing this? I know that for a char array I can do this: char* array; array = (char*)malloc(100000000 * sizeof(char)); If I was to declare the array by char array[100000000] then I would get a segmentation fault, since the maximum number of elements has been exceeded, which is why I use malloc. Is there something similar I can do for an array of bits?

    Read the article

  • Deferred printing in Java

    - by Bober02
    I have a specific issue with general console printing and I was wondering whether anyone has a solution for it. I am trying to print a dataTable which would look like sth like this: Table ---------------------- Name |Surname | ---------------------- Mike |Mikhailowish| Rafaello|Mirena | and so on. In order to print the border of the bar I need to know what the maximum length of each column value is. I don't want to go through the whole database to find that out and then again to print it. I would rather like to do sth like: System.out.printLater(s); //herejust leave a pointer to a StringBuilder you will build ... s.append("--------"); ... System.out.printAllDeferred(); I understand the above is probably in 99.99999% chances impossible, but perhaps you guys have a clever way of achieving the above?

    Read the article

  • Is correct name enough to make it happen?

    - by Knowing me knowing you
    Guys, I've just dipped in to limits.h by MS. I tried to check what's the return type for max() fnc and to my surprise I see something like this: // TEMPLATE CLASS numeric_limits template<class _Ty> class numeric_limits : public _Num_base { // numeric limits for arbitrary type _Ty (say little or nothing) public: static _Ty (__CRTDECL min)() _THROW0() { // return minimum value return (_Ty(0)); } static _Ty (__CRTDECL max)() _THROW0() { // return maximum value return (_Ty(0));//EXACTLY THE SAME WHAT IN min<<------------------ } //... other stuff }; so how is it possiple that in both min and max return does exactly the same? So does it mean if I would write makeSanwich() return (_Ty(0)) it would make a sandwich for me? How is it possible that having this same code just fnc names different we are getting different results?

    Read the article

  • CSS or JS max. character <h2> and replace end with "..."

    - by cr0z3r
    Hey I assume my title basically summed it all up. I have a <h2> title, and I want it to have a max character property, be it CSS or javascript, so that whenever this maximum limit is passed, the title's end is replaced by ... (three dots). Thank you very much in advance. An example can be viewed here: http://themeforest.net/forums/thread/now-accepting-bargain-submissions/23205 (see the title) P.S. Any idea why I had to create a new user? the login-feature through google doesn't recognize my previous user :(

    Read the article

  • What should layers in dotnet application ?

    - by haansi
    I am using layered architecture in dotnet (mostly I work on web projects). I am confuse what layers should I use ? I have small idea that there should be the following layers. user interface customer types (custom entities) business logic layer data access layer My purpose is sure quality of work and maximum re-usability of code. some one suggested to add common types layer in it. Please guide me what should be layers ? and in each layer what part should go ?

    Read the article

  • how can resize the page?

    - by Ryliatron
    im designing a website and i have screen resolution problem. I want to scale my page but i cant do it. Its my website and 21.5 inc mac screen: (its done, no problem) Its my laptop screen 1366 x 768 px resolution; I tryed this on css; body, html {height:100%;} and this on html; <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1"> <link rel="stylesheet" href="css/style.css" type="text/css" media="all" /> Doctype is: XHTML 1.0 Transitional but doesnt work. How can i do it? Thanks!

    Read the article

  • Google Maps API - load the US

    - by hjk
    I am new to google maps api. I'd like suggestions on achieving the following functionality: whenever the page loads, the map will load centered around the US. Imagine a box around the US with given lat/longs specifying the minimum and maximum boundaries. I need the map to load at the appropriate zoom (and zoom needs to be disabled) such that this box composes the entire map. Basically, I'm wondering if there is a function that loads the map based on lat/long boundaries (or some way to acheive this), rather then loading the map given a zoom level.

    Read the article

  • PHP, how can I produce a string, a unique list of values up to three items, for use after IN in a query?

    - by Jules
    I need to produce a string for use in an query e.g. SELECT whatever from Keywords.word IN (here); At the moment I have string which could be $search = "one word or four"; or $search = "one"; or $search = "one one"; I need to validate this into some acceptable for my query. I want a unique list of words, separated with a comma up to a maximum of three. This is what I have so far. $array = explode(" ",$search); $unique = array_unique ($array); I'm sure there must be a quicker way than evaluating each of the items for blank and selecting the first three.

    Read the article

  • How to prevent negative number in Mysql

    - by Jerry
    Hello guys.. I have data which is starting from 0 in my database. My php will add 1 or -1 to the data depending on the user's input. My problem is that if data is 0 and a user try to subtract 1. The data become 4294967295 which is the maximum value of INT data type. Are there anyways to make the data stays in 0 even when the user asks for -1? Thanks for the reply.. my sql command is like below update board set score=score-1 where team='TeamA' //this would generate 4294967295 if the score is 0.....

    Read the article

  • How to limit results by SUM

    - by superspace
    I have a table of events called event. For the purpose of this question it only has one field called date. The following query returns me a number of events that are happening on each date for the next 14 days: SELECT DATE_FORMAT( ev.date, '%Y-%m-%d' ) as short_date, count(*) as date_count FROM event ev WHERE ev.date >= NOW() GROUP BY short_date ORDER BY ev.start_date ASC LIMIT 14 The result could be as follows: +------------+------------+ | short_date | date_count | +------------+------------+ | 2010-03-14 | 1 | | 2010-03-15 | 2 | | 2010-03-16 | 9 | | 2010-03-17 | 8 | | 2010-03-18 | 11 | | 2010-03-19 | 14 | | 2010-03-20 | 13 | | 2010-03-21 | 7 | | 2010-03-22 | 2 | | 2010-03-23 | 3 | | 2010-03-24 | 3 | | 2010-03-25 | 6 | | 2010-03-26 | 23 | | 2010-03-27 | 14 | +------------+------------+ 14 rows in set (0.06 sec) Let's say I want to dislay these events by date. At the same time I only want to display a maximum of 10 at a time. How would I do this? Somehow I need to limit this result by the SUM of the date_count field but I do not know how. Anybody run into this problem before? Any help would be appreciated. Thanks

    Read the article

  • How should I display invalid options?

    - by mafutrct
    I've got a WinForms client-server app that displays various offers in a list. Every user (client) has a "rating". An offer consists of various data including a minimum and maximum rating. If a user's rating does not fall in that interval, he should not be able to take the offer. Of course I could just perform some server filtering and send a list of offers prefiltered for each user to the client application. But that would surely, and rightfully, lead to confused requests "Why isn't this offer showing up? I know it exists, it shows up on [other user]'s screen." How should I handle this? My favorite solution so far is to grey out the offer and add a tooltip "You can't take this offer because your rating is too high/low" while displaying greyed-out offers at the bottom of the list to leave the actually valid offers easily visible on top of the list.

    Read the article

  • How to add values accordingly of the first indices of a dictionary of tuples of a list of strings? Python 3x

    - by TheStruggler
    I'm stuck on how to formulate this problem properly and the following is: What if we had the following values: {('A','B','C','D'):3, ('A','C','B','D'):2, ('B','D','C','A'):4, ('D','C','B','A'):3, ('C','B','A','D'):1, ('C','D','A','B'):1} When we sum up the first place values: [5,4,2,3] (5 people picked for A first, 4 people picked for B first, and so on like A = 5, B = 4, C = 2, D = 3) The maximum values for any alphabet is 5, which isn't a majority (5/14 is less than half), where 14 is the sum of total values. So we remove the alphabet with the fewest first place picks. Which in this case is C. I want to return a dictionary where {'A':5, 'B':4, 'C':2, 'D':3} without importing anything. This is my work: def popular(letter): '''(dict of {tuple of (str, str, str, str): int}) -> dict of {str:int} ''' my_dictionary = {} counter = 0 for (alphabet, picks) in letter.items(): if (alphabet[0]): my_dictionary[alphabet[0]] = picks else: my_dictionary[alphabet[0]] = counter return my_dictionary This returns duplicate of keys which I cannot get rid of. Thanks.

    Read the article

  • Looking for a better alternative to linklabels

    - by user986086
    Please see the two long linklabels below (please ignore the black lines above) Linklabels' length is made dynamically during runtime, and as seen, could be that it's too long and overlapping other text we have (there is another text where you see 'Differences'). My questions are: a) Can I limit the maximum length of a linklabel? b) Is that possible to use a scrollbar with a linklabel (or any similar control) in case that it's too long? e.g. setting it to 200 pixels, and in case it's longer, the user has to scroll the horizontal scroller and see end of the text. I'm using VB.NET on Visual Studio 2008 THANK YOU

    Read the article

  • Game network physics collision

    - by Jonas Byström
    How to simulating two client-controlled vehicles colliding (sensibly) in a typical client/server setup for a network game? I did read this eminent blog post on how to do distributed network physics in general (without traditional client prediction), but this question is specifically on how to handle collisions of owned objects. Example Say client A is 20 ms ahead of server, client B 300 ms ahead of server (counting both latency and maximum jitter). This means that when the two vehicles collide, both clients will see the other as 320 ms behind - in the opposite direction of the velocity of the other vehicle. Head-to-head on a Swedish highway means a difference of 16 meters/17.5 yards! What not to try It is virtually impossible to extrapolate the positions, since I also have very complex vehicles with joints and bodies all over, which in turn have linear and angular positions, velocities and accelerations, not to mention states from user input.

    Read the article

  • How to empty a socket in python?

    - by luc
    I need to empty the data on a socket (making sure that there is nothing to receive). Unfortunately, there is no function for this in the python socket module. I've implemented something this way: def empty_socket(sock): """remove the data present on the socket""" input = [sock] while 1: inputready, o, e = select.select(input,[],[], 0.0) if len(inputready)==0: break for s in inputready: s.recv(1) What do you think? Is there a better way to do that? Update: I don't want to change the socket timeout. What's why i prefer a select to a read. Update: The original question was using the 'flush' term. It seems that 'empty' is a better term. Update - 2010-02-27 : I've noticed a bug after when the pair has closed. The inputready is always filled with the sockets. I fixed that by adding a maximum number of loops. Is there a better fix?

    Read the article

  • Python performance profiling (file close)

    - by user1853986
    First of all thanks for your attention. My question is how to reduce the execution time of my code. Here is the relevant code. The below code is called in iteration from the main. def call_prism(prism_input_file,random_length): prism_output_file = "path.txt" cmd = "prism %s -simpath %d %s" % (prism_input_file,random_length,prism_output_file) p = os.popen(cmd) p.close() return prism_output_file def main(prism_input_file, number_of_strings): ... for n in range(number_of_strings): prism_output_file = call_prism(prism_input_file,z[n]) ... return I used statistics from the "profile statistics browser" when I profiled my code. The "file close" system command took the maximum time (14.546 seconds). The call_prism routine is called 10 times. But the number_of_strings is usually in thousands, so, my program takes lot of time to complete. Let me know if you need more information. By the way I tried with subprocess, too. Thanks.

    Read the article

  • apply function using expand.grid in R

    - by kolonel
    I have two vectors x and y. I create a grid using the following function: v = expand.grid(x, y) I have a function defined as follows N <- function(a, b , dat){ m = ncol(Filter(function(z) a*max(z)*min(z) < b , dat[1:ncol(dat)])) return(m) } and then I need to maximize N over a grid of x,y: Maximize <- function(x , y ,dat){ v = as.matrix(expand.grid(x,y)) # Here is where I want to map the values of v and get the maximum element and # get the tuple in v that maximized N temp1 <- max(apply(v , 1 , N(v[[1]] , v[[2]] , dat))) } Thanks

    Read the article

  • Casting in mixed type calculations in C?

    - by yCalleecharan
    Hi, If I define these variables: double x0, xn, h; int n; and I have this mathematical expression: h = (xn - x0)/n; Is it necessary that I cast n into double prior doing the division for maximum accuracy like in h = (xn - x0)/ (double) n; I wrote a program to check the above but both expressions give the same answers. I understand that C will promote the integer to double type as variables xn and x0 are of type double but strangely enough in a book, the second expression with casting was emphasized. Thanks a lot...

    Read the article

  • Service Discovery in J2ME

    - by thiagolee
    Hello, I have an application to run on a cell phone equipped with Wi-Fi and an application on a desktop which I want to communicate with. The problem is that I want to find in a Local Area Network the IP and port of the machine who has my service running. I can guarantee that there will be at maximum only one machine running it. I searched a lot for a way to do this but I ended up with nothing. I read something about WebServices, but it didn't seen to be what I wanted, what I want is really simple. I actually found a solution for it, but it can't be ported to J2ME. Anyone can help? Thanks.

    Read the article

  • Sending emails from Django App

    - by Will M.
    We are a growing Django app that is currently using Google Apps to send email. We are hitting the maximum limits of email sending and need a better solution. We prefer not to have to manage our own email servers and the easier the better. What is the best, easiest, and cheapest way to send a large amount of email? We have looked at Postageapp but they require you to use your own SMTP server. We are considering App Engine to send email but it will require a lot of configuration to get it to work correctly. What can we use to quickly fix this problem?

    Read the article

  • Help with implementing a function to change size of dynamic array

    - by iRobot
    I'm trying to write a function that will change the size of a dynamic array to a new size. In my header file, I have: Image **images; //pointer to a dynamic array of image pointers int maximum; //size I want to do this by allocating a new array and copying the values over without changing their indices. If there are non-null pointers outside the range newmax, then we cant do this. So heres what I have: There are no compilation or runtime errors. However, I find that the new array isnt getting sized right. When I run the following test case: I should get an index out of bounds error, but instead the system lets it slide. Can anyone see the mistake? I've looked for hours but cant find anything.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >