Search Results

Search found 4 results on 1 pages for 'pica'.

Page 1/1 | 1 

  • grep 5 seconds of input from the serial port inside a shell-script

    - by pica
    I've got a device that I'm operating next to my PC and as it runs it's spitting log lines out it's serial port. I have this wired to my PC and I can see the log lines fine if I'm using either minicom or something like: ttylog -b 115200 -d /dev/ttyS0 I want to write 5 seconds of the device serial output to a temp file (or assign it to a variable) and then later grep that file for keywords that will let me know how the device is operating. I've already tried redirecting the output to a file while running the command in the background, and then sleeping 5 seconds and killing the process, but the log lines never get written to my temp file. Example: touch tempFile ttylog -b 115200 -d /dev/ttyS0 >> tempFile & serialPID=$! sleep 5 #kill ${serialPID} #does not work, gets wrong PID killall ttylog cat tempFile The file gets created but never filled with any data. I can also replace the ttylog line with: ttylog -b 115200 -d /dev/ttyS0 |tee -a tempFile & In neither case do I ever see any log lines logged to stdout or the log file unless I have multiple versions of ttylog running by mistake (see commented out line, D'oh). I have no idea what's going on here. It seems to be a failure of redirection within my script. Am I on the right track? Is there a better way to sample 5 seconds of the serial port?

    Read the article

  • Google remodèle les paramètres de confidentialité de Buzz, suite aux plaintes essuyées

    Mise à jour du 06.04.2010 par Katleen Google remodèle les paramètres de confidentialité de Buzz, suite aux plaintes essuyées Suite au mécontentement de certains de ses utilisateurs, allant jusqu'à une plainte aux Etats-Unis, Google Buzz va se doter d'une nouvelle page de réglage. Depuis hier, les usagers du service verront apparaître un écran de validation de leurs réglages utilisateurs, et ils devront confirmer ou modifier les paramètres concernant les informations personnelles qu'ils partagent via Buzz. Un peu comme les paramètres de confidentialité de Facebook, ce panneau de contrôle permettra de définir qui peut suivre le compte, la diffusion des données, les liens avec Pica...

    Read the article

  • Executing in java code an external program that takes arguments

    - by rmaster
    Process p; String line; String path; String[] params = new String [3]; params[0] = "D:\\prog.exe"; params[1] = picA+".jpg"; params[2] = picB+".jpg"; try { p = Runtime.getRuntime().exec(params); BufferedReader input = new BufferedReader (new InputStreamReader(p.getInputStream())); while ((line = input.readLine()) != null) System.out.println(line); input.close(); } catch (IOException e) {System.out.println(" procccess not read"+e);} i don't get any error, just nothing in cmd.exe prog.exe is working fine What to improve in order to make this code working?

    Read the article

  • How to calculate the height of the text rectangle from an NSString?

    - by mystify
    I know there is this one: sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode: But since the CGSize always has the same height and doesn't adjust to any shrinked text or whatsoever, the CGSize is not telling how heigh the text is. Example: Make a UILabel with 320 x 55 points and put a loooooooooooooong text in there. Let the label shrink the text down. Surprise: CGSize.height remains the same height even if the text is so tiny that you need a microscope. Ok so after banging my head against my macbook pro which is half way broken now, the only think that can help is that nasty actualFontSize. But the font size is in pica I think, it's not really what you get on the screen, isn't it? When that font size is 10, is my text really 10 points heigh at maximum? Once in a while I tried exactly that, and as soon as the text had a y or some character that extends to below (like that tail of an y does), it is out of bounds and the whole text is bigger than 10 points. So how would you calculate the real text height for a single line uilabel without getting a long beard and some hospital experience?

    Read the article

1