Search Results

Search found 29841 results on 1194 pages for 'random number generator'.

Page 33/1194 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • Apache on Windows random long wait times

    - by Jaxbot
    I have a development machine with Apache installed as a service on Windows. The installation is fresh out of the box, with no changes to configuration aside from adding the PHP module. From day one, I've had a problem that looks like this: Essentially, Apache is freezing for about 11 seconds before replying on random requests. This appears to happen more frequently when the host hasn't been connected to in a while, but this is not always the case. I've eliminated MySQL, PHP, and the specific application; this long wait problem will occur even when loading a static file such as favicon.ico. Thus, the only factor remaining is Apache, which is freezing for consistently around 10-11 seconds before replying. The problem is not the DNS problem that many people point to; as you can see, the DNS lookup is instant, and the problem occurs both on localhost and 127.0.0.1. Thanks for the time.

    Read the article

  • Windows 7 random black screen when idle

    - by Omar
    Occasionally, when I'm away from my computer for about 5 minutes, the computer screen will go black and all USB devices (keyboard/mouse) will lose power. Attempting to move the mouse or pressing keys does not 'wake up' the computer. This only started happening a few days ago but I'm not sure what changes I did could have caused this and I uninstalled programs (one by one) I installed before it started happening, but still having the same issue. The one thing I noticed different about my computer since it started happening is i've been getting random survey popups from www.insightexpress.com. I ran Microsoft Security Essentials scan, it picked up some Java related malware, I removed it but still the same issue. I'm running MBAM right now and will run SAS after. Edit: I just updated drivers for motherboard and video card and ran virus scans, still having the same issue.

    Read the article

  • Putty freezes at random when logging into a remote machine in another continent

    - by artknish
    I have to ssh to a remote machine in Europe from Asia every day for my work. But Putty freezes sometimes at totally random times and I have no choice but to close and re-open a new ssh session. It's frustrating especially when I'm editing something or executing a long running program. I know the question really doesn't have much details ('cause nothing seems to be wrong with the network at all). Has anyone experienced this sort of issue with Putty and had resolved it? Thanks for your time!

    Read the article

  • Chrome sending of packets to random destinations upon reconnect/disconnect

    - by f0x
    Noticed an interesting thing whilst debugging one of my websocket applications that Google Chrome will push out 3 http requests upon a network connection status changing; Quite disconcerting and looks almost as if some malware is checking out to a random server. I don't quite understand the why though since they all return a 502 or have no response code at all since the destination does not exist. On Disconnect: Reconnect: I guess the main question is this normal and what the use is; howcome they wouldn't go for a dns lookup that actually exists?

    Read the article

  • random hard disk errors

    - by AugB
    For the past 2 years or so (4 year old custom build) I've been getting random moments where everything stops responding (or takes a very long time to respond) followed by I/O and hdd not detected errors on restart. To fix it, all I usually need to do is unplug my SATA cables from the hdd and mobo and plug them back in again and the problem disappears, at least for a little while (it ranges anywhere from a day to a few months time). Sometimes even a startup repair does the job. I've done multiple reformats and have also ran chkdsk more times than I can remember and both do not seem to help in the long run. Both the drives seem to be exhibiting the same problem. Have both my hdds been "dying" for the past couple of years, even though they are fully functional besides these occasional hiccups? Does the issue lie elsewhere? All feedback is appreciated. System specs: Biostar Tpower i45 mobo 2x WD Caviar 640GB hdds Zalman 750w psu Radeon 5870 gpu 2x2gb Gskill DDR2 ram Win7 64

    Read the article

  • Random Connections to MySQL refused (Error 111)

    - by joatis
    A Perl/CGI webapp that has been running fine for almost a year has started to randomly been unable to connect to a remotely hosted MySQL. The Error thrown is : Can't connect to MySQL server on 'xx.x.xxx.xx' (111) Reloading the page often solves the problem The client is using Perl, DBI and SSL to connect to MySQL using the same configuration file each time. MySQL 5.0 Server Running RH EL5 Quad-Core AMD Opteron(tm) Processor 2374 HE, 8 cores Real Memory: 15.73 GB total, 11.81 GB used allows networking in my.cnf max-connections are not being met load is low. The servers firewall is open to the client's subnet. The mysql user has permissions from the client's subnet. I have my host looking into the problem but so far we're all stumped as to way the occasional connection is (increasingly getting refused) Any advice what to check that would cause the random refusal of connections?

    Read the article

  • Random BSOD ntoskrnl.exe (Windows 7)

    - by nordbjerg
    I get BSOD at random times and have been for a while now on my Windows 7 machine. It is really new, and I already tried wiping the graphic card drivers and installing them again (making sure that they are of course up to date). I get a variety of bug check strings on a few different drivers. The single file that is in all of my BSODs is ntoskrnl.exe Bug Check Strings - SYSTEM_SERVICE_EXCEPTION - KMODE_EXCEPTION_NOT_HANDLED - DRIVER_IRQL_NOT_LESS_OR_EQUAL - SYSTEM_THREAD_EXCEPTION_NOT_HANDLED - PAGE_FAULT_IN_NONPAGED_AREA I would rather not resort to getting a completely new PC, as I have already thrown a lot of money on my current one. Here is a .zip file with my dumps.

    Read the article

  • Java - Tile engine changing number in array not changing texture

    - by Corey
    I draw my map from a txt file. Would I have to write to the text file to notice the changes I made? Right now it changes the number in the array but the tile texture doesn't change. Do I have to do more than just change the number in the array? public class Tiles { public Image[] tiles = new Image[5]; public int[][] map = new int[64][64]; private Image grass, dirt, fence, mound; private SpriteSheet tileSheet; public int tileWidth = 32; public int tileHeight = 32; Player player = new Player(); public void init() throws IOException, SlickException { tileSheet = new SpriteSheet("assets/tiles.png", tileWidth, tileHeight); grass = tileSheet.getSprite(0, 0); dirt = tileSheet.getSprite(7, 7); fence = tileSheet.getSprite(2, 0); mound = tileSheet.getSprite(2, 6); tiles[0] = grass; tiles[1] = dirt; tiles[2] = fence; tiles[3] = mound; int x=0, y=0; BufferedReader in = new BufferedReader(new FileReader("assets/map.dat")); String line; while ((line = in.readLine()) != null) { String[] values = line.split(","); for (String str : values) { int str_int = Integer.parseInt(str); map[x][y]=str_int; //System.out.print(map[x][y] + " "); y=y+1; } //System.out.println(""); x=x+1; y = 0; } in.close(); } public void update(GameContainer gc) { } public void render(GameContainer gc) { for(int x = 0; x < map.length; x++) { for(int y = 0; y < map.length; y ++) { int textureIndex = map[y][x]; Image texture = tiles[textureIndex]; texture.draw(x*tileWidth,y*tileHeight); } } } Mouse picking public void checkDistance(GameContainer gc) { Input input = gc.getInput(); float mouseX = input.getMouseX(); float mouseY = input.getMouseY(); double mousetileX = Math.floor((double)mouseX/tiles.tileWidth); double mousetileY = Math.floor((double)mouseY/tiles.tileHeight); double playertileX = Math.floor(playerX/tiles.tileWidth); double playertileY = Math.floor(playerY/tiles.tileHeight); double lengthX = Math.abs((float)playertileX - mousetileX); double lengthY = Math.abs((float)playertileY - mousetileY); double distance = Math.sqrt((lengthX*lengthX)+(lengthY*lengthY)); if(input.isMousePressed(Input.MOUSE_LEFT_BUTTON) && distance < 4) { System.out.println("Clicked"); if(tiles.map[(int)mousetileX][(int)mousetileY] == 1) { tiles.map[(int)mousetileX][(int)mousetileY] = 0; } } System.out.println(tiles.map[(int)mousetileX][(int)mousetileY]); }

    Read the article

  • return the result of a query and the total number of rows in a single function

    - by csotelo
    This is a question as might be focused on working in the best way, if there are other alternatives or is the only way: Using Codeigniter ... I have the typical 2 functions of list records and show total number of records (using the page as an alternative). The problem is that they are rather large. Sample 2 functions in my model: count Rows: function get_all_count() { $this->db->select('u.id_user'); $this->db->from('user u'); if($this->session->userdata('detail') != '1') { $this->db->join('management m', 'm.id_user = u.id_user', 'inner'); $this->db->where('id_detail', $this->session->userdata('detail')); if($this->session->userdata('management') === '1') { $this->db->or_where('detail', 1); } else { $this->db->where("id_profile IN ( SELECT e2.id_profile FROM profile e, profile e2, profile_path p, profile_path p2 WHERE e.id_profile = " . $this->session->userdata('profile') . " AND p2.id_profile = e.id_profile AND p.path LIKE(CONCAT(p2.path,'%')) AND e2.id_profile = p.id_profile )", NULL, FALSE); $this->db->where('MD5(u.id_user) <>', $this->session->userdata('id_user')); } } $this->db->where('u.id_user <>', 1); $this->db->where('flag <>', 3); $query = $this->db->get(); return $query->num_rows(); } results per page function get_all($limit, $offset, $sort = '') { $this->db->select('u.id_user, user, email, flag'); $this->db->from('user u'); if($this->session->userdata('detail') != '1') { $this->db->join('management m', 'm.id_user = u.id_user', 'inner'); $this->db->where('id_detail', $this->session->userdata('detail')); if($this->session->userdata('management') === '1') { $this->db->or_where('detail', 1); } else { $this->db->where("id_profile IN ( SELECT e2.id_profile FROM profile e, profile e2, profile_path p, profile_path p2 WHERE e.id_profile = " . $this->session->userdata('profile') . " AND p2.id_profile = e.id_profile AND p.path LIKE(CONCAT(p2.path,'%')) AND e2.id_profile = p.id_profile )", NULL, FALSE); $this->db->where('MD5(u.id_user) <>', $this->session->userdata('id_user')); } } $this->db->where('u.id_user <>', 1); $this->db->where('flag <>', 3); if($sort) $this->db->order_by($sort); $this->db->limit($limit, $offset); $query = $this->db->get(); return $query->result(); } You see, I repeat the most of the functions, the difference is that only the number of fields and management pages. I wonder if there is any alternative to get as much results as the query in a single function. I have seen many tutorials, and all create 2 functions: one to count and another to show results ... Will there be more optimal?

    Read the article

  • Monotone-increasing Version Number based on Mercurial Commits

    - by Isaac
    When I was using subversion for the code for an application, I could append a period and the result of svnversion to the version number to create a unique and monotone-increasing version number and also be guaranteed that any check-out of the same revision of the code would generate the same version number. In Mercurial, because revision numbers are not necessarily consistent across clones, the local revision number is not suitable. The hash is appropriately unique and consistent, but does not create a number that is monotone-increasing. How can I generate a suitable number to append to the version number based on the Mercurial repository commits?

    Read the article

  • Does Hibernate's GenericGenerator cause update and saveOrUpdate to always insert instead of update?

    - by Derek Mahar
    When using GenericGenerator to generate unique identifiers, do Hibernate session methods update() and saveOrUpdate() always insert instead of update table rows, even when the given object has an existing identifier (where the identifier is also the table primary key)? Is this the correct behaviour? public class User { private String id; private String name; public User(String id, String name) { this.id = id; this.name = name; } @GenericGenerator(name="generator", strategy="guid")@Id @GeneratedValue(generator="generator") @Column(name="USER_ID", unique=true, nullable=false) public String getId() { return this.id; } public void setId(String id) { this.id = id; } @Column(name="USER_NAME", nullable=false, length=20) public String getUserName() { return this.userName; } public void setUserName(String userName) { this.userName = userName; } } class UserDao extends AbstractDaoHibernate { public void updateUser(final User user) { HibernateTemplate ht = getHibernateTemplate(); ht.saveOrUpdate(user); } }

    Read the article

  • Unique number generation with Java Server Faces

    - by Buddhika Ariyaratne
    I am developing an application for a medical channelling centre where multiple users reserve bookings for doctors with JSF and JPA. A sequence number is unique to the Doctor, Date and Session. I tried to get a unique sequence number from counting the previous bookings and add one, but if two requests comes at the same time, two bookings get the same number causing trouble to functionality. How can I get unique number in this case? Can I use an application wide bean to generate it? (I thought it is not practicle to get the unique number from the database sequence number as there are several doctors, sessions and daily they have to have different booking number.)

    Read the article

  • Regular expression in Umbraco for number validation.

    - by Vizioz Limited
    This evening I was looking for a way to validate an Umbraco node that could be either text or a numeric value, in my case a salary that could be either an hourly amount, an annual figure or a comment. In the case where the node contained a value I wanted the XSLT to output a pound sign (£) and for any that contained text it would just output the text, as this could be something like "Contact Us" or "Negotiable"I thought someone else might find this useful so here is the XSLT and the regular expression.First if you are using Umbraco, don't forget to include the reference to the EXSLT Regular expression library at the top of your XSLT.<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltRegularExpressions">Then the code I used was:<xsl:if test="Exslt.ExsltRegularExpressions:match($currentPage/data [@alias='Salary'], '^[0-9]*\,?[0-9]*\.?[0-9]+$') != ''"> <xsl:text>£</xsl:text></xsl:if>This regular expression allows any number of digits, an optional comma, more digits, an optional decimal point and finally more digits, so all the following are valid:12,00014.43334,342.03

    Read the article

  • How to determine number of resources to be allocated in a software project

    - by aditi
    Last day I have been interviewed and the interviwer asked me as given the outline of a project, how can we determine the number of resources to be needed for the same? I donot know to do do so? Is there any standard way of doing so? or is it based on the experience? or how.... I am pretty new in this activity and my knowledge is zero at present .... so any clear explanation with some example(simple) will help me(and people like me) to understand this. Thanks

    Read the article

  • google custom search gives different result number for same query

    - by santiagozky
    We are using google custom search and we have found that often the totalResults iterates between two values, even for the same query. The different values can be slightly different or more than double. The parameters I am using look like this: https://www.googleapis.com/customsearch/v1? q=something cx=XXXXXXXXXX lr=lang_en siteSearch=www.mydomain.com start=1 fields=context%2Citems%28fileFormat%2CformattedUrl%2Clink%2Cpagemap%2Csnippet%2Ctitle%29%2Cqueries%2CsearchInformation%28searchTime%2CtotalResults%29%2Cspelling%2FcorrectedQuery key=YYYYYYYYYYYYYYY filter=0 This is problem because of calculating the number of result pages. How can I get the same results for the same query?

    Read the article

  • Operating systems -- using minimum number of semaphores

    - by stackuser
    The three cooperating processes all read data from the same input device. Each process, when it gets the input device, must read two consecutive data. I want to use mutual exclusion to do this. The declaration and initialization that I think would work here are: semaphore s=1 sa1 = 0, sa2 = 0, sb1 = 0, sb2 = 0, sc1 = 0, sc2 = 0 I'd like to use semaphores to synchronize the following processes: P1: P2: P3: input(a1,a2) input (b1,b2) input(c1,c2) Y=a1+c1 W=b2+c2 Z=a2+b1 Print (X) X=Z-Y+W I'm wondering how to use the minimum number of semaphores to solve this. Diagram of cooperating Processes and one input device: It seems like P1 and P2 would start something like: wait(s) input (a1/b1, a2/b2) signal(s)

    Read the article

  • SIM card number swap

    - by DaGhostman Dimitrov
    Is it possible to swap two numbers between two sim cards (I am just got an new phone and it is using a micro sim) And I have a old number that I want to use but it is on standart sim card. Is it possible to swap the numbers between the cards using a SIM Card reader. What software and hardware should I use? Note: I have talked with my provider but I have to cancel my old numbers contract but I like it and do not want to pay the remaining period of the contract to turn it in to PayAsYouGo and then swap ..

    Read the article

  • Number of Weeks between 2 Dates in SQL Server and Oracle

    This post gives you queries in Oracle and SQL Server to find number of weeks between 2 given dates Microsoft SQL Server Syntax: SELECT DATEDIFF (ww, '01/01/1753', '12/31/9999'); Oracle Syntax: SELECT floor(              (to_date('12/31/9999','mm/dd/yyyy')               - to_date('01/01/1753','mm/dd/yyyy')              )              / 7) diff FROM DUAL; span.fullpost {display:none;}

    Read the article

  • Number of Weeks between 2 Dates in SQL Server and Oracle

    This post gives you queries in Oracle and SQL Server to find number of weeks between 2 given dates Microsoft SQL Server Syntax: SELECT DATEDIFF (ww, '01/01/1753', '12/31/9999'); Oracle Syntax: SELECT floor(              (to_date('12/31/9999','mm/dd/yyyy')               - to_date('01/01/1753','mm/dd/yyyy')              )              / 7) diff FROM DUAL; span.fullpost {display:none;}

    Read the article

  • query to select topic with highest number of comment +support+oppose+views

    - by chetan
    table schema title description desid replyto support oppose views browser used a1 none 1 1 12 - bad topic b2 1 2 3 14 sql database a3 none 4 5 34 - crome b4 1 3 4 12 Topic desid starts with a and comment desid starts with b .For comment replyto is the desid of topic . Its easy to select * with highest number of support+oppose+views by query "select * from [DB_user1212].[dbo].[discussions] where desid like 'a%' order by (sup+opp+visited) desc" For highest (comment +support+oppose+views ) i tried "select * from [DB_user1212].[dbo].[discussions] where desid like 'a%' order by ((select count(*) from [DB_user1212].[dbo].[discussions] where replyto = desid )+sup+opp+visited) desc" but it didn't work . Because its not possible to send desid from outer query to innner subquery .

    Read the article

  • How to fix "maximum number of clients reached"?

    - by Brian Averill
    About 30 Oct I ran recent updates for 12.04 64bit. No errors occurred. Next day when I booted computer most apps would not start or if started (eg Chrome) other app windows do not appear. Trying a command line start on most apps gives this message: "Maximum number of clients reachedError: cannot open display: :0" The 'error' part of message not always the same. Have tried to find solution on Ubuntu forums and other Linux web sites, but cannot find a solution. HELP please.

    Read the article

  • Get phone number of (via mobile networks) browsing mobile device

    - by TrialUser
    I recently figured out, that the web site of my phone provider (mobile) mysteriously identifies me and automatically logs me into my account when I'm accessing with my android phone, as if it knew my phone number. (I used several browsers. When I'm using the phone as WLAN hotspot and access the same site from another device that doesn't happen.) How does my phone provider do that? On the one hand, as a programmer, I'd like to be able to do that too, but on the other hand, as a user, I'm kind of scared. What information do they have, such that they (believe they) are able to identify me just by my device? I hope this question isn't completely inappropriate for this site; feel free to add better tags — it's hard to find the right ones without knowing the Webmasters site at all.

    Read the article

  • Why is 2^16 a "special" number?

    - by javamonkey79
    OK, I feel stupid asking this - but in Jeff's article: Getting the Interview Phone Screen Right and originally stated in the 5 essential phone screen questions: They shouldn't stare blankly at you when you ask with 2^16 is. It's a special number. They should know it. I've been a developer\software engineer\code monkey\whatever for a little while now, and I don't think I've ever come across this. I mean, I can certainly count binary values do basic operations on them, etc, etc. But I don't see what is "special" about this value.

    Read the article

  • Significant number of non-HTTP requests hitting my site

    - by Mark Westling
    I'm seeing a significant number of non-HTTP requests hitting a site I just launched. They show up in the server (nginx) logs as non-ASCII and get rejected (correctly) with a 400 status. Here are some lines from the log: 95.132.198.189 - - [09/Jan/2011:13:53:30 -0500] "œ$A\x10õœ²É9J" 400 173 "-" "-" 79.100.145.126 - - [09/Jan/2011:13:57:42 -0500] "#§i²¸oYi á¹„\x13VJ—x·—œ\x04N \x1DÔvbÛè½\x10§¬\x1E0œ_^¼+\x09ÜÅ\x08DÌÃiJeT€¿æ]œr\x1EëîyIÐ/ßýúê5Ǹ" 400 173 "-" "-" 79.100.145.126 - - [09/Jan/2011:13:58:33 -0500] "¯Ú%ø=Œ›D@\x12¼\x1C†ÄÀe\x015mˆàd˜Û%pÛÿ" 400 173 "-" "-" What should I make of this? Is this some sort of scripted attack? Or could these be correct requests that have somehow been garbled? They're not affecting the performance of the site and I'm not seeing any other signs of attacks (e.g., no strange POSTs) so at this point I'm more curious than afraid.

    Read the article

  • What exactly is the build number in MAJOR.MINOR.BUILDNUMBER.REVISION

    - by A9S6
    What I think about Build Numbers is that whenever a new nightly build is created, a new BUILDNUMBER is generated and assigned to that build. So for my 7.0 version application the nightly builds will be 7.0.1, 7.0.2 and so on. Is it so? Then what is the use of a REVISION after the build number? Or is the REVISION part being incremented after each nightly build? I am a little confused here... do we refer to each nightly build as a BUILD? The format is mentioned here: AssemblyVersion - MSDN

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >