Daily Archives

Articles indexed Thursday January 13 2011

Page 4/37 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Problem re-factoring multiple timer countdown

    - by jowan
    I create my multiple timer countdown from easy or simple script. entire code The problem's happen when i want to add timer countdown again i have to declare variable current_total_second CODE: elapsed_seconds= tampilkan("#time1"); and variable timer who set with setInterval.. timer= setInterval(function() { if (elapsed_seconds != 0){ elapsed_seconds = elapsed_seconds - 1; $('#time1').text(get_elapsed_time_string(elapsed_seconds)) }else{ $('#time1').parent().slideUp('slow', function(){ $(this).find('.post').text("Post has been deleted"); }) $('#time1').parent().slideDown('slow'); clearInterval(timer); } }, 1000); i've already know about re-factoring and try different way but i'm stack to re-factoring this code i want implement flexibelity to it.. when i add more of timer countdown.. script do it automatically or dynamically without i have to add a bunch of code.. and the code become clear and more efficient.. Thanks in Advance

    Read the article

  • How to improve IntelliJ code editor speed?

    - by Hoàng Long
    I am using IntelliJ (Community Edition) for several months, and at first I'm pleased about its speed & simplicity. But now, after upgrading to version 10, it's extremely slow. Sometimes I click a file then it takes 5 - 15 seconds to open that file (it freeze for that time). I don't know if I have done anything which cause that: I have installed 2 plugins(regex, sql), and have 2 versions of IntelliJ on my machine (now the version 9 removed, only version 10 remains). Is there any tips to improve speed of code editor, in general, or specifically IntelliJ? I have some experience when using IntelliJ: 1. Should open IntelliJ a while before working, cause it needs time for indexing. Don't open too many code tabs Open as less other program as possible. I'm using 2 GB RAM WinXP, and it just seems fairly enough for Java, IntelliJ & Chrome at the same time.

    Read the article

  • Can Parallel.ForEach be used safely with CloudTableQuery

    - by knightpfhor
    I have a reasonable number of records in an Azure Table that I'm attempting to do some one time data encryption on. I thought that I could speed things up by using a Parallel.ForEach. Also because there are more than 1K records and I don't want to mess around with continuation tokens myself I'm using a CloudTableQuery to get my enumerator. My problem is that some of my records have been double encrypted and I realised that I'm not sure how thread safe the enumerator returned by CloudTableQuery.Execute() is. Has anyone else out there had any experience with this combination?

    Read the article

  • Events + Adapter Pattern

    - by Stretto
    I have an adapter pattern on a generic class that essentially adapts between types: class A<T> { event EventHandler e; } class Aadapter<T1, T2> : A<T1> { A<T2> a; Aadapter(A<T2> _a) { a = _a; } } The problem is that A contains an event. I effectively want all event handlers assigned to Adapter to fall through to a. It would be awesome if I could assign the a's event handler to adapter's event handler but this is impossible? The idea here is that A is almost really just A but we need a way to adapt the them. Because of the way event's work I can't how to efficiently do it except manually add two event handlers and when they are called they "relay" the to the other event. This isn't pretty though and it would seem much nicer if I could have something like class A<T> { event EventHandler e; } class Aadapter<T1, T2> : A<T1> { event *e; A<T2> a; Aadapter(A<T2> _a) { a = _a; e = a.e; } } in a sense we have a pointer to the event that we can assign a2's event to. I doubt there is any simple way but maybe someone has some idea to make it work. (BTW, I realize this is possible with virtual events but I'd like to avoid this if at all possible)

    Read the article

  • Audio File continues to play even on leaving the view

    - by Swastik
    What I am doing is -(void)viewWillAppear:(BOOL)animated{ [NSTimer scheduledTimerWithTimeInterval:0.3 target:self selector:@selector(clickEvent:) userInfo:nil repeats:YES]; } -(void)clickEvent:(NSTimer *)aTimer{ NSDate* finishDate = [NSDate date]; if([finishDate timeIntervalSinceDate: self.startDate] 11 && touched == NO){ NSString *mp3Path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"test.mp3"]; [self playMusicFile:mp3Path]; NSLog(@"Timer from First Page"); [aTimer invalidate]; //[touchCheckTimer release]; aTimer = nil; } else{ } -(void)playMusicFile:(NSString *)mp3Path{ NSURL *mp3Url = [NSURL fileURLWithPath:mp3Path]; NSError *err; AVAudioPlayer *audPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:mp3Url error:&err]; [self setAudioPlayer1:audPlayer]; if(audioPlayer1) [audioPlayer1 play]; [audPlayer release]; } Now, on pushing another view this audio file keeps playing in the background. Please help!

    Read the article

  • Can this loop be sped up in pure Python?

    - by Noctis Skytower
    I was trying out an experiment with Python, trying to find out how many times it could add one to an integer in one minute's time. Assuming two computers are the same except for the speed of the CPUs, this should give an estimate of how fast some CPU operations may take for the computer in question. The code below is an example of a test designed to fulfill the requirements given above. This version is about 20% faster than the first attempt and 150% faster than the third attempt. Can anyone make any suggestions as to how to get the most additions in a minute's time span? Higher numbers are desireable. EDIT: This experiment is being written in Python 3.1 and is 15% faster than the fourth speed-up attempt. def start(seconds): import time, _thread def stop(seconds, signal): time.sleep(seconds) signal.pop() total, signal = 0, [None] _thread.start_new_thread(stop, (seconds, signal)) while signal: total += 1 return total if __name__ == '__main__': print('Testing the CPU speed ...') print('Relative speed:', start(60))

    Read the article

  • Call WCF Service Through Javascript, AJAX, or JQuery

    - by obautista
    I created a number of standard WCF Services (Service Contract and Host (svc) are in separate assemblies). I fired up a Web Site in IIS to host the Services (i.e., address is http://services:1000/wcfservices.svc). Then in my Web Site project I added the reference. I am able to call the services normally. I am needed to call some of the services client side. Not sure if I should be looking at articles calling WCF services through AJAX, JQuery, or JSON enabled WCF Services. Can anyone provide any thoughts or experience with configuring as such? Some of the changes I made was adding the following to the Operation Contract: [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "SetFoo")] void SetFoo(string Id); Then this above the implementation of the interface: [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] Then in the service webconfig I have this (parens are angle brackets): <serviceHostingEnvironment aspNetCompatibilityEnabled="true"> <baseAddressPrefixFilters> <add prefix="http://services:1000/wcfservices.svc/"/>> </baseAddressPrefixFilters> </serviceHostingEnvironment> <serviceHostingEnvironment multipleSiteBindingsEnabled="false" /> Then in the client side I attempted this: <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"> <compositeScript> <Scripts> <asp:ScriptReference Path="http://Flixsit:1000/FlixsitWebServices.svc" /> </Scripts> </CompositeScript> </asp:ScriptManagerProxy> I am attempting to call the service like this in javascript: wcfservices.SetFoo(string Id); Nothing is working. If it is idea or a better solution to call JSON enable, JQuery, etc....I am willing to make any changes. Thanks for any suggestions/tips provided....

    Read the article

  • Getting every nth Element of a Sequence

    - by Alexander Rautenberg
    I am looking for a way to create a sequence consisting of every nth element of another sequence, but don't seem to find a way to do that in an elegant way. I can of course hack something, but I wonder if there is a library function that I'm not seeing. The sequence functions whose names end in -i seem to be quite good for the purpose of figuring out when an element is the nth one or (multiple of n)th one, but I can only see iteri and mapi, none of which really lends itself to the task. Example: let someseq = [1;2;3;4;5;6] let partial = Seq.magicfunction 3 someseq Then partial should be [3;6]. Is there anything like it out there? Edit: If I am not quite as ambitious and allow for the n to be constant/known, then I've just found that the following should work: let rec thirds lst = match lst with | (_,_,x)::t -> x::thirds t | _ -> [] Would there be a way to write this shorter?

    Read the article

  • Why CABasicAnimation will send the layer's view to back and front?

    - by ohho
    There are two UIViews of similar size. UIView one (A) is originally on top of UIView two (B). When I try to perform a CABasicAnimation transform.rotation.y on A's layer: CABasicAnimation *rotateAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.y"]; CGFloat startValue = 0.0; CGFloat endValue = M_PI; rotateAnimation.fromValue = [NSNumber numberWithDouble:startValue]; rotateAnimation.toValue = [NSNumber numberWithDouble:endValue]; rotateAnimation.duration = 5.0; [CATransaction begin]; [imageA.layer addAnimation:rotateAnimation forKey:@"rotate"]; [CATransaction commit]; During the animation, the animating layer's UIView (A) will be: sent back (A is suddenly behind B) rotating ... passed second half of the animation sent front (A is now on top of B again) Is there a way to keep A on top of B for the whole animation period? Thanks! UPDATE: project source is attached: FlipLayer.zip

    Read the article

  • is it possible to extract certain strings based off a predefined white-space count?

    - by s2xi
    So after several Advil's I think I need help I am trying to make a script that lets the user upload a .txt file, the file will look like this as an example EXT. DUNKIN' DONUTS - DAY Police vehicles remain in the parking lot. The determined female reporter from the courthouse steps, MELINDA FUENTES (32), interviews Comandante Chitt, who holds a napkin to his jaw, like he cut himself shaving. MELINDA < Comandante Chitt, how does it feel to get shot in the face? > COMANDANTE CHITT < Not too different than getting shot in the arm or leg. > MELINDA < Tell us what happened. > COMANDANTE CHITT < I parked my car. (indicates assault vehicle in donut shop) He aimed his weapon at my head. I fired seven shots. He stopped aiming his weapon at my head. > Melinda waits for more, but Chitt turns and walks away into the roped-off crime scene. Melinda is confused for a second, then resumes smiling. MELINDA < And there you have it... A man of few words. > Ok, so based off of this what I want to do is this: The PHP script looks at the file and counts 35 white spaces, since all files will have the same layout and never differ in white spaces I chose this as the best way to go. for every 35 white spaces extract character 36 until the end of line. Then tally up $character++ so in the end the output would look like ----------------------------------- It looks like you have 2 characters in your script Melinda Commandante Chitt ----------------------------------- using PHP to select distinct names, and use the strtolower() to lower case the strings and ucfirst() to make the first letter upper-case thats my project, I'm at the stage where I'm going crazy trying to figure out how to count white-spaces and everything after that white space until the first white-space after the word IS a character name

    Read the article

  • Xcode C++ debugging

    - by mousebird
    I'm looking for a way to have the Xcode IDE pick up on the contents of my weird Boost template classes. Basically, classes complex enough that Xcode can't display their contents correctly. Is there something like the Objective C -description method or toString() in Java that Xcode will look for? At the moment I'm just implementing print() methods and invoking them in gdb, but that's likely to confuse other developers.

    Read the article

  • NSTableView Drag and Drop not working

    - by macatomy
    Hi, I'm trying to set up very basic drag and drop for my NSTableView. The table view has a single column (with a custom cell). The column is bound to an NSArrayController, and the array controller's content array is bound to an NSArray on my controller object. The data displays fine in the table. I connected the dataSource and delegate outlets of the table view to my controller object, and then implemented these methods: - (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard { NSLog(@"dragging"); return YES; } - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)op { return NSDragOperationEvery; } - (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id <NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation { return YES; } I also registered the drag types in -awakeFromNib: #define MyDragType @"MyDragType" - (void)awakeFromNib { [super awakeFromNib]; [_myTable registerForDraggedTypes:[NSArray arrayWithObjects:MyDragType, nil]]; } The problem is that the -tableView:writeRowsWithIndexes:toPasteboard: method is never called. I've looked at a bunch of examples and I can't figure out anything I'm doing wrong. Could the problem be that I'm using a custom cell? Is there something I'm supposed to override in the cell subclass to enable this functionality? EDIT: Confirmed. Switching the custom cell for a regular NSTextFieldCell made dragging work. Now, how do I make drag and drop work with my custom cell?

    Read the article

  • Hibernate Many-To-One Foreign Key Default 0

    - by user573648
    I have a table where the the parent object has an optional many-to-one relationship. The problem is that the table is setup to default the fkey column to 0. When selecting, using fetch="join", etc-- the default of 0 on the fkey is being used to try over and over to select from another table for the ID 0. Of course this doesn't exist, but how can I tell Hibernate to treat a value of 0 to be the same as NULL-- to not cycle through 20+ times in fetching a relationship which doesn't exist? <many-to-one name="device" lazy="false" class="Device" not-null="true" access="field" cascade="none" not-found="ignore"> <column name="DEVICEID" default="0" not-null="false"/>

    Read the article

  • Is there a way to create a step chart using the Google Charts API?

    - by Nathan
    I'd like to use the google charts API to create a step chart for my Rails application. Preferably using the annotated timeline Google has (since it has a nice wrapper plugin for rails): http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html However, there doesn't seem to be a way to create a step chart using the annotated timeline or any other chart in the Google API. I'm looking to make a plot like this: If there is no way to do this with the google API, is there an alternative graphing library that can handle such a task?

    Read the article

  • unable to retract Sharepoint solutions

    - by BeraCim
    Hi all: I am having trouble retracting solutions in SharePoint 2007. I used both the retract solution button and the stsadm command in command line. The timer job was created in both instances, but it never gets run... it just sits in the timer job definition. The Status of the target just said "Retracting (scheduled at m/dd/yyyy MM:SS AM/PM)". I've waited for a long time and nothing happens. Has anyone experienced this before, and does anyone have a solution to this problem? Thanks.

    Read the article

  • Problem re-factoring multiple timer countdown

    - by Joko Wandiro
    I create my multiple timer countdown from easy or simple script. entire code The problem's happen when i want to add timer countdown again i have to declare variable current_total_second CODE: elapsed_seconds= tampilkan("#time1"); and variable timer who set with setInterval.. timer= setInterval(function() { if (elapsed_seconds != 0){ elapsed_seconds = elapsed_seconds - 1; $('#time1').text(get_elapsed_time_string(elapsed_seconds)) }else{ $('#time1').parent().slideUp('slow', function(){ $(this).find('.post').text("Post has been deleted"); }) $('#time1').parent().slideDown('slow'); clearInterval(timer); } }, 1000); i've already know about re-factoring and try different way but i'm stack to re-factoring this code i want implement flexibelity to it.. when i add more of timer countdown.. script do it automatically or dynamically without i have to add a bunch of code.. and the code become clear and more efficient. Thanks in Advance

    Read the article

  • Jquery adding and removing class dynamically

    - by user244394
    I am trying to add the class"selected" when a link is clicked and when the user click on the next link , I want to remove the previously "selected" class and add "selected" to the link clicked.. -Thanks in advance $(document).ready(function() { $('.news a').click(function(){ $(this).addClass("selected"); }); }); <div class="news-w"> <div class="news" id="getnews-1"> <a href="#" >topic</a> </div> <div class="news" id="getnews-2"> <a href="#">topic</a> </div> <div class="news" id="getnews-3"> <a href="#" >topic</a> </div> <div class="news" id="getnews-4"> <a href="#">topic</a> </div> <div class="news" id="getnews-5"> <a href="#">topic</a> </div> </div>

    Read the article

  • What (tf) are the secrets behind PDF memory allocation (CGPDFDocumentRef)

    - by Kai
    For a PDF reader I want to prepare a document by taking 'screenshots' of each page and save them to disc. First approach is CGPDFDocumentRef document = CGPDFDocumentCreateWithURL((CFURLRef) someURL); for (int i = 1; i<=pageCount; i++) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; CGPDFPageRef page = CGPDFDocumentGetPage(document, i); ...//getting + manipulating graphics context etc. ... CGContextDrawPDFPage(context, page); ... UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext(); ...//saving the image to disc [pool drain]; } CGPDFDocumentRelease(document); This results in a lot of memory which seems not to be released after the first run of the loop (preparing the 1st document), but no more unreleased memory in additional runs: MEMORY BEFORE: 6 MB MEMORY DURING 1ST DOC: 40 MB MEMORY AFTER 1ST DOC: 25 MB MEMORY DURING 2ND DOC: 40 MB MEMORY AFTER 2ND DOC: 25 MB .... Changing the code to for (int i = 1; i<=pageCount; i++) { CGPDFDocumentRef document = CGPDFDocumentCreateWithURL((CFURLRef) someURL); NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; CGPDFPageRef page = CGPDFDocumentGetPage(document, i); ...//getting + manipulating graphics context etc. ... CGContextDrawPDFPage(context, page); ... UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext(); ...//saving the image to disc CGPDFDocumentRelease(document); [pool drain]; } changes the memory usage to MEMORY BEFORE: 6 MB MEMORY DURING 1ST DOC: 9 MB MEMORY AFTER 1ST DOC: 7 MB MEMORY DURING 2ND DOC: 9 MB MEMORY AFTER 2ND DOC: 7 MB .... but is obviously a step backwards in performance. When I start reading a PDF (later in time, different thread) in the first case no more memory is allocated (staying at 25 MB), while in the second case memory goes up to 20 MB (from 7). In both cases, when I remove the CGContextDrawPDFPage(context, page); line memory is (nearly) constant at 6 MB during and after all preparations of documents. Can anybody explain whats going on there?

    Read the article

  • Should I use curly brackets or concatenate variables within strings?

    - by mririgo
    Straight forward question: Is there an advantage or disadvantage to concatenating variables within strings or using curly braces instead? Concatenated: $greeting = "Welcome, ".$name."!"; Curly braces: $greeting = "Welcome, {$name}!"; Personally, I've always concatenated my strings because I use UEStudio and it highlights PHP variables a different color when concatenated. However, when the variable is not broken out, it does not. It just makes it easier for my eyes to find PHP variables in long strings, etc. EDIT: People are confusing this about being about SQL. This is not what this question is about. I've updated my examples to avoid confusion.

    Read the article

  • How to use JQUERY to filter table rows dynamically using multiple form inputs

    - by tresstylez
    I'm displaying a table with multiple rows and columns. I'm using a JQUERY plugin called uiTableFilter which uses a text field input and filters (shows/hides) the table rows based on the input you provide. All you do is specify a column you want to filter on, and it will display only rows that have the text field input in that column. Simple and works fine. I want to add a SECOND text input field that will help me narrow the results down even further. So, for instance if I had a PETS table and one column was petType and one was petColor -- I could type in CAT into the first text field, to show ALL cats, and then in the 2nd text field, I could type black, and the resulting table would display only rows where BLACK CATS were found. Basically, a subset. Here is the JQUERY I'm using: $("#typeFilter").live('keyup', function() { if ($(this).val().length > 2 || $(this).val().length == 0) { var newTable = $('#pets'); $.uiTableFilter( theTable, this.value, "petType" ); } }) // end typefilter $("#colorFilter").live('keyup', function() { if ($(this).val().length > 2 || $(this).val().length == 0) { var newTable = $('#pets'); $.uiTableFilter( newTable, this.value, "petColor" ); } }) // end colorfilter Problem is, I can use one filter, and it will display the correct subset of table rows, but when I provide input for the other filter, it doesn't seem to recognize the visible table rows that are remaining from the previous column, but instead it appears that it does an entirely new filtering of the original table. If 10 rows are returned after applying one filter, the 2nd filter should only apply to THOSE 10 rows. I've tried LIVE and BIND, but not working. Can anyone shed some light on where I'm going wrong? Thanks!

    Read the article

  • calling c function from assembly

    - by void
    I'm trying to use a function in assembly in a C project, the function is supposed to call a libc function let's say printf() but I keep getting a segmentation fault. In the .c file I have the declaration of the function let's say int do_shit_in_asm() In the .asm file I have .extern printf .section .data printtext: .ascii "test" .section .text .global do_shit_in_asm .type do_shit_in_asm, @function do_shit_in_asm: pushl %ebp movl %esp, %ebp push printtext call printf movl %ebp, %esp pop %ebp ret Any pointers would be appreciated. as func.asm -o func.o gcc prog.c func.o -o prog

    Read the article

  • Advanced XPath query

    - by alex
    Hello, I have an XML file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <PrivateSchool> <Teacher id="teacher1"> <Name> teacher1Name </Name> </Teacher> <Teacher id="teacher2"> <Name> teacher2Name </Name> </Teacher> <Student id="student1"> <Name> student1Name </Name> </Student> <Student id="student2"> <Name> student2Name </Name> </Student> <Lesson student="student1" teacher="teacher1" /> <Lesson student="student2" teacher="teacher2" /> <Lesson student="student3" teacher="teacher3" /> <Lesson student="student1" teacher="teacher2" /> <Lesson student="student3" teacher="teacher3" /> <Lesson student="student1" teacher="teacher1" /> <Lesson student="student2" teacher="teacher4" /> <Lesson student="student1" teacher="teacher1" /> </PrivateSchool> There's also a DTD associated with this XML, but I assume it's not much relevant to my question. Let's assume all needed teachers and students are well defined. What is the XPath query that returns the teachers' NAMES, that have at least one student that took more than 10 lessons with them? I was looking at many XPath sites/examples. Nothing seemed advanced enough for this kind of question... Thank you

    Read the article

  • XCode sqlite3 - SELECT always return SQLITE_DONE

    - by user573633
    Hi developers.... a noob here asking for help after a day of head-banging.... I am working on an app with sqlite3 database with one database and two tables. I have now come to a step where I want to select from the table with an argument. The code is here: -(NSMutableArray*) getGroupsPeopleWhoseGroupName:(NSString*)gn;{ NSMutableArray *groupedPeopleArray = [[NSMutableArray alloc] init]; const char *sql = "SELECT * FROM Contacts WHERE groupName='?'"; @try { NSArray * paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *docsDir = [paths objectAtIndex:0]; NSString *theDBPath = [docsDir stringByAppendingPathComponent:@"ContactBook.sqlite"]; if (!(sqlite3_open([theDBPath UTF8String], &database) == SQLITE_OK)) { NSLog(@"An error opening database."); } sqlite3_stmt *st; NSLog(@"debug004 - sqlite3_stmt success."); if (sqlite3_prepare_v2(database, sql, -1, &st, NULL) != SQLITE_OK) { NSLog(@"Error, failed to prepare statement."); } //DB is ready for accessing, now start getting all the info. while (sqlite3_step(st) == SQLITE_ROW) { MyContacts * aContact = [[MyContacts alloc] init]; //get contactID from DB. aContact.contactID = sqlite3_column_int(st, 0); if (sqlite3_column_text(st, 1) != NULL) { aContact.firstName = [NSString stringWithUTF8String:(char *) sqlite3_column_text(st, 1)]; } else { aContact.firstName = @""; } // here retrieve other columns data .... //store these info retrieved into the newly created array. [groupedPeopleArray addObject:aContact]; [aContact release]; } if(sqlite3_finalize(st) != SQLITE_OK) { NSLog(@"Failed to finalize data statement."); } if (sqlite3_close(database) != SQLITE_OK) { NSLog(@"Failed to close database."); } } @catch (NSException *e) { NSLog(@"An exception occurred: %@", [e reason]); return nil; } return groupedPeopleArray;} MyContacts is the class where I put up all the record variables. My problem is sqlite3_step(st) always return SQLITE_DONE, so that it i can never get myContacts. (i verified this by checking the return value). What am I doing wrong here? Many thanks in advance!

    Read the article

  • export a JOGL applet and embedd into a html page

    - by nkint
    hi guys it is some time that i'm testing opengl with java and JOGL. now i have good result and i wanto to pubblish it on web. but i have some problem. i'm in eclipse, and i'm testing an Applet with JOGL. first of all i have this run time error (but the program works correctly): java.lang.IllegalArgumentException: adding a window to a container at java.awt.Container.checkNotAWindow(Container.java:431) at java.awt.Container.addImpl(Container.java:1039) at java.awt.Container.add(Container.java:365) at AppletHelloWorld.init(AppletHelloWorld.java:30) at sun.applet.AppletPanel.run(AppletPanel.java:424) at java.lang.Thread.run(Thread.java:619) then i found this incredibly clear page and i do what is said, i open html with the browser, the libs are downloaded but it stops at "Starting applet AppletHelloWorld" that is the name i gave to my applet. mayebe i miss something like main function or exporting well the jar? this is my main code: public class AppletHelloWorld extends Applet { public static void main(String[] args) { JFrame fr=new JFrame(); fr.setBounds(0,0,1015,600); fr.add(new AppletHelloWorld()); fr.setVisible(true); } public void init() { setLayout(null); MyJOGLProject canvas = new MyJOGLProject(); //MyJOGLProject extends JFrame canvas.run(); Container c = new Container(); c.add(canvas); add(c); } //....

    Read the article

  • how to prevent log output from PostgreSQL stored procedure ?

    - by ssc
    I am running a number of PostgreSQL scripts that used to produce excessive log output. I managed to reduce most of the output to an acceptable amount by passing --quiet as parameter to the psql command line client and adding SET client_min_messages='warning'; to the beginning of my SQL scripts. This works fine for most basic statements like SELECT, INSERT, UPDATE, etc.) However, when I call a stored function in a script using e.g. SELECT my_func(my_args);, there is still log output similar to my_func (omitted a long with many '-' here because SF thinks that's a headline) (1 row) The output is useless; it only makes me having to scroll back up a long way after the script has run and also makes it much harder than necessary to spot any relevant error output. How can I get rid of it ?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >