java

Redirect webpages with HTML, PHP, .htaccess, Java+Script, CGI-Perl, ASP.NET and ColdFusion

Here are examples of code how to redirect an old page/url/domain to a new one with most popular client+server side programming/scripting languages. We use 301 http status code (permanent redirect). If you need temporary redirection use 302 status code instead of 301. It is better to prefer server-side redirection, because some clients are surfing with javascript and http-refresh disabled browsers. Do not forget to test your code first!

.htacces and Mod_Rewrite (Apache Webserver)

Hourly price of web & graphic designers and programmers

It is not easy to calculate last price for a website. Because it depend on many factors. Here I will try to give a simple line.

Small websites up 10 pages

1x home page : 200$
5x sub pages : 400$
1x flash animation/intro : 200$
1x web contact form with captcha protection: 150$

Middle to Big Websites with CMS

Drupal installation and customization : 800$
Joomla installation and customization : 500$
Wordpress installation and customization : 500$
phpBB/Phorum/Smf installation and customization : 250$
vbulletin installation and customization : 400$

E-Mail validation with Java and regular expressions (regex)

With a few lines of code you can check if an E-Mail address ist valid or not. The most import part ist our pattern:

String pattern = "([a-z0-9_.-]+@[a-z0-9-]+\\.[a-z]{2,6})";

import java.util.regex.*;

public class EmailCheck {

	public static void main(String[] args) {

		String eMail = "youremailyoursite.com"; 
		
		String pattern = "([a-z0-9_.-]+@[a-z0-9-]+\\.[a-z]{2,6})";
		if(eMail.matches(pattern)){
			System.out.println("Your E-Mail address is valid");
		}else{
			System.out.println("You entered a not valid E-Mail address");
		}

	}

}

Regex (regular expression) password check with Java

Our String is
aaaaaZZaa44

and with the regular
((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,})

we check if our password contains at least one digit, one upper and lower case.
we also check the length of the password, if its greater than 6.

import java.util.regex.*;
public class RegexPwdCheck {


	public static void main(String[] args) {

		String passwd = "aaaaaZZaa44"; 
		String pattern = "((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,})";
		System.out.println(passwd.matches(pattern));

	}
}

Attempting to pop table window

When I play pool/billard on Yahoo I get an error offen. I click on a table to open a game windom. Window opens, java loading and yes loading loading..... Wht isthe problem?

Syndicate content

CafeWebmaster.com(CW) is a free online community for webdevelopers and beginners. Anybody can share their code, articles, tips, tutorials, code-examples or other webdesign related material on the site. Newbies can submit their questions and reply to existing questions. CW does not guarantee or warrant reliability of code, data and information published on the site. Use the site on your own risk. The site takes no responsibility of direct or indirect loss or any kind of harm to its users. The site also doesn't take responsibility of infected files or source code with any kind of infection or viruses, worms, spywares, malwares, trojan horses. CW reserves the right to edit, move, or delete any of content for any reason.