Search Results

Search found 1856 results on 75 pages for 'hits lucky'.

Page 5/75 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Apache with mod_perl eating memory when idle

    - by syneticon-dj
    An Apache webserver running a mod_perl application is exposing abnormal memory usage - after the "day load" ceases, the system's memory is being exhausted by the Apache processes and oom_killer is being invoked. As the load returns the following morning, the memory usage normalizes - probably because Apache workers get recycled periodically if a sufficient number of hits is generated: This is the graph for apache hits per second to correlate: The remaining 2 hits per second throughout the night are induced by HAProxy checks - it runs HEAD http://mydomain.example.com/running HTTP/1.0 requests against the server every half a second with "running" being a static file (i.e. not invoking any perl code). It also seems that disabling these checks remedies the memory usage problem, but obviously cannot be a solution. All of 3 similarly configured servers (behind HAProxy) expose this behavior. The running OS is Ubuntu 10.10, Apache version 2.2.16. This seems to be a memory leak but I have no idea how to start debugging it - any hints?

    Read the article

  • What is the kd tree intersection logic?

    - by bobobobo
    I'm trying to figure out how to implement a KD tree. On page 322 of "Real time collision detection" by Ericson The text section is included below in case Google book preview doesn't let you see it the time you click the link text section Relevant section: The basic idea behind intersecting a ray or directed line segment with a k-d tree is straightforward. The line is intersected against the node's splitting plane, and the t value of intersection is computed. If t is within the interval of the line, 0 <= t <= tmax, the line straddles the plane and both children of the tree are recursively descended. If not, only the side containing the segment origin is recursively visited. So here's what I have: (open image in new tab if you can't see the lettering) The logical tree Here the orange ray is going thru the 3d scene. The x's represent intersection with a plane. From the LEFT, the ray hits: The front face of the scene's enclosing cube, The (1) splitting plane The (2.2) splitting plane The right side of the scene's enclosing cube But here's what would happen, naively following Ericson's basic description above: Test against splitting plane (1). Ray hits splitting plane (1), so left and right children of splitting plane (1) are included in next test. Test against splitting plane (2.1). Ray actually hits that plane, (way off to the right) so both children are included in next level of tests. (This is counter-intuitive - shouldn't only the bottom node be included in subsequent tests) Can some one describe what happens when the orange ray goes through the scene correctly?

    Read the article

  • Resultant Vector Algorithm for 2D Collisions

    - by John
    I am making a Pong based game where a puck hits a paddle and bounces off. Both the puck and the paddles are Circles. I came up with an algorithm to calculate the resultant vector of the puck once it meets a paddle. The game seems to function correctly but I'm not entirely sure my algorithm is correct. Here are my variables for the algorithm: Given: velocity = the magnitude of the initial velocity of the puck before the collision x = the x coordinate of the puck y = the y coordinate of the puck moveX = the horizontal speed of the puck moveY = the vertical speed of the puck otherX = the x coordinate of the paddle otherY = the y coordinate of the paddle piece.horizontalMomentum = the horizontal speed of the paddle before it hits the puck piece.verticalMomentum = the vertical speed of the paddle before it hits the puck slope = the direction, in radians, of the puck's velocity distX = the horizontal distance between the center of the puck and the center of the paddle distY = the vertical distance between the center of the puck and the center of the paddle Algorithm solves for: impactAngle = the angle, in radians, of the angle of impact. newSpeedX = the speed of the resultant vector in the X direction newSpeedY = the speed of the resultant vector in the Y direction Here is the code for my algorithm: int otherX = piece.x; int otherY = piece.y; double velocity = Math.sqrt((moveX * moveX) + (moveY * moveY)); double slope = Math.atan(moveX / moveY); int distX = x - otherX; int distY = y - otherY; double impactAngle = Math.atan(distX / distY); double newAngle = impactAngle + slope; int newSpeedX = (int)(velocity * Math.sin(newAngle)) + piece.horizontalMomentum; int newSpeedY = (int)(velocity * Math.cos(newAngle)) + piece.verticalMomentum; for those who are not program savvy here is it simplified: velocity = v(moveX² + moveY²) slope = arctan(moveX / moveY) distX = x - otherX distY = y - otherY impactAngle = arctan(distX / distY) newAngle = impactAngle + slope newSpeedX = velocity * sin(newAngle) + piece.horizontalMomentum newSpeedY = velocity * cos(newAngle) + piece.verticalMomentum My Question: Is this algorithm correct? Is there an easier/simpler way to do what I'm trying to do?

    Read the article

  • Windows XP machine not seeing external FAT32 partitions correctly

    - by Rob_before_edits
    About 8 months ago my Windows XP machine stopped being able to see FAT32 external drives when I plug them in... mostly. I will explain... It happens with all my FAT32 drives, whether they be unpowered external hard drives, powered external hard drives, SDHC cards plugged directly into the machine's card reader, or SDHC cards plugged in via a separate USB card reader. All of these drives/cards used to work fine on this machine. They all stopped working at about the same time. NTFS volumes are not affected. If I plug in NTFS external drives they are recognized right away. I even have one external drive with two partitions on it, one is NTFS which is recognized, the other is FAT32, which is not recognized. If I attach a FAT32 drive, then reboot, then the drive almost always becomes visible to the machine after the reboot. Sometimes I can plug in a FAT32 drive and it works right away. Not often though. I'd say I get lucky more often with SDHC cards than hard drives. I'm developing a theory that I only get lucky with hard drives if I'm running Acronis Disk Director when I plug them in, though that usually doesn't work either - I need more data here, this may be a red herring. Getting lucky with a hard drive is really rare, usually I have to reboot. When a FAT32 is recognized, either because I got lucky or because I rebooted, I can almost never safely disconnect it. It tells me "The device 'Generic volume' cannot be stopped right now. Try stopping the device again later". I can't seem to get around this. IIRC, I've tried closing every open window, and still no luck. Since I care about my data usually the only way to disconnect a FAT32 drive is to shut down the machine. As you can imagine, two reboots just to read a drive is getting pretty old... When the machine fails to see a FAT32 drive it usually comes up with the appropriate drive letter and the words "Local Disk" in Windows Explorer instead of the correct partition name. If I click on it I get "J:\ is not accessible. The parameter is incorrect." Before this problem arose I always clicked the "safely remove" button for everything, including SDHC cards where I think it's not necessary. I've known for a long time that this is the correct procedure for hard drives, so I don't think failing to do this was the cause of this problem (before someone asks :) Any answers or suggestions most welcome.

    Read the article

  • Installable ISAM not found

    - by lucky
    I have a requirement in which i upload excel sheets to sql server database. The business logic is executed and display as reports in php. It is working fine till yesterday. Today i tried to upload excel files. It is throwing an error message stating:- Translated version of it by me:- The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" has not found "installable ISAM." . Return This is the original message in german:-- [Microsoft][ODBC SQL Server Driver][SQL Server] OLE DB-Anbieter "Microsoft.Jet.OLEDB.4.0" für den Verbindungsserver "(null)" hat die Meldung "Installierbares ISAM nicht gefunden." zurückgeben. Query that i used in the stored procedure:- EXEC('SELECT * INTO temp FROM OPENROWSET(''Microsoft.Jet.OLEDB.4.0'', ''Excel 8.0;Database=' + @ba_bm_status + ''',' + '''SELECT * FROM [qry_BA_Controlling (Report)$]'')'); @ba_bm_status - i/p parameter of srored procedure qry_BA_Controlling (Report) - worksheet name webserver used:- IIS, connection is through odbc. I have no information about this error. Can you please help me in solving the same.

    Read the article

  • Lucene.NET search index approach

    - by Tim Peel
    Hi, I am trying to put together a test case for using Lucene.NET on one of our websites. I'd like to do the following: Index in a single unique id. Index across a comma delimitered string of terms or tags. For example. Item 1: Id = 1 Tags = Something,Separated-Term I will then be structuring the search so I can look for documents against tag i.e. tags:something OR tags:separate-term I need to maintain the exact term value in order to search against it. I have something running, and the search query is being parsed as expected, but I am not seeing any results. Here's some code. My parser (_luceneAnalyzer is passed into my indexing service): var parser = new QueryParser(Lucene.Net.Util.Version.LUCENE_CURRENT, "Tags", _luceneAnalyzer); parser.SetDefaultOperator(QueryParser.Operator.AND); return parser; My Lucene.NET document creation: var doc = new Document(); var id = new Field( "Id", NumericUtils.IntToPrefixCoded(indexObject.id), Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.NO); var tags = new Field( "Tags", string.Join(",", indexObject.Tags.ToArray()), Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.YES); doc.Add(id); doc.Add(tags); return doc; My search: var parser = BuildQueryParser(); var query = parser.Parse(searchQuery); var searcher = Searcher; TopDocs hits = searcher.Search(query, null, max); IList<SearchResult> result = new List<SearchResult>(); float scoreNorm = 1.0f / hits.GetMaxScore(); for (int i = 0; i < hits.scoreDocs.Length; i++) { float score = hits.scoreDocs[i].score * scoreNorm; result.Add(CreateSearchResult(searcher.Doc(hits.scoreDocs[i].doc), score)); } return result; I have two documents in my index, one with the tag "Something" and one with the tags "Something" and "Separated-Term". It's important for the - to remain in the terms as I want an exact match on the full value. When I search with "tags:Something" I do not get any results. Question What Analyzer should I be using to achieve the search index I am after? Are there any pointers for putting together a search such as this? Why is my current search not returning any results? Many thanks

    Read the article

  • bing maps in jquery dialog context menu

    - by lucky
    I have a main form, which has button. By clicking on this button JQuery Dialog will shown. And contains of this dialog is a javascript bing map (using VEMAP object). So there are different js documents. How can I create a context menu for bing map, opening in jquery dialog? Thanks!

    Read the article

  • How can I find the places of system calls of my program?

    - by Lucky Man
    From strace manual: -i Print the instruction pointer at the time of the system call. I straced my programm: strace -i prog As a result I got a lot of system calls. One of them: [000da49c] open("./rabbit.o", O_RDONLY) = 3 But disassembled instruction at this address of prog doesn't call any syscall (hte editor): da49c ! mov r7, ip What is wrong? How can I find the places of system calls of my program? P.S. Architecture of my device doesn't support GDB-command catch syscall.

    Read the article

  • recursive function's summation in MATLAB

    - by lucky
    B=[1 1 1 1 1 1....1] % vector of length N elements Xk= sin(2*pi/16) i need to find function alpha(l,k) which is having two variables l and k and a condition given that alpha(l,0)=alpha(l,-1)=alpha(l,-2)......=alpha(l,-(N-1))=0 i.e no matter what value of l ,alpha = 0 for past values A= input('no of iterations'); % no. of iterations user want N=input('N values of alpha:') alpha1=[]; for k=0:A-1 l=0:N-1 % need 10 separate alpha values for every k, which goes from 0 to A-1 alpha(l,k)= Xk + summation( B(j)*alpha(l,k-j)) % as summation goes from j=1 to N alpha1=[alpha1 alpha] end; could anyone please help me to solve this recursive function, i am new to matlab. alpha

    Read the article

  • Netbeans source code formatting

    - by lucky
    I am Netbeans user for PHP. I have installed Netbeans IDE 6.8. Everything is working well. There is an option in SOURCE -- FORMAT. This action formats the code properly. It is quite handy. Unfortunately, this functionality is not working for me. Whenever some php code comes in between, it additionally adding some empty rows in between and making it more untidy. Can you please help to set up the same functionality. Restore the settings to default.

    Read the article

  • set border for table with overflow is auto

    - by lucky
    Hi All, I would like to have a border for the table with class name as "wanttosetborder". Without the div it is setting border for this table. With the div tag, it is setting border till the last row before div tag,(i.e a line after H2 is displayed) after that no border is displayed. Please find the code below. <html> <head> <head> <style type="text/css"> #user{width: 50px;height:150px;overflow:auto;position:absolute} </style> </head> </head> <body> <TABLE class="wanttosetborder" CELLPADDING=1 cellspacing="1" border="1"> <tr><td>ABC</td></tr> <tr><td>H2</td></tr> <tr> <td> <div id="user"> <table> <?php for($i=1; $i<=10;$i++) { ?> <tr><td>123</td> </tr> <?php }?> </table> </div> </td> </tr> </TABLE> </body> </html>

    Read the article

  • Identify the checkbox that is checked

    - by lucky
    Hello Everyone, I have 2 checkboxes in a form and onclick of these, some php code needs to be executed and based on the result of the code, the checkbox is checked or unchecked. So i have written onclick = document.formName.submit(); Now it is triggering the same page and i am able to write the code. I am not able to differentiate which checkbox is checked. I don't want to use the procedure of:- calling javascript and then storing the value of the checkbox in a variable and making this variable as invisible. I would like to write something like document.formName.submit('checkbox1'). So that i should be able to handle the value of this or i dont know. Please suggest me an alternative method or better approach.

    Read the article

  • how to use summation in matlab???

    - by lucky
    i have a randomly generated vector say A of length M say A=rand(M,1) and also i have function X(k)=sin(2*pi*k) how would i find Y(k) which is summation of A(l)*X(k-l) as l goes from 0 to M ... assume any value of k... but answer should be summation of all M+1 terms

    Read the article

  • SQL Server stored procedure + set error message from the records of a table

    - by lucky
    Hello, My question is I have a table with the set of records. I am calling a stored procedure for some other purpose. But when ever it finds some duplicate records. It need to return as error message back to php. C1 C2 c3 abc 32 21.03.2010 def 35 04.04.2010 pqr 45 30.03.2010 abc 12 04.05.2010 xyz 56 01.03.2010 ghi 21 06.05.2010 def 47 17.02.2010 klm 93 04.03.2010 xyz 11 01.03.2010 For the above set it need to check for the records that has the same c1. The stored procedure should return as abc,def,xyz are duplicate. I tried something like this. This will not work it has more than 1 set of duplicate records. Please help me to enhance this to solve the purpose. SET @duplicate = (SELECT c1 FROM temp GROUP BY c1 HAVING count(c1) > 1) --Check for duplicate concession Nr. IF(len(@duplicate) > '1') BEGIN SET @error = @error + ' Duplicate C1 Number:- ' + @duplicate SET @errorcount = @errorcount + 1 END As this one type error I am checking for errorcount. IF @errorcount <> '0' BEGIN GOTO E_General_Error END -- If an error occurs, rollback and exit E_General_Error: PRINT 'Error' SET @error = @error IF @@error <> 0 SET @error = 'Database update failed' ROLLBACK TRANSACTION update_database RETURN END Now it is able to return Duplicate c1 number abc. If there are more than 1 problem comes. Thanks in advance!

    Read the article

  • Iphone application requiring user registeration?

    - by Lucky
    I am creating an iphone application that requires the users to have an account at my website. But if i have to distribute it through apple store, how should I make the users of this Iphone Application first create an account with my website. There could be a few options like : 1) Ask the user to create an account when he/she tries to run the application on iphone. 2) Provide a 'Sign-Up' page in the Iphone application itself. My question is "Is there any mechanism provided by Apple Store to make the user sign-up to my website before he/she can download the application". Kindly give in your suggestions for the same. Which would be the best approach for solving my problem. Thanks, LG

    Read the article

  • HTML + javascript mouse over, mouseout, onclick not working in firefox.

    - by lucky
    Hello Everyone, My question is to get onMouseover,onMouseout,onMousedown,onClick on a table row. For which i am calling javascript userdefined functions. onMouseover --- Background color should change. onMouseout --- Reset to original color onClick --- First column checkbox/radio button should be set and background color should change onMousedown --- background color should change. My code in html is:- <tr onMouseOver="hover(this)" onMouseOut="hover_out(this)" onMouseDown="get_first_state(this)" onClick="checkit(this)" > and the methods in javascripts are:- var first_state = false; var oldcol = '#ffffff'; var oldcol_cellarray = new Array(); function hover(element) { if (! element) element = this; while (element.tagName != 'TR') { element = element.parentNode; } if (element.style.fontWeight != 'bold') { for (var i = 0; i<element.cells.length; i++) { if (element.cells[i].className != "no_hover") { oldcol_cellarray[i] = element.cells[i].style.backgroundColor; element.cells[i].style.backgroundColor='#e6f6f6'; } } } } // ----------------------------------------------------------------------------------------------- function hover_out(element) { if (! element) element = this; while (element.tagName != 'TR') { element = element.parentNode; } if (element.style.fontWeight != 'bold') { for (var i = 0; i<element.cells.length; i++) { if (element.cells[i].className != "no_hover") { if (typeof oldcol_cellarray != undefined) { element.cells[i].style.backgroundColor=oldcol_cellarray[i]; } else { element.cells[i].style.backgroundColor='#ffffff'; } //var oldcol_cellarray = new Array(); } } } } // ----------------------------------------------------------------------------------------------- function get_first_state(element) { while (element.tagName != 'TR') { element = element.parentNode; } first_state = element.cells[0].firstChild.checked; } // ----------------------------------------------------------------------------------------------- function checkit (element) { while (element.tagName != 'TR') { element = element.parentNode; } if (element.cells[0].firstChild.type == 'radio') { var typ = 0; } else if (element.cells[0].firstChild.type == 'checkbox') { typ = 1; } if (element.cells[0].firstChild.checked == true && typ == 1) { if (element.cells[0].firstChild.checked == first_state) { element.cells[0].firstChild.checked = false; } set_rowstyle(element, element.cells[0].firstChild.checked); } else { if (typ == 0 || element.cells[0].firstChild.checked == first_state) { element.cells[0].firstChild.checked = true; } set_rowstyle(element, element.cells[0].firstChild.checked); } if (typ == 0) { var table = element.parentNode; if (table.tagName != "TABLE") { table = table.parentNode; } if (table.tagName == "TABLE") { table=table.tBodies[0].rows; //var table = document.getElementById("js_tb").tBodies[0].rows; for (var i = 1; i< table.length; i++) { if (table[i].cells[0].firstChild.checked == true && table[i] != element) { table[i].cells[0].firstChild.checked = false; } if (table[i].cells[0].firstChild.checked == false) { set_rowstyle(table[i], false); } } } } } function set_rowstyle(r, on) { if (on == true) { for (var i =0; i < r.cells.length; i++) { r.style.fontWeight = 'bold'; r.cells[i].style.backgroundColor = '#f2f2c2'; } } else { for ( i =0; i < r.cells.length; i++) { r.style.fontWeight = 'normal'; r.cells[i].style.backgroundColor = '#ffffff'; } } } It is working as expected in IE. But coming to firefox i am surprised on seeing the output after so much of coding. In Firefox:-- onMouseOver is working as expected. color change of that particular row. onClick -- Setting the background color permenantly..eventhough i do onmouseover on different rows. the clicked previous row color is not reset to white. -- not as expected onclick on 2 rows..the background of both the rows is set..Only the latest row color should be set. other rows that are selected before should be set back..not as expected i.e if i click on all the rows..background color of everything is changed... Eventhough i click on the row. First column i.e radio button or checkbox is not set.. Please help me to solve this issue in firefox. Do let me know where my code needs to be changed... Thanks in advance!!

    Read the article

  • one subdomain as cname for another domain, can i have different custom 404 pages

    - by lucky cool
    Actually I have a domain - domainone.com I have created a subdomain cname of anoter domain as abc.domaintwo.com - CNAME as - domainone.com so that I can use the js and css files e.g domainone.com/js/jquery.js files as abc.domaintwo.com/js/jquery.js SO Far everything is FINE, no issues at all. Problem: I have a custom 404 page for domainone.com and now when that abc.domaintwo.com goes 404 same page appears which i don't want. Any help is appreciated. Htaccess of domainone.com: ErrorDocument 404 /404/ All i want is to have different 404 for both..... Notes: Don't have access to shell for symlinks or alias as I am on shared hosting.

    Read the article

  • Copy data from one SQL Server database table to the other

    - by lucky
    I don't know how to copy table data from one server - database - table TO other sever - database - table. If it is with in the same server and different databases, i have used the following SELECT * INTO DB1..TBL1 FROM DB2..TBL1 (to copy with table structure and data) INSERT INTO DB1..TBL1(F1, F2) SELECT F1, F2 FROM DB2..TBL1 (copy only data) Now my question is copy the data from SERVER1 -- DB1-- TBL1 to SERVER2 -- DB2 --TBL2

    Read the article

  • MSSQL + Copy data from one server database table to the other

    - by lucky
    Hello All, I dont know how to copy table data from one server - database - table TO other sever - database - table. If it is with in the same server and different databases, i have used the following SELECT * INTO DB1..TBL1 FROM DB2..TBL1 (to copy with table structure and data) INSERT INTO DB1..TBL1(F1, F2) SELECT F1, F2 FROM DB2..TBL1 (copy only data) Now my question is copy the data from SERVER1 -- DB1-- TBL1 to SERVER2 -- DB2 --TBL2 Thanks in advance!

    Read the article

  • Is there any mechanism provided by Apple Store to make the user sign-up to my website before he/she

    - by Lucky
    I am creating an iphone application that requires the users to have an account at my website. But if i have to distribute it through apple store, how should I make the users of this Iphone Application first create an account with my website. There could be a few options like : 1) Ask the user to create an account when he/she tries to run the application on iphone. 2) Provide a 'Sign-Up' page in the Iphone application itself. My question is "Is there any mechanism provided by Apple Store to make the user sign-up to my website before he/she can download the application". Kindly give in your suggestions for the same. Which would be the best approach for solving my problem. Thanks, LG

    Read the article

  • PHP --> MSSQL + Excel file upload from a specific row

    - by lucky
    Hello, I have a requirement in which, i need to upload an excel file into MSSQL database. It is working well till this point. But sometimes i am getting excel file in such a way, that the first 2 rows and columns are empty rows. That is not even fixed everytime. so the format of the table after upload is not as expected. It is assigning F1, F2 as column names for the table in mssql. It varies from file to file. I want to program it in such away so that the user can enter the row number and the column number from where the actual data is starting. So that while upload it should from line 3 and column 2. I dont know how to specify that row and column while uploading. Please help me to solve the same.

    Read the article

  • HTML + Button with text and image on it.

    - by lucky
    Hello, I have a problem in creating a Button with text and image on it. <td> <button type="submit" name="report" value="Report" <?php if($tab == 'Excel') echo "id=\"tab_inactive\""; else echo "id=\"tab_active\"" ; ?>> <img src="images/report.gif" alt="Report"/>Report </button> <button type="submit" name="excel" value="Excel" <?php if($tab == 'Excel' ) echo "id=\"tab_active\""; else echo "id=\"tab_inactive\"" ; ?>> <img src="images/Excel.gif" alt="Excel" width="16" height="16" /> Excel </button> </td> Here $tab is $tab = strlen(trim($_POST[excel]))>0 ? $_POST[excel] : $_POST[report]; I tried this way, but this is behaving so strangely. On click the button:- The submit function is working properly in firefox, but not in IE. Instead of submitting the value(in this example values are 'Report' and 'Excel'), indeed it is submitting the label of the button. That is if i am checking the value of array PRINT_R($_POST). The value of it is Array ( [report] =>(Icon that i used) Report [excel] => (Icon that i used) Excel [frm_analysis] => [to_analysis] => ) Here i have more than 1 button, then all the labels are submitted eventhough one of them is pressed. i dont how to capture which button is pressed. I even tried changing button type=button and onclick="document.formname.submit()" Even this is resulting in the same. Can you please help me to solve this.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >