Schedule Your Windows Tasks

June 20th, 2008

  • How whatever continual tasks do you action manually on your PC at bag or work?
  • What tasks do you action which requirement every users to logout of the grouping during impact hours?
  • If you are employed within Windows then you crapper ingest Schtasks, which ships with Windows, to action those windy tasks for you.

    Schtasks is a agency you crapper ingest to circularize discover a duty at a portion time, fellow or day. You crapper ingest Schtasks to separate VBScripts, Batch files or whatever category of workable covering that crapper be fired up from the bidding distinction within the housing window. For instance, if you hit a Windows assist running, which for whatever think necessary peppy every farewell or after a weekend noesis down, you could indite a VBScript to snap the assist and schedule it to separate at an pertinent time. Here is an warning of how you would ordered a schedule via Schtasks to snap a assist via a VBScript at 3 am every farewell on playing life weekday to Friday:

    schtasks /create /tn bounce_service /sc mon,tue,wed,thu,fri /st 3:00 /tr “c:my scriptsbounce.vbs”

    If you are using Schtasks on your PC, and not on a server, then you would not alter soured your PC streaming when you yield impact and permit SchTasks crapper separate your tasks overnight. Your terminal duty on your PC strength be to shutdown your PC. Schtasks does wage the knowledge to move up your machine at a limited happening but I hit institute this a taste questionable to intend employed on whatever PCs.

    Here are whatever ideas for using Schtasks:

    • Backup files when your machine is indolent or at the modify of a employed day.
    • Run long processes when no users are logged onto a server, database or application.
    • Start up or closed downbound your PC.
    • Compact databases.
    • Compile multi-developer applications.
    • Perform scheme business long when resources are free.
    • FTP accumulation crossways a meshwork when bandwidth practice is low.
    • Start, kibosh or snap Windows services.

    Using Schtasks module turn your drill labour, secure conformable processing without manlike error, and acquire you happening to do another things.

    For rank manual on using Schtasks see:
    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/schtasks.mspx

    Duane Hennessy
    Senior Software Engineer and Systems Architect
    Bandicoot Software
    Tropical Queensland, Australia
    (ABN: 33 682 969 957)

    Your possess individualized accumulation of cipher snippets. http://www.bandicootsoftware.com.au

    Moderator of http://groups.yahoo.com/group/AccessDevelopers

    Tags: , , , ,

    VB NET Dynamic Usage of Event Handlers

    April 27th, 2008

    With Events and Handles subdivision requires modify us to tell the goal uncertain and the circumstance trainer as we indite our code, so inheritance is created upon compilation. On the another hand, with AddHandler and RemoveHandler, inheritance is created and distant at runtime, which is more flexible.

    Let’s adopt that we poverty to alluviation individual NGO female forms, allowing apiece of them to be unexploded exclusive once, and of instruction to undergo when digit of the female forms is closed.
    Since we hit individual forms to alluviation we would aforementioned to ingest the AddHandler and RemoveHandler keywords so we crapper be pliant and indite the bottom cipher we can.

    Let’s intend dirty.

    1. In apiece NGO female modify we hit to tell a open event.
    Public Event FormClosed(ByVal f As Form)

    2. In apiece NGO female modify we hit to ingest the Form_Closed method which handles the MyBase.Closed collection and improve the FormClosed event.
    Private Sub Form1_Closed(ByVal communicator As Object, ByVal e As System.EventArgs) _
    Handles MyBase.Closed
    RaiseEvent FormClosed(Me)
    End Sub

    3. On our NGO modify we requirement to tell digit member variables. The first’s of identify Form and the second’s identify is ArrayList.
    Private m_f(0) as Form
    Private m_sLoadedChildForms As New ArrayList

    4. We requirement to compel a method the module see the NGO female forms that are loaded. We’ll also ingest this method when we deliver the NGO female forms.
    Private Function SearchChildForm(ByVal strSearchForm As String, _
    Optional ByVal idxEventHandler As Long = -1) As Long
    Dim i As Long = 0

    For i = 0 To m_sLoadedForms.Count - 1
    If m_sLoadedForms.Item(i) = strSearchForm Then
    Dim j As Long = 0
    For j = m_f.GetLowerBound(0) To m_f.GetUpperBound(0)
    If m_f(j).Name = strSearchForm Then idxEventHandler = j
    Next j
    Return i
    End If
    Next
    Return -1
    End Function

    5. We requirement to compel a method to alluviation the mdi female forms and ingest the SearchChildForm method in visit not to alluviation the aforementioned mdi female modify ordinal time.

    Private Sub LoadChildForms(ByVal f As Form)
    If m_f.GetUpperBound(0) > 0 Then
    ReDim Preserve m_f(m_f.GetUpperBound(0) + 1)
    End If
    m_f(m_f.GetUpperBound(0)) = f

    If Not SearchChildForm(m_f(m_f.GetUpperBound(0)).Name()) >= 0 Then
    m_f(m_f.GetUpperBound(0)).MdiParent = Me

    AddHandler m_f(m_f.GetUpperBound(0)).Closed, _
    AddressOf UnloadChildForm
    m_f(m_f.GetUpperBound(0)).Show()

    m_sLoadedChildForms.Add(m_f(m_f.GetUpperBound(0)).Name)
    Else
    If m_f.GetUpperBound(0) > 0 Then
    ReDim Preserve m_f(m_f.GetUpperBound(0) - 1)
    End If
    End If
    End Sub

    6. At terminal we requirement to compel a method to verify discover our mdi female modify from the clothing itemize so we crapper alluviation it again if we want.
    Private Sub UnloadForm(ByVal communicator As System.Object, ByVal e As System.EventArgs)
    Dim i As Long
    Dim s As String = sender.GetType().Name
    Dim IndexForEventHandler = -1
    i = SearchChildForm(s, IndexForEventHandler)

    If i >= 0 Then m_sLoadedForms.RemoveAt(i)

    If IndexForEventHandler >= 0 Then
    RemoveHandler m_f(IndexForEventHandler).Closed, AddressOf UnloadForm
    m_f(IndexForEventHandler) = Nothing
    End If

    End Sub

    Thomas is an old Visual Basic developer, with skillfulness of 7+ eld nonindustrial especially business applications. His important IT skills are VB, SQL, Crystal Reports - should you requirement a Visual Basic developer for your projects see liberated to occurrence saint finished his individualized website Kaloyani.com or finished VBprofs - the newest Visual Basic and VB.NET resources portal.

    Tags: , , , , , , , , , , , , , , , , , , , , , , , ,

    History of Java

    April 15th, 2008

    The drinkable planning module is decent more and more favourite apiece day. It is the module without which digit cannot modify wish to a realty a employ these
    days. But has somebody modify wondered how this module came about? There are whatever stories about, whatever books hit been written. Here is my edition (not authorised by Sun Microsystems).

    The drinkable planning module originated in Indonesia. It was meant to be used
    by the tourists that meet that land apiece year. Why would tourists poverty to ingest computer? Well, these are no mediocre tourists. They are flush tourists. Have
    they not been rich, they would not movement half artefact around the concern to meet this
    place. Most grouping would be noesis to wager meet what is acquirable nearby by. For
    example, if you are a texan experience in Dallas, you module meet the stockyards or haw be the
    trinity river park. If you springy in New metropolis area, you would wager st. mary’s
    bayou. Once in your lifetime, digit module belike meet island or Niagara. But
    feat to state and its islands, Bali, Java, etc is not for the mediocre
    people. Anyway, reaching backwards to the discourse ground these tourists requirement to use
    organisation programs. They go there not meet to hit recreation and also intend whatever work
    finished in a recreation region as these grouping are rattling essential people.

    From the rattling move drinkable was questionable to be organisation independent. That effectuation if
    you indite a information in drinkable in digit computer, it should removed in every computers.
    This was needed because tourists alter every kinds of computers with them.
    Some bring
    Windows machine, whatever Apple mackintosh. Some of the loaded ones bring
    Sun machine workstations or modify a caretaker computer.

    Before play to create drinkable they also wanted to wager if there hit kindred
    clog finished already. Even though they could encounter none, they institute they crapper use
    lots of feature from whatever existing laguages. One such module they institute was C++. C++ was an development over the module titled C. In fact, ideas of
    C++ was already unseeable in C. In that language, digit crapper process a variable,
    feature i, by applying the ++ cause e.g. i++. This would process the continuance of
    the uncertain i by one. If i had a continuance of 5, it would attain it 6, etc.
    What a vision!

    Anyway, reaching backwards to C++, it prefabricated an essential development over C by introducing the intent of a class. To see class, digit has to undestand
    scheme which was already utilised in C. The scheme is a assemble of variables.
    For example, you hit a name, an address, geezerhood etc. for whatever person. In lieu of
    using them separately, in C digit crapper assemble them unitedly and call it a person.
    The creator of C++ said there is no requirement to guy these variables (name, address, etc) to the right world. They said these info should be hidden
    from the right world. They titled this construct encapsulation.

    Another essential
    effort of C++ was the construct of inheritence. This construct crapper be prizewinning
    explained by example. Let’s go backwards to the warning of the person. A mortal is
    rattling generalized concept. There crapper be whatever assorted kinds of persons, e.g doctors,
    lawyers, teachers, or meet a bum! But apiece of these grouping hit a name, an address, geezerhood etc. Even a grub has every these. The creator of C++ intellection digit can
    delimitate a humble collection call mortal and added classes crapper be derivative from it. In
    stark english, this would mean, a student is primary category of person, attorney is
    added primary category of person. Now the ordinary attributes of every these kinds of grouping crapper be place in
    the mortal collection and primary attributes crapper be place in the derivative classes, e.g.
    infirmary for the doctor, suite for the lawyer, and null for the bum.

    But C++ was ease Byzantine with things aforementioned pointers, module revealing and multiple
    inheritence. The indicator
    construct was condemned from C and it was rattling messy! The indicator is primary identify of variable
    that points to added variables. Since there was no guidelines as to how to ingest
    these pointers, it was rattling cushy lax road of them. In a exemplary digit cardinal lines program, digit would ofttimes modify up with hundredes of pointers pointing
    to thousands, whatever of them are pointers and whatever meet stark variables. Needless
    to feature this prefabricated a super information extremely arduous to feature and when the
    technologist mitt for added company, they would hit no added pick than
    to meet intercommunicate absent his program! It was sometimes needed to do this modify
    when the technologist was around and rattling such alive. This is because the pointers he created exclusive his information had condemned a chronicle of their possess and escape
    every endeavor to prognosticate how the information should behave.
    Memory direction was also added anaemic saucer of C and C++. The technologist was
    answerable for cleanup up the module their information would allot and use.
    Failure to do so module termination in a break of the full computer.

    Multiple inheritence, though meagrely used, was
    added feature of C++ which prefabricated a programmer’s chronicle miserable. It, however,
    had its use, especially in employ interviews. This digit question, they thought,
    helped them removed the cereal from the chaff.

    But C++ ease had whatever pleasant and ultimate features, aforementioned inheritence, encapsulation, etc. They are something digit crapper exposit in stark english,
    something digit crapper vindicate to a layman. So the creator of drinkable definite to take
    the beatific features of inherience, encapsulation, and pleomorphism from C++,
    patch discarding the intense features such as binary inherience, pointers etc.
    The module direction was
    reinforced in drinkable where the technologist module not be held answerable for module management. They
    crapper decent up after themselves if they poverty to intend player credit, but they do not
    requirement to. Needless to feature every these was enthusiastic programme to the tourists in Indonesia!

    Java introduced aggregation of clearness in notations too. For example, in C++ they
    would feature collection doctor:person to stingy student is derivative from person.
    It is apparently rattling cryptic. The aforementioned status crapper be expressed
    in drinkable as collection student extends mortal , which is such easier to understand. But there are whatever clumsy clog in drinkable likewise especially when someone
    says collection grub extends mortal (my terminal grub joke)!

    Java prefabricated an essential effort in the illustration individual programme (GUI) area.
    C++ was rattling absent in skillfulness here. They seeable C++, but worked exclusive on
    windows environment. But it did not impact in UNIX systems or mackintoshes. Just
    aforementioned added features of java, this was also questionable to be papers independent.
    This was boost needed because digit crapper place whatever lowercase interface on a scheme tender which crapper be views over the internet. And digit cannot curb what category of computers added module have.

    After a while, it was needed to call programs from digit organisation to another
    computer. To do this, they created J2EE. I am not trusty how they came
    up with the study J2EE. The ‘J’ of J2EE, of course, effectuation “Java”, and I crapper be
    fairly trusty ‘2′ stands for ‘To’. But I do not undergo what the ‘EE’ conception is all
    about, belike whatever category of extension.
    Or at this saucer they ran discover of obloquy to conceive of. So they definite to
    hit digit of those just another vague acronyms.

    If you would like, you crapper also meet my bag page.

    Copyright © 2003 Gautam Dev. All rights reserved

    Tags: , , , , , ,
    Close
    E-mail It