Labview novice with a question about scanning strings

Hello, I'm a research assistant tasked with taking data received via TCP-IP and plotting it. I've had a couple of problems, probably because I've never used Labview before.
The data is sent in sets of six values separated using semicolons as delimiters, for example
"0.086842;0.00020341;0.00039838;-0.14057;-0.12614;​-0.1327;" is one such data set
Receiving these strings through TCP connection is working just fine, however I just noticed that after passing a string such as my example into a 'Scan String for Tokens' block, the negative signs are dropped from the latter three values. I assumed it has something with setting '-' as an operator, but simply wiring negative sign in as an operator didn't change anything. I know there has to be a way to retain my negative signs, but I can't figure it.

Is this what you need?
Attachments:
SNAG-002.jpg ‏91 KB
SNAG-003.jpg ‏20 KB

Similar Messages

  • HT4972 Good afternoon! I addressed in the AT&T company with a question about untying of a sim card of AT&T from my iPhone, all of them made Iphone now is unlocked, I executed all points which were written: To complete the unlock, simply  1 . Open iTunes o

    Good afternoon! I addressed in the AT&T company with a question about untying of a sim card of AT&T from my iPhone, all of them made Iphone now is unlocked, I executed all points which were written:
    To complete the unlock, simply
    1 . Open iTunes on your Mac or PC and verify that you have Internet connectivity.
    2 . Ensure a SIM card is inserted into your iPhone.
    3 . Connect your iPhone using the dock connector to USB cable that came with your iPhone.
    4 . Backup and restore your iPhone using iTunes. For information on backup and restore, please visit http://support.apple.com/kb/HT1414.
    5 . After restoring, your iPhone will be unlocked.
    Additional information on unlocking can be found at http://support.apple.com/kb/TS3198
    I made everything as well as was written, but on completion of the ios 6.1.3 installation the iPhone asks to be activated through wifi or through a wire to the computer.
    I connected Iphone to the computer and the text takes off: (Were sorry, we are unable to continue with your activation at this time. Please TR again later, or contact customer care! )
    how to me to activate my iPhone?
    I hope for your help....

    Hey APPLELovestory,
    We have an article that goes over troubleshooting iPhone activation issues here:
    iPhone: Troubleshooting activation issues
    http://support.apple.com/kb/TS3424
    Perform the following steps:
    Restart the iPhone.
    Try another means of reaching the activation server and attempt to activate.
    Try connecting to Wi-Fi if you're unable to activate using a cellular data connection.
    Try connecting to iTunes if you're unable to activate using Wi-Fi.
    Restore the iPhone.
    If you receive an alert message when you attempt to activate your iPhone, try to place the iPhone in recovery mode and perform a restore. If you're still unable to complete the setup assistant due to an activation error, contact Apple for assistance.
    Hope that helps,
    David

  • I got an answer and I replied with a question about the answer, does no show in unanswered

    I got an answer and I replied with a question about the answer, does no show in unanswered questions. I guess replying was not the way to get another anwer, How do I do that?
    He said - Certain Firefox problems can be solved by performing a Clean reinstall. This means you remove Firefox program files and then reinstall Firefox.
    I want to know - Will I still have my bookmarks, history, addons, plugins, etc.? I do not know what plugins and such that I had. What about my pinned tabs and my tabs that where open.
    More information - When I try to start Firefox I keep getting the message that I need to restart my computer in order to complete a previous update attempt. I had Sweetpacks on my PC and I do not know where it came from, it took over my home page in Internet Explorer and Ithink caused the issue with Firefox.
    Should I do the clean install or try starting Firefox now.

    Could you please stay in the thread where you posted the question and reply there instead of opening a new thread?
    Locking this thread, so please continue here:
    *[[/questions/968194]]
    See also:
    *[[/questions/968222]]
    You won't lose bookmarks and other data in the Firefox profile folder as long as you do not remove personal data in case you uninstall Firefox.
    See also:
    *http://kb.mozillazine.org/Profile_backup
    *https://support.mozilla.org/kb/Backing+up+your+information
    You can open the Properties of the Firefox desktop shortcut via the right-click context menu and check the "Compatibility" tab.<br />
    Make sure that all items are deselected in the "Compatibility" tab of the Properties window.

  • Where 2 go for help with some questions about a logo design?

    I'm an absolute novice Illustrator user (CS4). Im doing a web site for a mate and he's given me a logo that I have made a vector drawing of. It was black and white, and I made it coloured but I have discovered that colour gets difficult when you go for grayscale! You all knew that, didn't you?
    I'm not putting the logo up here because I don't want to ask a question that's too far off the purpose of the board. So, if I can't show it here can anyone suggest another forum where people do that kind of stuff and are kind to novices please?
    Many thanks
    Martin
    Well, having a look around I think I might not be going to far off by asking so...
    http://www.imagesandwords.org.uk/test/illylogo.html
    Anything really, but bear in mind It's very like the original except it had no style, no color and less er.. precision

    >How can I make the logo better for colour and B&W?
    As I understand it, you are troubled -- among many things -- by the lack of differentiation among the spheres when you convert to grayscale. Is that correct?
    If so, there are some things to consider. For example, the original uses only two attributes -- color and size -- to differentiate the spheres. Otherwise, you have the same shapes and the same gradient fills (other than base color).
    When you remove color from the equation, you're left with only one differentiating attribute: size. Not surprisingly, you find yourself facing a dull uniformity -- the monotonicity produces monotonousness. Now, the challenge is to add back some differentiating features.
    Not a whole lot of choices here. You can develop different gradient fills for a subtle effect, but you have to be careful: If the "lighting" changes dramatically among spheres, you'll end up with an unnatural look.
    You might consider forgetting about gradient fills altogether and go with solid or texture fills. Sometimes, simpler is better... especially with a logo.

  • Potential new T61 user with some questions about product/su​pport/etc.

    Hi all!
    I've been using Dell Latitude's for last 7+ years and been happy with them thus far, as I was able to stay within the C-series thru 3 systems and reuse some components such as batteries, CD-ROM, etc. but now that I'd have to go to D-series, that gives me the choice of going to new vendor...and IBM/Lenovo was the only other choice due to my OS requirement: XP Pro!
    So now I'm here asking some questions that I'm still having issues with:
    (I'm comparing the T61 to Dell D530 and/or my C610)
    1) Features that I've used on existing Dell that I don't see on T61 :
        a) Infared port --- I've used to transfer stuff from one sys to another
        b) S-Video out --- I've used to display on TV for some situations  
        c) Serial port --- can't recall using it but with my luck, I'd need it sometime. 
        d) Parallel port (C610) --- for my really old printer used on rare occasions
        e) Floppy drive --- yes, I still use it for some unusual situations
    2) On Dell, I can put a 2nd battery or floppy drive in the media bay instead of CD/DVD...what about T61?
    3) Support:
        a) Dell forums have 7+ yrs of history and are well used...this forum seems brand new...was there another one before it?
        b) My Dell's have lifetime tech support (ok, so sometimes understanding the folks from India can be an issue) but IBM seems to limit this to life of warranty.
    4) Pricing: T61 would be seem to be, at minimum, about $150 more than similar Dell even with current "sales"...I'm having trouble justifying this...
    5) Things that I see that T61 has that new Dell D530 doesn't:
       a)  built-in mike --- my current Dell has it and I use it now and then so this is a plus!
       b) keyboard light --- nice feature, but couldn't I use a USB one instead if I really needed it?
       c) fingerprint reader --- never used one...how often do people use it?
       d) 2nd card slot for Express cards --- current Dell has two standard slots and I'm using both, though one is wi-fi which C610 didn't have built-in...and other is modem to replace failed built-in...D530 has only one slot, so having 2nd of any type is good.
       e) middle mouse button --- is that what I'm seeing? Or is it something else?
       f) recovery partition --- ok, nice but how much room does it take?
    6) Things that D530 has that T61 doesn't:
       a) 4th USB --- I'm used to only 1 now so even 3 would be big step up...
       b) 15" standard screen --- T61 is only a 14.1" screen and that extra bit of size would likely help, but I'm limited on physical dimensions to 13.5" total width (unusual situation) so a 15.4" wide screen isn't possible...I'm looking at SXGA+ in either case to maximize usage.
       c) recovery CD is standard --- so I'm presuming I'd have to create my own here?
    That, I think, about does it...so...any users willing to help me decide if a switch is good for me?
    Thanks!!!
    Update: It seems that phone tech support is only available for warranty period with IBM, whereas with Dell, I can still call for hardware tech help (to diagnose problem at least) for "lifetime" or well past paid period, as I've already done in past...comments?
    Update #2: Changed the incorrect "R"s to "T"! Duh!
    Message Edited by J_Hallgren on 12-28-2007 07:50 PM
    A current Dell Latitute user who was looking to maybe switch...But didn't.

    I finally made the switch to Lenovo and the Thinkpad line of notebooks and think this was the best move I have ever made in years! I've spent far too much money maintaining a separate notebook (Dell Latitude L400) several custom built desktops.  This December, I sold my desktops, my laptops (I had 2 L400's), and my 20" Aquous LCD TV to finance my Thinkpad T61.  It was well worth it!  I will try to answer your questions in this checklist, which I found to be quite similar to my own .... frighteningly exactly like my own....:
    Hardware Requirements
    IR: This is pretty outdated but functional.  I used to use a Palm with IR as well as an IR laser printer.  I ditched both for a PDA phone with bluetooth.  The laser printer is networked now
    S-Video: You might be able to get away with a TV tuner cardbus or a expres card.  There might also be external converters that convert from your VGA/DVI (DVI via port replicator) into any variety of video outputs.
    Serial: My older Palm had a serial port for the docking station - bluetooth is a good replacement
    Parallel port: I currently have a USB to parallel adapter in my bag just in case.  These are cheap cables and work well.
    Floppy: I keep a USB one of these just in case.  I find that having fewer input devices on my laptop and leaving them external help keep the machine lighter for my mostly mobile usage (e.g., my L400 with no inputs at all except 1 USB port).
    T61 Spare Battery: Uses ultrabay battery - I rarely use the DVDRW drive and leave the ultrabay battery in there while on the go.  DVDRW drive stays in the bag until needed.  I recommend you upgrade to the 9 cell battery with the advanced ultra bay battery, which will give u something like 9 to 12 hours of operating life.  If you are not a fan of the battery pack sticking out like crazy, stick to the letter box format laptop (not widescreen), which will provide the minimum amount of battery pack stick-out with the 9 cell battery.  The 6 cell will not stick out with the letterbox laptop but will stick out with the widescreen version.
    Support Options:  I rarely call support so I have no opinion here.
    Pricing: Price was not really a concern for me.  I purchased mine for the business look mainly, which Lenovo maintained well.  I don't like the shiny/plastic/toy look of Dell and Apple computers these days.  If anything, consider the premium an investment in the build quality of these machines (or a premium just for the good looks).  I particularly like the roll cage as well as active protection system that stops the hard drive as soon as the system detects excessive motion. 
    Included Hardware Comparison:
    I like the mic, use it often for Skype and the built in 1.3MP webcam as well. 
    Keyboard light.... kinda cute but not as functional because it simply is too small.  It was a cute idea that could have been made better had Lenovo opted for a backlit keyboard instead.  That would have been more functional and added to the "cool" factor. 
    With regards to the Express Card and PCMCIA card slot, I rarely use either because everything is built in.  However, if you want that TV tuner, an express card or PCMCIA card slot is good.  If you opt for the built in media reader, you will be unable to use the express card as the media reader takes up that slot (I might be wrong, but I think the card reader is large enough that it takes up both slots, so u can't add anything anyway - but you should call pre-sales to answer that question). 
    Middle mouse button: The three buttons in the middle are used for the trackpoint/joystick mouse controller.  I think the middle button is configurable to do various things.  I personally hate the joystick and can only use the touchpad.  The lack of a touchpad was the only reason I did not stick to the smaller 12.1" X line of laptops, which was really more in tune with my size requirements (too used to using the L400 sized machine).
    Recovery Partition: This is a cheap way for manufacturers to make it easy for people to recover their systems in case of crash - without the need for any documentation or disc media.  However, it makes it hard for people like me who only use machines after a clean format and customized install of Windows.  This partition is about 10GB and can be erased with special disk format or partition tools.  Windows itself cannot read or delete this partition.  With the minimum size of the hard drives available, this should not be an excessive space killer for most people.  I personally need only 7GB total for OS and apps.  The remaining data I work with is actually streamed from a 500GB gigabit NAS.  I might switch to a 32GB solid state disk one of these days when their performance comes more in par or exceeds traditional drives.
    Recovery CD: You can create your own from the recovery partition since Lenovo does not provide any.
    4th USB: I only use 1 or 2 as well.  1 for an external micro mouse (I love my touchpad, but it's just hard to use with Photoshop or CAD apps) and a second for a USB memory key.  My other devices i.e., scanner, external mouse, keyboard, are plugged in on my desktop through a USB hub that goes to a single port on my docking station.  So yes, your docking station will probably remove the need for more than 2 ports.  Although, I do find it odd there are only 3 ports... such an odd number.
    Screen Size: I personally wish I could have gotten the X series of laptops but the 14.1 was the only other mobile solution.  For the larger screen size, docking station to my 24" Dell 2405FP.  The compact nature of the T series makes it pretty thin and compact though... it was not too much bigger than my L400 - at least, not uncomfortably bigger.
    But yeah, I think if you make the switch, you'll be getting yourself a solid machine that will keep u going for years.  The Latitude line of Dell's were really good, but overall, I feel that the nature of Dell's manufacturing process is making it too "cookie cutter" and reducing its overall quality level.  Their earlier lines were awesome, like the D lines you mentioned.  But unless you get the ATG line, you just won't get the same level of quality they used to offer (in addition, the ATG line is wickedly too expensive - I'd rather get a Durabook for military grade spec at a fraction of the price). 
    Anyway, have fun shopping! :-)
    And moderators or employees of Lenovo, don't you guys get referral bonuses for giving your employee discount code to friends and family?  *wink*
    T61_Wide | Model No. 7662 - CTO
    Core 2 Duo T7250 | 2GB OCZ DDR2-800
    82566MM Gigabit | 4965AGN Centrino Pro

  • There is a question about encode String

    hello
    i find a question when i decode java program at linux(redhat 7.3 Valhalla) and J2SDK 1.4.1_02.
    when i want to encode a String from GB2312 to UTF-16BE, the String used CJK and alpha bet mixed. the String length is error and can not convert success!
    from API documents, the string length when count the CJK character ,2 bytes count to 1,but there is 2! for example ,when i encode a CJK character to a UTF-16BE,when the string length is 1.then in the UTF-16BE should be 1,but there is not 1 but 2!!!:(
    by the way ,when my code run at windows2000,it's right!! no error!
    to everyone:what should i do ? is it a bug in j2sdk1.4.1_02?

    There are multiple 16-bit Unicode encodings, i.e.,
    UTF-16
    UnicodeBigUnmarked
    UnicodeLittleUnmarked
    UnicodeBig
    UnicodeLittle
    with/without BOM (byte order mark).
    Try these at a time, or confirm the unicode encoding used on an OS by the following.
    System.out.println(System.getProperty("sun.io.unicode.encoding"));

  • Question about scanned books

    i have dozens of scanned books that ive downloaded from internet some of them are 250 pages long
    i want to print some of in booklets and the larger ones god willing i will bind etc etc.
    the problem is that two there are two scanned sheets per page, i need an option on acrobat to split the pages in half. is there a easy work around to manipulate large pdfs
    (document assembly is allowed on the ebooks)

    Typically you might crop all the pages for odd and print or redax to a new PDF. Repeat the crop for the other side (even), then recombine them. I think I have read about some 3rd party products that will do what you want.
    In Acrobat, the recombination is the issue. It can probably be automated with JavaScript.

  • Teacher with a question about projectors

    I teach in the philadelphia school district. The district has spent millions on online resources with multimedia references that go along with the curriculum but we don't have projectors so we can't utilize them. What is the cheapest way I can go about buying a projector for my class? (under 200) I have been watching ebay and I almost bought a Proxima 2800 for around 100 dollars but was not sure if it would work with my macbook. Thanks for any tips.

    dford425 wrote:
    First i have a question, can i make a .jar file that can run on a computer without JRE installed. No, not unless you package the JRE with your dist. Hence the name JRE (Java Runtime Environment).
    And if i can, how do i make it. I have tried to make it on my computer, that has JRE but i keep getting the error when i run it: Exception in thread "main" java.lang.NoClassDefFoundError: Sample\FileSearch
    That simply means your not pointing the runtime to the classes. Set your CLASSPATH environment variable correctly and it will run (given you have a JRE which it appears you do).
    And im using the command:
    jar cvfm jarname.jar directory\manifest.txt directory\FileSearch.class directory\FileNode.classIt says it creates the .jar but is unable to run it.

  • I am a Tiger user, with a question about Leopard's smart folders!

    Hello!
    I starting toying with smart folders under Tiger. It is my understanding that smart folders under Leopard have some different/improved features.
    What I was wondering is, is there a way to EXCLUDE a certain string of alpha-numerics as a refining search parameter? I am looking to better sift through Logic Pro projects and it would be amazing if I could weed out any project that had ".0" in the project name (to weed out the backup projects while still finding showing the core Logic projects).
    It would be very helpful to know if this is possible before I finally make the plunge into Leopard. Also, knowing might dictate how I am overhauling the organization of my files right now, at this time. Thanks!

    wow that is weird. Because I know that in tiger, you can check box as many folders as you like to be included in the search. In leopard, i guess they want you to have one smart folder for every folder you want to search the contents of?
    Hopefully, people can get around that by just consolidating some of the folders (putting folders within folders) that they wanted to search through one smart folder.
    But anyway, that is great news about the option to EXCLUDE! Tiger's is definitely missing that. I searched for Name Extensions that are ".logic", but that also gets me tons and tons of project backups. Those backups all have a number, such as ".01" or ".02" interjected before the ".logic" extension. Excluding ".0" would hopefully not include a file such as this one "mysong.01.logic"
    Thanks for your help! I will look forward to this working in Leopard!

  • NEED HELP WITH A QUESTION ABOUT PURCHASING A NEW IPOD AFTER GIVING MY OLD

    IPOD TO MY SON. IT WAS FILLED WITH 3600 SONGS AND I STILL HAVE THOSE SONGS IN MY ITUNES LIBRARY. MY QUESTION IS CAN I BUY A NEW IPOD AND LOAD IT ON COMPUTER USING MY ITUNES LIBRARY--I MEAN WILL ITUNES AND MY COMPUTER RECOGNIZE THE NEW ONE. IF NOT, WHAT CAN I DO? JEFF

    You should be fine, just make sure the new one has the current firmware, dock it to the computer, & away you go.
    Please kill the "caps lock" key when posting, it's considered to be shouting & it's rude. Thanks.

  • Help with a question about making/running .jar files.

    First i have a question, can i make a .jar file that can run on a computer without JRE installed. And if i can, how do i make it. I have tried to make it on my computer, that has JRE but i keep getting the error when i run it: Exception in thread "main" java.lang.NoClassDefFoundError: Sample\FileSearchAnd im using the command:
    jar cvfm jarname.jar directory\manifest.txt directory\FileSearch.class directory\FileNode.classIt says it creates the .jar but is unable to run it.

    dford425 wrote:
    First i have a question, can i make a .jar file that can run on a computer without JRE installed. No, not unless you package the JRE with your dist. Hence the name JRE (Java Runtime Environment).
    And if i can, how do i make it. I have tried to make it on my computer, that has JRE but i keep getting the error when i run it: Exception in thread "main" java.lang.NoClassDefFoundError: Sample\FileSearch
    That simply means your not pointing the runtime to the classes. Set your CLASSPATH environment variable correctly and it will run (given you have a JRE which it appears you do).
    And im using the command:
    jar cvfm jarname.jar directory\manifest.txt directory\FileSearch.class directory\FileNode.classIt says it creates the .jar but is unable to run it.

  • Question about scanning

    Hi I'm trying to scanto email or even to computer and it wont do it . It keep saying " Unable to connect to Web Services. " but I was able to do it before and now I can't get it to scan at all. Please help. 
                       Thank you

    Hello @Mary258 ,
    Welcome to the HP forums.
    I understand that you are having a problem with the scan to email feature on your Photosmart 7520.
    I would like to help.
    Seems like you have two issues.
    Scan to computer should not be effected by the Web Services.
    It could be a network issue.
    For the scan to computer try the Print and Scan Doctor.
    For the scan to email try a manual DNS.
    The following post by @happytohelp01 , has some good steps on how to do this.
    Efax 7510 still won't work after turning off/on ePrint several times
    I know its for a 7510 but the steps should be the same.
    If that does not work reboot your network.
    Turn the printer and the computer off.
    Unplug the power cord to the router.
    Wait a minute then plug the power back into the router.
    Turn the printer back on.
    When the blue wireless stops blinking try the scan to email.
    Please let me know how things work out.
    Aardvark1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

  • New Member but with a question about my Predator and erecovery disks

    So far I have tried several routes to recover my Predator AG-3620 desktop and so far it's been a "fail"each time. Originally tried to go with the recovery from the USB (will not accept USB for some odd reason),then decided, okay, let's get the erecovery disks from Acer (system specific) and they arrive scratched. Nogo there,...Acer sends a second good set and I go about the recovery steps and get a "Install incomplete. Windowsfailed to fully,..." Sooo, figure okay MAYBE, just maybe, it's the HDD,...go get a NEW HDD, and attempt anotherrun of restore,...again, no go. By this time I am really flustered,...(I've done recoveries on other systems, noproblem) SO I come up on Acer community in the Predator (Gamers) area and get a few good Ideas,...but nonehelp as I still have a dead (in my mind, you can't use it, it's dead) desktop that is a FANTASTIC system,...butnow I am having to resort to using the wife's laptop to look for ANY way I can get my system back up andrunning. I have checked cables, memory, and even gone the Ubutu route and Microsoft sys software down loadjust to get to Windows so I can get that puppy up and going again.  ANY help is appreciated at this point and I mean ANY!!! Please save me from this Compac Celeron Laptop I amhaving to deal with in the meantime!!!

    Hiya!
     It would only use data when either you initiate the data (either connecting to the browser or other apps, or manually poll your email) or when your device pulls the email.
    Now there are many variables to how much data is used, but in my travels of the interwebs, I have come across This data calculator which should help a bit. I'm with Rogers and don't use that carrier, but the tool works nonetheless.
    Hope that helps
    1). Please thank those who help you by clicking the beside the 'Reply' button.
    2). If your issue has been solved, please resolve it by marking "Accept as Solution" on the correct post!
    3). Remember to have fun! We are all in this together!
    4). Follow me on

  • [SOLVED] dm-crypt with LUKS, questions about Pam mount

    Hello archers,
    recently i switched to an encrypted home partition on my laptop.
    /dev/sdb2 has been encrypted with
    cryptsetup options luksFormat /dev/sdb2
    After booting i login as root, and do the following:
    cryptsetup --allow-discards luksOpen /dev/sdb2 home
    mount -o defaults,nodev,nosuid,noatime,discard /dev/mapper/home /home
    I want to use pam_mount to automate the luksOpen and mount commands when i login as user.
    The wiki says
    archwiki wrote:It is probably necessary to change both /etc/pam.d/login and the file for your display manager [...]
    As the wiki does not say how to change the login file, and i do not use a login manager, i am a bit lost here.
    Also i do not know where to add the --allow-discards option.
    What i have done so far:
    * changed my users password to be identical to the luks passphrase
    * edited /etc/security pam_mount.conf.xml as by the wiki
    (* encrypted the partition)
    If you have already done this, your comments are much appreciated.
    Last edited by teateawhy (2013-10-02 14:46:33)

    vacant wrote:
    Strike0 wrote:Is there a specific reason you want to do it via pam-mount and not the normal way to let it automount via crypttab?
    I'm not the only user on my old laptop so I don't want it stopping to ask for a passphrase if someone else switches it on. Also, I leave it around running transmission overnight, downloading to a shared multimedia directory. Using pam_mount, I can log out leaving my stuff encrypted (though as I said, the umount doesn't always work).
    Before when I was the only user, I used lvm on luks - single password to unlock everything on boot, so I didn't use crypttab then either.
    Without going in too much detail: pam-mount is user-specific, meaning it will mount something for that one specific user. The OP was about the entire /home partition, which usually holds all of the user directories. And when it comes to LUKS, once unmouned the partition is unaccessible, leaving it "hidden" from all other applications, including a possibly backgrounded transmission (there may be your reason why the unmount did not work sometimes - a partition, in general, cannot be unmounted while there are opened files there).
    -m.

  • Help me with some question about Worker/Service/Task in JavaFx 2

    I have read some articles in the forum adout mutithreading in JavaFx2, and now I know if I want to do some long-run jobs, i should use Service/Task.
    But my application needs a function like this:
    1. here is a long-run job(something like getting data from database or other resources);
    2. If I clicked a button, then the job started and get the data.
    3. When the job is done, I show the data in the tableview of my JavaFx application.
    4. then the job waiting some random time(such as 100 seconds).
    5. then the job started again automaticlly.
    so, the steps are 2->3->4->5->3->4->5->3->4->5->........
    so, the important things is that the job runs many times automaticlly.
    I know I should implements the job as a Service or Task in javaFx, But where should I put my "while(true){ job.start();sleep(random_time);}" loop code to make the job start automaticlly after some random sleep time.
    I wonder what is the best practice for this use case.
    My english is poor, but i hope you can understand what i'm dealing with.
    Thank you very much!
    Edited by: user9529194 on 2011-12-18 下午8:20

    Hi,
    Based on the response from John,
    I think you can acheive the functionality as below.
    // Creating the tableview.
    TableView<Person> personTable = new TableView<Person>()
    // Instantiating the personlist.
    ObservableList<Person> persons = FXCollections.observableArrayList();
    // Setting the list to the table.
    personTable .setItems(persons)
    final Button button = new Button("Refresh");
    final Timeline repeatTimeLine = new Timeline(
          new KeyFrame(Duration.seconds(100), new EventHandler<ActionEvent>() {
                @Override
             public void handle(ActionEvent event) {
                    // Call the service method to update the list.
                       PersonService.updatepersons(persons );
    button.setOnAction(new EventHandler<ActionEvent>() {
         @Override
         public void handle(ActionEvent arg0) {
                 repeatTimeLine.setCycleCount(Timeline.INDEFINITE);
                 repeatTimeLine.play();
    });And in the Service class...
    public void updatepersons(final ObservableList<Person> persons){
              final Task<List<Person>> getPersonTask = new Task<List<Person>>() {
              @Override
              protected List<Person> call() throws Exception {
                   return getPersonService().getPersons();
         getPersonTask .stateProperty().addListener(new ChangeListener<State>() {
              @Override
              public void changed(ObservableValue<? extends State> arg0, State arg1, State newState) {
                   switch (newState) {
                   case SUCCEEDED:
                        persons.clear();
                        persons.addAll(getPersonTask .getValue());
                        break;
                   case FAILED:
                        break;
         ThreadManager.getInstance().schedule(this.getClass(), getPersonTask );
    }I hope this code can give you some idea.
    Happy Coding !! :)

Maybe you are looking for

  • How to pair a new remote for Apple TV First Gen Without the Old Remote?

    We bought the first generation apple tv when it first came out. When we got it, it came with the old small plastic remote. A few years back we lost the plastic remote and decided to one of the new metal remotes but 1 problem. We can pair the new remo

  • How do you make a field in RBKP mandatory

    Hi. I need to make ESRNR and ESRRE fields in RBKP mandatory. But before then, were do you check if this fields are optional, mandatory or supressed. In other words where do you check the fields status group on this field. Thanks

  • Error message after connecting my iPod to my comp

    I got this error message when I 1st connected my iPod Shuffle to my new computer. "Exception Processing Message 0xc0000013 Parameters 0x75CF023C 0x997B3364 0x75CF023C 0x75CF023C" Previously my iPod was link with another iTunes Library (my old comp, r

  • OAYB transaction - taking the configuration off

    Hello! Has someone used the OAYB transaction (Limiting transaction type groups)? If so, would someone let me know if there is any problem if I take out the "Asset under construction" class already existing there, so that I avoid recording down paymen

  • Options to open a published InfopPath 2013 template in InfopPath 2013 designer?

    Hello, Using SharePoint 2013, I have an InfoPath form template published to a form library. The form is browser based. How can open the template again in InfoPath Designer? Thank you,