Search Results

Search found 6376 results on 256 pages for 'launch condition'.

Page 153/256 | < Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >

  • Two parallel line segments intersection

    - by Judarkness
    I know there are many algorithms to verify whether two line segments are intersected. But once they encountered parallel condition, they just tell the user a big "No" and pretend there is no overlap, share end point, or end point collusion. I know I can can calculate the distance between 2 lines segments. If the distance is 0, check the end points located in the other line segments or not. And this means I have to use a lot of if else and && || conditions. This is not difficult, but my question is "Is there a trick( or mathematics) method to calculate this special parallel case?"

    Read the article

  • How to restrict bounds for Translate Animation for a view in Android?

    - by Kiran Parmar
    Hello All. Let me explain the scenario that I want to achieve:- Consider the below as the Layout I have inside a Parent_Linearlayout: [Linear Layout] (Fill_Parent, Wrap_Content) [ScrollView] Activity's setContentView is set to the Parent_Linearlayout In the application, when a condition is met, I want the Scrollview to be removed from the screen and instead put another View in its place.<br> I've been able to do this, When I remove the ScrollView, I'm applying translate Animation to it so that it seems as if the View has gone to the top, before removing it. But when the animation occurs, the ScrollView translates OVER the Linear layout present above it. How do I restrict it, so that the scrollview does not go over the linear layout, but disappears at the base of the Linearlayout. I want the linearlayout to always stay visible.. I've been trying to do this from quite some time, but I've not been able to get desired results.. Could someone kindly help me out here??

    Read the article

  • Loop with pointer arithmetic refuse to stay within boundary in C. Gives me segfault.

    - by Fred
    Hi have made this function which is made to replicate an error that I can't get past. It looks like this: void enumerate(double *c, int size){ while(c < &c[size]){ printf("%lf\n", *c); c++; } } I have added some printf's in there and it gives me: Adressof c: 0x100100080, Adressof c + size: 0x1001000a8 I then also print the address of c for each iteration of the loop, it reaches 0x1001000a8 but continues past this point even though the condition should be false as far as I can tell until I get a segfault. If anyone can spot the problem, please tell me, I have been staring at this for a while now. Thanks.

    Read the article

  • Is running multiple databases on login going to make my Mac really slow?

    - by Walrus the Cat
    Sometime ago, I installed Postgres, and the Launch agent that causes it to run when I log in. Just now, I did the same thing for Mongo. I was just about to do it for Couch. I don't remember if I ever did it for MySQL, but I probably did. Mongo and Couch are just 'when I have time to look into it' sort of things, but I don't want to have to remember to start them when I do. I have a 2.4 Ghz processor and 8 GB ram. Is this sort of behavior going to significantly impact my computer's performance? Should I be scrambling to uninstall all but the database I'm currently using, or can I install all the things and run them all the time? Thanks

    Read the article

  • Elan Smart Pad - empty settings window

    - by Quarien
    I am using my Asus UL30JT with Windows 8. I installed Elan Smart-pad driver 11.14.1.3. It basically works just fine, I have all the gestures and stuff. However, to adjust the settings I have to launch regedit.exe, because the window appears to be broken. Under Mouse - Elan Tab - Options I see this: Do you know how to fix that? Also, if you have a similar program, can you at least send me screens of what I can change? As I said, I am editing registry right now and I need some guidance what I can actually do :)

    Read the article

  • Good code visualization / refactoring tools for C++?

    - by Paul D.
    I've found myself coming across a lot of reasonably large, complicated codebases at work recently which I've been asked to either review or refactor or both. This can be extremely time consuming when the code is highly concurrent, makes heavy use of templates (particularly static polymorphism) and has logic that depends on callbacks/signals/condition variables/etc. Are there any good visualization tools for C++ period, and of those are there any that actually play well with "advanced" C++ features? Anything would probably be better than my approach now, which is basically pen+paper or stepping through the debugger. The debugger method can be good for following a particular code path, but isn't great for seeing the big picture you really need when doing serious refactoring. EDIT: I should mention that Visual Studio plugins aren't going to be a lot of help to me, since our stuff is mostly Linux-only.

    Read the article

  • a nicer way to create structs in a loop

    - by sandra
    Hi guys, I haven't coded in C++ in ages. And recently, I'm trying to work on something involving structs. Like this typedef struct{ int x; int y; } Point; Then in a loop, I'm trying to create new structs and put pointers to them them in a list. Point* p; int i, j; while (condition){ // compute values for i and j with some function... p = new Point; p* = {i, j}; //initialize my struct. list.append(p); //append this pointer to my list. } Now, my question is it possible to simplify this? I mean, the pointer variable *p outside of the loop and calling p = new Point inside the loop. Isn't there a better/nicer syntax for this?

    Read the article

  • Recommendations for a cloud/hosted server environment that can run different Windows VMs?

    - by Rory
    I currently have a colocated Win 2008 server that I use for hosting different windows VMs for testing: Win 2008, Win XP, Vista, Win7, Win 2000. I'd like to ditch the server and use something like Amazone AWS but the key thing is I need to be able to launch VMs for these different windows versions. AWS doesn't allow this currently. Can anyone recommend somewhere that I could use? The main reasons I want to get away from my own server are: administration: backup, windows updates, etc space: disk limitations mean I can't have all the VMs I want. I'd like to be able to pay for space incrementally. I'll typically only run 1-3 at a time but want lots of snapshots of different machines.

    Read the article

  • How do I move an Amazon micro instance to a small instance?

    - by Navetz
    I want to move my instance to a micro instance to a small instance but when I try to launch a new AMI based on my Micro instance AMI it only gives me the option for 64 bit instances. My initial ami is based off an ubuntu 10.04 image. Is it not possible to move between 64 bit and 32 bit instance? Would it be possible to use a load balancer to have a 32bit instance and a 64bit instance work together? I have a website/web app that I will be uploading huge volumes of data to. I will be starting with 65gigs of images and then moving up to 100+ gigs of images. I am not sure which instance type would be best for this. I was going to use a load balancer and auto scaling to increase the number of instance when the load is high. Also when using a load balancer, does one of the AMI instance become the primary image and the rest act as clones of it?

    Read the article

  • Paginating with SQL ROW_NUMBER

    - by Kelsey Thorpe
    I want to return search results in paginated format. However I can't seem to successfully get the first 10 results of my query. The problem is the 'RowNum' returned are like 405, 687, 1024 etc. I want them to be renumbered as 1,2,3,4,5 etc., so that when I specify between rows 1 and 20 i get the first 20 search results. Instead, because the numbers are larger, I get no results between 1 and 10. If i change RowNum condition to: AND RowNum < 20000 I get plenty of results Here's the sql: SELECT * FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY DocumentID ) AS RowNum, * FROM Table ) AS RowConstrainedResult WHERE RowNum >= 1 AND RowNum < 20 AND Title LIKE '%diabetes%' AND Title LIKE '%risk%' Any help appreciated.

    Read the article

  • Chrome Javascript

    - by Mike
    i have two spans on my page with class='hidden' and then some javascript to remove the class when a condition is met, its working fine in ie 9/10 and firefox but its not working in chrome when I run the function in the chrome JS console I get the message TypeError: Cannot read property 'attributes' of null Anybody know whats going on? <script type='text/javascript' > function showhidden() { var att =document.getElementById('hiddentextbox'); att.attributes[0].value=''; att =document.getElementById('hiddentextbox1'); att.attributes[0].value=''; }</script> Thanks

    Read the article

  • TableView reloading problem

    - by abdulsamad
    Hi All, i am in a very serious problem of tableview reloading. i have two option in my tableview 1) show next 10 Results 2) show previos 10 results I wanna show only 50 results at a time in my table view. when table is populated with 50 results after that on pressing "show next 10 results" the results from 1-10 are removed and results from 51-60 are now displayed and hence i have the total results in my table view from 11-60. As the total # of results remain 50 hence i have the cells with their identifier from 1-50 and now they are not nil. So i also have to code in else block of the condition if(cell == nil) { } else{ Have to write the same code as in if. } Now my cells are properly reloading on clicking "show next 10" and on clicking "show previous 10" but the problem is that because of the code in else block my cells are also reloaded when the user scrolls the table-view. Kindly give some good suggestion what should i do to get out from this situation.

    Read the article

  • IP not detected in terremark enteprise cloud server - how to install VMware on instance?

    - by JohnMerlino
    Using terremark enteprise cloud, when you create a server, you assigned an IP address to them and that IP is visible under Detected IP when selecting the server. However, I created a server, with IP address and I created an internet service and connected it with a node. I used protocol TCP and mapped it to port 3001. But I notice when I select my server, the IP address doesnt dsplay under Detected IP and then I VPN Connect, launch terminal and try to SSH with the IP to my server, and I get connection timed out. I presume the reason lies in that the IP address is not being detected. Someone suggested that my VMware-Tools is out of date and in fact on the server instance for VMware-Tools it does say "out of date". I'm not sure how to mount the instance and install VMware-Tools. I am using Mac OSX. Someone said that it will only work on PC running IE.

    Read the article

  • Refactoring a long method that simply populates

    - by Jeune
    I am refactoring a method which is over 500 lines (don't ask me why) The method basically queries a list of maps from the database and for each map in the list does some computation and adds the value of that computation to the map. There are however too many computations and puts being done that the code has reached over 500 lines already! Here's a sample preview: public List<Hashmap> getProductData(...) { List<Hashmap> products = productsDao.getProductData(...); for (Product product: products) { product.put("Volume",new BigDecimanl(product.get("Height")* product.get("Width")*product.get("Length")); if (some condition here) { //20 lines worth of product.put(..,..) } else { //20 lines worth of product.put(..,..) } //3 more if-else statements like the one above try { product.put(..,..) } catch (Exception e) { product.put("",..) } //over 8 more try-catches of the form above } Any ideas on how to go about refactoring this?

    Read the article

  • Procedure Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

    - by Nick
    The stored proc is failing at below location,Thanks, for all your help. --Insert MSOrg Information DECLARE @PersonnelNumber int, @MSOrg varchar(255) DECLARE csr CURSOR FAST_FORWARD FOR SELECT PersonnelNumber FROM Person OPEN csr FETCH NEXT FROM csr INTO @PersonnelNumber WHILE @@FETCH_STATUS = 0 BEGIN EXEC GetMSOrg @PersonnelNumber, @MSOrg out INSERT INTO PersonSubject ( PersonnelNumber ,SubjectID ,SubjectValue ,Created ,Updated ) SELECT @PersonnelNumber ,SubjectID ,@MSOrg ,getDate() ,getDate() FROM Subject WHERE DisplayName = 'MS Org' FETCH NEXT FROM csr INTO @PersonnelNumber END CLOSE csr DEALLOCATE csr Below is the stored prc defination GetMSOrg and fails at third condition CREATE PROCEDURE [dbo].[GetMSOrg] ( @PersonnelNumber int ,@OrgTerm varchar(200) out ) AS DECLARE @MDRTermID int ,@ReportsToPersonnelNbr int --Check to see if we have reached the top of the chart SELECT @ReportsToPersonnelNbr = ReportsToPersonnelNbr FROM ReportsTo WHERE PersonnelNumber = @PersonnelNumber IF (@ReportsToPersonnelNbr IS NULL) --Reached the Top of the Org Ladder BEGIN SET @OrgTerm = 'Non-standard rollup' END ELSE IF (@PersonnelNumber IN (SELECT PersonnelNumber FROM OrgTermMap)) BEGIN SELECT @OrgTerm = s.Term FROM OrgTermMap tm JOIN Taxonomy..StaticHierarchy s ON tm.OrgTermID = s.TermID WHERE tm.PersonnelNumber = @PersonnelNumber END ELSE BEGIN SELECT @MDRTermID = tm.OrgTermID FROM ReportsTo r JOIN OrgTermMap tm ON r.ReportsToPersonnelNbr = tm.PersonnelNumber WHERE r.PersonnelNumber = @PersonnelNumber IF (@MDRTermID IS NULL) BEGIN EXEC GetMSOrg @ReportsToPersonnelNbr, @OrgTerm out END ELSE BEGIN SELECT @OrgTerm = Term FROM Taxonomy..StaticHierarchy WHERE VocabID = 118 AND TermID = @MDRTermID END END GO

    Read the article

  • sql query where parameters null not null

    - by Laziale
    I am trying to do a sql query and to build the where condition dynamically depending if the parameters are null or no. I have something like this: SELECT tblOrder.ProdOrder, tblOrder.Customer FROM tblOrder CASE WHEN @OrderId IS NOT NULL THEN WHERE tblOrder.OrderId = @OrderId ELSE END CASE WHEN @OrderCustomer IS NOT NULL THEN AND tblOrder.OrderCustomer = @OrderCustomer ELSE END END This doesn't work, but this is just a small prototype how to assemble the query, so if the orderid is not null include in the where clause, or if the ordercustomer is not null include in the where clause. But I see problem here, for example if the ordercustomer is not null but the orderid is null, there will be error because the where keyword is not included. Any advice how I can tackle this problem. Thanks in advance, Laziale

    Read the article

  • Group policy doesn't let me execute Chrome

    - by George Katsanos
    Where I work, the admins just migrated us to Windows 7. They gave me admin rights but still, I had to "Run as Administrator" my Google Chrome installation. After I managed to install it, I realized I even have to go through the "Run as Administrator" shortcut every time I have to execute the application. I even edited the properties of the shortcut to check "Always run as Administrator" but nothing changed. The message I get when I'm trying to launch Chrome is "This program is blocked by group policy. For more information contact your system administrator"... Is it something I could work out alone or I have to convince them to change the "policy"?

    Read the article

  • How can I clean up this SELECT query?

    - by Cruachan
    I'm running PHP 5 and MySQL 5 on a dedicated server (Ubuntu Server 8.10) with full root access. I'm cleaning up some LAMP code I've inherited and I've a large number of SQL selects with this type of construct: SELECT ... FROM table WHERE LCASE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( strSomeField, ' ', '-'), ',', ''), '/', '-'), '&', ''), '+', '') ) = $somevalue Ignoring the fact that the database should never have been constructed to require such a select in the first place, and the $somevalue field will need to be parameterised to plug the gaping security hole, what is my best option for fixing the WHERE condition into something less offensive? If I was using MSSQL or Oracle I'd simply put together a user-defined function, but my experience with MySQL is more limited and I've not constructed a UDF with it before, although I'm happy coding C. Update: For all those who've already raised their eyebrows at this in the original code, $somevalue is actually something like $GET['product']—there are a few variations on the theme. In this case the select is pulling the product back from the database by product name—after stripping out characters so it matches what could be previously passed as a URI parameter.

    Read the article

  • Virtual Screen Splitter

    - by dabest1
    I am looking for a utility that will allow my screen to be split into two sections. I would like to do this so that programs can easily fill or get sized properly to one part of the screen. This way I can pretend that I have a separate monitor for working on my stuff, while my kids can watch something on the other side. In addition, this should help prevent any popups covering up their side of the screen. Although Windows 7 comes with ability to drag a program window to a side and it becomes sized to half of the screen automatically, this is insufficient for me. I would like to make sure that any programs I launch or any pop-ups that open up, do not block the other side of the screen, even for a short time. Also, I am not looking for a virtual OS solution, as in VirtualBox.

    Read the article

  • Crystal report loop

    - by CrystalLearn
    Hi All Master, I have a running total and would like to stop it when condition is match. Eg :- I have STOCK qty 100pcs ; qty are accumulate from Purchase Order Receiving transactions as below : No. Qty Accumulate 1. 20 20 2. 30 50 3. 10 60 4. 40 100 5. 20 120 The running total should stop at no.4, because it have reach the STOCK qty 100. Thanks in advance.

    Read the article

  • JavaScript: If clause partially executed !!!

    - by arwa
    Hi everyone My problem is that when the condition is true it will close the window but not execute the php part ! here goes my code.. function onClose() { var r=confirm("Is the meeting Over!"); if (r==true) { window.close(); } else { } } </blink> this is the php part.. $sql="UPDATE previousmeetings SET Live='0' WHERE MeetingID='34'"; //$meeting_id $sql2="UPDATE previousmeetings SET Live='1' WHERE MeetingID='34'";

    Read the article

  • Validate a date range within MySQL query

    - by fishcracker
    (This question may seem easy or kind of noobish, by that I pardon my ignorance.) I used PDO query to use SELECT then fetch some values, it comes to a point that I need to fetch only some entries that within its start date and end date. My database +----------+-----------------+----------------------+--------------------+ | id (INT) | title (VARCHAR) | start_date (VARCHAR) | end_date (VARCHAR) | +----------+-----------------+----------------------+--------------------+ | 1 | buddy | 2012-11-26 | 2012-11-30 | | 2 | metro | 2012-12-05 | 2012-12-20 | | 3 | justin | 2012-11-28 | 2012-12-01 | +----------+-----------------+----------------------+--------------------+ My query is as follows: $query = "SELECT title, start_date, end_date FROM debts WHERE start_date >= CURDATE() AND end_date >= CURDATE()"; What I want to achieve is whenever the start_date is today or greater but not exceeding the end_date it will be valid. This will return the row for id 1, however if I change the start_date to 2012-11-25, it will fail due to the first condition on AND. I'm really confuse on this since I am new to this, is there any built-in function to handle this kind of situation?

    Read the article

  • Repeating animations using the Stop Selector

    - by Tiago
    I'm trying to repeat an animation until a certain condition is met. Something like this: - (void) animateUpdate { if (inUpdate) { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:2.0]; [UIView setAnimationDelegate: self]; [UIView setAnimationDidStopSelector: @selector(animateUpdate)]; button.transform = CGAffineTransformMakeRotation( M_PI ); [UIView commitAnimations]; } } This will run the first time, but it won't repeat. The selector will just be called until the application crashes. How should I do this? Thanks.

    Read the article

  • How to install ubuntu OS using an android mobile as a usb drive?

    - by Rochelle Canale
    I just want to ask if How can I install Ubuntu OS from android phone? I have the ubuntu.img and .md5 file. But I don't knwo how to run this. I also have Linux installer and VNC. Everytime I launch the application the terminal emulator always force close. So I think that there's an error with the application. Any idea how can I install this? I am using myphone A848 duo same as Noir A6 and micromax A68.

    Read the article

  • How to check whether a excel file is write protected or not in C#?

    - by Pavan Navali
    Hi, I'm developing a sample application in which I have to open an excel file and check whether the file is write protercteed or not. The code is using System.Windows.Forms; using Microsoft.Office.Core; private void button1_Click(object sender, EventArgs e) { string fileNameAndPath = @"D:\Sample\Sample1.xls"; // the above excel file is a write protected. Microsoft.Office.Interop.Excel.Application a = new Microsoft.Office.Interop.Excel.Application(); if (System.IO.File.Exists(fileNameAndPath)) { Microsoft.Office.Interop.Excel.ApplicationClass app = new Microsoft.Office.Interop.Excel.ApplicationClass(); // create the workbook object by opening the excel file. app.Workbooks.Open(fileNameAndPath,0,false,5,"","",true,Microsoft.Office.Interop.Excel.XlPlatform.xlWindows,"\t",false, true, 0,false,true,0); Microsoft.Office.Interop.Excel._Workbook w = app.Workbooks.Application.ActiveWorkbook; if (w.ReadOnly) MessageBox.Show("HI"); // the above condition is true. } } I would like know whether the file is write protected or not.

    Read the article

< Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >