Search Results

Search found 6393 results on 256 pages for 'frame rate'.

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

  • How to keep Java Frame from waiting?

    - by pypmannetjies
    I am writing a genetic algorithm that approximates an image with a polygon. While going through the different generations, I'd like to output the progress to a JFrame. However, it seems like the JFrame waits until the GA's while loop finishes to display something. I don't believe it's a problem like repainting, since it eventually does display everything once the while loop exits. I want to GUI to update dynamically even when the while loop is running. Here is my code: while (some conditions) { //do some other stuff gui.displayPolygon(best); gui.displayFitness(fitness); gui.setVisible(true); } public void displayPolygon(Polygon poly) { BufferedImage bpoly = ImageProcessor.createImageFromPoly(poly); ImageProcessor.displayImage(bpoly, polyPanel); this.setVisible(true); } public static void displayImage(BufferedImage bimg, JPanel panel) { panel.removeAll(); panel.setBounds(0, 0, bimg.getWidth(), bimg.getHeight()); JImagePanel innerPanel = new JImagePanel(bimg, 25, 25); panel.add(innerPanel); innerPanel.setLocation(25, 25); innerPanel.setVisible(true); panel.setVisible(true); }

    Read the article

  • reshaping a data frame into long format in R

    - by user1773115
    I'm struggling with a reshape in R. I have 2 types of error (err and rel_err) that have been calculated for 3 different models. This gives me a total of 6 error variables (i.e. err_1, err_2, err_3, rel_err_1, rel_err_2, and rel_err_3). For each of these types of error I have 3 different types of predivtive validity tests (ie random holdouts, backcast, forecast). I would like to make my data set long so I keep the 4 types of test long while also making the two error measurements long. So in the end I will have one variable called err and one called rel_err as well as an id variable for what model the error corresponds to (1,2,or 3) Here is my data right now: iter err_1 rel_err_1 err_2 rel_err_2 err_3 rel_err_3 test_type 1 -0.09385732 -0.2235443 -0.1216982 -0.2898543 -0.1058366 -0.2520759 random 1 0.16141630 0.8575728 0.1418732 0.7537442 0.1584816 0.8419816 back 1 0.16376930 0.8700738 0.1431505 0.7605302 0.1596502 0.8481901 front 1 0.14345986 0.6765194 0.1213689 0.5723444 0.1374676 0.6482615 random 1 0.15890059 0.7435382 0.1589823 0.7439204 0.1608709 0.7527580 back 1 0.14412360 0.6743928 0.1442039 0.6747684 0.1463520 0.6848202 front and here is what I would like it to look like: iter model err rel_err test_type 1 1 -0.09385732 (#'s) random 1 2 -0.1216982 (#'s) random 1 3 -0.1216982 (#'s) random and on... I've tried playing around with the syntax but can't quite figure out what to put for the time.varying argument Thanks very much for any help you can offer.

    Read the article

  • Fade unfocused GNU Emacs frame (X window)

    - by Mischa Arefiev
    Is it possible to make GNU Emacs 24 dim unfocused windows a bit? For example, I can set my rxvt-unicode clients to become darker when their windows don't have focus with this string in ~/.Xdefaults: URxvt*fading: 50 It greatly reduces discomfort when you have a lot of terminal windows on 2+ monitors. I would like a similar feature in Emacs, but couldn't google up anything. Here is how it looks like with urxvt (png, 1.43 MB)

    Read the article

  • how to create internal frame?

    - by joseph
    I created class NewProject extends JInternalFrame. Then I create New...Action named "NEW", localised in File menu. I put code NewProject p = new NewProject(); p.setVisible(true); to the ActionPerformed method of the action. But when I run the module and click "NEW" in file menu, nothing appears. Where can be problem?

    Read the article

  • How to activate and deactivate frame in java?

    - by Nitz
    hey guys I had made one application in java-swing, Now what i am getting problem is, i want to minimize my jframe when it is deactivate and then to maximize i want to activate that window. So for maximize, i want to activate any jframe using java code. So how to activate and deactivate any jframe, so that i can do something on window listeners? thanks in advance.

    Read the article

  • i frame scroll back problem

    - by muralikalpana
    Can you help me with my problem regarding iframe because whenever the iframe is scrolled till end, and the user clicks a control inside the page within iframe, and page content is on the top of the page, the user needs to scroll up the Iframe just to see the content. Are there any properties that I can set or code that I can do so that the Iframe scrollbar goes back to top whenever an event is triggered inside the form??

    Read the article

  • Obtaining frame pointer in C

    - by assketchum
    I'm trying to get the FP in my C program, I tried two different ways, but they both differ from what I get when I run GDB. The first way I tried, I made a protocol function in C for the Assembly function: int* getEbp(); and my code looks like this: int* ebp = getEbp(); printf("ebp: %08x\n", ebp); // value i get here is 0xbfe2db58 while( esp <= ebp ) esp -= 4; printf( "ebp: %08x, esp" ); //value i get here is 0xbfe2daec My assembly code getEbp: movl %ebp, %eax ret I tried making the prototype function to just return an int, but that also doesn't match up with my GDB output. We are using x86 assembly. EDIT: typos, and my getEsp function looks exactly like the other one: getEsp: movl %esp, %eax ret

    Read the article

  • match two data.frame

    - by Elb
    I have a situation like this: DF1 COL1 COL2 COL3 ... a b c b d b f e a g m f DF2 COL a b c d e f g h i l m n o I would like to match each column of DF1 with the only one column of DF2 and score how many occurrence of DF2 are in each column of DF1. How this can be done? Thanks in advance, E.

    Read the article

  • MSDN "pseudoframe"

    - by bobobobo
    So, I'm trying to replicate MSDN "pseudoframes" here. Their pages are laid out like they're using an old-school frameset, but inspecting their elements with firebug reveals they've done this with purely div's. Here's my attempt at it. Its not perfect though, it only works in Chrome and Firefox, it has this weird highlight select behavior that I don't like, any takers? <!doctype html> <html> <head> <title>msdn "pseudoframe"</title> <style> body { background-color: #aaa; margin: 0; padding: 0; } div#pseudoframe, div#main { border: solid 1px black; background-color: #fff; } div#pseudoframe { position: absolute; left: 0; width: 180px; height: 100%; overflow-x: auto; overflow-y: none; } div#sizeMod { background-color: #a0a; position: absolute; left: 220px; height: 100%; cursor: e-resize; } div#main { font-weight: bold; font-size: 2em; padding: 24px; margin-left: 224px; } </style> <script type="text/javascript"> function initialize() { // get the pseudoframe and attach an event to the mouse flyover. var pf = document.getElementById('pseudoframe'); var main = document.getElementById('main'); var resize = document.getElementById( 'sizeMod' ); pf['onmouseover'] = function( event ) { event = event || window.event; var el = event.srcElement || event.target ; // are we within 5 px of the border? if we are, // change the mouse cursor to resize. }; pf['onscroll'] = function( event ) { event = event || window.event; var el = event.srcElement || event.target ; var sizeMod = document.getElementById( 'sizeMod' ); //alert( el.scrollLeft ); sizeMod.style.right = '-' + (el.scrollLeft) + 'px'; //alert( sizeMod.style.right ); // are we within 5 px of the border? if we are, // change the mouse cursor to resize. }; resize['onmousedown'] = function( event ) { event = event || window.event; var el = event.srcElement || event.target ; window.lockResize = true; }; window['onmouseup'] = function( event ) { event = event || window.event; var el = event.srcElement || event.target ; window.lockResize = false; //release on any mouse up event //alert('unlocked'); }; window['onmousemove'] = function( event ) { event = event || window.event; var el = event.srcElement || event.target ; if( window.lockResize == true ) { // resize. get client x and y. var x = event.clientX; var y = event.clientY; pf.style.width = x + 'px'; resize.style.left = x + 'px'; main.style.marginLeft = x + 'px'; //alert( pf.style.width ); event.stopPropagation(); event.preventDefault(); return false; } }; } </script> </head> <body onload=" initialize(); "> <div id="pseudoframe"> <ul> <li>Code</li> <li>MICROSOFT CODE <ul> <li>WINDOWS XP SOURCE</li> <li>WINDOWS VISTA SOURCE</li> <li>WINDOWS 7 SOURCE</li> <li>WINDOWS 8 SOURCE</li> </ul> </li> <li>DOWNLOAD ALL MICROSOFT CODE EVER WRITTEN</li> <li>DOWNLOAD ALL MAC OS CODE EVER WRITTEN</li> <li>DOWNLOAD ALL AMIGA GAME CONSOLE CODE</li> <li>DOWNLOAD ALL CODE EVER WRITTEN PERIOD</li> </ul> </div> <div id="sizeMod">&nbsp;&nbsp;</div> <div id="main"> lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe lorem ipsum microsoft pseudoframe </div> </body> </html>

    Read the article

  • Creating a dataframe in pandas by multiplying two series together

    - by Aoife
    Say I have two series in pandas, series A and series B. How do I create a dataframe in which all of those values are multiplied together, i.e. with series A down the left hand side and series B along the top. Basically the same concept as this, where series A would be the yellow on the left and series B the yellow along the top, and all the values in between would be filled in by multiplication: http://www.google.co.uk/imgres?imgurl=http://www.vaughns-1-pagers.com/computer/multiplication-tables/times-table-12x12.gif&imgrefurl=http://www.vaughns-1-pagers.com/computer/multiplication-tables.htm&h=533&w=720&sz=58&tbnid=9B8R_kpUloA4NM:&tbnh=90&tbnw=122&zoom=1&usg=__meqZT9kIAMJ5b8BenRzF0l-CUqY=&docid=j9BT8tUCNtg--M&sa=X&ei=bkBpUpOWOI2p0AWYnIHwBQ&ved=0CE0Q9QEwBg Thanks!

    Read the article

  • 2-Way databinding with Entity Framework and WPF DataGrid , is Possible ?

    - by Panindra
    i am working on POS application using SQL CE , WPF , Entity framework 3.5sp2 and iam trying to use data grid as my Order Entry Control for User to enter Products Order . Iam plannning to bind this to enitiy frmae work model , abd looking for 2 way updating ? private void button1_Click(object sender, RoutedEventArgs e) { using (MasterEntities nwEntities = new MasterEntities()) { var users = from d in nwEntities.Companies select new { d.CompanyId, d.CompanyName, d.Place }; listBox1.DataContext = users; dataGrid1.DataContext = users; // foreach (String c in customers) // { // MessageBox.Show(c.ToString()); // } } } When try to double clikc on the datagrid it through s a error with Caption " Invalid Operation Execption was unhandled " and Message " A TwoWay or OneWayToSource binding cannot work on the read-only property 'CompanyId' of type '<f__AnonymousType0`3[System.Int32,System.String,System.String]'. whats wrong here and my xaml coding goes like this <Grid> <ListBox Name="listBox1" ItemsSource="{Binding}" /> <Button Content="Show " Name="button1" Click="button1_Click" /> <DataGrid AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding}" > <DataGrid.Columns> <DataGridTextColumn Header=" ID" Binding="{Binding CompanyId}"/> <DataGridTextColumn Header="Company Name" Binding="{Binding CompanyName}"/> <DataGridTextColumn Header="Place" Binding="{Binding Place}" /> </DataGrid.Columns> </DataGrid> </Grid> EDITED : i made the changes shown by @vorrtex, But, then i added another button to save the chages and in button click event i added follwing code , butit showing Updating error private void button2_Click(object sender, RoutedEventArgs e) { nwEntities.SaveChanges(); }

    Read the article

  • function to find common rows between more than two data frames in R

    - by biohazard
    I have 4 data frames, and would like to find the rows whose values in a certain column do not exist in any of the other data frames. I wrote this function: #function to test presence of $Name in 3 other datasets common <- function(a, b, c, d) { is.B <- is.numeric(a$Name %in% b$Name) == 1 is.C <- is.numeric(a$Name %in% c$Name) == 1 is.D <- is.numeric(a$Name %in% d$Name) == 1 t <- as.numeric(is.B & is.C & is.D) t } However, the output is always t = 0. This means that it tells me that there are no unique rows in any data sets, even though the datas frames have very different numbers of rows. Since there are no duplicate rows in any of the data frames, I should be getting t = 1 for at least some rows in the biggest dataset. Can someone figure out what I got wrong?

    Read the article

  • Filtering a dataframe in row names from a column value in R

    - by user1755155
    Basically I have dataframe with two columns (target_id and fpkm). I want to keep only those row names in first column that are not duplicated. For example in the below dataframe you can see there are two row names with the same name (almost) comp267138_c0_seq1 comp267138_c0_seq2 and from both and I want to keep only one comp267138_c0_seq2 based of high value in column 2. target_id fpkm comp247393_c0_seq1 3.197885 comp257058_c0_seq4 1.624577 comp242590_c0_seq1 1.750319 comp77911_c0_seq1 1.293059 comp241426_c0_seq1 1.626589 comp288413_c0_seq1 14.828853 comp294436_c0_seq1 11.555596 comp63603_c0_seq1 1.982386 comp267138_c0_seq1 8.594494 comp267138_c0_seq2 11.134958 comp321623_c0_seq1 6.934149

    Read the article

  • R matrix handling expressions aren't evaluated in a function or a "for" loop - Column extract doesn't seem to work

    - by Sal Leggio
    I have an R matrix named ddd. When I enter this, everything works fine: i <- 1 shapiro.test(ddd[,y]) ad.test(ddd[,y]) stem(ddd[,y]) print(y) The calls to Shapiro Wilk, Anderson Darling, and stem all work, and extract the same column. If I put this code in a "for" loop, the calls to Shapiro Wilk, and Anderson Darling stop working, while the the stem & leaf call and the print call continue to work. for (y in 7:10) { shapiro.test(ddd[,y]) ad.test(ddd[,y]) stem(ddd[,y]) print(y) } The decimal point is 1 digit(s) to the right of the | 0 | 0 0 | 899999 1 | 0 [1] 7 The same thing happens if I try and write a function. SW & AD do not work. The other calls do. D <- function (y) { + shapiro.test(ddd[,y]) + ad.test(ddd[,y]) + stem(ddd[,y]) + print(y) } D(9) The decimal point is at the | 9 | 000 9 | 10 | 00000 [1] 9 Why don't all the calls behave the same way?

    Read the article

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