Search Results

Search found 69247 results on 2770 pages for 'problem solving'.

Page 20/2770 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Multi-threaded JOGL Problem

    - by moeabdol
    I'm writing a simple OpenGL application in Java that implements the Monte Carlo method for estimating the value of PI. The method is pretty easy. Simply, you draw a circle inside a unit square and then plot random points over the scene. Now, for each point that is inside the circle you increment the counter for in points. After determining for all the random points wither they are inside the circle or not you divide the number of in points over the total number of points you have plotted all multiplied by 4 to get an estimation of PI. It goes something like this PI = (inPoints / totalPoints) * 4. This is because mathematically the ratio of a circle's area to a square's area is PI/4, so when we multiply it by 4 we get PI. My problem doesn't lie in the algorithm itself; however, I'm having problems trying to plot the points as they are being generated instead of just plotting everything at once when the program finishes executing. I want to give the application a sense of real-time display where the user would see the points as they are being plotted. I'm a beginner at OpenGL and I'm pretty sure there is a multi-threading feature built into it. Non the less, I tried to manually create my own thread. Each worker thread plots one point at a time. Following is the psudo-code: /* this part of the code exists in display() method in MyCanvas.java which extends GLCanvas and implements GLEventListener */ // main loop for(int i = 0; i < number_of_points; i++){ RandomGenerator random = new RandomGenerator(); float x = random.nextFloat(); float y = random.nextFloat(); Thread pointThread = new Thread(new PointThread(x, y)); } gl.glFlush(); /* this part of the code exists in run() method in PointThread.java which implements Runnable */ void run(){ try{ gl.glPushMatrix(); gl.glBegin(GL2.GL_POINTS); if(pointIsIn) gl.glColor3f(1.0f, 0.0f, 0.0f); // red point else gl.glColor3f(0.0f, 0.0f, 1.0f); // blue point gl.glVertex3f(x, y, 0.0f); // coordinates gl.glEnd(); gl.glPopMatrix(); }catch(Exception e){ } } I'm not sure if my approach to solving this issue is correct. I hope you guys can help me out. Thanks.

    Read the article

  • Problem installing NVIDIA-Linux-x86-302.07.run in 12.04

    - by paj100
    I have a catch 22 problem in trying to install this driver (NVIDIA-Linux-x86-302.07.run) to set my screen to its native resolution of 1280x1024 (hpL1906). Problem is that in order to install this driver, I need to stop the XServer but when I do this (sudo service lightdm stop), my screen goes blank and displays the message - Out of Range 1280X1024 need to reset (or something similar) - and I can go no further. So, I cannot install NVIDIA-Linux-x86-302.07.run without stopping lightdm but when I do so, I can no longer see anything on the screen or go further to install the driver that would let me adjust the resolution. Any advice on getting out of this loop would be greatly appreciated.

    Read the article

  • Problem adding a ppa

    - by Roman Rdgz
    I want to install gcc compiler 4.7 to use c++11 features. I have looked on the internet for instructions, and I found in several websites these steps: sudo add-apt-repository ppa:Ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.7 g++-4.7 The problem is that my console freezes when adding the ppa. At first I thought it was due to having an old Ubuntu version (11.04). So I have upgraded to 11.10 and then 12.04, and everything seems to work OK. But still having the same problem. Any help?

    Read the article

  • Ubuntu one sync problem with Windows

    - by user87046
    I installed ubuntu one (ubuntuone-3.0.2b) on my Windows 7 pc. My problem is that it does not sync my files without admin rights. The ubuntu one app gets my username and used space, but then hangs.... Then I run the app as admin and it opens, and works correctly. After I run it as admin for all users (right click properties, run as administrator for all users) then the app will not autostart with windows, but when I open the app manually it works correctly. (the uac promt comes up and I accept) I think it is the UAC promt wich prevents it from autostarting, but I do not know how to work around this. I don't know if it is a bug or a problem with windows 7.

    Read the article

  • sed problem ....

    - by moata_u
    hello there ... am facing problem in sed command , i was trying write a bash script that do the following : 1. search for the line that contain :@ , 2.then save the line that contained :@ and replace it with new line ....as following : ! /bin/bash echo "Please enter the ip address of you file" read ipnumber find=grep ':@' application.properties # find the line input="connection.url=jdbc\racle\:thin\:@$ipnumber\:1521\:billz" # preparing new line echo sed "s/'${find}'/'${input}'/g" application.properties # replace old with new line **Problem is nothing happen !!!! * I already tried to use "${find}" instead of '${find}'

    Read the article

  • mayavi2 installing has problem (ubuntu 12.04)

    - by user98865
    I'm using ubuntu 12.04 and python 2.7.3-0ubuntu2 is already installed. I have a problem during installing mayavi2 from ubuntu software center. Error message is : Package dependencies cannot be resolved This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time. Details: The following packages have unmet dependencies mayavi2: Depends: python-numpy (= 1:1.6.1) but 1:1.6.1-6ubuntu1 is to be installed Depends: python-numpy-abi9 but it is a virtual package Depends: python (< 2.8) but 2.7.3-0ubuntu2 is to be installed Depends: python-vtk (= 5.4.2-5) but 5.8.0-5 is to be installed I've searched to solve this problem for a long time but I didn't solve yet. What can I do?

    Read the article

  • Mouse and keyboard focus problem

    - by heffaklump
    I have two Chrome windows side by side. I click a link in window#1, ok. Now I want to switch to window#2 and click anywhere in the window. Noting happens. Sometimes the cursor switch to make-bigger-window style. If I click in the top part of current window. And then in the top part of next window I can switch focus so the other window works. Another problem is that the keyboard focus can get stuck in one window. I can click on things in one window but when using the keyboard it will change the first window. Only by closing the window that has the focus, it will release keyboard. What is this madness? Another problem not related is that sometimes I get logged out. Just like that.

    Read the article

  • Dual boot (Win 7 & Ubuntu 13.10 clock problem

    - by peter
    I'm a "newbie" to Ubuntu, but I've been wrestling with this problem for several hours and don't seem to be able to solve it: When I set the time in Windows (Indianapolis, Eastern U.S. time zone) and then re-boot to Ubuntu, the computer time goes to Hawaiian time. When the time is set in Ubuntu, and the computer is rebooted to Windows the time is advanced by 5 hours. I've set the time in the BIOS, and it seems to make no difference. I've tried setting the time from "automatic" to "manual", all with the same result. Not a big problem, but it shows some underlying glitch. Could anyone explain?

    Read the article

  • Nvidia GTS 450 HDMI problem?

    - by Gercke
    Good afternoon friends. I have a problem with my video card, I have a video card GeForce GTS 450 and a TV Samsung Series 4 43 "and I have it connected to my video card via a cable Mini HDMI to the TV and everything works perfectly, I can instarlar Ubuntu 12.04 (64bits) perfectly, but the problem when I want to change the screen resolution but try to change the driver I install that comes directly from the Nvidia page gave me an error at the end. maximum resolution I presents is 1024x 768 and is supposed to introduce more resolutions and that is connected to the HDMI. A someone else has happened???? Will have some sort of solution???? I hope someone can help me and I thank you very much. Regards

    Read the article

  • iptables rule problem

    - by thakrage
    I've been searching around for some time now, but nothing solves my problem. I'm setting up a mail server, but when writing to the iptables, I get an error: iptables-restore: line 2 failed. I'm tryig to use the following /etc/iptables.test.rules: # Allows SMTP access -A INPUT -p tcp --dport 25 -j ACCEPT # Allows pop and pops connections -A INPUT -p tcp --dport 110 -j ACCEPT -A INPUT -p tcp --dport 995 -j ACCEPT # Allows imap and imaps connections -A INPUT -p tcp --dport 143 -j ACCEPT -A INPUT -p tcp --dport 993 -j ACCEPT After this, I'm issuing the following command: sudo iptables-restore < /etc/iptables.test.rules However I get returned this: iptables-restore: line 2 failed. I don't know what the problem is. Can anyone clarify? btw. I'm using Ubuntu 10.10 LTS

    Read the article

  • Wine doesn't work (Problem with the mount manager)

    - by audrianore
    I didn't know exactly when the problem occurred. My Wine worked well a couple days ago. Then, I was just about to install some Windows programs hours ago but I got nothing. No installer window showed up, and no error report. It just won't work. And now I just found where the problem is (screenshot below), but I don't know how to fix it. Any idea? Any help would be appreciated. Thanks in advance. Details: Wine 1.4 Ubuntu 12.04 LTS I tried: Autoremove in Terminal Delete the software configuration

    Read the article

  • Linked list in C

    - by ScReYm0
    I am still new at lists in C and i got a big problem... First i wanna show you my code for inserting item to the list: void input_books_info(int number_of_books, BOOK *current) { int i; for(i = 0; i < number_of_books; i++) { while(current->next != NULL) current = current->next; current->next = (BOOK *)malloc(sizeof(BOOK)); printf_s("%d book catalog number: ", i + 1); scanf_s("%s", &current->next->catalog_number , 20); printf_s("%d book title: ", i + 1); scanf_s("%s", current->next->title ,80); printf_s("%d book author: ", i + 1); scanf_s("%s", current->next->author ,40); printf_s("%d book publisher: ", i+1); scanf_s("%s", current->next->publisher,80); printf_s("%d book price: ", i + 1); scanf_s("%f", &current->next->price, 5); printf_s("%d book year published: ", i + 1); scanf_s("%d", &current->next->year_published, 5); current->next->next = NULL; printf_s("\n\n"); } } And this is my main function: void main (void) { int number_of_books, t = 1; char book_catalog_number[STRMAX]; char book_title[STRMAX]; char book_author[STRMAX]; char reading_file[STRMAX]; char saving_file[STRMAX]; first = malloc(sizeof(BOOK)); first->next = NULL; /* printf_s("Enter file name: "); gets(saving_file); first->next = book_open(first, saving_file); */ while(t) { char m; printf_s("1. Input \n0. Exit \n\n"); printf_s("Choose operation: "); m = getch(); switch(m) { case '1': printf_s("\ninput number of books: "); scanf_s("%d", &number_of_books); input_books_info(number_of_books, first); printf_s("\n"); break; default: printf_s("\nNo entry found!\n\n\n\n\n"); break; } } } and last maybe here is the problem the printing function: void print_books_info(BOOK *current) { while(current->next != NULL && current != NULL) { printf_s("%s, ", current->next->catalog_number); printf_s("%s, ", current->author); printf_s("%s, ", current->next->title); printf_s("%s, ", current->next->author); printf_s("%s, ", current->next->publisher); printf_s("%.2f, ", current->next->price); printf_s("%d", current->next->year_published); printf_s("\n\n"); current = current->next; } } And my problem is that, when i run the app, program is moving good. But when I start the app, the program is storing only first input of data second and third are lost ... Can you help me to figure out it... ???

    Read the article

  • sql server 2005 stored procedure unexpected behaviour

    - by user283405
    i have written a simple stored procedure (run as job) that checks user subscribe keyword alerts. when article posted the stored procedure sends email to those users if the subscribed keyword matched with article title. One section of my stored procedure is: OPEN @getInputBuffer FETCH NEXT FROM @getInputBuffer INTO @String WHILE @@FETCH_STATUS = 0 BEGIN --PRINT @String INSERT INTO #Temp(ArticleID,UserID) SELECT A.ID,@UserID FROM CONTAINSTABLE(Question,(Text),@String) QQ JOIN Article A WITH (NOLOCK) ON A.ID = QQ.[Key] WHERE A.ID > @ArticleID FETCH NEXT FROM @getInputBuffer INTO @String END CLOSE @getInputBuffer DEALLOCATE @getInputBuffer This job run every 5 minute and it checks last 50 articles. It was working fine for last 3 months but a week before it behaved unexpectedly. The problem is that it sends irrelevant results. The @String contains user alert keyword and it matches to the latest articles using Full text search. The normal execution time is 3 minutes but its execution time is 3 days (in problem). Now the current status is its working fine but we are unable to find any reason why it sent irrelevant results. Note: I am already removing noise words from user alert keyword. I am using SQL Server 2005 Enterprise Edition.

    Read the article

  • CONFUSING : CGAffineTransform - rotation on uibutton resizes buttonimage ?! (iPad)

    - by Michael
    hi there, i've got a strange problem using uibuttons, type custom. i'm placing 4 of those buttons on a scrollview, rotating each button by a random angle using CGAffineTransform. now it seems, that the buttons itself change size depending on the angle of rotation. can't get this problem solved :( UIGraphicsBeginImageContext(tempCtxSize); [cookbookImage drawInRect:CGRectMake(imgOffsetX, imgOffsetY+frmOffsetY, cookbookImage.size.width, cookbookImage.size.height)]; [cookbookFrame drawInRect:CGRectMake(0.0f, frmOffsetY, cookbookFrame.size.width, cookbookFrame.size.height)]; UIImage *combinedImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); ... ... UIButton *cookbookViewButton = [UIButton buttonWithType:UIButtonTypeCustom]; [cookbookViewButton setFrame:CGRectMake(0.0f, 0.0f, combinedImage.size.width, combinedImage.size.height)]; [cookbookViewButton setBackgroundColor:[UIColor clearColor]]; [cookbookViewButton setBackgroundImage:combinedImage forState:UIControlStateNormal]; CGAffineTransform rotation = [cookbookViewButton transform]; rotation = CGAffineTransformRotate(rotation, angle); // some random angle [cookbookViewButton setTransform:rotation]; thx for your help in advance!

    Read the article

  • dojo.require() prevents Firefox from rendering the page

    - by Eduard Wirch
    Im experiencing strange behavior with Firefox and Dojo. I have a html page with these lines in the <head> section: ... <script type="text/javascript" src="dojo.js" djconfig="parseOnLoad: true, locale: 'de'"></script> <script type="text/javascript"> dojo.require("dojo.number"); </script> ... Sometimes the page loads normally. But sometimes it won't. Firefox will fetch the whole html page but not render it. I see only a gray window. After some experiments I figured out that the rendering problem has something to do with the load time of the html. Firefox starts evaluating the html page while loading it. If the page takes too long to load the above javascript will be executed BEFORE the html finishes loading. If this happens I'll get the gray window. Advising Firefox to show me the source code of the page will display the correct complete html code. BUT: if I save the page to disk (File-Save Page As...) the html code will be truncated and the above part will look like this: ... <script type="text/javascript" src="dojo.js" djconfig="parseOnLoad: true, locale: 'de'"></script> <script type="text/javascript"> dojo.require("dojo.number"); </script></head><body></body></html> This explains why I get to see a gray area. But why does this code appear there? I assume the require() method of Dojo does something "evil". But I can't figure out what. There is no write.document("</head><body></body></html>"); in the Dojo code. I checked for it. The problem would be fixed, if I'd place the dojo.require("dojo.number"); statement in the window.load event: <script type="text/javascript"> window.load=function() { dojo.require("dojo.number"); } </script> But I'm curious why this happens. Is there a Javasctript function which forces Firefox to stop evaluating the page? Does Dojo do somethig "bad"? Can anyone explain this behavior to me? EDIT: Dojo 1.3.1, no JS errors or warnings.

    Read the article

  • How would you handle making an array or list that would have more entries than the standard implemen

    - by faceless1_14
    I am trying to create an array or list that could handle in theory, given adequate hardware and such, as many as 100^100 BigInteger entries. The problem with using an array or standard list is that they can only hold Integer.MAX_VALUE number of entries. How would you work around this limitations? A whole new class/interface? A wrapper for list? another data type entirely?

    Read the article

  • jQuery - bad div size in IE

    - by Tomek
    hello, I have a problem with sizes of divs - in Firefox everything is fine, but IE messes things up, I use only jquery show hide function which open div with other divs nested in it, you can see what I mean on www.custos.pl/v1 - by choosing any option on the bottom, a div opens up, where you have a submenu opening up jScrollPanes, the whole div should stay within the photo background, but in IE it goes vertically way beyond it, Id appreciate your help

    Read the article

  • Emulator typing "="

    - by Anton
    Hello. I have a problem with Android Emulator. I have created avd and run it. But when it was started I can't work, because it emulate typing many "=" symbol. I launch this avd with -debug-all parameter and debuger write "could not handle (sym=61, mod=0, str=EQUAL) KEY [0x00d, down]". OS - Windows Vista. Last version Java platform, SDK, Eclipse. Thank you very mach if you can hep me =)

    Read the article

  • apostrophe text comparison in xsl

    - by Nanda
    Hi I have a problem with text with apostrophe symbol example i try to test this xml having the symbol is then how can i compare ? <xsl:for each select="country[nation='India's]"> this is statement showing error Regards Nanda.A

    Read the article

  • Link doesn't let animation to end JQUERY

    - by christian deliens
    I create a div that when is clicked it executes an jquery script, but the problem I have is that in the animation there is a link, when you click on the link the links is execute as well as the animation but it does not let the animation to end. Is there a way to let know Jquery that when the links its executed wait for the animation to end and then go to the link?

    Read the article

  • Firefox CSS error

    - by Matko
    Hello! Please visit http://domenadesign.com/istra-bike.com with Firefox browser! After a few clicks on the links page go crazy but only in Firefox, what's the problem? I tried to experiment with anything in css (position, float...) but it doesnt work properly.. Thank you for your answer!

    Read the article

  • You don't have permission fckeditor php

    - by G-Rajendra
    i upload fckeditor in myadmin and i also make upload files in $Config['UserFilesPath'] = '/uploadfiles/' ; i had also gave 777 permission in upload files and browse.html but when i want to upload files there is showing error as below "You don't have permission to access /wealthfinance/admin/fckeditor/editor/filemanager/browser/default/browser.html on this server." what is main problem in fckeditor could you please anyone help me

    Read the article

  • [iPhone] Error reading plist file for fill a table

    - by Matthew
    Hi, I'm developing an app for iPhone but I've a problem... I've a view with some textField and the informations writed in them are saved in a plist file. With @class and #import declarations I import this view controller in another controller that manage a table view. The code I've just wrote appear to be right but my table is filled up with 3 same row... I don't know why the row are 3... Can anyone help me?

    Read the article

  • Window 7 problem, Explorer.exe, DWM.exe

    - by Nitinzz
    I'm using Window 7 Ultimate. I get a problem with two processes, namely explorer.exe and sometimes dwm.exe. The two processes tend to use cpu between 20-30%. And it only occurs when i play some game on my PC. My PC works perfect until I play some game. And another important observation: They consume no cpu as such but only consumes when I try to refresh my desktop. I mean when I right-click on desktop. It takes seconds for refresh. I have no virus problems. I had already tried following things: Kill explorer.exe and relaunch from task manager. (Problem still persists) Kill dwm.exe, well it relaunches again. (Problem still persists) Log Off and Log On. (Problem still persists) Restart. Problem Solved. (But need an alternative). Can anyone kindly suggest some quick fixes to the problem?

    Read the article

  • problem opening eclipse

    - by Marchosius
    I'm having a problem loading Eclipise in 12.04. I loaded the error log and this was inside: !SESSION 2012-09-03 16:52:09.742 ----------------------------------------------- eclipse.buildId=I20110613-1736 java.version=1.7.0_07 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB Command-line arguments: -os linux -ws gtk -arch x86_64 !ENTRY org.eclipse.osgi 4 0 2012-09-03 16:52:11.317 !MESSAGE Application error !STACK 1 java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-gtk-3740 in java.library.path no swt-gtk in java.library.path Can't load library: /home/marcel/.swt/lib/linux/x86_64/libswt-gtk-3740.so Can't load library: /home/marcel/.swt/lib/linux/x86_64/libswt-gtk.so at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194) at org.eclipse.swt.internal.C.<clinit>(C.java:21) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54) at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132) at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695) at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161) at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386) I had openJDK installed and to remove and replace with Oracle Java to install Aptana Studio. This thread explains it all. So now reinstalled OpenJDK, this might give some insight to the problem?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >