Search Results

Search found 3130 results on 126 pages for 'half duplex'.

Page 79/126 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • correct technical term for this pattern

    - by Oliver A.
    sometimes I use a pattern which is very similar to the singleton pattern: There is one default instance which and a static get method to aces it. But you may create other instances and pass it as optional parameter and if you want to and you can even replace the default instance with a instance from a child class. So it is NO SINGLETON at all but it is used like one singleton in most cases. Anyone got an idea who to call something like this ? Maybe half*** singleton? domiton?

    Read the article

  • Twisted Matrix and telnet server implementation

    - by ypercube
    I have a project which is essentially a game server where users connect and send text commands via telnet. The code is in C and really old and unmodular and has several bugs and missing features. The main function alone is half the code. I came to the conclusion that rewriting it in TwistedMachine could actually result in faster completement, besides other benefits. So, here is the questions: What packages and modules I should use? I see a "telnet" module inside "protocols" package. I also see "cronch" package with "ssh" and another "telnet" module. I'm a complete novice regarding Python.

    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

  • scikit learn extratreeclassifier hanging

    - by denson
    I'm running the scikit learn on some rather large training datasets ~1,600,000,000 rows with ~500 features. The platform is Ubuntu server 14.04, the hardware has 100gb of ram and 20 CPU cores. The test datasets are about half as many rows. I set n_jobs = 10, and am forest_size = 3*number_of_features so about 1700 trees. If I reduce the number of features to about 350 it works fine but never completes the training phase with the full feature set of 500+. The process is still executing and using up about 20gb of ram but is using 0% of CPU. I have also successfully completed on datasets with ~400,000 rows but twice as many features which completes after only about 1 hour. I am being careful to delete any arrays/objects that are not in use. Does anyone have any ideas I might try?

    Read the article

  • If element has been 'mouseover'ed for 500ms, run function with jQuery

    - by PaulAdamDavis
    For the sanity of my users, I want a 'mouseover' event to run after the selector has been hovered for half a second rather than as soon as they hover it. I first tried a setTimeout function but that runs however long the element has been hovered, I didn't think it through too much I guess. I've also spent a day (on and off) searching (and playing Pacman) ti no result, unless I'm searching for the wrong things. I would like to keep this plugin-less if we can, purely for run speed & maintainability. $("#mySelector").mouseover(function(){ // Run after 500ms $(this).addClass("hasBeen500ms"); }); Let's see if we can crack this, I know it will have so many applications!

    Read the article

  • INSERT INTO ... SELECT ... vs dumping/loading a file in MySQL

    - by Daniel Huckstep
    What are the implications of using a INSERT INTO foo ... SELECT FROM bar JOIN baz ... style insert statement versus using the same SELECT statement to dump (bar, baz) to a file, and then insert into foo by loading the file? In my messing around, I haven't seen a huge difference. I would assume the former would use more memory, but the machine that this runs on has 8GB of RAM, and I never even see it go past half used. Are there any huge (or long term) performance implications that I'm not seeing? Advantages/disadvantages of either?

    Read the article

  • How to use jquery .animate() to mock 'text-align:right'

    - by mrwienerdog
    I am building a very simple jquery menu. On hover, I have a menu on the right easing to the left margin of my menu container. This is easy, as the text is left aligned within said container. However, I also have a menu on the left, and because the links (left justified) are of differing length, the best I can do is adjust the padding to ease the text a uniform amount between links. Therefor, long link text goes to the right edge of the container, buy short text only makes it about half way. In reading about this, I have learned that you can not modify the text align property as it is non numeric. Is there any other way to do this? I of course tried to go with: $('#selector').css('text-align':'right') but that made the text jump to the right instead of ease. Is there any way to ensure all links ease to the rightmost margin of the container?

    Read the article

  • How to limit memory of a OS X program? ulimit -v neither -m are working

    - by hectorpal
    My programs run out of memory like half of the time I run them. Under Linux I can set a hard limit to the available memory using ulimit -v mem-in-kbytes. Actually, I use ulimit -S -v mem-in-kbytes, so I get a proper memory allocation problem in the program and I can abort. But... ulimit is not working in OSX 10.6. I've tried with -s and -m options, and they are not working. In 2008 there was some discussion about the same issue in MacRumors, but nobody proposed a good alternative. The should be a way a program can learn it's spending too much memory, or setting a limit through the OS.

    Read the article

  • How to access web page hierarchy inside a application.

    - by Hazior
    Trying to figure out how to programmatically access the web pages in the application. Just something simple like a list of them would be awesome. I know I can create a list but I was wondering if there was something that could 'look' at the pages and add a new one to the list if you make a new page for the application. Example with 7 pages: Error Default Login Content Users ContactUs Admin I am half awake so I may be a little unclear. Maybe puting it all in a single question will be easier. How do you autogenerate a list of all webpages in your current application?

    Read the article

  • Simple haskell splitlist

    - by js7354
    I have the following function which takes a list and returns two sublists split at a given element n. However, I only need to split it in half, with odd length lists having a larger first sublist splitlist :: [a] -> Int -> ([a],[a]) splitlist [] = ([],[]) splitlist l@(x : xs) n | n > 0 = (x : ys, zs) | otherwise = (l, []) where (ys,zs) = splitlist xs (n - 1) I know I need to change the signature to [a] - ([a],[a]), but where in the code should I put something like length(xs) so that I don't break recursion? Thank you.

    Read the article

  • SqlDataAdapter.Fill suddenly taking a long time

    - by WraithNath
    I have an application with a central DataTier that can execute a query to a data table using an SQLDataAdapter. None of this code has changed but now all queries are taking at least 10x as long to execute a query returning even one record. The only difference is that I have been using the app in a VM but the issue has started mid way through using the application. eg, the speed issue has not manifested itself from the start of using the VM, rather half way through. Has anyone else had an issue with the SQL Data Adapter taking a long time to fill for no reason? executing the query in Management studio it runs in less than a second. Firewalls are disabled

    Read the article

  • sql query is too slow, how to improve speed

    - by user1289282
    I have run into a bottleneck when trying to update one of my tables. The player table has, among other things, id, skill, school, weight. What I am trying to do is: SELECT id, skill FROM player WHERE player.school = (current school of 4500) AND player.weight = (current weight of 14) to find the highest skill of all players returned from the query UPDATE player SET starter = 'TRUE' WHERE id = (highest skill) move to next weight and repeat when all weights have been completed move to next school and start over all schools completed, done I have this code implemented and it works, but I have approximately 4500 schools totaling 172000 players and the way I have it now, it would take probably a half hour or more to complete (did not wait it out), which is way too slow. How to speed this up? Short of reducing the scale of the system, I am willing to do anything that gets the intended result. Thanks! *the weights are the standard folk style wrestling weights ie, 103, 113, 120, 126, 132, 138, 145, 152, 160, 170, 182, 195, 220, 285 pounds

    Read the article

  • Counting values in data frame subject to conditions

    - by unixsnob
    I have been searching around and I cannot figure out how to sumarise the data I have in my data frame (subject to some ranges). I know that it can be done when applying some combination of daaply/taaply or table but I haven't been able to get the exact result I was expecting. Basically I want to turn this: part_no val1 val2 val3 2 1 2 3 45.3 2 1 3 4 -12.3 3 1 3 4 99.3 3 1 5 2 -3.2 3 1 4 3 -55.3 Into this: part_no val3_between0_50 val3_bw50_100 val3_bw-50_0 val3_bw-100_-50 2 1 0 0 1 0 3 0 1 0 1 1 This is dummy data, I got a lot more rows, but the idea is the same. I just want to count the number of values for a participant that meet certain condition. If anyone could explain it sort of step by step, I would really appreciate it. I saw lots of different little posts around, but none do exactly this and my attempts only got me half way there. Like using table, etc. Thanks!

    Read the article

  • OpenGL ES perspective projection

    - by TimeManx
    I'm having a hard time understanding how glFrustum & gluPerspective work. I understand the concept of perspective projection but the functions aren't behaving how I expect them to. For example, if I set the frustum this way glFrustumf(0, 10, 0, 10, 1, 100) and have a rectangle at points 0, 0, 1, 0, 10, 1, 10, 10, 1, 10, 0, 1 then the rectangle is drawn with its left edge at -5 & right edge at 5, so the left half of the rectangle isn't visible. And if x is translated, I'd expect y to be too. But that doesn't happen either. In whatever examples I've seen, the coordinates for the projection matrix are taken as glFrustumf(-10, 10, -10, 10, 1, 100) but either way, whatever part is shown should be dependent on the rectangle's coordinates, right?

    Read the article

  • How to get into android phone without having to press any buttons

    - by user2961092
    I'm not a programmer, so I'm not sure what I'd needed to answer my question. I'm wondering if it's possible to program a way to half wake your cell phone screen without having to press any buttons or using the sensors. Like I've found you can do on the blackberry z10, you have an option to wake the screen by swiping up from a locked screen. I love android and will use it regardless, but I had to use a z10 for work for a while and stumbled upon that feature. It would be fantastic to have that feature with Android as hitting a power button can get annoying. Thanks in advance

    Read the article

  • Convert "minutes since midnight" to time (convert to NSDate?)

    - by Canada Dev
    I am getting some open/closed times as integers since midnight. For example: "1140" = 19:00 (or 7 pm if you will) or; "570" = 9:30 (or 9.30 am) I can easily get the time in European format, just by doing doing a simple calculation and formatting: [NSString stringWithFormat:@"%d:00", (T / 60)] However, this doesn't work for half hours, such as "570 minutes since midnight". Also, I run into problems if I want to include a bit of localization, because some people may prefer AM/PM times. Does NSDate include a method for easily implementing times using the above? Or can anyone tell me how I would at least convert a time like "570 minutes since midnight" to 9:30 properly. Right now it obviously won't write the :30 part. Thank you

    Read the article

  • Background image help

    - by J2
    is there any way when using a div for a background image- to limit the height to only the content displayed? im putting the background image in a div because i want it centered via position:relative but the image doesnt show up unless i put a height on the div, and thats not what i want because i dont want to be able to just scroll down to the bottom of the image where theres no content ive tried putting the background image on the body css but if the browser is less than the width of the image, it just throws it over to the left and you can only see half of it- is there no way to make the background position:relative on the body? sorry if that doesnt make sense < thanks

    Read the article

  • Pointer aliasing- in C++0x

    - by DeadMG
    I'm thinking about (just as an idea) disjointed pointer aliasing in C++0x. I was thinking about seeing if it could be implemented similarly to const correctness- that is, enforced by the compiler. What would be the requirements for such a thing? As this is more of a thought experiment, I'm perfectly happy to look at solutions that destroy legacy code or redefine half the language and that kind of thing. What I'd really rather not do is have, say, restrict from C99 where the programmer just promises it. It should be enforced.

    Read the article

  • How many SQL queries per HTTP request is optimal?

    - by Chris Kooken
    I know the answer to this question for the most part is "It Depends", however I wanted to see if anyone had some pointers. We execute queries each request in ASP.NET MVC. Each request we need to get user rights information, and Various data for the Views that we are displaying. How many is too much, I know I should be conscious to the number of queries i am executing. I would assume if they are small queries and optimized out, half-a-dozen should be okay? Am I right? What do you think?

    Read the article

  • What are some Coldfusion (mx7 and greater) "Gotchas" that I should know about?

    - by jakeonrails
    I just spent half the day troubleshooting what is apparently a rather famous gotcha for Coldfusion MX7 and below: The nested query loop bug: Where you are required to reference the current_row of the outer query or else you will only see the first record. For example: <cfloop query="outer"> <cfloop query="innner"> <p>#outer.field#</p><!--- this won't work, you'll only get the first row ---> <p>#outer.field[current_row]#</p><!--- you must do this instead ---> </cfloop> </cfloop> Are there any other ways in which ColdFusion does not work in the obvious way?

    Read the article

  • Which route should i take for web hosting?

    - by Undermine2k
    Hi I am setting up a small website sort of like an online portfolio. I made the mistake of signing up for shared-web hosting before asking if they supported stored procedures which took me half the day to figure out they didn't. Basically i'm looking for a site that offers me PHP5.4+/ Mysql 5.5 + with support for triggers/stored procedures/ and if possible MyphpAdmin 3.5.1. I also have a domain name I already registered and which I would like to use. What is my best option to look for hosting provider which offers this functionality or to setup a VPS?

    Read the article

  • C++ vector that *doesn't* initialize its members?

    - by Mehrdad
    I'm making a C++ wrapper for a piece of C code that returns a large array, and so I've tried to return the data in a vector<unsigned char>. Now the problem is, the data is on the order of megabytes, and vector unnecessarily initializes its storage, which essentially turns out to cut down my speed by half. How do I prevent this? Or, if it's not possible -- is there some other STL container that would avoid such needless work? Or must I end up making my own container? (Pre-C++11) Note: I'm passing the vector as my output buffer. I'm not copying the data from elsewhere.

    Read the article

  • Debugging in netbeans (java)

    - by Daen
    I have been asking this myself for a while. Debugging in visual studio goes smooth. But when i debugg in Netbeans(java) i find myself more then half of the time browsing trough the system code itself. This makes it almost unpossible for me to detect hard to find bugs, cause debugging simply is to tedious and unmanageable. How can this be avoided? Stepping out all the time takes a insane amount of time, and i only wish to debug the code i have written down. I usally add all the controls myself without using any drag and drop for forms if that makes any difference in the total picture. Regards.

    Read the article

  • iPhone: Localizing app icon still not supported?

    - by js_
    My app's icon includes some text. So I want to change language of the text by language or country. There is a post which says localizing app icon is not supported: http://useyourloaf.com/blog/2010/12/16/localizing-iphone-app-icon-is-not-supported.html But it was posted in December 2010, one and half years ago from now. Is it still not possible to change icon of app by language? Localizing both icon of app on device and icon on App Store are not supported? Or localizing icon only on App Store is possible?

    Read the article

  • How to use `wx.ProgressDialog` with my own method?

    - by user1401950
    How can I use the wx.ProgressDialog to time my method called imgSearch? The imgSearch method finds image files on the user's pc. How can I make the wx.ProgressDialog run while imgSearch is still running and display how long the imgSearch is taking? Here's my code: def onFind (self,event)# triggered by a button click max = 80 dlg = wx.ProgressDialog("Progress dialog example","An informative message",parent=self, style = wx.PD_CAN_ABORT| wx.PD_APP_MODAL| wx.PD_ELAPSED_TIME| wx.PD_REMAINING_TIME) keepGoing = True count = 0 imageExtentions = ['*.jpg', '*.jpeg', '*.png', '*.tif', '*.tiff'] selectedDir = 'C:\\' imgSearch.findImages(imageExtentions, selectedDir)# my method while keepGoing and count < max: count += 1 wx.MilliSleep(250) if count >= max / 2: (keepGoing, skip) = dlg.Update(count, "Half-time!") else: (keepGoing, skip) = dlg.Update(count) dlg.Destroy()

    Read the article

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