Search Results

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

Page 31/256 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Apache crash on launch - W2008 Server

    - by user1634444
    I installed Xampp on my Windows Server 2008. It worked fine, untill I decided to install some updates. Now Apache doesn't start any more and I get these errors; [Wed Aug 29 23:31:20.328125 2012] [core:warn] [pid 1540:tid 312] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Wed Aug 29 23:31:20.968750 2012] [ssl:warn] [pid 1540:tid 312] AH01873: Init:Session Cache is not configured [hint: SSLSessionCache] I'm trying to install Cacti on the server to monitor everything... Don't think it's relevant, but just saying

    Read the article

  • How to protect critical section in PHP?

    - by Morgan Cheng
    I did some search about this topic but found nothing valuable. If I don't use PHP default session handler, there is no session lock at request level. So, I have to protect critical section by myself. In Java, we have synchronized. In C#, we have lock. In PHP, how to do that?

    Read the article

  • Makefile : contains string

    - by Michael
    The variable returns MINGW32_NT-5.1 or CYGWIN_NT-5.1. (yea, dot at the end) Need to compare that given var contains NT-5.1 positioned anywhere. Using cygwin and would like to be compatible with pretty much any *nix.

    Read the article

  • Atomic Instructions and Variable Update visibility

    - by dsimcha
    On most common platforms (the most important being x86; I understand that some platforms have extremely difficult memory models that provide almost no guarantees useful for multithreading, but I don't care about rare counter-examples), is the following code safe? Thread 1: someVariable = doStuff(); atomicSet(stuffDoneFlag, 1); Thread 2: while(!atomicRead(stuffDoneFlag)) {} // Wait for stuffDoneFlag to be set. doMoreStuff(someVariable); Assuming standard, reasonable implementations of atomic ops: Is Thread 1's assignment to someVariable guaranteed to complete before atomicSet() is called? Is Thread 2 guaranteed to see the assignment to someVariable before calling doMoreStuff() provided it reads stuffDoneFlag atomically? Edits: The implementation of atomic ops I'm using contains the x86 LOCK instruction in each operation, if that helps. Assume stuffDoneFlag is properly cleared somehow. How isn't important. This is a very simplified example. I created it this way so that you wouldn't have to understand the whole context of the problem to answer it. I know it's not efficient.

    Read the article

  • Android Respond To URL in Intent

    - by Isaac Waller
    I want my intent to be launched when the user goes to a certain url: for example, the android market does this with http://market.android.com/ urls. so does youtube. I want mine to do that too. If anybody could explain this, thank you very much. Isaac Waller

    Read the article

  • Simulating O_NOFOLLOW (2): Is this other approach safe?

    - by Daniel Trebbien
    As a follow-up question to this one, I thought of another approach which builds off of @caf's answer for the case where I want to append to file name and create it if it does not exist. Here is what I came up with: Create a temporary directory with mode 0700 in a system temporary directory on the same filesystem as file name. Create an empty, temporary, regular file (temp_name) in the temporary directory (only serves as placeholder). Open file name for reading only, just to create it if it does not exist. The OS may follow name if it is a symbolic link; I don't care at this point. Make a hard link to name at temp_name (overwriting the placeholder file). If the link call fails, then exit. (Maybe someone has come along and removed the file at name, who knows?) Use lstat on temp_name (now a hard link). If S_ISLNK(lst.st_mode), then exit. open temp_name for writing, append (O_WRONLY | O_APPEND). Write everything out. Close the file descriptor. unlink the hard link. Remove the temporary directory. (All of this, by the way, is for an open source project that I am working on. You can view the source of my implementation of this approach here.) Is this procedure safe against symbolic link attacks? For example, is it possible for a malicious process to ensure that the inode for name represents a regular file for the duration of the lstat check, then make the inode a symbolic link with the temp_name hard link now pointing to the new, symbolic link? I am assuming that a malicious process cannot affect temp_name.

    Read the article

  • Using device variable by multiple threads on CUDA

    - by ashagi
    I am playing around with cuda. At the moment I have a problem. I am testing a large array for particular responses, and when I get the response, I have to copy the data onto another array. For example, my test array of 5 elements looks like this: [ ][ ][v1][ ][ ][v2] Result must look like this: [v1][v2] The problem is how do I calculate the address of the second array to store the result? All elements of the first array are checked in parallel. I am thinking to declare a device variable int addr = 0. Every time I find a response, I will increment the addr. But I am not sure about that because it means that addr may be accessed by multiple threads at the same time. Will that cause problems? Or will the thread wait until another thread finishes using that variable?

    Read the article

  • Why Switch/Case and not If/Else If?

    - by OB OB
    This question in mainly pointed at C/C++, but I guess other languages are relevant as well. I can't understand why is switch/case still being used instead of if/else if. It seems to me much like using goto's, and results in the same sort of messy code, while the same results could be acheived with if/else if's in a much more organized manner. Still, I see these blocks around quite often. A common place to find them is near a message-loop (WndProc...), whereas these are among the places when they raise the heaviest havoc: variables are shared along the entire block, even when not propriate (and can't be initialized inside it). Extra attention has to be put on not dropping break's, and so on... Personally, I avoid using them, and I wonder wether I'm missing something? Are they more efficient than if/else's? Are they carried on by tradition?

    Read the article

  • How to compare two floating-point values in shell script

    - by Reem
    I had to do a division in shell script and the best way was: result1=`echo "scale=3; ($var1 / $total) * 100"| bc -l` result2=`echo "scale=3; ($var2 / $total) * 100"| bc -l` but I want to compare the values of $result1 and $result2 Using if test $result1 -lt $result2 or if [ $result1 -gt $result2 ] didn't work :( Any idea how to do that?

    Read the article

  • How to compare two "not integer" values in shell script

    - by Reem
    I had to do a division in shell script and the best way was: result1=`echo "scale=3; ($var1 / $total) * 100"| bc -l` result2=`echo "scale=3; ($var2 / $total) * 100"| bc -l` but I want to compare the values of $result1 and $result2 Using if test $result1 -lt $result2 or if [ $result1 -gt $result2 ] didn't work :( Any idea how to do that?

    Read the article

  • Preventing Race Conditions

    - by Qua
    I'm using the built-in ajax functionality of MVC2. Basically the user types a search query, and on every key press a set of results for the query is shown. This works fine in almost all cases, but sometimes the server is a bit slow with a single response, and thus the result for the next key stroke is returned before the previous. When the previous key stroke result set is finally returned to the client it will overwrite the results for the newer search query that should actually have been shown. My code follows more or less along these lines: <% using (Ajax.BeginForm("SearchUser", null, new AjaxOptions() { UpdateTargetId = "findUserResults" }, new { id = "findUserAjaxForm" })) {%> Every keystroke submits this form and thus outputs the results in the 'findUserResults' element. How can I prevent older results from being displayed while still making use of the built-in functions provided in MVC2?

    Read the article

  • iPhone: Create a single UIView from multiple clicks

    - by Cuzog
    I'm making a partial overlay modal in my app with the code from “Semi-Modal (Transparent) Dialogs on the iPhone” at ramin.firoozye.com. In doing so, the button that calls the modal is still visible and clickable. I will hide this button when the modal spawns, but I want to be sure if the user clicks very quickly twice, a new modal doesn't come up for each click. What is the best way to check that the modal doesn't already exist when calling it from the button click? You can download the test project here. For those that don't have xcode, the relevant functions are below: I call forth the modal on button click with this: - (IBAction)displayModal:(id)sender { ModalViewController *modalController = [[ModalViewController alloc] initWithNibName:@"ModalViewController" bundle:nil]; modalController.view.frame = CGRectOffset(modalController.view.frame, 0, 230); [self showModal:modalController.view]; } Then use this function to animate the custom modal over the current view: - (void)showModal:(UIView*) modalView { UIWindow* mainWindow = (((TestAppDelegate*) [UIApplication sharedApplication].delegate).window); CGPoint middleCenter = modalView.center; CGSize offSize = [UIScreen mainScreen].bounds.size; CGPoint offScreenCenter = CGPointMake(offSize.width / 2.0, offSize.height * 1.5); modalView.center = offScreenCenter; // we start off-screen [mainWindow addSubview:modalView]; // Show it with a transition effect [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; // animation duration in seconds modalView.center = middleCenter; [UIView commitAnimations]; } Then I dismiss the modal on button click with this: - (IBAction)dismissModal:(id)sender { [self hideModal:self.view]; } And then use these functions to animate the modal offscreen and clean itself up: - (void)hideModal:(UIView*) modalView { CGSize offSize = [UIScreen mainScreen].bounds.size; CGPoint offScreenCenter = CGPointMake(offSize.width / 2.0, offSize.height * 1.5); [UIView beginAnimations:nil context:modalView]; [UIView setAnimationDuration:0.7]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(hideModalEnded:finished:context:)]; modalView.center = offScreenCenter; [UIView commitAnimations]; } - (void)hideModalEnded:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { UIView* modalView = (UIView *)context; [modalView removeFromSuperview]; [self release]; } Any help is greatly appreciated!

    Read the article

  • Lauching Lotus Notes with mailto:

    - by SKR
    I have a mailto url in a web page. The target system contains both Microsoft Outlook and Lotus Notes. Microsoft Outlook is the **default** Mail Client. So when i click on *mailto* link it opens up Microsoft Outlook. I want it to open Lotus Notes when i click on the link and i do **NOT** want change the default mail client settings in Internet Options as well. Please suggest a solution or work around to achive this.

    Read the article

  • How to open the command prompt and insert commands using Java?

    - by 404 Not Found
    There have been a few other questions on here sort of like this, but none seem to have any answers. Is it possible to open the command prompt (and I guess any other terminal for other systems), and execute commands in the newly opened window? Currently what I have is this: Runtime rt = Runtime.getRuntime(); rt.exec(new String[]{"cmd.exe","/c","start"}); I've tried adding the next command after the "start", I've tried running another rt.exec containing my command, but I can't find a way to make it work. If it matters, I'm trying to run a command similar to this: java -flag -flag -cp terminal-based-program.jar

    Read the article

  • mysql meeting multiple conditions

    - by Djeux
    I'm having a table, where one ID, can have multiple statuses | client_id | status_id | | 1 | 2 | | 1 | 3 | | 1 | 5 | | 2 | 2 | | 2 | 3 | | 2 | 6 | The problem is, to select only those client_id's if they have all the statuses i.e. 2,3,5 (status_id = 2 AND status_id = 3 AND status_id = 5) but mysql doesn't allow that directly.

    Read the article

  • SQL with codition on calculated value

    - by user619893
    I have a table with products, their amount and their price. I need to select all entries where the average price per article is between a range. My query so far: SELECT productid,AVG(SUM(price)/SUM(amount)) AS avg FROM stock WHERE avg=$from AND avg<=$to GROUP BY productid If do this, it tells me avg doesnt exist. Also i obviously need to group by because the sum and average need to be per wine

    Read the article

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