Search Results

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

Page 26/256 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Only get the value if a condition is true

    - by Autolycus
    I am checking to see if element1, element 2 or element 3 exists and then add them to finalData if they exist. However if one of those dont exist or are not true then I just want to add the elements whose bool value is true! Below is my code bool hasElement1 = ( from Playlist in loaded.Descendants("Node") select Playlist.Descendants("Element1").Any() ).Single(); bool hasElement2 = ( from Playlist in loaded.Descendants("Node") select Playlist.Descendants("Element2").Any() ).Single(); bool hasElement3 = ( from Playlist in loaded.Descendants("Node") select Playlist.Descendants("Element2").Any() ).Single(); var finalData = from x in loaded.Descendants("Node") select new { Element1 = x.Descendants("Element1").First().Value, Element2 = x.Descendants("Element2").First().Value, Element3 = x.Descendants("Element3").First().Value, };

    Read the article

  • check_box_tag and find condition

    - by red
    <%= check_box_tag('videos_count')%> If this box is checked, the param will say "videos_count"="1" . In the controller I have this: videos_count = params[:videos_count] @cars = Car.paginate( :page => params[:page], :per_page => 10, :conditions => ["videos_count = ?", videos_count], when the box is checked I see the correct parameter in the server log, but the find returns all of the results instead of results with videos_count = 1.

    Read the article

  • Rails 2.3.8 Compound condition

    - by Michael Guantonio
    I have a rails query that I would like to run. The only problem that I am having is the query structure. Essentially the query looks like this queryList = model.find(:all, :conditions => [id = "id"]) #returns a query list #here is the issue compound = otherModel.find(:first, :select => "an_id", :conditions => ["some_other_id=? and an_id=?, some_other_id, an_id]) Where an_id is actually a list of ids in the query list. How can I write that in rails to basically associate a single id to a list that may contain ids...

    Read the article

  • Entering If Statement Despite Not Meeting Condition

    - by msmf14
    This is a specific problem, but I can't seem to figure out what is wrong. else if (X == 2) //move left { if (Level[X-1][Y] == 0); { cout << Level[X-1][Y] << "\n"; cout << "\n MOVING LEFT from RIGHT\n"; //PROBLEM IS HERE Level[X][Y] = 1; // block it X = X - 1; moved = 1; } } What I am doing is I am checking if Level[X-1][Y] is 1, indicating a column, so I can not move my player there. However for some reason, despite it being 1 and not 0 (as indicated by the output), the IF statement is still accessed. Any help will be appreciated.

    Read the article

  • How to break a jquery variable dynamically based on condition

    - by Adi
    I have a jquery variable which has is showing the value in the console as .. ["INCOMING", 0, "INETCALL", 0, "ISD", 31.8, "LOCAL", 197.92, "STD", 73.2] Now as per my need i have to break these values and make it like this ["INCOMING", 0],["INETCALL", 0],["ISD", 31.8],["LOCAL", 197.92],["STD", 73.2] but these values i need to make in the required formate dynamically as this is received from database. Here is my ajax call to get the values from server side.. var dbdata=""; $(document).ready(function() { $.ajax({ type: 'GET', url: 'getPieChartdata', async:false, dataType: "text", success: function(data) { dbdata=JSON.parse(data); } }); console.log(dbdata); }); Please guys help me . Thanks in advance..

    Read the article

  • C++ Unlocking a std::mutex before calling std::unique_lock wait

    - by Sant Kadog
    I have a multithreaded application (using std::thread) with a manager (class Tree) that executes some piece of code on different subtrees (embedded struct SubTree) in parallel. The basic idea is that each instance of SubTree has a deque that store objects. If the deque is empty, the thread waits until a new element is inserted in the deque or the termination criteria is reached. One subtree can generate objects and push them in the deque of another subtree. For convenience, all my std::mutex, std::locks and std::variable_condition are stored in a struct called "locks". The class Tree creates some threads that run the following method (first attempt) : void Tree::launch(SubTree & st, Locks & locks ) { /* some code */ std::lock_guard<std::mutex> deque_lock(locks.deque_mutex_[st.id_]) ; // lock the access to the deque of subtree st if (st.deque_.empty()) // check that the deque is still empty { // some threads are still running, wait for them to terminate std::unique_lock<std::mutex> wait_lock(locks.restart_mutex_[st.id_]) ; locks.restart_condition_[st.id_].wait(wait_lock) ; } /* some code */ } The problem is that "deque_lock" is still locked while the thread is waiting. Hence no object can be added in the deque of the current thread by a concurrent one. So I turned the lock_guard into a unique_lock and managed the lock/unlock manually : void launch(SubTree & st, Locks & locks ) { /* some code */ std::unique_lock<std::mutex> deque_lock(locks.deque_mutex_[st.id_]) ; // lock the access to the deque of subtree st if (st.deque_.empty()) // check that the deque is still empty { deque_lock.unlock() ; // unlock the access to the deque to enable the other threads to add objects // DATA RACE : nothing must happen to the unprotected deque here !!!!!! // some threads are still running, wait for them to terminate std::unique_lock<std::mutex> wait_lock(locks.restart_mutex_[st.id_]) ; locks.restart_condition_[st.id_].wait(wait_lock) ; } /* some code */ } The problem now, is that there is a data race, and I would like to make sure that the "wait" instruction is performed directly after the "deque_lock.unlock()" one. Would anyone know a way to create such a critical instruction sequence with the standard library ? Thanks in advance.

    Read the article

  • Developing iPhone app to Run on iPad - Auto Set 2x

    - by R.J.
    Is there a way to programmatically set the iPad to run the iPhone app at 2x as it is launched (yet keep the iPhone app native). I understand I can create NIB files for each hardware platform, but for ease, I just would rather the app launch as if the user had tapped the 2x on the iPad. Thanks...R.J.

    Read the article

  • Launch a real install of Ubuntu already on another hard-drive in Windows 7 like a VM

    - by Chad M
    I'm not too familiar with VMs and the like so this may not even be possible. Here is what I have: A real, full install of Windows 7 on hard drive A. A real, full install of Ubuntu 10.04 on hard drive B. Grub allowing me to select what I want to launch when I start up my computer. It would be Amazing if I could do one of two things. Within Windows 7, launch my real install of ubuntu as if it were a VM. That means i would get all the installed software, all of the files, and all of the settings. Launch a VM copy of ubuntu 10.04 but some how make it use all of the installed software and settings from my real copy. Thanks!

    Read the article

  • How to create a KDE start application menu launcher that launches the search and launch desktop?

    - by davorao
    Now i love the plasma-netbook aka the "search and launch" interface but i would want to be able to have it appear on demand and not sit as the desktop default in the back of my windows. So what i imagine is having a application launcher be created which on activation brings up the "search and launch" feature allowing for easy access of your favorites or have that slick interface to find what your looking for. I'm aware that krunner solves a similar use-case but search and launch would be more of an Unity Dash type of search, whereas krunner is more useful when u exactly know what your looking for. And to summarize my question, since I'm clueless as to how this would be done, I'm lookinf for someone who could tell me how hard it would be to do it.

    Read the article

  • How to launch android email setup screen programmatically from my activity

    - by ganesh
    hi, I could send mail from my Activity when i have already configured with any email account in android ,but in case if have not configured ,is there any way to launch email setup screen from my Activity ,or at least check whether email account is setup before sending a email. If i haven't set up my email account then the following code takes me to compose SMS/MMS,which i don't want ,Please give your suggestion. Intent emailIntent = new Intent(Intent.ACTION_SEND); emailIntent.putExtra(Intent.EXTRA_EMAIL, "xxx.com"); emailIntent.putExtra(Intent.EXTRA_SUBJECT, "..."); emailIntent.putExtra(Intent.EXTRA_TEXT,"..."); emailIntent.setType("text/plain"); startActivity(Intent.createChooser(emailIntent, "Send mail..."));

    Read the article

  • Fail to launch application (CreateProcess error=87), can't use shorten classpath workaround

    - by Ivo Bosticky
    When I launch our application in Eclipse on Windows I receive the following error: Exception occured executing command line. Cannot run program .. : CreateProcess error=87, The parameter is incorrect I've solved this in the past by shortening the CLASSPATH. I've now come to a point where I can no longer shorten the CLASSPATH, and would like to know if there are any other workarounds. http://support.microsoft.com/kb/830473 seems to indicate that the max command prompt line length in windows xp is 8191 characters, and the only solution is to shorten folder names, reduce depth of folder trees, using parameter files, etc.

    Read the article

  • Can't launch asp.net mvc 2 application from iis 7.5

    - by StuffHappens
    Hello. I'm trying to launch my mvc 2 application from iis 7.5 and get HTTP 403.14 - Forbidden error. That's what I did: 1. Went to add or remove windows fitures checked iis, asp.net, http redirect. Installed all this stuff. 2. Launched Visual studio 2010 (release), created standart mvc 2 project and published it in default web site/ApplicationName 3. Set default DefaultAppPool .Net version to 4.0. I'm the only user of the computer and have admin rights. What might be wrong? Thank you for your help.

    Read the article

  • Flexbuilder won't launch...arrrgh!

    - by eco_bach
    In a panic since I'm trying to meet a deadline so appreciate any feedback on this. For some reason, Flexbuilder 3 on my mac won't launch, crashes on startup. I've never experienced this before. Checked the .log file and what seems to be the problem is the following /Users/foo/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust/flexbuilder.fbr (No such file or directory) WTF is the flexbuilder.fbr??? Googled but not much luck. The only thing I've done that might have caused this is change flash player versions system wide using the official flash player uninstaller...but obviously this should not happen Any feedback appreciated...

    Read the article

  • iPhone: Failed to launch simulated application: Unknown error.

    - by Schubert
    This is a new iPhone project, only 1 target (different from this question) On build we get: Failed to launch simulated application: Unknown error. The google again gives us nothing, lots of people have encountered this and there are lots of crazy ideas to try "oh clean the build", "clear the cache", "twiddle this flag" and none of them work and work consistently. We can reproduce this on two different machines with SDK 2.2.1 and 3.0 beta. Not the install on the machines since other iphone projects work just fine so we believe it has something to do with the config of this particular project but after combing through the config twice we can't spot the problem. Vanna, I'd like to buy a clue for $200 please. Tried: XCode menu-Clear cache Tried: clean all targets Tried: rm -rf ~/Library/Application\ Support/iPhone\ Simulator

    Read the article

  • [UIScreen applicationFrame] returning incorrect rectangle on landscape application launch (iPhone/iP

    - by jbrennan
    Having trouble getting the correct bounds for my iPad application when launching it in landscape mode. I have the proper keys set in my Info.plist file, and my view controllers launch properly in landscape (and portrait, natch). In my applicationDidFinishLaunching: method I'm calling a selector after a 3 second delay, and that method makes a call to [[UIScreen applicationFrame]`, but it's returning me a portrait frame (ie height width). Does anyone know how to fix this? It smells like a bug to me (if so I'll file a radar), but if it's intended behaviour, where is it documented?

    Read the article

  • How to launch activity from android home screen widget

    - by Brian515
    Hi all, I am desperately trying to get my head wrapped around how to implement home screen widgets. Right now, I (finally) was able to get a button on my widget respond to a button press setting up an intent filter in the manifest. However, I cannot for the life of me figure out how to launch an activity when the button is pressed. Basically, here's the code i have: @Override public void onReceive(Context context, Intent intent) { super.onReceive(context, intent); if(intent.getAction().equals("com.bic.search.searchWidget.CLICK")) { Toast.makeText(context, "It works!!", Toast.LENGTH_SHORT).show(); } } What I really want to do, though, is start a new activity, not display a toast message. I know it has something to do with pending intents, but I can't figure out how to get that to work. Any help and sample code would be appreciated. Thanks a ton to whoever answers this!

    Read the article

  • White view when launch iOS app in simulator

    - by user820511
    I have been working for 4 months on an app, its pretty complex and works fine. Now suddenly, I added a new class and did some changes to the MainWindow.xib with all my views there and now I just get a plain white view when I launch it with simulator. I even stripped it down completely to nothing but the appdelegate and one simple plain view with a button. So basically I've got an app with nothing but an appDelegate managing a tabBar, launching with one simple view, no frameworks no nothing and I still get a white app. There must be an option somewhere that I must have activated for the running of app in simulator but I can't figure it out. Thank you

    Read the article

  • Web Site in solution where "Rebuild Solution" compile succeeds cannot launch debugger

    - by fordareh
    I have a solution that includes a Web Site (created using the web site template not the web app project template - converting isn't an option, btw). When I rebuild all, the compile succeeds, but strangely displays 3 errors, all of which are "Could not get dependencies for project reference 'PROJNAME'". When I try to launch the debugger, I get the "There were build errors." dialogue. Two questions: If I choose the 'Yes' option in the debug error dialogue to run the last successful build, will it run on the code that my Rebuild All just compiled? How do I resolve this issue? I checked this post and am disheartened by my prospects. What is strange, though, is that I added these same projects to a separate web site solution that compiled/debugged fine, removed the test web site and re-added the target website I would like to debug, and it failed in the same manner. Is there a secret web site .proj file for .NET web sites? http://stackoverflow.com/questions/863379/could-not-get-dependencies-for-project-reference

    Read the article

  • Launch Activity for a certain record

    - by OceanBlue
    I have an screen that displays all the names in the Contacts in a ListView. When the user clicks on a name, I want to launch another Activity which display the details of the selected Contact (Phone number/ email) in another screen. How do I display details for the selected row. (i.e When starting the intent how do I send over the row_id of the item selected)? I've tried the following code: Intent i = new Intent(this, ContactDetails.class); startActivity(i);

    Read the article

  • Launch Apple's Stocks app, with a particular stock selected

    - by Vincent Gable
    I would like to launch Apple's Stocks app to show information for a particular stock, on a non-jailbroken phone. I'm not interesting in how to get a quote or graph a stock myself, just opening Stocks.app. I was hoping that the Stocks app would have a custom URL format, so opening a URL like stocks://AAPL would do the trick. But I haven't found anything documenting such a scheme, and suspect it doesn't exist. Any other ideas, or is it impossible to integrate with the native Stocks app?

    Read the article

  • Launch Google Maps app

    - by oriharel
    Hi, I'm trying to launch Google maps from my application. I'm using: GeoPoint center = _mapView.getMapCenter(); Uri uri = Uri.parse("geo:"+center.getLatitudeE6()+","+center.getLongitudeE6()); Log.d(LOG_TAG, "Launching Google Maps with Uri: ("+uri+")"); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); I tested it with a map centered on somewhere in NYC, however Google maps opens not centered there. I followed Android Developer's site reference to use: "geo:latitude,longitude" pattern. the log that you see prints: Launching Google Maps with Uri: (geo:40763500,-73979305) anyone knows what can be the problem?

    Read the article

  • Ho to launch Choose File dialog on Mac

    - by Manish
    Hi All, I am using LSOpenItemsWithRole() to open any file from my appication. It works fine for all files which has a default application to get opened on Mac, but for the files which cannot be open with any default application this method returns an error kLSApplicationNotFoundErr and does nothing. For such cases I want my application to launch the "Choose Application" dialog box, so that end user can choose any application from there to open the file. This dialog box pops up whenever any such file is directly opened by double clickig. Is there is any direct API call to do the same? any help will be appreciated, Thanks in advance! Manish

    Read the article

  • Launch IE with specific BHO enabled

    - by watsonmw
    I have a IE BHO plugin that I only want to be enabled when the user launches IE from my program (The program start IE using CreateProcess()). I don't want this BHO to be enabled when a user launches IE from outside my program, as that would mean any problems in the BHO could potentially mess up the user's normal browsing experience. What's the best way to do this? One way would be to register the BHO, launch IE and then quickly unregister the BHO. This seems kind of messy though, as a crash in the program that launches IE could cause the BHO to remain registered.

    Read the article

  • Find package name for Android apps to use Intent to launch Market app from web

    - by eom
    I'm creating a mobile website that will include a page from which people can download relevant apps that we recommend. I've found instructions for creating the links to launch the Market but this assumes that you are the developer of the app in question and know the exact package name. Is there any way to get the package name, other than just contacting the developers and asking? Also, it turns out that those instructions don't really work for creating web hyperlinks. They only give you a URI to reference in a string of Java code in another Android app. Our site is in Drupal, so Java is not going to work. For the iPhone, I found easy instructions for getting the URL/link style I need from the iTunes store, so I'm looking for info like that.

    Read the article

  • javascript to launch only ONE window for a Java applet with a given URL

    - by Jonathan Dugan
    I need a javascript solution to launch only one window, with a Java Applet in it, for a given URL. I found a solution posted here on Stack Overflow - here: http://stackoverflow.com/questions/528671/javascript-window-open-only-if-the-window-does-not-already-exist But it doesn't seem to work .. I get Error: launchApplication.winrefs is undefined Line: 29 I can't seem to post the code in this little box and make it look right below, so the code (my working code, plus the solution from above) is here: http://pastie.org/833879 Where is the error? As I understand it, the hash or array or whatever I use to store the called references to the windows opened this way will be lost if the calling window is closed. Is there a way to make this work even if the calling window is closed and reopened? To basically ask the browser: "Do you have a window open with the following URL?" and if so, "What is the reference to that window?" (so I can raise it).

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >