Author Archives: admin - Page 2

Applet in Java

Applet code in Java

applE1.java

/**
*for writing(drawstring)
*your class shud always be a subclass of applet class
*@author : Ashish H Thakkar
*/

import java.awt.*; //pg 329
import java.applet.*;
/* <applet code=”applE1″ width=200 height=200> */
public class applE1 extends Applet //accessed by code outside the prog
{
public void paint(Graphics g) // overiding method
{
g.drawString(“My first applet so soon “,100,50);
}
}

applE2.java

/**
*Applet for drawing
*@author : Ashish H Thakkar
*/
import java.awt.*;
import java.applet.*;
/* <applet code=”applE2″ width=200 height=200> */
public class applE2 extends Applet //accessed by code outside the prog
{
Color rang; // color classs available
public void init() // method available under applet class
{
setBackground(Color.pink);
setForeground(Color.black);
rang=new Color(100,50,90);
}
public void paint(Graphics g)
{
g.setColor(rang);
g.fillRect(50,100,50,100);
}}

Abstract code in Java

abstracT.java


/**
*any method is absTRACT then class shud be absTRACT.
*CANT CREATE METHOD OF ABSTRACT CLASS
*cant overide a final method , cant change final variable and
*final class cant be abstract and final class cant be extended
*@author : Ashish H Thakkar
*/
abstarct class demo
{
int x=5,y=10;
abstract void abc();
//not giving body hence abst.cant create an object of abstact class
abstract int pqr();
void display()
{
System.out.println(“hello”);
}
}
class abstracT extends demo
{
void abc() /*have to overide both*/
{
System.out.println(“the value of x and y are “+x+ ” and “+y);
}
int pqr()
{
return x*y;
}
public static void main(String args[])
{
abstracT ob1=new abstracT();
ob1.abc();
ob1.display();
int w=ob1.pqr();
System.out.println(w);
}}

This is similar to Abstract classes in C#

Optimize Windows XP

Title : Optimize Windows Xp using software.

About this Application : Xp Tweak mechanic is a desktop application which can help you improve and optimize the performance of your Windows xp operating system. The software also helps you boost your internet speed to some level.

The software is a must for any Windows Xp user who wishes to get the best out of his/her operating system. The Features of this software are :

1. Optimizes the start up and shut down speed along with Internet explorer settings.

2. No more frustrations as it takes care of your programs that are not responding. It will quickly shutdown any non responding application.

3. Speeds up your start menu. This can really help you save a lot of time.

4. Important – Inbuilt functionality for memory management hence giving you a speedy performance from system memory and ram.

5. Various other features such as Auto management of dll and Mouse positioner for quick work.

Cost : $19.95$9.95 (Buy Now)

Optimize Windows Xp

Note : The software that will help you optimize Windows Xp is Jvw Xp tweak mechanic.

Cost of the application is $9.95 only with Free updates.

Payment : 100% secure and can be made using Paypal.com or through credit card.

Package : The software will come as a zip file and will include the below with it (optional) :

1. Help file to understand the using of the application in a much better way.

2. Document attached so that even non computer savvy people can know better.

3. Free popup blocker application to stop those annoying popups.

4. Support – After sales support is given through phone, email or Im.

Buy Optimize Windows Xp
Buy Optimize Windows Xp software

Content extractor

Title : Content extractor by Jvw.

About : Content creation and content extraction software.

Category : Desktop application.

Review :

  • The application is a simple desktop tool to create content from the world wide web.
  • Surprisingly the content extracted is search engine friendly and extracted content comes in SERPs also.
  • The software is pretty fast and creating content with it takes about a minute.
  • This is a good niche software but very small niches will not be able to extract loads of content like other popular niches like weight loss, finance/forex, dog and pets, hair and skin care, seo and web design etc.
  • Excellent tool as a FAQ builder or help page/tutorial builder.
  • Nice tool to build an ebook in a matter of few minutes. So you can also call it an ebook builder.
  • Has good feature of inbuilt ftp program and adsense inserter.
  • Price is low which means it is targeted for all audiences.

    Content extractor banner

    Other : Video for content extractor is located at http://www.youtube.com/watch?v=zUj9zoC7Bhw

    Regards,
    The review team at Fullycoded.com

  • Automatic backup software

    Title : Automatic backup software with source code.

    About this Application : It is a desktop application which can help you create automatic backup for your files and various folders. Think about how much time this can save you if everything is simply automatic.

    The software is helpful to you because it will take a backup of your mentioned files and folders which may include :

    1. Your pictures and the pictures of your family and friends – “My pictures” folder.

    2. Your work folder or the folder where you have created and saved your documents – “My documents”.

    3. Your favorites folder where you have everything bookmarked.

    4. Important – Your email(s) folder so that a backup is made of all your emails.

    5. Various other folders – Your movies, songs (mp3 files).

    Cost : $9.95 (Buy Now)

    Automatic backup software

    Note : The software code for Automatic backup software is not in VB but in Delphi.

    Cost With source code : $111.00

    Payment : Can be made by Paypal or credit card.

    Package : Source code plus the resell rights of the software application includes the below :

    1. Rebranded Automatic backup software to take backup of your files and folders.

    2. Full Source code for the software created in Delphi.

    3. Help file of the desktop application.

    4. 100% After sales support to make you happy.

    Buy Automatic backup software
    Buy Automatic backup software

    Javascript popup software

    Title : Javascript popup source code for software.

    About Application : This desktop application can help you create javascript popup windows that are unstoppable by popup blocking softwares and pop-up blockers that are installed within the toolbars.

    The types of popup windows this software can create are :
    1. StickMe Note
    2. Timer Ads
    3. Slide-in ads.
    4. Bouncy ads.
    5. Regular popup window ad.

    Cost : $195.00

    Available : With the resell rights of this desktop application you will get the below :

    1. Rebranded Javascript popup windows software to create popup windows.

    2. Complete Source code for the application in VisualBasic.

    3. Help file for the software.

    4. After sales support.

    5. Web script for the application with resell rights – http://fullycoded.com/?p=43

    Note : You can also get rebranded version of this software/script at a lower cost from our resell rights website.

    Visual Basic source code for Article extractor

    Title : VB Code for Article extractor to find article.

    About Application : The desktop application will help you find articles of your niche and extract them for you to study or to use them for your article site or website. Please visit the application website at http://www.jvwinc.com/article-extractor.html to know more.

    Cost : $345.00

    Available : With the resell rights package of the source code you will get the below :

    1. Rebranded Article extractor software to find article.

    2. Source code for the application in Visual Basic.

    3. Help page for the application.

    4. Videos and related files.

    5. After sales support.

    Find article with Article extractor

    Please contact us through our resell rights page from Jvwinc.com.

    Warning and error in C#

    WARNING.CS
    ===

    #warning This is A warning
    class zzz
    {
    //#error This is An error
    public static void Main()
    {
    System.Console.WriteLine(“MAIN”);
    }
    }

    ===

    For other C# code or website scripts source code please visit http://fullycoded.com/

    While and Writeline in c sharp

    C# code for While and Writeline

    1. While1.cs :

    class zzz
    {
    static void Main()
    {
    int ii;
    ii=1;
    while ( ii < = 5 )
    {
    System.Console.WriteLine (“Hi {0}”, ii);
    ii++;
    }
    }
    }

    2. Writeline1.cs :

    // created on 3/1/2008 at 12:36 AM
    class callingfunction
    {
    static void Main(){

    System.Console.WriteLine(“Hundred ={0}”,100);

    }
    }

    Virtual Override

    Similar to C# code for virtual we provide you Virtual OverRide code

    class zzz
    {
    public static void Main()
    {
    yyy a = new yyy();xxx b = new xxx();yyy c = new xxx();
    a.abc();a.pqr();a.xyz();
    b.abc();b.pqr();b.xyz();
    c.abc();c.pqr();c.xyz();
    }}
    class yyy
    {
    public virtual void abc()
    {System.Console.WriteLine(“yyy abc”);}
    public virtual void pqr()
    {System.Console.WriteLine(“yyy pqr”);}
    public virtual void xyz()
    {System.Console.WriteLine(“yyy xyz”);}
    }
    class xxx : yyy
    {
    public override void abc()
    {System.Console.WriteLine(“xxx abc”);}
    public new void pqr()
    //New means that the function pqr is a new function and it has absolutely nothing to do with the pqr in the base class
    {
    System.Console.WriteLine(“xxx pqr”);
    }
    public void xyz()
    {
    System.Console.WriteLine(“xxx xyz”);
    }}

    Virtual.cs C# code

    Virtual.cs
    ===

    class zzz
    {
    public static void Main()
    {
    yyy a = new xxx();
    yyy b = new vvv();
    xxx c = new vvv();
    a.abc();a.pqr();a.xyz();b.abc();b.pqr();b.xyz();c.abc();c.pqr();c.xyz();}}
    class yyy
    {
    public void abc()
    {System.Console.WriteLine(“yyy abc”);}
    public virtual void pqr()
    {System.Console.WriteLine(“yyy pqr”);}
    public virtual void xyz()
    {System.Console.WriteLine(“yyy xyz”);}
    }
    class xxx : yyy
    {
    public virtual void abc()
    {System.Console.WriteLine(“xxx abc”);}
    public new void pqr()
    {System.Console.WriteLine(“xxx pqr”);}
    public override void xyz()
    {System.Console.WriteLine(“xxx xyz”);}
    }
    class vvv : xxx
    {
    public override void abc()
    {System.Console.WriteLine(“vvv abc”);}
    public void xyz()
    {System.Console.WriteLine(“vvv xyz”);}
    }

    Using.cs
    ===

    using System;
    using ashish;
    class zzz {
    static void Main()
    {
    yyy.abc();
    }
    }
    namespace ashish
    {
    class yyy
    {
    public static void abc()
    {
    Console.WriteLine(“abc”);
    }
    }
    }
    //After the word using you can only write the name of a namespace…

    Unsafe code in C#

    Unsafe : This means pointers are allowed in C# code. If you wish to compile unsafe code then should specify the /unsafe compiler option in the command line(This is not required if you are using Visual Studio.NET).

    using System;
    class zzz {
    public static void Main() {
    yyy a = new yyy();
    a.abc();
    }
    }
    unsafe class yyy {
    unsafe public void abc() {
    int *i; //declaring pointer
    int j=1;
    i = &j; //pointing
    Console.WriteLine((int)i);
    *i = 10;
    Console.WriteLine(j);
    }
    }

    C# code for Throw

    class zzz
    {
    public static void Main()
    {
    yyy a;
    a=new yyy();
    try
    {
    a.abc();
    System.Console.WriteLine(“Bye”);
    }
    catch (System.Exception e)
    {
    System.Console.WriteLine(“In Exception”+ e.ToString());
    }
    System.Console.WriteLine(“After Exception”);
    System.Console.Read();
    }
    }
    class yyy {
    public void abc()
    {
    throw new System.Exception(“C# Throw code exception”);
    System.Console.WriteLine(“C# Throw code“);
    }
    }

    Threads in C# programming

    1. C# Threads Example 1
    using System.Threading;
    public class yyy
    {
    public void abc()
    {
    for ( int i = 0; i< =3;i++)
    {
    System.Console.Write(i + ” “);
    }
    }
    public void pqr()
    {
    for ( int i = 0; i<=3;i++)
    {
    Thread.Sleep(1000);
    System.Console.Write(i+ “…”);
    }
    }
    }
    public class zzz
    {
    public static void Main()
    {
    yyy a = new yyy();
    Thread t = new Thread(new ThreadStart(a.abc));
    Thread t1 = new Thread(new ThreadStart(a.pqr));
    t.Start();
    t1.Start();
    }
    }

    2. Example 2 of threading in C Sharp (C#)
    using System;
    using System.Threading;

    class App {
    public static void Main() {

    Console.WriteLine(” (Hit or Press Enter to terminate the sample)”);
    Timer timer = new Timer(new TimerCallback(CheckStatus), null, 1, 2000);

    Console.WriteLine(“Press Enter to close window”);
    Console.Read();
    }

    // The callback method’s signature MUST match that of a System.Threading.TimerCallback
    // delegate (it takes an Object parameter and returns void)
    static void CheckStatus(Object state) {
    Console.WriteLine(“Threads in C # sharp”);

    }
    }

    Tip of the day script

    Part 1 – q.readme.txt
    These three different scripts read a single line from a file containing quotes, or “one-liners” as they’re sometimes called. Of course, you need a file of quotes to begin with, so I included my own quotes file in the zip file.

    The first one seeds the randoming function which selects a random quote from the quote array. The second one uses the shuffle function to select a random quote from the quote array.

    The third one is a little more complex. On Windows machines, and on ‘nix machines where the permissions are set, the code creates the quotes counter file if it doesn’t already exist. Otherwise, you’ll have to create a blank file and set permissions before installing the script.

    It selects the next quote each time the script executes. This is done by updating the element number of the array in a separate file.

    In each example, the “quotes” file path and file name is the first line of code. The third example contains the “qfile” variable with the path and file name as the second line of code.

    Part 2 – Quotes1.inc
    < ?
    $quote = file("quotes.txt");
    srand((double)microtime()*1000000);
    echo $quote[rand(0,count($quote))];
    ?>

    Part 3 – Quotes2.inc
    < ?
    $quote = file("quotes.txt");
    echo $quote[shuffle($quote)];
    ?>

    Part 4 – Quotes3.inc
    < ?
    $quote = file ("quotes.txt");
    $qfile = "qnumber.inc";
    if (file_exists ($qfile)) {
    $fp = fopen ($qfile,"r+");
    $qc = fgets ($fp,4);
    $qc = chop ($qc);
    $qc += 1;
    if ($qc == count($quote))
    $qc = 0;
    rewind ($fp);
    fputs ($fp,substr($qc." ",0,4));
    fclose ($fp);
    echo $quote[$qc];
    }
    else {
    $fp = fopen($qfile,"w");
    $qc = 0;
    fputs ($fp,substr($qc." ",0,4));
    fclose ($fp);
    echo $quote[$qc];
    }
    ?>

    Part 5 – Quotes.txt
    Which should contain tip of the day and or quotes line by line.

    System Variables in C#

    C# code for System Variables

    class zzz
    {
    public static void Main(){
    System.Collections.IDictionary i=System.Environment.GetEnvironmentVariables ();
    System.Collections.IDictionaryEnumerator d=i.GetEnumerator();
    System.Console.WriteLine(“Content-Type:text/html\n”);
    System.Console.WriteLine(i.Count + “
    “);
    while (d.MoveNext())
    {
    System.Console.WriteLine(“{0}={1}
    “,d.Key,d.Value);
    }}}

    Struct program in C#

    One of the simplest program for Struct…

    ===
    class zzz
    {
    public static void Main()
    {
    xxx a = new xxx(10);
    }
    }
    struct xxx
    {
    public int i,j;
    public xxx(int p)
    {
    i = p;
    j = 0;
    }
    }
    ===

    Just compile it and run it to understand the c# code better.

    Static in C#

    Static in c#
    ===
    class zzz
    {
    static void Main()
    {
    yyy a=new yyy();
    a.abc();
    yyy.pqr();
    }
    }
    class yyy
    {
    public void abc()
    {
    System.Console.WriteLine(“C# at abc”);
    }
    public static void pqr()
    {
    System.Console.WriteLine(“C# at pqr”);
    }
    }

    PS : VB Developers have the biggest problem understanding static when migrating from programming language Visual basic to a C#.

    Basics of C#

    WriteLine.cs and Return.cs :

    1. WriteLine.cs
    ===
    // created on 3/1/2002 at 12:36 AM
    class callingfunction
    {
    static void Main(){

    System.Console.WriteLine(“Hundred ={0}”,100);

    }
    }
    ===

    2. Return.cs
    ===
    class zzz
    {
    static void Main()
    {
    int ii = abc();
    System.Console.WriteLine(“hi {0}”,ii);
    }
    static int abc()
    {
    System.Console.WriteLine(“abc”);
    return 100;
    // after return everything ignored
    System.Console.WriteLine(“abc”);
    }
    }
    ===

    Reflection in c#

    Reflection is a process by which an application can read and collect data from assemby and metadata.

    Reflection.cs
    ===
    using System;
    using System.Reflection;
    class zzz
    {
    public static void Main()
    {
    Type m;
    m = typeof(int);
    System.Console.WriteLine(m.Name + ” ” + m.FullName);
    m = typeof(System.Int32);
    System.Console.WriteLine(m.Name + ” ” + m.FullName);
    m = typeof(yyy);
    System.Console.WriteLine(m.Name + ” ” + m.FullName);
    m=typeof(string);
    MemberInfo [] n;
    n = m.GetMembers();
    Console.WriteLine(n.Length);
    foreach ( MemberInfo a in n)
    {
    Console.Write(a.Name+”,”);
    }
    System.Console.WriteLine(m.Name + ” ” + m.FullName);
    }
    }
    class yyy
    {
    }
    ===