Search Results

Search found 302 results on 13 pages for 'alarm'.

Page 1/13 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • DIY Sunrise Alarm Clock Sports a Polished Build and Perfect Time Keeping

    - by Jason Fitzpatrick
    We’ve seen our fair share of sunrise simulators, but by far this one is the most polished build–everything from the atomic clock circuit to the LEDs are all packed cleanly in a frosted acrylic case. Renaud Schleck, the tinker behind the build, describes the guts: This is an alarm clock simulating the sunrise, which means that a few minutes before the alarm goes off, it shines some light whose brightness increases over time. The alarm clock is built around a MSP430G2553 microcontroller compatible with the MSP430 Launchpad from Texas Instrument. It features a DCF77 module which sets the clock automatically through radio waves. How to Factory Reset Your Android Phone or Tablet When It Won’t Boot Our Geek Trivia App for Windows 8 is Now Available Everywhere How To Boot Your Android Phone or Tablet Into Safe Mode

    Read the article

  • Morning Routine Is an Alarm Clock Deactivated via Barcode Scan

    - by Jason Fitzpatrick
    Android: If you have trouble getting out of bed in the morning, Morning Routine might be just the tool you need–an alarm clock that requires you to scan a barcode to deactivate it. Similar in concept to alarm clocks which require you to solve a puzzle to shut them down, Morning Routine requires you to get out of bed and scan a barcode/QR code to turn the alarm off. If you’re worried that’s not enough you can even set it up to require a sequence of scans. In addition, you can have the scan(s) open a URL to launch your favorite news site, web radio, or other resource that serves as part of your morning routine. Morning Routine is free for a limited time, Android only. Morning Routine [via Addictive Tips] How to Stress Test the Hard Drives in Your PC or Server How To Customize Your Android Lock Screen with WidgetLocker The Best Free Portable Apps for Your Flash Drive Toolkit

    Read the article

  • Dim an Overly Bright Alarm Clock with a Binder Divider

    - by ETC
    Love your alarm clock but hate how eye-searingly bright it is? Slice up a plastic binder divider to dim your alarm clock (or any other aggressively bright monochromatic display). At DIY site Curbly Chris Job shares a simple alarm clock hack. For years he had an alarm clock with a nice dim display. When it broke he went in search of a replacement but failed to find one that wasn’t . His solution came in form of a sliced up binder divider (the clear, usually tinted, plastic tabs you put in between paper in a binder). He sliced to fit the display, spritzed it with a little water to help it cling to the plastic, and pressed it in place. The plastic dims the display enough–as seen in the before/after picture above–that he doesn’t need to cover it up to get a good night’s sleep. Calm Your Alarm Clock’s Display and Sleep Better for 25¢ [Curbly] Latest Features How-To Geek ETC Have You Ever Wondered How Your Operating System Got Its Name? Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 Dim an Overly Bright Alarm Clock with a Binder Divider Preliminary List of Keyboard Shortcuts for Unity Now Available Bring a Touch of the Wild West to Your Desktop with the Rango Theme for Windows 7 Manage Your Favorite Social Accounts in Chrome and Iron with Seesmic E.T. II – Extinction [Fake Movie Sequel Video] Remastered King’s Quest Games Offer Classic Gaming on Modern Machines

    Read the article

  • Three Alternatives to Apple’s Flaky iOS Alarm Clock

    - by Jason Fitzpatrick
    If two iPhone alarm failures in less than three months (the Daylight Savings bug and the New Year’s bug) isn’t motivation to grab a 3rd party alarm app, we don’t know what is. Check out these feature-packed replacements for dependable time keeping. Latest Features How-To Geek ETC How To Boot 10 Different Live CDs From 1 USB Flash Drive The 20 Best How-To Geek Linux Articles of 2010 The 50 Best How-To Geek Windows Articles of 2010 The 20 Best How-To Geek Explainer Topics for 2010 How to Disable Caps Lock Key in Windows 7 or Vista How to Use the Avira Rescue CD to Clean Your Infected PC Luigi Installs Any OS on Google’s Cr-48 Notebook DIY iPad Stylus Offers Pen-Based Interaction on the Cheap Serene Blue Ubuntu Wallpaper for Your Desktop Enjoy Old School Style Video Game Fun with Chicken Invaders Hide the Twitter “Litter” in Twitter’s Sidebar Area (Chrome and Iron) Public Domain Day: Reflections on Copyright and the Importance of Public Domain

    Read the article

  • android alarm not able to launch alarm activity

    - by user965830
    I am new to android programming and am trying to make this simple alarm app. I have my code written and it is compiled with no errors. The app runs in the emulator, that is the main activity asks the date and time, but when i click on the confirm button, it displays the message - "Unfortunately, Timer1 has stopped working." The code for my main activity is as follows: public void onClick(View v) { EditText date = (EditText) findViewById(R.id.editDate); EditText month = (EditText) findViewById(R.id.editMonth); EditText hour = (EditText) findViewById(R.id.editHour); EditText min = (EditText) findViewById(R.id.editMin); int dt = Integer.parseInt(date.getText().toString()); int mon = Integer.parseInt(month.getText().toString()); int hr = Integer.parseInt(hour.getText().toString()); int mnt = Integer.parseInt(min.getText().toString()); Intent myIntent = new Intent(MainActivity.this, AlarmActivity.class); pendingIntent = PendingIntent.getService(MainActivity.this, 0, myIntent, 0); AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.DATE, dt); calendar.set(Calendar.MONTH, mon); calendar.set(Calendar.HOUR, hr); calendar.set(Calendar.MINUTE, mnt); alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent); } I do not understand what all the errors in logcat mean, so i am posting them: 06-25 16:03:32.175: I/Process(566): Sending signal. PID: 566 SIG: 9 06-25 16:03:53.775: I/dalvikvm(612): threadid=3: reacting to signal 3 06-25 16:03:54.046: I/dalvikvm(612): Wrote stack traces to '/data/anr/traces.txt' 06-25 16:03:54.255: I/dalvikvm(612): threadid=3: reacting to signal 3 06-25 16:03:54.305: I/dalvikvm(612): Wrote stack traces to '/data/anr/traces.txt' 06-25 16:03:54.735: I/dalvikvm(612): threadid=3: reacting to signal 3 06-25 16:03:54.785: I/dalvikvm(612): Wrote stack traces to '/data/anr/traces.txt' 06-25 16:03:54.925: D/gralloc_goldfish(612): Emulator without GPU emulation detected. 06-25 16:05:09.605: D/AndroidRuntime(612): Shutting down VM 06-25 16:05:09.605: W/dalvikvm(612): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 06-25 16:05:09.685: E/AndroidRuntime(612): FATAL EXCEPTION: main 06-25 16:05:09.685: E/AndroidRuntime(612): java.lang.NumberFormatException: Invalid int: "android.widget.EditText@41030b40" 06-25 16:05:09.685: E/AndroidRuntime(612): at java.lang.Integer.invalidInt(Integer.java:138) 06-25 16:05:09.685: E/AndroidRuntime(612): at java.lang.Integer.parse(Integer.java:375) 06-25 16:05:09.685: E/AndroidRuntime(612): at java.lang.Integer.parseInt(Integer.java:366) 06-25 16:05:09.685: E/AndroidRuntime(612): at java.lang.Integer.parseInt(Integer.java:332) 06-25 16:05:09.685: E/AndroidRuntime(612): at com.kapymay.tversion1.MainActivity$1.onClick(MainActivity.java:34) 06-25 16:05:09.685: E/AndroidRuntime(612): at android.view.View.performClick(View.java:3511) 06-25 16:05:09.685: E/AndroidRuntime(612): at android.view.View$PerformClick.run(View.java:14105) 06-25 16:05:09.685: E/AndroidRuntime(612): at android.os.Handler.handleCallback(Handler.java:605) 06-25 16:05:09.685: E/AndroidRuntime(612): at android.os.Handler.dispatchMessage(Handler.java:92) 06-25 16:05:09.685: E/AndroidRuntime(612): at android.os.Looper.loop(Looper.java:137) 06-25 16:05:09.685: E/AndroidRuntime(612): at android.app.ActivityThread.main(ActivityThread.java:4424) 06-25 16:05:09.685: E/AndroidRuntime(612): at java.lang.reflect.Method.invokeNative(Native Method) 06-25 16:05:09.685: E/AndroidRuntime(612): at java.lang.reflect.Method.invoke(Method.java:511) 06-25 16:05:09.685: E/AndroidRuntime(612): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 06-25 16:05:09.685: E/AndroidRuntime(612): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 06-25 16:05:09.685: E/AndroidRuntime(612): at dalvik.system.NativeStart.main(Native Method) 06-25 16:05:10.445: I/dalvikvm(612): threadid=3: reacting to signal 3 06-25 16:05:10.575: I/dalvikvm(612): Wrote stack traces to '/data/anr/traces.txt'

    Read the article

  • DIY Sunrise Simulator Combines Microchips, LEDs, and Laser Cut Goodness

    - by Jason Fitzpatrick
    Sunrise simulators use a gradually brightening light to wake you in the morning. Check out this creative build that combines a microprocessor, addressable LEDs, and a nifty laser-cut bracket to yield a polished and wall-mountable alarm clock lamp. Courtesy of NYC-based tinker Holly, the project features a detailed build guide that references all the other projects that inspired her sunrise simulator. Hit up the link below to check out everything from her laser cut shade brackets to the Adafruit module she used to control the light timing. Sunrise Lamp Alarm Clock [via Make] How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • How to handle Alarm notification in Android?

    - by Asheesh Vashishtha
    Hi, I'm developing an media player application for Android, for which I need to handle any Alarm notification, and based on that I'll pause my playback. When the Alarm in snoozed or dismissed, I'll then resume the playback. I googled a lot for the Alarm handling, but what I found was the way to enable Alarm notifications through code, set the intent and then handle it. However, no where could I locate just handling the Alarm notification part. I don't need to set the Alarm on, it could've been set by the user, and I don't need to programmatically. All I need is just handle that notification. Any ideas on this would be extremely useful? Thanks, Asheesh

    Read the article

  • A more elegant way to start a multithread alarm in Rebol VID ? (What's the equivalent of load event?

    - by Rebol Tutorial
    I want to trigger an alarm when the GUI starts. I can't see what's the equivalent of load event of other language in Rebol VID, so I put it in the periodic handler which is quite circumvoluted. So how to do this more cleanly ? alarm-data: none set-alarm: func [ "Set alarm for future time." seconds "Seconds from now to ring alarm." message [string! unset!] "Message to print on alarm." ] [ alarm-data: reduce [now/time + seconds message] ] ring: func [ "Action for when alarm comes due." message [string! unset!] ] [ set-face monitor either message [message]["RIIIING!"] ; Your sound playing can also go here (my computer doesn't have speakers). ] periodic: func [ "Called every second, checks alarms." fact action event ] [ either alarm-data [ ; Update alarm countdown. set-face monitor rejoin [ "Alarm will ring in " to integer! alarm-data/1 - now/time " seconds." ] ; Check alarm. if now/time > alarm-data/1 [ ring alarm-data/2 ;alarm-data: none ; Reset once fired. ] ][ either value? 'message [ set-alarm seconds message ][ set-alarm seconds "Alarm triggered!" ] ] ] alarm: func[seconds message [string! unset!]][ system/words/seconds: seconds if value? 'message [ system/words/message: message ] view layout [ monitor: text 256 "" rate 1 feel [engage: :periodic] button 256 "re/start countdown" [ either value? 'message [ set-alarm seconds message ][ set-alarm seconds "Alarm triggered!" ] set-face monitor "Alarm set." ] ] ]

    Read the article

  • Programmable Home Security Alarm [closed]

    - by stej
    I don't ask for recommendation! (just wanted to say that; anyway it doesn't matter now as the question is closed) I've seen some advertisements about home alarms that notifies me that something is happening in my house. None of them mentioned programmability (with real programming language like e.g C, assembler, whatever). As a programmer I'd like to have a possibility to add some behaviour, that is not part of the alarm itself. This might be: take snapshots of all cameras in a house and send it to some email send email, twitter message, skype message to some predefined account send email to a police (silly, I know) start turning the lights on and off (scary, right?) etc. (would be veeery challenging with assembler, I know; but lets suppose I can use some more high level language) I don't expect that there is a alarm system capable of this stuff, that's why I'm looking for a programmable module. Question: Is it even possible? Is it good idea (my program could crash and cause instability of the system).

    Read the article

  • BroadcastReceiver not receiving an alarm's broadcast

    - by juanjux
    I have a code that sets a new repeating alarm (on production I'll use a inexactRepeating), but the BroadCastReceiver I've registered for handling it is not being called. Here is the code where I set the alarm: newAlarmPeriod = 5000; // For debugging Intent alarmIntent = new Intent(this, GroupsCheckAlarmReceiver.class); PendingIntent sender = PendingIntent.getBroadcast(this, Constants.CHECK_ALARM_CODE, alarmIntent, 0); AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE); am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + newAlarmPeriod, newAlarmPeriod, sender); It seems to work and it triggers and alarm every five seconds, as seen in the output of "adb shell dumpsys alarm": DUMP OF SERVICE alarm: Current Alarm Manager state: Realtime wakeup (now=1269941046923): RTC_WAKEUP #1: Alarm{43cbac58 type 0 android} type=0 when=1269997200000 repeatInterval=0 count=0 operation=PendingIntent{43bb1738: PendingIntentRecord{43bb1248 android broadcastIntent}} RTC_WAKEUP #0: Alarm{43ce30e0 type 0 com.almarsoft.GroundhogReader} type=0 when=1269941049555 repeatInterval=5000 count=1 operation=PendingIntent{43d990c8: PendingIntentRecord{43d49108 com.almarsoft.GroundhogReader broadcastIntent}} RTC #1: Alarm{43bfc250 type 1 android} type=1 when=1269993600000 repeatInterval=0 count=0 operation=PendingIntent{43c5a618: PendingIntentRecord{43c4f048 android broadcastIntent}} RTC #0: Alarm{43d67dd8 type 1 android} type=1 when=1269941100000 repeatInterval=0 count=0 operation=PendingIntent{43c4e0f0: PendingIntentRecord{43c4f6c8 android broadcastIntent}} Broadcast ref count: 0 Alarm Stats: android 24390ms running, 0 wakeups 80 alarms: act=android.intent.action.TIME_TICK flg=0x40000004 com.almarsoft.GroundhogReader 26ms running, 2 wakeups 2 alarms: flg=0x4 cmp=com.almarsoft.GroundhogReader/.GroupsCheckAlarmReceiver But for some reason my BroadCastReceiver is not being called when the alarm is triggered. I've declared it on the Manifest: <receiver android:name=".GroupsCheckAlarmReceiver" /> And this is the abbreviated code: public class GroupsCheckAlarmReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, "XXX Alarm worked.", Toast.LENGTH_LONG).show(); Log.d("XXX", "GroupsCheckAlarmReceiver.onReceive"); }

    Read the article

  • NSTimer as Alarm

    - by huntaub
    Is the best practice of setting an alarm on OS X to create a NSTimer scheduled for the number of seconds between the current time and the desired time for the alarm, or is there an alternative to that method?

    Read the article

  • developing daily alarm in android

    - by zoza
    I have this piece of code that fire the alarm once by setting a time and date using the TimePicker and the DatePicker in another activity. i want to modify it in a way that whenever i set a time and a date it will fire the alarm everyday at the same time. in other words i want the alarm to be fired dialy public class M_ReminderManager { private Context mContext; private AlarmManager mAlarmManager; public M_ReminderManager(Context context) { mContext = context; mAlarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); } public void setReminder(Long reminderId, Calendar when) { Intent i = new Intent(mContext, Medicines_OnAlarmReceiver.class); i.putExtra(RemindersDbAdapter.KEY_ROWID_MEDS, (long)reminderId); PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, i, PendingIntent.FLAG_ONE_SHOT); mAlarmManager.set(AlarmManager.RTC_WAKEUP, when.getTimeInMillis(), pi); } } i have tried using setRepeating function but i dont know how exactly i should set the attributes i used this line instead of the set fuction on the code but it didn't work: mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, when.getTimeInMillis() ,AlarmManager.INTERVAL_DAY , pi); can someone help me with it? thanks in advance,

    Read the article

  • iCal CalDAV multiple alarm notification

    - by user13332755
    In case you work with Apple iCal CalDAV Client you might noticed an issue with several alarm notification was send / received. So Alice add Calendar of Mike in iCal, Mike created an event with email alarm notification for Tom. Guess what, Tom will receive an email alarm notification from Mike and Alice. So whenever you add Calendars which are not your own Calendar in iCal you should use the Option Ignore Alarms

    Read the article

  • C# Simple Event Handler for Setting Alarm

    - by yeeen
    Why does the following line "alarm.AlarmEvent += new AlarmEventHandler(alarm_Sound);" gives me "An object reference is required for the non-static field, method, or property 'AlarmClock.Alarm.alarm_Sound(object, System.EventArgs)'" public static void Main(string[] args) { Alarm alarm = new Alarm(new DateTime(2010, 4, 7, 23, 2, 0)); alarm.Set(); alarm.AlarmEvent += new AlarmEventHandler(alarm_Sound); } Full source code here: Program.cs AlarmEventArgs

    Read the article

  • alarm clock for iphone

    - by Joy
    I am looking to develop an alarm clock for iphone. But i came to know that i can't run application in the background. So is there any other way to do that job. Please help me cause i'm in serious problem. Thanks in advance

    Read the article

  • want to build an alarm app in iphone.

    - by Sumit Kr Singh
    Hi, I want to build an alarm application for iphone. I want to ignore iphone device state and volume buttons state. I want to play sound anyhow in full volume and also want that user cant modify volume using iphone hardware buttons while sound is played. Does anybody know how to implement it? Please post the code here....... Thankx in Advance.......

    Read the article

  • Android repeating alarm not working

    - by erdomester
    This works fine: Intent intent = new Intent(HelloAndroid2.this, AlarmReceiver.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(HelloAndroid2.this, 0, intent, PendingIntent.FLAG_ONE_SHOT); AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (12 * 1000), pendingIntent); This doesn't work. I hear the alarm only time. alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (12 * 1000), 3 * 1000, pendingIntent); I have also tried this, no luck: Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.SECOND, 5); alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 7000, pendingIntent); What is the problem?

    Read the article

  • AWS Elastic load balancer doesn't decrease instances from Alarm Trigger

    - by jchysk
    I have a load balancer that I created an auto-scaling-group and launch-config for. I created the auto-scaling-group with a min-size of 1 and max size of 20. I have a scaledown policy: as-put-scaling-policy SBMScaleDownPolicy --auto-scaling-group SBMAutoScaleGroup --adjustment=-1 --type ChangeInCapacity --cooldown 300 Then I set up an alarm: mon-put-metric-alarm SBMLowCPUAlarm --comparison-operator LessThanThreshold --evaluation-periods 1 --metric-name CPUUtilization --namespace "AWS/EC2" --period 600 --statistic Average --threshold 35 --alarm-actions arn:aws:autoscaling:us-east-1:policystuffhere:autoScalingGroupName/SBMAutoScaleGroup:policyName/SBMScaleDownPolicy --dimensions "AutoScalingGroupName=SBMAutoScaleGroup" When average CPU usage over 10 minutes is under 35, in CloudFront the alarm shows up as "In Alarm State" but doesn't decrease the number of instances. Also, if there's only one instance running it'll spin up another to 2 even if a scale up alarm isn't hit. It seems like the default value is just set to 2 somehow. How can I change this?

    Read the article

  • BroadcastReceiver not triggered by Alarm

    - by Ezekiel Buchheit
    I am trying to set up an alarm that will run in the background and trigger (eventually) a save event. At the moment I simply have this code attached to a button. Press the button and the alarm should start leaving Toast messages behind as an indication that it is functioning. At the moment everything runs except the onReceive in the BroadcastReceiver is never triggered. Here is my code: The class setting up the alarm: //FIXME - rename (ie BackgroundSave; more descriptive) public class AlarmReceiver extends Service{ //FIXME - make sure you kill the service public void onCreate() { super.onCreate(); Toast.makeText(getApplication().getApplicationContext(), "Service onCreate called", Toast.LENGTH_SHORT).show(); } @Override public int onStartCommand(Intent intent, int flags, int startId) { Toast.makeText(getApplication().getApplicationContext(), "Service started", Toast.LENGTH_SHORT).show(); setAlarm(AlarmReceiver.this); // We want this service to continue running until it is explicitly // stopped, so return sticky. return START_STICKY; } public void setAlarm(Context c) { AlarmManager alarmManager = (AlarmManager)c.getSystemService(Context.ALARM_SERVICE); Intent i = new Intent(c, Alarm.class); PendingIntent pi = PendingIntent.getBroadcast(c, 0, i, 0); alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, System.currentTimeMillis() + 1000, 1000, pi); Toast.makeText(c.getApplicationContext(), "setAlarm called", Toast.LENGTH_SHORT).show(); } public void cancelAlarm(Context context) { Intent intent = new Intent(context, Alarm.class); PendingIntent sender = PendingIntent.getBroadcast(context, 0, intent, 0); AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); alarmManager.cancel(sender); } @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub return null; } } Here is the BroadcastReceiver: public class Alarm extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, "Alarm", Toast.LENGTH_SHORT).show(); } } And here is my manifest: <!-- Alarm --> <service android:name="com.xxxx.android.tools.AlarmReceiver" android:enabled="true" /> <receiver android:name="com.xxxx.android.tools.Alarm" ></receiver> The alarm onReceive is never triggered.

    Read the article

  • Issue in setting alarm time in AlarmManager Class

    - by Anshuman
    I have used the following code in setting alarm time in AlarmManager class. Now Suppose my device current date 9-july-2012 11:31:00, Now suppose i set set a alarm at 9-july-2012 11:45:00, then it works fine and pop-up an alarm at that time. But if i set an alarm at 10-aug-2012 11:40:00, then as soon as exit the app the alarm pop-up, which is wrong because i set an alarm at month of august, So why this happen, is anything wrong in my code. if anyone knows help me to solve this out. Code For Setting Alarm time in AlarmManager class Intent myIntent = new Intent(context, AlarmService.class); PendingIntent pendingIntent = PendingIntent.getService(context, i, myIntent, i); AlarmManager alarmManager = (AlarmManager)context.getSystemService(AlarmService.ALARM_SERVICE); Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.MILLISECOND, (int) dateDifferenceFromSystemTime(NoteManager.getSingletonObject().getAlarmTime(i))); alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent); public static long dateDifferenceFromSystemTime(Date date) { long difference = 0; try { Calendar c = Calendar.getInstance(); difference = date.getTime() - c.getTimeInMillis(); if (difference < 0) { // if difference is -1 - means alarm time is of previous time then current // then firstly change it to +positive and subtract form 86400000 to get exact new time to play alarm // 86400000-Total no of milliseconds of 24hr Day difference = difference * -1; difference = 86400000 - difference; } } catch (Exception e) { e.printStackTrace(); } return difference; } Service class which pop-up alarm when matches time public class AlarmService extends IntentService { public void onCreate() { super.onCreate(); } public AlarmService() { super("MyAlarmService"); } @Override public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent, startId, startId); return START_STICKY; } @Override protected void onHandleIntent(Intent intent) { startActivity(new Intent(this,AlarmDialogActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); } }

    Read the article

  • PERC 5/i Enable alarm on disks failures

    - by Andy M
    I'm trying to enable one the alarm of my server's raid controller PERC 5/i. Using this documentation, under the chapter Audible Alarm Warnings, it's explained that enabling an audible alarm is allowed in order to quickly spot failures on my hard disks. My trouble is that when entering the disk controller configuration (Ctrl+R at boot time), I'm able to set up lot of things but I cannot navigate to Enable Audible Alarm. I have : Enable Controller BIOS Enable Alarm Enable BIOS stop on Error I can navigate with my arrow keys to both the first and third items, but I cannot navigate to or select the second! It's not greyed out, and seems like I should be able to select go on this entry, but my cursor keep skipping it. Any ideas about what I'm missing here?

    Read the article

  • How can I terminate a system command with alarm in Perl?

    - by rockyurock
    I am running the below code snippet on Windows. The server starts listening continuously after reading from client. I want to terminate this command after a time period. If I use alarm() function call within main.pl, then it terminates the whole Perl program (here main.pl), so I called this system command by placing it in a separate Perl file and calling this Perl file (alarm.pl) in the original Perl File using the system command. But in this way I was unable to take the output of this system() call neither in the original Perl File nor in called one Perl File. Could anybody please let me know the way to terminate a system() call or take the output in that way I used above? main.pl my @output = system("alarm.pl"); print"one iperf completed\n"; open FILE, ">display.txt" or die $!; print FILE @output_1; close FILE; alarm.pl alarm 30; my @output_1 = readpipe("adb shell cd /data/app; ./iperf -u -s -p 5001"); open FILE, ">display.txt" or die $!; print FILE @output_1; close FILE; In both ways display.txt is always empty.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >