Search Results

Search found 7 results on 1 pages for 'crp'.

Page 1/1 | 1 

  • replace NA in an R vector with adjacent values

    - by pssguy
    I have a dataframe which has merged player and team data for soccer seasons So for a particular player in a specific season I have data like df <- data.frame(team=c(NA,"CRP",NA,"CRP","CRP",NA), player=c(NA,"Ed",NA,"Ed","Ed",NA), playerGame= c(NA,1,NA,2,3,NA), teamGame =c(1,2,3,4,5,6)) Where the NA's indicate that the player did not appear in that specific team game How would I most efficiently replace the team and player NA's with "CRP" and "Ed" respectively and have a plGame output of, in this instance, 0,1,1,2,3,3

    Read the article

  • Centering of a div, but the normal CSS does not work

    - by Jean
    Hello, I want to center a div, but the general way is #selector{position:relative;margin:0px auto;} What exactly is wrong below #crp{top:40%; position:absolute; margin:auto;} The Div below is not nested but a standalone. The #crp is going to the extreme right. <div id="crp">...something goes here....</div> Thanks Jean

    Read the article

  • VB.NET - cannot get Video Preview to work

    - by Yiu Korochko
    Hi, Overflow. I have an application which is supposed to convert a video via DirectShowSource. I have a checkbox which enables a button called "btnviewcrop" which shows a new form called crp.vb for cropping/shearing pixels off the video. Now, I have a Panel1 that I want to set as the owner (the video drawing surface) but when I set it to open, the application crashes (Error: Object reference not set to an instance of an object.) and I do not understand how to fix it. Here is my button code: Imports Microsoft.DirectX.AudioVideoPlayback Private Sub btnviewcrop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnviewcrop.Click Me.ShowInTaskbar = False Me.Enabled = False crp.Show() Dim cropperv As Video cropperv.Owner = crp.preview cropperv.FromFile(labinputfile.Text, True) cropperv.Play() End Sub

    Read the article

  • Applescript, how to get network address of a file

    - by CRP
    We are a network of Mac computers. I would like to send email addresses to colleagues with links to files on network locations. I made the following applescript: tell application "Finder" set uuu to URL of the first item of (get the selection) set the clipboard to uuu end tell which puts the URL of the currently selected file into the clipboard, which can then be pasted into the message (using the Add Link menu item), providing, for example: file://localhost/Volumes/Commerciale/Clienti/ unfortunately these links do not work. If I select Go To Folder from the menu item, I can get to the folder using an afp:// type url. Is there any way to get this via applescript like I do with url above? Thanks

    Read the article

  • How do I make a sql query where fields are the result of a different query?

    - by CRP
    I have two tables, the first is like this: f1 | f2 | f3 | f4 ----------------- data.... the second contains info about the fields of the first: field | info ------------ f1 a f2 b f3 a etc. I would like to query the first table selecting the fields with a query on the second. So, for example, I might want to get data for fields where info is equal to "a", thus I would do "select f1, f3 from first_table". How do I do this programmatically? I was thinking about something along the lines of select (select fields from second_table where info='a') from first_table Thanks Chris

    Read the article

  • How do I simulate a progress counter in a command line application in Python?

    - by CRP
    My Python program does a series of things and prints some diagnostic output. I would also like to have a progress counter like this: Percentage done: 25% where the number increases "in place". If I use only string statements I can write separate numbers, but that would clutter the screen. Is there some way to achieve this, for example using some escape char for backspace in order to clear a number and write the next one? Thanks

    Read the article

  • Javascript html5 database transaction problem in loops

    - by Marek
    I'm hittig my head on this and i will be glad for any help. I need to store in a database a context (a list of string ids) for another page. I open a page with a list of artworks and this page save into the database those artowrks ids. When i click on an artwork i open its webpage but i can access the database to know the context and refer to the next and prev artwork. This is my code to retrieve the contex: updateContext = function () { alert("updating context"); try { mydb.transaction( function(transaction) { transaction.executeSql("select artworks.number from artworks, collections where collections.id = artworks.section_id and collections.short_name in ('cro', 'cra', 'crp', 'crm');", [], contextDataHandler, errorHandler); }); } catch(e) { alert(e.message); } } the contextDatahandler function then iterates through the results and fill again the current_context table: contextDataHandler = function(transaction, results) { try { mydb.transaction( function(transaction) { transaction.executeSql("drop table current_context;", [], nullDataHandler, errorHandler); transaction.executeSql("create table current_context(id String);", [], nullDataHandler, errorHandler); } ) } catch(e) { alert(e.message); } var s = ""; for (var i=0; i < results.rows.length; i++) { var item = results.rows.item(0); s += item['number'] + " "; mydb.transaction( function(tx) { tx.executeSql("insert into current_context(id) values (?);", [item['number']]); } ) } alert(s); } the result is, i get the current_context table deleted, recreated, and filled, but all the rows are filled with the LAST artwork id. the query to retrieve the artworks ids works, so i think it's a transaction problem, but i cant figure out where. thanks for any help

    Read the article

1