When using SqlConnection, it's important to always close it when used - either by .Close() or placing the SqlConnection in a "using". Unfurtunately, people, including myself, tend to forgot that and this is where the garbage collectors rescues me for a while until i've forgot to close my connections too many times or the number of people...
Some minutes ago I tried to create a time job
A added some properties like
this.Properties.Add("fileName", fileName);
this.Properties.Add("username", new NetworkCredential("username", "passworD");
After updating the job a get a critical error in the Timer Job list of the Central Administration occured.
The platform does not know how...
I created a timer job (via Feature Deployment) that creates a file in hostserver´s filesystem.
private static void myMethod(Byte[] results, string fileName)
{
using (FileStream stream = File.OpenWrite(fileName))
{
stream.Write(results, 0, results.Length);
stream.Close();
stream.Dispose();
}
}
als...
Hello all.
I'm rewriting a VB 6.0 program in C# .Net for an internship. It measures incoming data from a precision grinding machine and gives a readout on its accuracy. A lot of the meat of the program is done within a Timer object, with an interval of 10. The program is unfinished, so it has yet to be tested on an actual machine, but ...
My Flex app seems to have different frame rates in Chrome and Firefox. I have a preloader that is essentially a splash screen that fades away with a Timer, and it is this part that has the noticeable frame rate difference--it fades away faster in Firefox. The odd thing is that any Timers I'm using in the rest of the app seem to behave un...
I´m currently writing a software in Ansi-C and are struggling to get one of the basic functionality to work.
The software will receive messages over a CAN-network and when these messages arrive, I need to make sure that they are delivered before a expected time and after the previous message.
Only unsigned variables are allowed to be u...
Hi,
I'm working on a simple web service which exports data from some data store into the database.
The service runs every 20 seconds (testing interval).
Intervals are implemented through System.Timers.Timer class.
What is happening at the moment is:
Service starts
Timer starts
20 seconds pass and service starts the export
Export do...
In my Android app, I have some data that needs to be synced daily but also needs to be updated every hour when a user is inside the app.
I have already implemented a service that gets called from an alarm for the daily update. Im having a problem with developing a strategy to do the hourly sync. I could use an hourly alarm too and fire ...
I am looking to create timed events which trigger UI changes (like a Toast) on Android. I already know you can do this with a Handler object's postDelayed(runnable, timeDelay) method (see this page for a great example).
Here is the twist: I also need to be able to pause and resume the countdown for these events. So when a user pauses th...
I have a function called goRight() which does some stuff when I click a div called "goright".
I want to make it so that when I hover over the div "goright" it will call the function repeatedly (with a small delay) for as long as I'm hovering, and then do nothing and stop once i move the mouse away.
I have experimented with setInterval ...
Hello.
Using Cocos2D, is it possible to create a button which constantly triggers when being touched, instead of triggering just once?
I'm happy to have a timer which does the repeat trigger, so I guess another question is can I use a touch removed with a Cocos2D menu button?
Cheers. :-)
...
Hi Everyone,
I’m trying to make a counter which shows the number of days until we leave on a trip to Europe. It’s only about 70 days (as of today) so I don’t believe that I should have to worry about astronomically large numbers or anything, but I really am stumped - I’ve attached the code that some friends have given me, which don’t wo...
I've seen some examples of code where StoryBoard is used as Timer, such as:
void Update()
{
if (_sb == null)
{
_sb = new Storyboard();
_sb.Completed += _sb_Completed;
_sb.Duration = new Duration(TimeSpan.FromSeconds(1));
}
if (_sb_completed)
{
_s...
Hello
I have a working script like this:
jQuery(document).ready(function(){
$('.video-thumb img').bind('mouseover',function(){
var new = $(this).attr('src').replace(/default.jpg/,'1.jpg');
$(this).attr('src',new);
}).bind('mouseout',function(){
var default = $(this).attr('src').replace(/[0-9].jpg/,'defa...
when i'am calling timer1.Start() func in an event handler that contains two adjacent if blocks, its tick events doesn't fire and the code following it also doesnt get executed.
on the othr hand, using an if-else pair instead solves the problem. why it can be so??
...
Hi,
I have a basic question regarding timers. My timer is acting very strange. I am trying to make the tick occur every millisecond to update my data. I can get it to work with seconds, it seems, but not milliseconds..
I am using WPF and am wondering why the following is not functioning correctly.
It appears that the "second" countdow...
Hi
I want to know how to stop a specified function's execution within a specified time in java.
For example: I may call a function called print_data(). If it takes more time to execute, I will have to stop that function's execution.
Is it possible to stop the execution like this?
Thanks in advance
...
Hey there
I've experience this problem in many forms.
public function startTimer() {
timer = new Timer(3000);
timer.addEventListener(TimerEvent.TIMER, timerTick, false, 0, true);
timer.start();
}
private function timerTick(e:TimerEvent) {
var bubble = new Bubble();
this.addChild(bubble);
}
Bubble gets removed from the disp...
Hi
Im developing the java Email application with Timer, I have a two arraylists named ActiveProcesses,InActiveProcesses. If I start the Timer it will send the Email with InActiveProcesses list values for every seconds. But the problem is the timer is sent the Email if the InActiveProcesses list values is same.For Example the InActive...
How do you make a event-driven program where the execution of the main flow is suspended whenever an event is raised and handled, until the event handler finishes?
I created the following program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
namespace EventTest
{
class P...