Search Results

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

Page 38/256 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • What's the most common scenario for Cocoa app setup during first launch?

    - by Eimantas
    I am creating an app and I would like a user to set some obligatory preferences during first app launch. What is the most common scenario to achieve this? Should I set some user defaults to see if the app has been setup? Also - if I determine that the app is being launched for the first time - how should I display "Setup" window? If I load it from the separte xib file - how will I deffer the display of main app window?

    Read the article

  • Cakephp beforeFind() - How do I add a JOIN condition AFTER the belongsTo association is added?

    - by michael
    I'm in Model-beforeFind($queryData), trying to add a JOIN condition to the queryData on a model which has belongsTo associations. Unfortunately, the new JOIN references a table in the belongsTo association, so it must appear AFTER the belongsTo in the query. Here is my Tagged-belongsTo association: app\plugins\tags\models\tagged.php (line 192) Array ( [Tag] => Array ( [className] => Tag [foreignKey] => tag_id [conditions] => [fields] => [order] => [counterCache] => ) [Group] => Array ( [className] => Group [foreignKey] => foreign_key [conditions] => Array ( [Tagged.model] => Group ) [fields] => [order] => [counterCache] => ) ) Here is the JOIN added in Tagged-beforeFind(), notice that the belongsTo joins have not yet been added: app\plugins\tags\models\tagged.php (line 194) Array ( [conditions] => Array ( [Tag.keyname] => europe ) [fields] => Array ( [0] => DISTINCT Group.* [1] => GroupPermission.* ) [joins] => Array ( [0] => Array ( [table] => permissions [alias] => GroupPermission [foreignKey] => [type] => INNER [conditions] => Array ( [GroupPermission.model] => Group [0] => GroupPermission.foreignId = Group.id [or] => Array ( ... ) ) ) ) [limit] => [offset] => [order] => Array ( [0] => ) [page] => 1 [group] => [callbacks] => 1 [by] => europe [model] => Group ) When I check the output, it fails with "1054: Unknown column 'Group.id' in 'on clause'" because the Permissions join appeared BEFORE the Groups join. SELECT DISTINCT `Group`.*, `GroupPermission`.* FROM `tagged` AS `Tagged` INNER JOIN permissions AS `GroupPermission` ON (`GroupPermission`.`model` = 'Group' AND `GroupPermission`.`foreignId` = `Group`.`id` AND (...)) LEFT JOIN `tags` AS `Tag` ON (`Tagged`.`tag_id` = `Tag`.`id`) LEFT JOIN `groups` AS `Group` ON (`Tagged`.`foreign_key` = `Group`.`id` AND `Tagged`.`model` = 'Group') WHERE `Tag`.`keyname` = 'europe' But this SQL (with Permissions joined moved to the end) works fine: SELECT DISTINCT `Group`.*, `GroupPermission`.* FROM `tagged` AS `Tagged` LEFT JOIN `tags` AS `Tag` ON (`Tagged`.`tag_id` = `Tag`.`id`) LEFT JOIN `groups` AS `Group` ON (`Tagged`.`foreign_key` = `Group`.`id` AND `Tagged`.`model` = 'Group') INNER JOIN permissions AS `GroupPermission` ON (`GroupPermission`.`model` = 'Group' AND `GroupPermission`.`foreignId` = `Group`.`id` AND (...)) WHERE `Tag`.`keyname` = 'europe' How do I add my join in beforeFind() after the belongsTo join?

    Read the article

  • Referencing a theorem-like environment by its [name]

    - by Seamus
    I am using ntheorem to typeset a set of conditions. In my preamble I have: \theoremstyle{empty} \newtheorem{Condtion}{Condtion} When I want to typeset a condition, I write: \begin{Condtion}[name] \label{cnd:nm} foo foo foo \end{Condition} The name appears boldface on the same line as the start of the text of the condition, with no number or anything. Perfect. What I want to do now is refer to the condition by some variant of the \ref command, \ref calls the number [which is not displayed anywhere else] \thref writes "Condition n" for the nth condition \nameref writes the name of the SECTION of the label. a zref solution was suggested here, but seems unsatisfactory. Any clues?

    Read the article

  • conditional while loop in php?

    - by julio
    I'm pretty sure there's an obvious answer for this-- hoping someone can help me-- I need to do a PHP while loop, but only if a variable is true. And I can't really put the while loop in an "if" statement, which seems like the obvious thing to do, since the code block is huge and it would be ugly and confusing. Do I need to break out the code in the loop into a function, or is there an easier way to deal with this? Here's the basic idea: if(condition){ while(another_condition){ //huge block of code loops many times } } else { // huge block of code runs once } I want the huge block of code to execute regardless of the state of the condition variable-- but only to execute once if condition is false, and execute for as long as another_condition is true if condition is true. Hope that's clear! The following code doesn't work, but gives an idea of what I want to accomplish: if(condition){ while(another_condition){ } // huge block of code if (condition){ } } // closes the while loop-- obviously throws an error though! thanks in advance.

    Read the article

  • T-SQL Self Join in combination with aggregate function

    - by Nick
    Hi, i have the following table. CREATE TABLE [dbo].[Tree]( [AutoID] [int] IDENTITY(1,1) NOT NULL, [Category] [varchar](10) NULL, [Condition] [varchar](10) NULL, [Description] [varchar](50) NULL, CONSTRAINT [PK_Tree] PRIMARY KEY CLUSTERED ( [AutoID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO the data looks like this: INSERT INTO [Test].[dbo].[Tree] ([Category] ,[Condition] ,[Description]) VALUES ('1','Alpha','Type 1') INSERT INTO [Test].[dbo].[Tree] ([Category] ,[Condition] ,[Description]) VALUES ('1','Alpha','Type 1') INSERT INTO [Test].[dbo].[Tree] ([Category] ,[Condition] ,[Description]) VALUES ('2','Alpha','Type 2') INSERT INTO [Test].[dbo].[Tree] ([Category] ,[Condition] ,[Description]) VALUES ('2','Alpha','Type 2') go I try now to do the following: SELECT Category,COUNT(*) as CategoryCount FROM Tree where Condition = 'Alpha' group by Category but i wish also to get the Description for each Element. I tried several subqueries, self joins etc. i always come to the problem that the subquery cannot return more than one record. The problem is caused by a poor database design which i cannot change and i run out of ideas to get this done in a single query ;-(

    Read the article

  • What types of conditions can be used for conditional compilation in C++?

    - by user1002288
    This is an exam question for C++: Which of the following statements accurately describe the condition that can be used for conditional compilation in C++? A. The condition can depend on the value of environment variables. B. The condition can depend on the value of any const variables. C. The condition can depend on the value of program variables. D. The condition can use the sizeof() operator to make decision about compiler-dependent operations based on the size of standard data type. E. The condition must evaluate to either a 0 or 1 during preprocessing. I think the answer is E. Is this correct?

    Read the article

  • Converting a macro to an inline function

    - by Rob
    I am using some Qt code that adds a VERIFY macro that looks something like this: #define VERIFY(cond) \ { \ bool ok = cond; \ Q_ASSERT(ok); \ } The code can then use it whilst being certain the condition is actually evaluated, e.g.: Q_ASSERT(callSomeFunction()); // callSomeFunction not evaluated in release builds! VERIFY(callSomeFunction()); // callSomeFunction is always evaluated Disliking macros, I would instead like to turn this into an inline function: inline VERIFY(bool condition) { Q_ASSERT(condition); } However, in release builds I am worried that the compiler would optimise out all calls to this function (as Q_ASSERT wouldn't actually do anything.) I am I worrying unnecessarily or is this likely depending on the optimisation flags/compiler/etc.? I guess I could change it to: inline VERIFY(bool condition) { condition; Q_ASSERT(condition); } But, again, the compiler may be clever enough to ignore the call. Is this inline alternative safe for both debug and release builds?

    Read the article

  • Unable to launch the ASP.NET Development server because port '1900' is in use.

    - by Shaul
    I don't know what has got into my computer today. I was developing just fine in VS 2008 and testing my ASP.NET web site on my development server. Then suddenly, out of the blue, I can't run my web site any more! As soon as I hit F5, the message appears: Unable to launch the ASP.NET Development server because port '1900' is in use. And it doesn't matter what port I change to, it's always in use! AAARRRGGGHH!!! I have tried: Changing the port number Restarting Visual Studio Rebooting my machine Installing IIS Clue: My IIS refuses to start. But I didn't have IIS installed when I was happily working earlier, so that is probably not the issue; it might just be highlighting something else... Thanks in advance... Update: after rebooting, IIS does start, but the problem here persists.

    Read the article

  • How to launch the market intent in 'Give Feedback' mode on android.

    - by Paul Maidment
    Hi There, I have just written a game for the Android market and would like to remind my customers to leave feeback on the market for the application (especially the demo version.) Is there any way to launch the market intent in a mode that will take the user to the feedback / comments section of the page? I already use this approach for linking my demo to the paid app... Intent goToMarket = null; goToMarket = new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id=com.paulmaidment.games.flagsoftheworld")); startActivity(goToMarket); Is there a best practice that any Android devs out there might know of? Additionally, is there any way to track referalls from my demo app so that I can try to calculate some kind of a conversion rate? (i.e. how effective the demo app is at generating sales.) Thanks, Paul

    Read the article

  • How to launch a file protocol URL with an anchor from Java?

    - by Jeff C
    From a Java program, I need to launch the default browser on a local HTML file, pointed to an anchor inside the file. In Java SE 6, the java.awt.Desktop.browse method will open the file, but will not honor the anchor, so something like the following opens the file at the top, but does not page the browser to the anchor: Desktop.getDesktop("file:///C:/foo/bar.html#anchor"); Sun says here http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6477862 that anchors are not supported in the file URI protocol. Does anyone have a better answer? I can use Java SE 6. I would be OK with a Windows only solution.

    Read the article

  • How do i launch a process with low priority? C#

    - by acidzombie24
    I want to execute a cmd line tool to process data. It does not need to be blocking. I want it to be low priority. So i wrote the below Process app = new Process(); app.StartInfo.FileName = @"bin\convert.exe"; app.StartInfo.Arguments = TheArgs; app.PriorityClass = ProcessPriorityClass.BelowNormal; app.Start(); However i get a System.InvalidOperationException with the msg "No process is associated with this object." Why? how do i properly launch this app in low priority? PS: Without the line app.PriorityClass = ProcessPriorityClass.BelowNormal; the app runs fine.

    Read the article

  • I am not able launch JNLP aaplications using "Java Web Start"?

    - by akjain
    Up until recently, I was able to launch/open JNLP files in Firefox using Java web start. Don't know what happened all of a sudden JNLP files stopped launching, a splash screen appears saying Java Starting... and then nothing happens. Even the Java Console in the browser and javacpl.cpl applet doesn't open. Tried all possibilities: removed all older version and installed the latest JRE (java version "1.6.0_17"), still it doesn't work. Done some googling for this problem, people suggested to start javaws.exe with -viewer option but same behavior (a splash screen appears saying "Java Starting..." and then disappears) The problem is that I don't know any place (logs etc.) to look for to see what is causing the problem. I am using WinXP SP3, and some of the screenshots below shows further info about my system. I can provide any other detail if required but please help me solve this problem. Update: Although this question is bit old, Following solution fixed above issue for me (indeed this was the actual cause)

    Read the article

  • How to launch a Windows process as 64-bit from 32-bit code?

    - by Jonas
    To pop up the UAC dialog in Vista when writing to the HKLM registry hive, we opt to not use the Win32 Registry API, as when Vista permissions are lacking, we'd need to relaunch our entire application with administrator rights. Instead, we do this trick: ShellExecute(hWnd, "runas" /* display UAC prompt on Vista */, windir + "\\Reg", "add HKLM\\Software\\Company\\KeyName /v valueName /t REG_MULTI_TZ /d ValueData", NULL, SW_HIDE); This solution works fine, besides that our application is a 32-bit one, and it runs the REG.EXE command as it would be a 32-bit app using the WOW compatibility layer! :( If REG.EXE is ran from the command line, it's properly ran in 64-bit mode. This matters, because if it's ran as a 32-bit app, the registry keys will end up in the wrong place due to registry reflection. So is there any way to launch a 64-bit app programmatically from a 32-bit app and not have it run using the WOW64 subsystem like its parent 32-bit process (i.e. a "*" suffix in the Task Manager)?

    Read the article

  • Launch ms word template as new document from IE...

    - by Simon
    I have a requirement to launch .dot files (ms word templates) as new documents from the browser... Let me explain... if you click on a .dot file in Windows Explorer it opens a new document and runs any macros... you can right click and edit the template... I want to link to the files, so I use <a href="file://myserver/templates/letter.dot">Letter</a>... However this then prompts for the "Download File" dialogue box... and then if I click "Open" it opens the template in edit mode... not the required new document mode... This may be a technical impossibility but can I achieve the desired result in ActiveX or something??

    Read the article

  • Is it possible to launch an Android Activity from an AlertDialog?

    - by YYY
    I am trying to create a small pop-up in my Android application to let the user choose from one of many items, ala a ListView. I am hoping to make it show up as a translucent box that overlays on the screen, as opposed to completely occupying it like Activities usually do. One technique for doing this that I've heard is possible is to launch an Activity in an AlertDialog box. This would be perfect - it's the ideal size and has a lot of the mechanical properties I'm looking for, but I'm totally unable to find any more specifics of this technique. Is this possible? And if not, what is the preferred way of accomplishing something like this?

    Read the article

  • howto launch my application like MS-Office applications do using automation.

    - by Alan
    I am writing a c# application which references a separate dll which contains all the automation features i am trying to implement such as Application Object Model, doing all this by using delegates and events. What i want to be able todo is to reference my dll containing the application object model in a different process and for it to automatically launch my application, like MS-Word does when you call its application. Example: Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application(); Word object model loads in the WinWord.exe running its own process how can i achieve this as well. Thanks in advance

    Read the article

  • [Android] How to launch an Activity without a UI?

    - by fjmustak
    Is it in any way possible to launch an activity from the main function without having a UI? i.e. is there a way to create a sort of "wrapper" around another activity, i.e. by launching the main activity, it takes you to another activity automatically. If that is not possible, is there a way to remove the main activity from the stack so that clicking the back button does not take you to a blank UI? Here's an example of what I'm trying to do: public class WrapperActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:555-1212")); startActivity(intent); } }

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >