Wire-2nd week homework 1 clarification

The duties States:

The second thread starts print messages when the first thread is on an odd interval (ending 5): 12:05, 12:15, etc. This thread will print a message every 30 seconds. This thread illustrates the use of a task interval spaced - for example, a job where you want to collect readings over a period of time to illustrate a rate of change.


Just so I'm clear, the second thread is triggered to begin printing of messages once and only once, namely when the first thread reaches the first minute '5' end (i.e. 5% min == 0), Yes?  After that, he keeps on printing messages every 30 seconds?  There is no trigger "switch off", OK.


Thank you


Brent S


Brent & Henry - salvation

The way I wrote homework, it is certainly open to interpretation!

My solution is consistent with the interpretation of Henry.  Only works the second thread that displays a message every 30 seconds

5 minutes (10 messages).

The output looks like this (example):

Departure time: 14:05:35

Time: 14:10

Time: 14:15

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

Time: 14:20

Time: 14:25

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

To listen...

Time: 14:30

But it is not really a good or bad way.  The point of the homework is exploring using wire or timers.

Tom

Tags: Java

Similar Questions

  • Problem with week exercise

    Hello

    If I run select to_char (sysdate, 'YYYYWW') of 201410 is double, how get 201411

    If I start running from Wednesday I get the correct value

    Select to_char (sysdate + 2, 'YYYYWW') of double

    Example of

    Date jan 1, 2, 3, 4, or 5 falls is 1st week exercise

    Date jan 6, 7, 8, 9, 10, 11, 12 falls in 2nd week exercise

    for example, mar 10, 11, 12, 13, 14, 15 16, fall in the 11th week exercise

    Appreciate your help

    Thank you...

    Hello

    You can use 'IW' instead of format "WW".

    To_char (dt, 'YYYYIW')

    Week 1 in the format "WW" begins January 1, no matter what day of the week that is be.  If 1 January is be a Wednesday, then every week this year that begin Wednesday.

    Week 1 in the format "IW" begins the Monday closest to January 1.  Every week starting Monday, no matter what day of the week of January 1.

  • Week number and day

    Hello

    I'll try to find the week of the month and the day of the week by

    Select to_char(sysdate,'w') and to_char(sysdate,'d') of the double that gives me 1 (week) and 2 (day of the week)

    sysdate is Jan 05,2009.

    For to_char (sysdate, 'w') it takes 1 Jan as the 1st day of the week and so to sysdate Jan 05,2009 it is show week 1.

    But you do not have to to_char(sysdate,'d') that the output should be 5

    Or, if it appears to_char(sysdate,'d') such as sysdate then 2 Jan 05,2009 should come in 2nd week.

    Sorry, it's perhaps a stupid question for you guys but I'm new on this and all my calculations do not go.
    Help, please...


    Concerning
    Sagar

    Try user format ISO week 'IW' as

    SQL> select to_char(sysdate,'iw') , to_char(sysdate,'d') from dual
      2
    SQL> /
    
    TO T
    -- -
    02 2
    
    SQL> 
    
  • I've just updated to version 10 and want to downgrade to version 9. None of my security software is compatible with 10. Where can I download version 9. Version 3.6, which is available on the Web site, is more than I want to go. Thank you.

    See the question

    _nat_

    You're better off with almost nothing accept ZA and Kaspersky, both are absolutely the worst security editors to keep in touch with updates of Firefox this last year: everyone has had at least one add-on Firefox being several weeks or months of delay on the schedule of release of Firefox. It's almost as if they don't know week 18 of Firefox development process and they are waiting until their Firefox users complain of their shit doesn't work don't not with a version new version of Firefox, before even to think to do their updates. IMO, the smartest thing is to test the version of channel every night (first alpha stage 6 weeks) for compatibility issues once a week to see what problems may exist with their software, and once the new version hits the channel Aurora (2nd week alpha stage 6) begin to develop a plan calendar for what they should be fixed and begin to repair their stuff, while intensifying to test a little. Once the new version Beta 6 weeks channel hits they should be completed their corrections and expand their tests to include the combination of the Add - most popular add-ons used by Firefox users so that they can see all problem users could hit and fix what needs to be fixed before the release of the new version of Firefox.

    Another thing these security vendors could do is some clients do their beta testing to find flaws and weak spots in their substance, as organizations open source like Mozilla done with Firefox. While I'm not a professional software, I have 3 different versions installed Nightly that I 'test' a little almost every day for simple things and the Aurora version, as well as the beta version. The last 6 or 7 years old, I found 3 or 4 pretty serious flaws that I have filed bug reports, of which one resulted in developers providing a warning much sterner on the risk of data loss and the other Bug reports helped developers by making them aware of a potential problem early enough in development that is was difficult to avoid the issue I pointed out to them with some minor coding changes.

    Free or paid version, if these security companies will create and distribute a Firefox Add-on is the right thing to do to keep to date with Firefox, or they should just interrupt the add-on and we stop around jerks with their irresponsibility and their nonchalant attitude towards Firefox. Honestly, I miss the "good old days" when these security companies ignored Firefox and only support Internet Explorer.

    I use Avira Personal Free - http://www.free-av.com/ - who does not feel the need to develop Add-ons for Firefox which really don't add anything to Firefox and only provide a 'bells and whistles' version of something that is already integrated into Firefox. Good solid anti-virus protection that is updated twice a day.

  • Statellite M100 does not recognize USB storage devices or SD card

    I had problems with my laptop Toshiba Satellite M100 series read don't not Sandisk SD card in the camera to my son - is a 2 GB card and what I read online, maybe that is the problem BUT the laptop is also not reading any of my devices USB "stick". When I insert the SD card or a USB 'stick' he asks me to install the driver software that is simply stupid. I tried to connect the camera via a usb cable too and it does not recognize the device and still once, claims the driver software device.

    I looked on the toshiba site and have installed all updates that I thought may be justified, I'm also trying to run Windows update (at least every 2nd week anyway so it shouldn't be a problem). I am running Vista Home Edition (32 bit). The USB ports have certainly worked in the past, I don't really want to resort to execution of recovery discs if I have as I don't want to lose all the stuff I've stored.

    Question of the SD Card/USB seems to be a common one, but I can't find a specific patch to this topic or any other tech site, any suggestions?

    See you soon

    In your case, I would do two things.

    First: Check if a new BIOS is available. Search on the Toshiba site and do an update.

    Second: Reinstall the laptop with the recovery discs. I know that you will lose all the data, but you can save it to s DVD or external HARD drive.

  • battery not charging not - 17 "Macbook Pro late 2011

    Hi all

    so I'm OSX 10.11.3 on a Macbook Pro 17 "(dernier modèle fin 2011) 2.5 Ghz / 16 GB RAM / 1 TB SSD and 1 TB HD installed (not DVD player more)." I prefer the matte screen of 17 "to something more recent, so I would keep. I actually had two (the other is in early 2011 2.4 Ghz) only it showed graphic problems feared and died before Christmas, so I moved it.

    I have a problem of "load", most of the time the laptop is connected to a screen 27 "love at first sight and levied on it (I also tried 3 different Chargers there is no difference). The problem I describe happened first in 2nd week of January, I could not solve - in the end I swapped the battery of my 17 "2.4 Ghz for the new computer laptop dead and somehow successful to do work again... which leads me to believe that it's NOT the battery.

    The situation:

    The computer is connected to the power supply display and thunderbolt

    The magsafe plug LED is green

    the menu bar of battery icon shows less than 100% WAY (currently 50%)

    menu icon menu bar says:

    Battery won't charge

    Power source: power adapter

    most of the time since 10 January, everything's okay, battery drains a little / charge of kicking in / loading finished / battery drains a little etc...

    The problem:

    Sometimes the battery slowly drains that I continue to work and at one point the computer shut down hard.

    There is no warning, no pause to sleep... just BANG - OFF - black screen.

    I tried using different Chargers (up to 4) that work fine with my wife's cell phone and even the old 17 '' fresh.

    I tried:

    Restart

    reset the SMC according to here reset management system (SCM) controller on your Mac - Apple Support

    reset the Pram (although I think that it's now obsolete - right?) according to OS X Yosemite here: reset PRAM your computer

    repair permissions and the HD of the punt rescue partition (boot with Cmd - R)

    No change. I am now at 48% of the battery, I need to work and I'm at a loss to know how to keep this thing running...

    Any advice would be greatly appreciated.

    I'm about to use the old 17 "as a charger and keep battery (grand :-/) Exchange

    Made an end of 2011 still the Macbook Pro 17 "have a buffer battery?

    The little buggers the used to die after a few years and cause all sorts of funny behaviors?

    If yes where?

    I ordered a replacement battery, should happen tomorrow, we'll see if that helps, but I'm afraid, it will not. (after trying two different batteries AND batteries of charge actually in my old 17 '')

    Is any circuit board responsible for the charge of the battery which is not the motherboard? I could locate and use the one in my old 17 "...

    Once again, thx for all help.

    kind regards Jo

    greeny62 wrote:

    ...

    Made an end of 2011 still the Macbook Pro 17 "have a buffer battery?

    The little buggers the used to die after a few years and cause all sorts of funny behaviors?

    If yes where?

    ...

    They have not an accumulator (PRAM).

  • HP g62-340us: FIND THE DATE OF MANUFACTURE for a HP G62-340US?

    How to find the date of manufacture on my HP G62-340US

    Ken

    Hi, Ken

    This means that your laptop has built in 2011 (1) in the 2nd week of the calendar year (02) or January 2011.

  • results of system service

    my computer is only 3 months and within the 2nd week, I had a system service exception screen how can I fix this problem?

    Hello

    If your computer is only 3 months old and you have / had a problem in the second week, contact the manufacturer.

    It should be under warranty and you can get them to repair or replace.

    See you soon.

  • SP2... No more updates to date?

    I installed a windows vista home Basic... sp2 since I installed it I wonder why there are no more updates available since last few weeks, and since I installed sp2. Why? and thw windows update says "Windows is up-to-date.

    Updates are usually out of the 2nd week of each month.

    This is the security for December 2009 - bulletin
    http://www.Microsoft.com/technet/security/bulletin/MS09-Dec.mspx

    If it was longer that one then maybe reset Windows updates.

    How to reset the Windows Update settings?
    http://support.Microsoft.com/kb/971058 TaurArian [MVP] 2005-2010 - Update Services

  • error fatal c00000005

    I did a search on google to try & fix a fatal error that I get when I try to sync my I Phone 4 g to Photoshop Elements & was a registry cleaner to fix. Photoshop works so easy with my 3G phone, I upgraded to a 4G, I think it worked very well at the start, but the phone has slipped in a case & broken screen in the 2nd week. Apple has replaced the phone, but now it used to sync, I get an error fatal c00000005, address 7c911daa.  Leave a string in your forum on these registry cleaners, I see this is a scam & will not solve this problem, but no idea what I need to do to fix this?   Bill B

    Hello

    ·         What is the error message that you are experiencing with the error code?

    ·         This error occurs when you try to download the photos using your iPhone in Photoshop or any other camera too?

    It could be a problem with Photoshop Elements. I suggest you uninstall Photoshop of the system, and then reinstall it back and check if the problem persists. I also suggest you to contact Adobe.

    Adobe forums

    http://forums.Adobe.com/index.jspa

    I also suggest you to return the item mentioned below.

    iPhone, iPad and iPod touch: syncing photos via iTunes

    http://support.Apple.com/kb/HT4236

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.

  • Vista will not boot

    Since auto-updates 2nd week of February 2010, my PC will not boot.

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    And read this update problems:

    http://www.bleepingcomputer.com/tutorials/tutorial140.html

    Understanding Windows Update and Extras in Windows Vista at the link above.

     

    Remove the Vista updates; two ways to do this:

    1. a System Restore to before the updates:

    Click Start > programs > Accessories > system tools > System Restore > restore time/choose your own date > next

    If you use Norton, disable it before using the system restore.

    If it is impossible to enter the Normal Mode, do a Safe Mode system restore:

    Press F8 at the startup/power and the list of startup options, use THE ARROW key to select Safe mode > and then press ENTER.

    System restore steps according to the info above.

    Also:

    2. click on start > right click on computer > properties > Windows updates down the lower left corner > updates installed in the lower left corner in the next window

    > then click the one that you don't want > uninstall will appear at the top > uninstall it.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In addition, on the page where you clicked "Installed updates", click on change settings at the top left corner it

    > Change update settings in the next page of AutoUpdate to "check for updates but let me choose etc" > OK ".

    When you take a look at pending updates, you can either download/install them one at the time, namely the update causing you problems.

    > or if you do not need an individual > right-click on > UAC prompt > hide it

    See you soon.

    Mick Murphy - Microsoft partner

  • BlackBerry Curve 8310 Smartphones: Blackberry internet services are blocked

    I bought the curve 8310 unlocked phone, first week I am able to use internet services, but the 2nd week internet services are blocked, I contacted the service provide they said "this phone suspended by RIM" and has blocked my PIN code but they said IMEI number and PIN codes are valid. The salesman says this valid phone which is unlocked. My phone numbers IMEI and PIN code are

    IMEI: #.
    PIN: #.
    Please let us know the problem and the possible solution.

    EDIT: Remove personal information

    Hello and welcome to the Forums!

    FYI - these forums are a chain of support to users, not a conduct of user-to-RIM. Frontline for BB is, contractually, not provided by RIM. Companies and authorized resellers are responsible for the front line of official support to end users. It is possible to bypass your carrier and request direct assistance from the RIM, but this generates costs, since you are without your support contract with your carrier. The "Support & Services" tab to the top of the forum pages provide information on this subject. But, if you go through your carrier for support, they can degenerate into RIM without cost to you if they choose to.

    So, with all this, your line must stay with your carrier, so that they can worsen your case for you and find the answers you want without incurring costs to do. Don't forget to worsen after their initial support and up to their people to support BB... they generally have the best information that people from the front line.

    Good luck!

  • printing constantly number of copies after the driver update

    Hi HP

    HP Laserjet 1022n printer. Printing via LAN.

    Observed on two home computers da: Windows 7 32 bit. Windows Vista 32 bit. Windows fully updated by 2013 01/16.

    I let my updated driver via the optional push in Windows Update recently. (2nd week of January 2013)

    Now my printer print an unlimited number of copies, even if only one copy is selected. Exact same behavior on both aforementioned computers. When you look in the print queue in order to stop the waste of paper by cancelling the work, writing project flashes as if the continuous work return it yourself or something.

    Help, please!

    I can't always find the previous version of driver anywhere as it worked flawless.

    Kind regards

    Søren

    I've disabled 'bidirectional support' in the properties-> Ports and the problem seems to be resolved

  • Add column according to date

    Hello

    I want to add column as from Time_period conditon below

    If the review date is between the date of yesterday for a week, then it should display as "week1.

    If the review date is 2nd week, then it should display as "semaine2" and so on.

    I tried, but do not get the correct result.

    Can someone help me.

    Thank you

    with abc as

    (select 101 as id, to_date('21-JUL-2015','DD-MON-YYYY') as double union review

    Select 102, double union to_date('17-JUL-2015','DD-MON-YYYY')

    Select 103, to_date('13-JUL-2015','DD-MON-YYYY') of double union

    Select 104, to_date('12-JUL-2015','DD-MON-YYYY') of double union

    Select 105, double union to_date('01-JUL-2015','DD-MON-YYYY')

    Select 106, to_date('01-JUN-2015','DD-MON-YYYY') of double union

    Select 107, to_date('29-JUN-2015','DD-MON-YYYY') of double union

    Select 108, to_date('07-JUL-2015','DD-MON-YYYY') of double union

    Select 108, double to_date('03-JUL-2015','DD-MON-YYYY')

    )

    SELECT id,

    -case when trunc (review) between trunc (sysdate)-1 and trunc (sysdate)-7 then "week1.

    When trunc (review) between trunc (sysdate)-8 and trunc (sysdate)-15 then 'semaine2 '.

    When trunc (review) between trunc (sysdate)-16 and trunc (sysdate)-23 then "week3.

    Another 'other '.

    end as Time_period

    ABC

    Hello

    You must provide the lower date first in your between the declaration

    -case when trunc (review) between trunc (sysdate)-7 and trunc (sysdate)-1 then "week1.

    When trunc (review) between trunc (sysdate)-15 and trunc (sysdate)-8 then 'semaine2 '.

    When trunc (review) between trunc (sysdate)-23 and trunc (sysdate)-16 then 'week3.

    Concerning

    Marcus

  • Validation before the move to the new Record?

    I think it should be relatively simple, but I had no chance of finding a good example. (I'm very new to ADF, 2nd week of play with him)

    I created a simple form (af: form the tag) and adding a my control of data in as controls inputText field. I need to add more, but right now I would like to see a work.

    Then, I added the operations back and forward my data as command buttons control.

    When the user clicks command buttons, if the page has been changed, I will commit the changes before moving to the new record.

    I think I need to create a bean and call one of its methods to perform these actions, but I have not found a good example to do so. I don't know what is opposed to use to access the functionality needed from the bean.

    Here is my current form:
    <? XML version = "1.0" encoding = "UTF - 8"? >
    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
    < f: view xmlns:f = "http://java.sun.com/jsf/core" xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >
    < af:document title = "description.jsf" id = "d1" > "
    < af:messages id = "m1" / >
    < af:form id = "f1" >
    < table border = "0" style = "padding: 20px;" outline-style: none; margin: 0px; border-width: 0px; do-family: Arial, Helvetica, without serif. font-size: x-large; ">
    Description < tr > < td > < table > < /tr >
    < b >
    < td >
    < af:inputText value = "#{bindings." Simple Desc.inputValue}' = 'true '.
    required = "#{bindings." DESC.hints.Mandatory}.
    columns = "#{bindings." Desc.hints.displayWidth}.
    maximumLength = "#{bindings." DESC.hints.Precision}.
    shortDesc = "#{bindings." DESC.hints.ToolTip}"id ="it1.
    lines = autoSubmit "6" = "true" >
    < f: validator binding = "#{bindings." DESC. Validator} "/ >"
    < / af:inputText >
    < table >
    < /tr >
    < /table >
    < p / >
    < af:commandButton actionListener = "#{bindings." Previous.Execute text}"="previous ".
    Disabled = "#{!}" bindings. PartialSubmit Previous.enabled}"="true"id ="cb1"/ >
    < af:commandButton actionListener = "#{bindings." Next.Execute text}"="next ".
    Disabled = "#{!}" bindings. Next.Enabled}.
    partialSubmit = "true" id = "cb2" / >
    < / af:document >
    < / f: view >

    I would be grateful of any advice or suggestions people have.

    Add a button of validation to your page, then merge operations in a pod of support.
    See: https://blogs.oracle.com/shay/entry/doing_two_declarative_operatio

Maybe you are looking for