Showing posts with label class. Show all posts
Showing posts with label class. Show all posts

Sunday, 28 February 2016

GetIn Feburary 2016 28,

In Feburary 2016 28,
Get_headers() is a command in PHP that fetches HTTP headers. The get_header() function accesses the header.php file that describes the nature of the Web page or file. The get_headers function also retrieves website redirection information, error codes, authentication requirements and encryption information such as HTTP and HTTPS. The get_headers function must include the URL of the request in the argument. An argument to format the retrieved headers is optional.
cURL
Websites may have cURL enabled or use a socket connection. cURL in PHP supports FTP, HTTP, HTTPS, LDAP and other data transfer protocols. The Web connection details are contained within the cURL class. This eliminates the need to reference the connection details throughout the PHP code, decreasing the amount of time required to create cURL scripts. cURL scripts create cookies and save the cookies to specified directories. The cURL extension in PHP websites allows external websites to be accessed while remaining on the first website. This function is used for retrieving data like stock quotes from a third-party website or third-party payment vendor websites like PayPal and credit-card processors. cURL scripts are essential to creating online shopping carts and continuously updating data feeds. cURL scripts allow reporting on a connection status such as transfer speed, transferred data volume and the percentage of the file that has been downloaded so far.
Factors Affecting Get_File Speed
Get_file functions do not trigger authentication routines such as log in prompts or cookies. The file_get_contents() function also downloads files without exchanging information with the server from which it was retrieved, such as cookie processing. Using a get_file function instead of a cURL script is faster than a cURL script because these steps are skipped. Get_header speed depends on the volume of information it retrieves. Web pages with less information are retrieved more quickly. Web pages that hold less data are downloaded more quickly.
Factors Affecting cURL Speed
cURL speed depends on network latency, network speed and the speed of the server with which it is communicating. cURL scripts also depend upon the processing speed of the servers they access. cURL slows down when handling large XML files. Multi-processing allows multiple cURL tasks to run simultaneously, potentially speeding up the processing time of the whole Web page.
In Feburary 2016 28,

Wednesday, 24 February 2016

How to Write a Java Application Program That Prompts a User to Input One After the OtherIn Feburary 2016 24,

In Feburary 2016 24,
Start a new project in NetBeans by clicking on its icon, selecting 'File/New Project', and choosing 'Java Applicatoin.' A new Java project is created and a source code file appears in the NetBeans text editor. The source code file has a main function and little else.
Import the 'Console' class by writing this line at the top of the source code file:import java.io.Console;
Create a new Console object by writing the following line of code between the curly brackets of the main function:Console c = System.console();
Declare a couple of strings, one for a user's name, and one for the user's password. You can accomplish this by writing the following:String userName, password;
Prompt the user to enter his or her user name using the following line of code:userName = c.readLine('Enter your user name and press enter: ');
Repeat the last step for the user's password, like this:password = c.readLine('Enter your password and press enter: ');
Run the program by pressing F6. The program will prompt you to enter a name. After you enter your name, it will ask you for a password. You can add more prompts if you would like. All you have to do is repeat the previous step and add more strings to hold the data.
In Feburary 2016 24,

Wednesday, 10 February 2016

How to Check if a Folder Exists in Vb.NetIn Feburary 2016 10,

In Feburary 2016 10,
Type 'Dim pathName As String' in your VB.NET code to define a string variable to hold the path to the folder that you want to look for. This string variable is called 'pathName.' As an example, set the value of the string variable 'pathName' to 'C:\TestFolder.' This can be implemented using the following code; 'pathName = 'C:\TestFolder'.'
Type 'Imports System.IO' in the first line of your code page to import the 'System.IO' library into your VB.net code. The 'System.IO' is a .NET framework class library that is available to all .NET based code. As the code is being developed in VB.NET, this library is also automatically available for use to the developer. A class library is a collection of classes with various functions that programmers can use in their software applications.The 'DirectoryInfo' class is a part of the 'System.IO' class library that exposes functions for creating and moving through directories and sub-directories.
Type the line 'Directory.Exists(pathName)' to use the 'Exists' function of the 'DirectoryInfo class' to check if the 'C:\TestFolder' folder exists on your computer. The 'Exists' function will return a true boolean value if the folder exists, and it will return a false boolean value if the folder does not exist. To catch this boolean value, define a boolean variable by using the following code line: 'Dim answer As Boolean.' Use this 'answer' variable to accept the return value of the 'Exists' function by using the following code line: ' answer = Directory.Exists(pathName).'
Build and compile your code by clicking on the 'Project' option on the top tool bar and then clicking on 'Build.' Execute the code by clicking on the 'Debug' option on the top tool bar and then clicking 'Run.' The VB.net code will execute, check if the 'C:\TestFolder' exists on your computer and return an appropriate true or false value.
In Feburary 2016 10,

Sunday, 7 February 2016

How to Create Registration Forms in JavaIn Feburary 2016 07,

In Feburary 2016 07,
Download and install the free NetBeans IDE from NetBeans.org. (See Resources for other IDEs with similar form designers.)
Open NetBeans and select \'File>New Project.\' Select \'Java\' in the Categories window, and \'Java Application\' in the Projects window. Press \'Next.\'
Complete the New Java Application dialog box: enter \'registerform\' for \'Project Name.\' Enter \'c:\users\
\Desktop\registerform\' for the \'Project Location.\' Leave the \'Use Dedicated Folder...\' check box unchecked, and also the \'Create Main Class\' box unchecked. Do check the \'Set as Main Project\' check box, then press \'Finish.\'
Expand the \'registerform\' node, which is in the Projects window, then its \'Source Packages\' node. Right-click on \'
\' and select \'New>Java package.\' In the \'New Java Package\' dialog box, enter \'pkgRegform\' for \'Package Name,\' then click \'Finish.\'
Right-click the \'pkgRegform\' node in the \'Projects\' window and select \'New>JFrame Fform.\' In the \'New JFrame Form\' dialog box, enter \'frmRegform\' for the \'Class Name,\' then press \'Finish.\'
Click and drag a \'Label\' control from the \'Palette\' window onto the form, near the form's upper left corner. Right-click on the label control and select \'Properties,\' then locate the \'text\' property. Type \'first name\' to replace the default text for that control. Click the \'Close\' button on the \'Properties\' dialog box.
Drag a \'Text Field\' onto the form from the Palette window. Position the text field to the right of the label control. Using the Properties dialog box, delete the default text from the text field.
Repeat steps 6 and 7 to create a label and associated text box for the \'Last Name\' field. Position the new controls directly under the first two. Under the controls for the last name, add a label and text box control for an email address.
Add a button under the email label. Using the Properties window, change its \'Text\' property to read \'Submit.\'
Resize the form by dragging its lower right corner. Position that corner so that the white space between the controls and the form's borders is visually agreeable.
Preview your form by right-clicking on it and selecting \'Preview Design.\' In the context menu that appears, choose the form type (i.e. \'Metal,\' \'Nimbus,\' \'Windows Classic\') that matches your project's design specifications.
Double-click the button to enter the code window. Enter the Java program code needed to route the data that your form has gathered to the destination indicated in your project's specifications.
In Feburary 2016 07,

Monday, 1 February 2016

How to Host a Carnival FundraiserIn Feburary 2016 01,

In Feburary 2016 01,
Ask a local school, church or library. They may donate a space or charge a minimal fee.
Fotolia.com'>
Ask volunteers to build a small stage for performers, game booths or back-drops for photo shoots.
Advertise locally for volunteers.
Ask businesses for leftover materials for craft projects or to donate the cost of renting a 'bouncy house' or to sponsor another activity.
Solicit items for pot luck food or contact a local restaurant to provide a spaghetti dinner.
Work closely with members of the organization raising funds
Arts and Crafts Station
Set up an arts and crafts station with projects for kids and adults of all ages.
Fotolia.com'>
Arts and crafts are an entertaining way for carnival-goers to create their own souvenirs of the event.
Ask for volunteers from a local high school arts class to guide carnival-goers through different projects and solicit materials from local businesses and neighborhood residents.
Look for materials that would otherwise end up in a landfill and lower the carbon footprint of the event.
Cake Walk and Bake Sale
Sell baked goods, snacks and beverages.
Fotolia.com'>
Ask members of your organization to donate baked goods to be sold at the carnival.
Organize a cake or cupcake walk.
Charge for each entry.
Games
Arrange a carnival boardwalk complete with carnival games like ring toss, balloon darts, beanbag toss, bowling and three-legged races,.
Fotolia.com'>
Carnival games are easy to set up and fun to play.
Sell tickets for the games at a reasonable price and offer inexpensive prizes bought in bulk or donated.
Consider other games like bobbing for apples, croquet or mini-golf
Self-Expression & Entertainment
Ask for volunteers from a local beauty school or art school to facilitate this activity.
Fotolia.com'>
Allow guests to express themselves through body art.
Set up a tent wherein guests can adorn their cheeks, bedazzle their nails or temporarily ink their limbs.
Ask local clowns, jugglers, musicians, poets, comedians, theatre troupes, dancers, mimes, balloon artists and other talented performers to donate their time for a good cause.
Fotolia.com'>
Tap into the social consciousness of local performers.
Raise Funds
Solicit businesses and artisans for items.
Fotolia.com'>
Conduct a raffle, silent auction or task a volunteer with hosting a live auction.
Raffle off a donated prize.
Conduct a silent auction or host a live auction.
Fun Photo Back Drops & Costumes
Set-up a photo shoot and charge a small fee for the finished product.
Fotolia.com'>
Capture the memories on film.
Create painted cardboard cut-outs for guests to pose with.
Alternatively, set-up a background and add costumes for carnival-goers to wear.
In Feburary 2016 01,