Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts

Friday, 29 June 2012

Virus and a Worm

Difference between a Virus and a Worm?

“Virus” has become a generic term that includes all the malicious ways your computer can be attacked.   

Viruses are distributed by making copies of themselves or replication.   

Sometimes the replication itself causes damage to your hard disk.  Sometimes the accumulative effect of replicating again and again disables the computer. 

A Virus is a program that piggy-backs on other programs. It can be attached to a Word or Excel file.  Each time the file is run, the virus runs too.  It attaches itself to other programs and continues to reproduce.

An Email virus is a special type of virus sent as an attachment to an email message.  It replicates by automatically mailing itself to everyone in the recipients email address book.  

A Worm uses computer networks to replicate itself.  It searches for servers with security holes and copies itself there.  It then begins the search and replication process again.

A Trojan Horse is a computer program masquerading as a game or a “cute” program.  However, when it runs it does something else - like erasing your hard drive or blocking your screen with a graphic will not go away.
Some viruses use several of these in combination to replicate themselves

Sunday, 25 March 2012

Excel and VBA

Excel and VBA


There is really only one way to master Excel VBA, and that is by doing it. 

Excel VBA, which stands for Excel Visual Basic for Applications, is the name of the programming language of Microsoft Excel. With Excel VBA you can automate a task in Excel by writing a so called Macro. This can save you a lot of time! More importantly there are certain things you cannot do with Excel alone. Excel VBA allows you to do these things in Excel.


excel-vba   Excel Macros (VBA) For beginners, intermediate and advanced users


MS_Excel_for_Chartered_Accountants

Read


How to create the sample function Called SpellNumber

  1. Start Microsoft Excel.
  2. Press ALT+F11 to start the Visual Basic Editor.
  3. On the Insert menu, click Module.
  4. Type the following code into the module sheet.

    --------------------------------------------------------------------------- 
    Option Explicit
    'Main Function
    Function SpellNumber(ByVal MyNumber)
        Dim Dollars, Cents, Temp
        Dim DecimalPlace, Count
        ReDim Place(9) As String
        Place(2) = " Thousand "
        Place(3) = " Million "
        Place(4) = " Billion "
        Place(5) = " Trillion "
        ' String representation of amount.
        MyNumber = Trim(Str(MyNumber))
        ' Position of decimal place 0 if none.
        DecimalPlace = InStr(MyNumber, ".")
        ' Convert cents and set MyNumber to dollar amount.
        If DecimalPlace > 0 Then
            Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
                      "00", 2))
            MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
        End If
        Count = 1
        Do While MyNumber <> ""
            Temp = GetHundreds(Right(MyNumber, 3))
            If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
            If Len(MyNumber) > 3 Then
                MyNumber = Left(MyNumber, Len(MyNumber) - 3)
            Else
                MyNumber = ""
            End If
            Count = Count + 1
        Loop
        Select Case Dollars
            Case ""
                Dollars = "No Dollars"
            Case "One"
                Dollars = "One Dollar"
             Case Else
                Dollars = Dollars & " Dollars"
        End Select
        Select Case Cents
            Case ""
                Cents = " and No Cents"
            Case "One"
                Cents = " and One Cent"
                  Case Else
                Cents = " and " & Cents & " Cents"
        End Select
        SpellNumber = Dollars & Cents
    End Function
          
    ' Converts a number from 100-999 into text 
    Function GetHundreds(ByVal MyNumber)
        Dim Result As String
        If Val(MyNumber) = 0 Then Exit Function
        MyNumber = Right("000" & MyNumber, 3)
        ' Convert the hundreds place.
        If Mid(MyNumber, 1, 1) <> "0" Then
            Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
        End If
        ' Convert the tens and ones place.
        If Mid(MyNumber, 2, 1) <> "0" Then
            Result = Result & GetTens(Mid(MyNumber, 2))
        Else
            Result = Result & GetDigit(Mid(MyNumber, 3))
        End If
        GetHundreds = Result
    End Function
          
    ' Converts a number from 10 to 99 into text. 
    Function GetTens(TensText)
        Dim Result As String
        Result = ""           ' Null out the temporary function value.
        If Val(Left(TensText, 1)) = 1 Then   ' If value between 10-19...
            Select Case Val(TensText)
                Case 10: Result = "Ten"
                Case 11: Result = "Eleven"
                Case 12: Result = "Twelve"
                Case 13: Result = "Thirteen"
                Case 14: Result = "Fourteen"
                Case 15: Result = "Fifteen"
                Case 16: Result = "Sixteen"
                Case 17: Result = "Seventeen"
                Case 18: Result = "Eighteen"
                Case 19: Result = "Nineteen"
                Case Else
            End Select
        Else                                 ' If value between 20-99...
            Select Case Val(Left(TensText, 1))
                Case 2: Result = "Twenty "
                Case 3: Result = "Thirty "
                Case 4: Result = "Forty "
                Case 5: Result = "Fifty "
                Case 6: Result = "Sixty "
                Case 7: Result = "Seventy "
                Case 8: Result = "Eighty "
                Case 9: Result = "Ninety "
                Case Else
            End Select
            Result = Result & GetDigit _
                (Right(TensText, 1))  ' Retrieve ones place.
        End If
        GetTens = Result
    End Function
         
    ' Converts a number from 1 to 9 into text. 
    Function GetDigit(Digit)
        Select Case Val(Digit)
            Case 1: GetDigit = "One"
            Case 2: GetDigit = "Two"
            Case 3: GetDigit = "Three"
            Case 4: GetDigit = "Four"
            Case 5: GetDigit = "Five"
            Case 6: GetDigit = "Six"
            Case 7: GetDigit = "Seven"
            Case 8: GetDigit = "Eight"
            Case 9: GetDigit = "Nine"
            Case Else: GetDigit = ""
        End Select
    End Function
    -----------------------------------------------------------------------     

Thursday, 22 March 2012

What Is a Torrent?

What Is a Torrent?

A torrent file stores data about files for use with BitTorrent, enables users to send and receive files in small pieces to and from computers across the Internet as of January 2012. Because small pieces of the files are downloaded and then reassembled by the software, BitTorrent uses less resources than direct downloading of files, resulting in faster speeds for the downloader and lower bandwidth costs for the file provider. 

At any given instant of time BitTorrent has, on average, more active users than YouTube and Facebook combined.


 In this animation, the colored bars beneath all of the 7 clients in the animation above represent the file, with each color representing an individual piece of the file. After the initial pieces transfer from the seed (large system at the bottom), the pieces are individually transferred from client to client. The original seeder only needs to send out one copy of the file for all the clients to receive a copy.

Wednesday, 21 March 2012

PHP

PHP (.php) 

PHP is a powerful tool for making dynamic and interactive Web pages.

PHP is the  competitors of  Microsoft's ASP.

PHP-enabled web pages are treated just like regular HTML pages.

Your first PHP-enabled page

Click 

 

 

Data Minining & Warehousing

Data Mining
the extraction of hidden predictive information from large databases

Generally, data mining (sometimes called data or knowledge discovery) is the process of analyzing data from different perspectives and summarizing it into useful information.

Technically, data mining is the process of finding correlations or patterns among dozens of fields in large relational databases.

Example

For example, one Midwest grocery chain used the data mining capacity of Oracle software to analyze local buying patterns. They discovered that when men bought diapers on Thursdays and Saturdays, they also tended to buy beer. Further analysis showed that these shoppers typically did their weekly grocery shopping on Saturdays. On Thursdays, however, they only bought a few items. The retailer concluded that they purchased the beer to have it available for the upcoming weekend. The grocery chain could use this newly discovered information in various ways to increase revenue. For example, they could move the beer display closer to the diaper display. And, they could make sure beer and diapers were sold at full price on Thursdays.

Data Warehouses

Data warehousing is defined as a process of centralized data management and retrieval. Data warehousing represents an ideal vision of maintaining a central repository of all organizational data.

The data analysis software is what supports data mining.

Click

Sunday, 13 November 2011

Introduction to Networking Tutorials


Introduction to Networking Tutorials

Training Package

This free training can be used towards achieving full Microsoft Accreditation.
This is a completely free system that offers you flexibility and choice without any long-term commitments. 

This is a total of 25 lessons.


Friday, 14 October 2011

Macro's or VBA ?


http://bytes.com/topic/access/insights/741520-macros-vba

Although some users find Macros simple and easy to use, there are some major limitations to using them. Although you can use macros to perform tasks, there is limited control on when and how those tasks should be performed, and setting conditions can be difficult. There is however, another even stronger reason not to use macros and that is that when errors are thrown during a macro's execution it is difficult to trap the error and therefore very difficult to debug it.

Some simple VBA programming skills can replace all the functions available in a macro and, as you become more proficient there are many more tasks that can be performed which would just not be possible with macros. To itemise, the advantages of using VBA over macros are as follows:

VBA provides much more functionality than macros
Using VBA allows more complex navigation and conditions to be imposed on tasks you wish to perform. You can code functions that are just not possible with macros.

VBA allows you to trap and handle errors
All tasks can produce unexpected errors due to unforeseen circumstances. It is important to identify and trap these error exactly where and when they occur, to identify the problem and to handle the consequences. This is simple enough when using VBA.

VBA executes faster than macros
Although you may not notice the difference in speed when using simple macros, you will notice a big difference when using VBA in place of complex macros.

Using VBA makes your database more maintainable
Macros are not saved with the form they are designed to act on, but as separate objects, whereas your VBA code is saved with the form it belongs to. If you were trying to change the functionality on a form, it would not be obvious which macro you needed to change, whereas it is easy to find the appropriate VBA event(s) to change. VBA is also easier to read and follow.

Using VBA allows you to connect to other applications
This is a technique known as Automation. Using VBA allows you to work directly on applications like Word and Excel while still in Access. You can control these applications programmatically.

Using VBA allows you to use Public Variables
You can declare variables publicly either to a form or to a database by declaring them in a module. This means you can pass a value to those variables and have it retain that value for use in various of your objects (reports; forms; etc).

Some programmers still use macros for things like AutoExec which doesn't have a directly comparable facility in VBA. This macro command will execute once the database is opened. However, this can be replaced with code which is placed within the "Startup" form. This is the form that is set to open when the database is opened (See Tools / Startup...).

Access will allow you to convert existing macros to VBA.

In the macros tab select the macro you wish to convert. Then select File / Save As.... When the Save As... dialog box appears change the As from Macro to Module. In the next dialog box tick the Add Error handling and Include Macro comments. Access will open the Visual Basic Editor window and covert the macro to VBA code. When finished it will prompt with a message box, just click OK.

This is useful way to learn VBA when you are starting. You can see how Access VBA codes your macros.

Visual Basic for Applications (VBA)


Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6 and its associated integrated development environment (IDE), which are built into most Microsoft Office applications.

VBA enables building user defined functions, automating processes and accessing Windows API and other low-level functionality through dynamic-link libraries (DLLs). It was also built into Office applications apart from version 2008 for Apple's Mac OS X, other Microsoft applications such as Microsoft MapPoint and Microsoft Visio; as well as being at least partially implemented in some other applications such as AutoCAD, WordPerfect and ArcGIS.

It supersedes and expands on the abilities of earlier application-specific macro programming languages such as Word's WordBasic. It can be used to control many aspects of the host application, including manipulating user interface features, such as menus and toolbars, and working with custom user forms or dialog boxes. VBA can also be used to create import and export filters for various file formats, such as OpenDocument (ODF). As its name suggests, VBA is closely related to Visual Basic and uses the Visual Basic Runtime, but can normally only run code within a host application rather than as a standalone application.

It can, however, be used to control one application from another via OLE Automation. For example, it is used automatically to create a Word report from Excel data, in turn automatically collected by Excel from polled observation sensors. The VBA IDE is reached from within an Office document by pressing the key sequence Alt+F11.

VBA is functionally rich and flexible but it does have some important limitations, such as restricted support for function pointers which are used as callback functions in the Windows API. It has the ability to use (but not create) (ActiveX/COM) DLLs, and later versions add support for class modules.

http://en.wikipedia.org/wiki/Visual_Basic_for_Applications
Nov 26 '07 #1