SCJP: Classpath and Jar #Java Short Notes #SCJP #Blog

Java certification exams like SCJP test your knowledge about java classpath. Check here for an excellent resource on the topic .

System classpath

We can specify classpath in the command line or make use of a `system’ class path. The IDEs have their own way of maintaining class paths. System class paths will be used by both the Java compiler and the JVM in the absence of specific instructions.

Set Linux System Classpath:
CLASSPATH=/myclasses/myclasses.jar;export CLASSPATH

Windows:
set CLASSPATH=c:myclassesmyclasses.jar

For permanent result, in Linux, put the commands in the file .bashrc in your home directory. On Windows 2000/NT, set it from `Control Panel’, System, Environment Variables.

You can also specify .jar files full of your required classes in your classpath.

CLASSPATH=/usr/j2ee/j2ee.jar:.;export CLASSPATH

where the `.’ indicates `current directory’.

From command line, if you want to add more paths to the classpath use:

Linux:javac -classpath $CLASSPATH:dir1:dir2 …

Windows:javac -classpath %CLASSPATH%;dir1:dir2 …

if you have spaces in your path use double quote to concatenate words.

Also check this resource

From: http://sitestree.com/?p=4849
Categories:Java Short Notes, SCJP, Blog
Tags:
Post Data:2013-06-05 14:27:56

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

JAVA: Some links: useful for exams like scjp/scja #Java Short Notes #SCJP #Blog

Assertions in Java: http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html
Enum in Java:http://www.java2s.com/Code/Java/Language-Basics/Enum.htm
StringBuffer and StringBuilder Classes have similar methods where StringBuffer is synchronized: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html
Serialize and Deserialize: http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html
java.util package is very important: http://java.sun.com/j2se/1.4.2/docs/api/java/util/package-summary.html

From: http://sitestree.com/?p=4845
Categories:Java Short Notes, SCJP, Blog
Tags:
Post Data:2013-06-11 18:38:25

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java Spring: Use Cases #Java #Java Frameworks #Spring #Spring Framework and Hibernate

Reference: https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/overview.html

 

Typical full-fledged Spring web application

 

 

Spring middle-tier using a third-party web framework

 

Remoting usage scenario

 

EJBs – Wrapping existing POJOs

 

 

  From: http://sitestree.com/?p=10900
Categories:Java, Java Frameworks, Spring, Spring Framework and Hibernate
Tags:
Post Data:2017-07-28 20:42:31

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java Spring: Components for Web #Java #Spring #Spring Framework and Hibernate #Spring #Spring Framework and Hibernate

Java Spring: Components for Web

Full-stack web development with Tomcat and Spring MVC
Reactive web development with Netty and Spring WebFlux: requires Spring Boot >=2.0.0.M1
Websocket development with SockJS and STOMP
Contract-first SOAP service development with Spring Web Services
RESTful Web Services framework with support of JAX-RS
RESTful Web Services framework with support of JAX-RS
Spring Boot integration for the Ratpack framework
Vaadin java web application framework
Exposing Spring Data repositories over REST via spring-data-rest-webmvc
HATEOAS-based RESTful services
Browsing Spring Data REST repositories in your browser
Simplify the development of mobile web applications with spring-mobile
Document RESTful services by combining hand-written and auto-generated documentation
Stormpath default starter including Spring MVC, Thymeleaf and Spring Security: requires Spring Boot >=1.5.0.RC1 and <2.0.0.M1
Keycloak integration, an open source Identity and Access Management solution.: requires Spring Boot >=1.5.3.RELEASE and <2.0.0.M1

From: http://sitestree.com/?p=10914
Categories:Java, Spring, Spring Framework and Hibernate, Spring, Spring Framework and Hibernate
Tags:
Post Data:2017-07-28 21:58:25

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

JavaScript: Pass by Value: Pass by Reference #JavaScript

JavaScript: Pass by Value: Pass by Reference From: http://sitestree.com/?p=3485
Categories:JavaScript
Tags:
Post Data:2016-07-09 23:39:28

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

JavaScript Frameworks #JavaScript

The following web-resources discuss some JavaScript Frameworks. Comparisons among the frameworks can also be found.

From: http://sitestree.com/?p=3481
Categories:JavaScript
Tags:
Post Data:2016-07-09 20:31:15

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

JavaScript Codes #JavaScript

JavaScript is a very powerful scripting language for web-site development. Also, it is in much demand.

	var serviceInstancesArrAtLoad = Array();
	var serviceInstancesArrAtSubmit = Array();
	var tempArr=Array();	
	
	function validate_required(field,alerttxt)
	{
		with (field)
		{
			if (value==null||value=='')
			{
				alert(alerttxt);return false
			}
			else {return true}
		}
	}
	
	function validateTicketCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(type,'Type must be filled out!')==
			false)
			{type.focus();return false}
			
			if (validate_required(subject,'Subject must be filled out!')
			==false)
			{subject.focus();return false}
						
		}
	}

	function validate_customer_create_form(thisform)
	{
		with (thisform)
		{
			if (validate_required(firstName,'First name must be filled 
			out!')==false)
			{firstName.focus();return false}
			
			if (validate_required(lastName,'Last name must be filled 
			out!')==false)
			{lastName.focus();return false}
			
			if (validate_required(phone,'Phone must be filled out!')==
			false)
			{phone.focus();return false}
			
		}
	}
	
	
	function validateUserCreateForm(thisform)
	{
		with (thisform)
		{
						
			if (validate_required(firstName,'First name must be filled 
			out!')==false)
			{firstName.focus();return false}
			
			if (validate_required(lastName,'Last name must be filled 
			out!')==false)
			{lastName.focus();return false}
			
			if (validate_required(shortName,'Short name must be filled 
			out!')==false)
			{shortName.focus();return false}
			
			if (validate_required(username,'Username must be filled 
			out!')==false)
			{username.focus();return false}
			
			/*
			if (validate_required(password,'Password must be filled 
			out!')==false)
			{password.focus();return false}
			
			if (password.value.length < passwordLength.value) 
			{alert("Password must be at least "+ 
			passwordLength.value +" char long");	password.focus();
			return false}
			
			if (validate_required(password2,'Please re-enter password!')
			==false)
			{password2.focus();return false}
			
			if (password.value != password2.value)
			{
				alert("Password did not match");
				password2.focus();
				return false			
			}
			*/
			
		}
	}

	function validate_assign_group_form(thisform)
	{
		with (thisform)
		{
			if (validate_required(groupId,'Group name must be filled 
			out!')==false)
			{groupId.focus();return false}
			
			if (validate_required(userId,'Action on invalid user!')==
			false)
			{userId.focus();return false}		
		}
	}
	
	function validateGroupCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Group name must be filled out!')
			==false)
			{name.focus();return false}
			
		}
	}
	
	function validateAssignGroupPermissionForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(taskId,'Task module name must be 
			filled out!')==false)
			{taskId.focus();return false}
			
		}
	}
	
	function validateAssignTaskPermissionForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(groupId,'Group name must be filled 
			out!')==false)
			{groupId.focus();return false}
			
		}
	}
	
	function validateUserEditForm(thisform)
	{
		with (thisform)
		{
						
			if (validate_required(firstName,'First name must be filled 
			out!')==false)
			{firstName.focus();return false}
			
			if (validate_required(lastName,'Last name must be filled 
			out!')==false)
			{lastName.focus();return false}
			
			if (validate_required(shortName,'Short name must be filled 
			out!')==false)
			{shortName.focus();return false}
			
			if (validate_required(username,'Login id must be filled 
			out!')==false)
			{username.focus();return false}
						
			if (password.value.length>0)
			{
				if (password.value.length < passwordLength.value) 
				{alert("Password must be at least "+ 
				passwordLength.value +" char long");	
				password.focus();return false}
				
				if (validate_required(password2,'Please re-enter 
				password!')==false)
				{password2.focus();return false}
			}
			
			if (password.value != password2.value)
			{
				alert("Password did not match");
				password2.focus();
				return false
			}
			
		}
	}
	
	function validateInventoryCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(serial,'serial must be filled out!')
			==false)
			{serial.focus();return false}
			
			if (validate_required(hardwareAddress,'Hardware Address 
			must be filled out!')==false)
			{hardwareAddress.focus();return false}
		}
	}
	
	function validateInventoryTypeCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
		}
	}
	
	function validateInventoryModelCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
			
			if (validate_required(manufacturerId,'Manufacturer must be
			 filled out!')==false)
			{manufacturerId.focus();return false}
			
			if (validate_required(typeId,'Type must be filled out!')==
			false)
			{typeId.focus();return false}
			
			
		}
	}
	
	function validateInventoryManufacturerCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
		}
	}
	
	
	function validateServiceCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
			
			if (validate_required(typeId,'Type must be filled out!')==
			false)
			{typeId.focus();return false}
			
			
		}
	}
	
	function validateHostingCreateForm(thisform)
		{
			with (thisform)
			{
				if (validate_required(serviceId,'Service must be 
				filled out!')==false)
				{serviceId.focus();return false}
				
				if (validate_required(storageSpace,'Storage space 
				must be filled out!')==false)
				{storageSpace.focus();return false}
			}
		}
		
	function validateDomainName(strValue) 
	{
		return /www.[a-z0-9_-]+.[a-z]{2, 3}/ig.test(strValue);
		
		//var objRegExp  = /^w+([.-]?w+)*(.w{2,3})/;

  		//check for valid domain
  		//return objRegExp.test(strValue);
	}
	
	function validateDomainServiceCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Domain name must be filled out!')==false)
			{name.focus();return false}
			
			/*if (validateDomainName(name.value)==false)
			{alert('Please enter valid domain name');name.focus();
			return false;}*/
			
			if (validate_required(registrar,'Registrar must be filled 
			out!')==false)
			{registrar.focus();return false}
			
			if (validate_required(registrationTimestamp,'Registration 
			timestamp must be filled out!')==false)
			{registrationTimestamp.focus();return false}
			
			if (validate_required(expiryTimestamp,'Expiry timestamp 
			must be filled out!')==false)
			{expiryTimestamp.focus();return false}
			
			if (validate_required(username,'User name must be filled 
			out!')==false)
			{username.focus();return false}
			
			if (validate_required(password,'Password must be filled 
			out!')==false)
			{password.focus();return false}
			
			if (password.value.length < passwordMinLength.value || 
			password.value.length>passwordMaxLength.value)
			{alert('Password must be '+ passwordMinLength.value+ '-'+ 
			passwordMaxLength.value +' chars long');
			password.focus();return false;}
			
			if (password.value != password2.value)
			{alert('Password must match');password2.focus();
			return false;}
		}
	}
	
	
	
	
	function validateCommunityCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
		}
	}
	
	function validatePostalCodeCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(postalCode,'Postal code must be 
			filled out!')==false)
			{postalCode.focus();return false}
			
			if (validate_required(communityId,'Community must be 
			filled out!')==false)
			{communityId.focus();return false}
		}
	}
	
	function validateStreetTypeCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
		}
	}
	
	function validateStreetCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
			
			if (validate_required(typeId,'Type must be filled out!')==
			false)
			{typeId.focus();return false}
			
			if (validate_required(communityId,'Community must be filled 
			out!')==false)
			{communityId.focus();return false}
		}
	}
	
	function validateUnitCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(streetId,'Street must be filled out!')
			==false)
			{streetId.focus();return false}
			
			if (validate_required(communityId,'Community must be filled 
			out!')==false)
			{communityId.focus();return false}
			
			if (validate_required(number,'Number must be filled out!')==
			false)
			{number.focus();return false}
			
			if (validate_required(nodeId,'Node must be filled out!')==
			false)
			{nodeId.focus();return false}
			
		}
	}
	
	function validatePlantCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
		}
	}
	
	function validateCreateTicketCategoryForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(name,'Name must be filled out!')==
			false)
			{name.focus();return false}
		}
	}
	
	
	function validateStartWorkOnTicketForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(startTimestamp,'Start Timestamp must
			 be filled out!')==false)
			{startTimestamp.focus();return false}
		}
	}
	
	function validateTicketReportForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(date,'Date must be filled out!')==
			false)
			{date.focus();return false}
		}
	}
	
	
	function validateCloseTicketForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(date,'Date must be filled out!')==
			false)
			{date.focus();return false}
			
			if (validate_required(time,'Time must be filled out!')==
			false)
			{time.focus();return false}
			
		}
	}

	function validateCreateWorkOrder(thisform)
	{
		with (thisform)
		{
			if (validate_required(inventoryId,'Inventory must be filled 
			out!')==false)
			{inventoryId.focus();return false}
			
			if (validate_required(assignedTo,'Assigned to must be 
			provided!')==false)
			{assignedTo.focus();return false}
			
			if (validate_required(scheduledDate,'Scheduled date must 
			be provided!')==false)
			{scheduledDate.focus();return false}
			
			if (validate_required(scheduledTime,'Scheduled time must 
			be provided!')==false)
			{scheduledTime.focus();return false}
			
		}
	}
	
	
	
	
	function addService(services,serviceId)
	{
		for (var i = 0; i < services.length; i++) 
		{
			if (services.options[i].selected) 
			{
				serviceIdLength = serviceId.length++;
				serviceId.options[serviceIdLength].text = 
					services.options[i].text;
				serviceId.options[serviceIdLength].value = 
					services.options[i].value;
				
			}
		}
	}
	
	
	function removeService(serviceId)
	{
		for (var i = 0; i < serviceId.length; i++) 
		{
			if (serviceId.options[i].selected) 
			{
				
				serviceId.options[i].text = '';
				serviceId.options[i].value = '';
				serviceId.options[i].selected = false;
				serviceId.options[i].remove();
			}
			
		}
		
	}
	
	function validateAssignInventoryForm()
	{
		
		var serviceArr=document.getElementsByName("serviceArr[]");
		length=serviceArr.length;
		isAnySelected = false;
		
		for (var i=0;i<length;i++) {="" if="" (servicearr[i].checked="=" true)="" isanyselected="true;" i="length;" }="" var="" servicerequested="new" array();="" inventorieshavingsameservice="new" serviceshavingsameinventory="new" isservicerequested="0;" for="" (var="" value="serviceArr[i].value;" valueelements="value.split(":");" inventory="valueElements[0];" service="valueElements[1];" serviceinstance="valueElements[2];" servicerequested[service]="serviceInstance;" (serviceinstance=""> 0)
			   isServiceRequested = 1;
			   
			if (serviceArr[i].checked == true)
			{
			   if (inventoriesHavingSameService[service] >= 0)
			   	inventoriesHavingSameService[service]=inventoriesHavingSameService[service]+1;
			   else 
			   	inventoriesHavingSameService[service]=1;
			   
			   if (servicesHavingSameInventory[inventory] > 0)
			   	servicesHavingSameInventory[inventory]=servicesHavingSameInventory[inventory]+1;
			   else
			   	servicesHavingSameInventory[inventory]=1;
			}
			
			
		}	
		if (   (!isAnySelected) && (isServiceRequested) )
		{
			alert('Service & inventory requested. But no checkbox is selected');
			return false;
		}
		else if (!isAnySelected)
		{
			var response = confirm('No checkbox is selected, do you want to proceed');
			if (!response) return false;
		}
		
		var errMsg ='';
		
		for (k=1;k<servicerequested.length;k++) {="" if="" (servicerequested[k]="">= 0 )
			{	
				if ( (serviceRequested[k] != inventoriesHavingSameService[k])  )
				{
					if (serviceRequested[k]>0) 
						errMsg = errMsg + "Inventory is not 
						checked properly for service " + k 
						+", Requested:" + serviceRequested[k] +", 
						Assigned:" + inventoriesHavingSameService[k] + "n";
					else if (serviceRequested[k]==0 && inventoriesHavingSameService[k]>0)
						errMsg = errMsg + "Inventory is not 
						checked properly for service " + k 
						+", Requested:" + serviceRequested[k] +", 
						Assigned:" + inventoriesHavingSameService[k] + "n";
				}
			}
		}
			
		if (errMsg.length>0)
		{
			alert(errMsg);
			return false;
		}
		return true;
	}
	
	//not 100% right, will fix later
	function checkDateFormat()
	{
		var pattern = new RegExp(0|1[0-9]/[0-3][0-9]/[0-9][0-9]);
		if(document.getElementById('timestampStarted').value.match(pattern))
		{
			var date_array = document.getElementById('timestampStarted').value.split('/');
			
			var month = date_array[0];
			var day = date_array[1];
			var year = date_array[2];

			// This instruction will create a date object
			source_date = new Date(year,month,day);
	
			if(month != source_date.getMonth())
			{
				alert('Month is not valid!');
				return false;
			}
	
			if(day != source_date.getDate())
			{
				alert('Day is not valid!');
				return false;
			}
			
			if(year != source_date.getYear())
			{
				alert('Year is not valid!');
				return false;
			}
		}
		else
		{
			alert('Date format is not valid!');
			return false;
		}
	
		return true;
	}

	//used by assignService.php
	function initializeServiceInstanceArr()
	{
		if (serviceInstancesArrAtLoad.length == 0)
			serviceInstancesArrAtLoad=document.getElementsByName("serviceInstances[]");
		length=serviceInstancesArrAtLoad.length;

		for(i=0;i<length;i++) {="" temparr[i]="serviceInstancesArrAtLoad[i].value;" }="" used="" by="" assignservice.php="" temparr="" is="" filled="" up="" at="" the="" page="" load="" and="" function="" validateassignserviceform(thisform,serviceid)="" var="" flag="false;" with="" (thisform)="" if="" (validate_required(timestampstarted,'start="" date="" must="" be="" out!')="=false)" {timestampstarted.focus();return="" false}="" (checkdateformat()="=false)" {return="" serviceinstancesarratsubmit="document.getElementsByName("serviceInstances[]");" length="serviceInstancesArrAtSubmit.length;" for="" (var="" i="0;i<length;i++)" (serviceinstancesarratsubmit[i].value="" !="tempArr[i])" break;="" (flag)="" service="" id="" checked="" otherwise="" data="" will="" not="" passed="" to="" php="" scripts="" <="" serviceid.length;="" i++)="" serviceid.options[i].selected="true;" return="" true;="" else="" alert('nothing="" has="" been="" changed');="" false;="" checkallinventories2(serviceid)="" servicecheckall="document.getElementsByName("serviceCheckAll[]");" inventorycheckall="document.getElementsByName("inventoryCheckAll[]");" servicearr="document.getElementsByName("serviceArr[]");" lengthinventorycheckall="inventoryCheckAll.length;" lengthservicearr="serviceArr.length;" status="false;" (i="0;i<length;i++)" (servicecheckall[i].value="=serviceId)" lengtharr="serviceArr.length;" (j="0;j<lengthArr;j++)" value="serviceArr[j].value;" valueelements="value.split(':');" (valueelements[1]="=serviceId)" servicearr[j].checked="status;" servicecheckall.checked;="" !servicearr[j].checked;="" (status="=false)" inventoryid="valueElements[0];" alert(inventoryid);="" alert(lengthinventorycheckall);="" (inventorycheckall[i].value="=inventoryId)" inventorycheckall[i].checked="false;" (k="0;k<lengthServiceArr;k++)" value2nd="serviceArr[k].value;" valueelements2nd="value2nd.split(':');" (valueelements2nd[0]="=inventoryId)" (servicearr[k].checked="=false)" (flag="=true)" checkallservices2(inventoryid)="" lengthservicecheckall="serviceCheckAll.length;" (valueelements[0]="=inventoryId)" serviceid="valueElements[1];" servicecheckall[i].checked="false;" (valueelements2nd[1]="=serviceId)" validateemail(="" strvalue)="" objregexp="/(^[a-z]([a-z_.]*)@([a-z_.]*)([.][a-z]{3})$)|" (^[a-z]([a-z_.]*)@([a-z_.]*)="" (.[a-z]{3})(.[a-z]{2})*$)="" i;="" check="" valid="" email="" objregexp.test(strvalue);="" validateemailcreationform(thisform)="" (validate_required(email,'email="" {email.focus();return="" (validate_required(domain,'email="" domain="" {domain.focus();return="" *emailaddr="email.value+'@'+domain.value;" alert(emailaddr);="" (validateemail(emailaddr)="=false)" {alert('please="" provide="" address');email.focus();return="" false;}*="" (validate_required(password,'password="" {password.focus();return="" (validate_required(password2,'please="" re-enter="" password!')="=false)" {password2.focus();return="" (password.value="" {alert('passwords="" match');password2.focus();return="" *if="" (forwardaddress.value.length="">0 )
			{
				var forwardAddresses = forwardAddress.value.split(',');
				var length=forwardAddresses.length;
				for(var i=0;i<length;i++) {="" alert(forwardaddresses[i]);="" if="" (validateemail(forwardaddresses[i])="=false)" {alert('please="" provide="" valid="" forward="" address');forwardaddress.focus();return="" false;}="" }="" }*="" function="" validatenodecreateform(thisform)="" with="" (thisform)="" (validate_required(name,'name="" must="" be="" filled="" out!')="=false)" {name.focus();return="" false}="" *if="" (validate_required(communityid,'community="" {communityid.focus();return="" false}*="" validatedocsisnodecreateform(thisform)="" (validate_required(nodeid,'node="" {nodeid.focus();return="" (validate_required(docsisservicegroupid,'docsis="" service="" group="" id="" {docsisservicegroupid.focus();return="" validateaddtowhiteblacklistform(thisform)="" (validate_required(email,'email="" {email.focus();return="" (validate_required(addto,'add="" to="" {addto.focus();return="" (validateemail(email.value)="=false)" email="" address');email.focus();return="" var="" passstr="&email=" +email.value+'&addto="+addTo.value+" &emailid="+emailId.value;
			expandtab(" maintab',11,passstr);="" validatealiascreateform(thisform)="" (validate_required(alias,'alias="" {alias.focus();return="" (validate_required(destination,'destination="" {destination.focus();return="" ajaxfunction()="" page_request="false" (window.xmlhttprequest)="" mozilla,="" ie7,="" safari="" etc="" xmlhttprequest()="" else="" (window.activexobject)="" ie="" try="" activexobject("msxml2.xmlhttp")="" catch="" (e)="" activexobject("microsoft.xmlhttp")="" return="" false="" page_request;="" changemodeloptions()="" (!page_request)="" false;="" manufacturerid="document.getElementById('manufacturerId');" modelid="document.getElementById('modelId');" lengthmodelid="modelId.options.length;" modelid.removeall();="" page_request.onreadystatechange="function()" if(page_request.readystate="=4)" modelids="page_request.responseText;" modelidarr="modelIds.split('~');" length="modelIdArr.length;" while(modelid.options.length="">=1)
				{
					lengthModelId=modelId.options.length;
					modelId.options[lengthModelId-1]=null;
				}
      
        		for(var i=0;i<length-1;i++) {="" values="modelIdArr[i].split(':');" var="" newoption="document.createElement("option");" newoption.value="values[0];" newoption.innerhtml="values[1];" modelid.appendchild(newoption);="" }="" page_request.open('get',="" '="" inventory="" changemodelslist.php?manufacturerid="+manufacturerId.value, true)
		page_request.send(null)
	}
	
	function ajaxFunctionGeneral()
	{
		var page_request = false

		if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
			page_request = new XMLHttpRequest()
		else if (window.ActiveXObject)
		{ // if IE
			try 
			{
				page_request = new ActiveXObject("Msxml2.XMLHTTP")
			} 
			catch (e)
			{
				try
				{
					page_request = new ActiveXObject("Microsoft.XMLHTTP")
				}
				catch (e)
				{
				}
			}
		}
		else		
			return false
		return page_request;
	}

	function reboot(deviceId)
	{
		var response=confirm(" are="" you="" sure="" to="" reboot');="" if(!response)="" exit;="" page_request="ajaxFunctionGeneral();" if="" (!page_request)="" return="" false;="" page_request.onreadystatechange="function()" if(page_request.readystate="=4)" response="page_request.responseText;" displayarea="document.getElementById('showDiagnosticsResults');" displayarea.value="response;" diagnostics="" reboot.php?deviceid="+deviceId, true)
		page_request.send(null)
	}
	
	function standBy(deviceId)
	{
		page_request = ajaxFunctionGeneral();
		if (!page_request) return false;
		
		page_request.onreadystatechange=function()
      {
      	if(page_request.readyState==4)
        	{
        		var response=page_request.responseText;
        		var displayArea = document.getElementById(" showdiagnosticsresults');="" standbystatus.php?deviceid="+deviceId, true)
		page_request.send(null)
	}
	
	function changeIpDomainAddress()
	{
		page_request = ajaxFunctionGeneral();
		if (!page_request) return false;				
		var serverTypeId=document.getElementById(" servertypeid');="" addressid="document.getElementById('addressId');" addressidlength="addressId.options.length;" modelid.removeall();="" addressids="page_request.responseText;" addressidarr="addressIds.split('~');" length="addressIdArr.length;" while(addressid.options.length="">=1)
				{
					lengthAddressId=addressId.options.length;
					addressId.options[lengthAddressId-1]=null;
				}
      
        		for(var i=0;i<length-1;i++) {="" values="addressIdArr[i].split(':');" var="" newoption="document.createElement("option");" newoption.value="values[0];" newoption.innerhtml="values[1];" addressid.appendchild(newoption);="" }="" page_request.open('get',="" '="" service="" changeipdomainaddress.php?servertypeid="+serverTypeId.value, true)
		page_request.send(null)
	}

	
	
	function validateHostingAdministrationForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(serviceName," name="" must="" be="" filled="" out!')="=false)" {servicename.focus();return="" false}="" if="" (validate_required(servertypeid,'server="" type="" {servertypeid.focus();return="" function="" validateinventorytypeassignform(thisform)="" with="" (thisform)="" (validate_required(manufacturerid,'manufacturer="" {manufacturerid.focus();return="" (validate_required(modelid,'model="" {modelid.focus();return="" (validate_required(typeid,'type="" {typeid.focus();return="" refreshcanopydiagnostics(id,inventoryid)="" page_request="ajaxFunctionGeneral();" (!page_request)="" return="" false;="" page_request.onreadystatechange="function()" if(page_request.readystate="=4)" response="page_request.responseText;" displayarea="document.getElementById('ajaxcontentarea');" displayarea.innerhtml="response;" inventory="" canopydiagnostics.php?id="+id+" &inventoryid="+inventoryId, true)
		page_request.send(null)
	}
	
	function validateDocsisNodeCreateForm(thisform) 
	{
		with (thisform)
		{
			if (validate_required(nodeName," node="" {nodename.focus();return="" (validate_required(docsisservicegroupid,'docsis="" group="" {docsisservicegroupid.focus();return="" validatedocsisdhcpaddresscreateform(thisform)="" with(thisform)="" (validate_required(startipaddress,'start="" ip="" address="" {startipaddress.focus();return="" (validate_required(cmtsinterfacebundleid,'cmts="" interface="" bundle="" {cmtsinterfacebundleid.focus();return="" validatedocsiscmtscreateform(thisform)="" (validate_required(name,'name="" {name.focus();return="" (validate_required(ipaddress,'ip="" {ipaddress.focus();return="" (validate_required(cmtscommunitystring,'community="" string="" {cmtscommunitystring.focus();return="" (validate_required(modemcommunitystring,'modem="" {modemcommunitystring.focus();return="" validatecmtsspeedcreateform(thisform)="" (validate_required(speed,'speed="" {speed.focus();return="" services="" changeservices()="" servicetypeid="document.getElementById('serviceTypeId');" serviceid="document.getElementById('serviceId');" lengthserviceid="serviceId.options.length;" modelid.removeall();="" (page_request.readystate="=4)" serviceids="page_request.responseText;" serviceidarr="serviceIds.split('~');" length="serviceIdArr.length;" while(serviceid.options.length="">=1)
				{
					lengthServiceId=serviceId.options.length;
					serviceId.options[lengthServiceId-1]=null;
				}
      
        		for(var i=0;i<length-1;i++) {="" values="serviceIdArr[i].split(':');" var="" newoption="document.createElement("option");" newoption.value="values[0];" newoption.innerhtml="values[1];" serviceid.appendchild(newoption);="" }="" page_request.open('get',="" '="" service="" changeserviceslist.php?servicetypeid="+serviceTypeId.value, true)
		page_request.send(null)
	}
	
	function validateServiceSpeedAssignForm(thisForm)
	{
		with(thisForm)
		{
			if (validate_required(serviceId," type="" &="" must="" be="" filled="" out!')="=false)" {serviceid.focus();return="" false}="" if="" (validate_required(cmtsspeedid,'cmts="" speed="" {cmtsspeedid.focus();return="" docsis="" function="" validatedocsisservicegroupcreateform(thisform)="" with="" (thisform)="" (validate_required(cmtsvlan,'dhcp="" vlan="" {cmtsvlan.focus();return="" (validate_required(cmtsinterfacename,'interface="" name="" {cmtsinterfacename.focus();return="" (validate_required(cmtsinterfacebundleid,'interface="" bundle="" {cmtsinterfacebundleid.focus();return="" validatedocsisinterfacebundlecreateform(thisform)="" with(thisform)="" (validate_required(name,'interface="" {name.focus();return="" (validate_required(docsiscmtsid,'docsis="" cmts="" {docsiscmtsid.focus();return="" (validate_required(cmtsvlanaddress,'cmts="" address="" {cmtsvlanaddress.focus();return="" validatedocsisinventorycreateform(thisform)="" (validate_required(inventorymodelid,'inventory="" model="" {inventorymodelid.focus();return="" (validate_required(docsisversion,'docsis="" version="" {docsisversion.focus();return="" validatedocsisservicecreateform(thisform)="" (validate_required(serviceid,'service="" (validate_required(downloadspeed,'download="" {downloadspeed.focus();return="" *if="" (validate_required(uploadspeed,'upload="" {uploadspeed.focus();return="" false}*="" validatedocsissettingcreateform(thisform)="" (validate_required(customerid,'customer="" {customerid.focus();return="" (validate_required(overrideconfigfile,'override="" config="" file="" {overrideconfigfile.focus();return="" hosting="" validatecustomerhostingparameters(thisform)="" (validate_required(domainid,'domain="" {domainid.focus();return="" validatehostingsiteusercreateform(thisform)="" (validate_required(username,'site="" user="" {username.focus();return="" (validate_required(password,'site="" password="" {password.focus();return="" (="" password.value.length="" <="" passwordminlength.value="" )="" alert('password="" length="" should="" at="" least="" '+passwordminlength.value);="" password.focus();return="" false="" (password.value.length=""> passwordMaxLength.value)
			{alert('Password length should be <= '+passwordMaxLength.value );
			password.focus();return false}
			
						
			if (validate_required(password2,'Please re-enter site password !')==false)
			{password2.focus();return false}
			
			if (password.value != password2.value)
			{
				alert("Site User Passwords must match");
				password2.focus();
				return false
			}
		}
	}
	
	function validateHostingDomainUserCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(domainId,'Domain name must be 
			filled out!')==false)
			{domainId.focus();return false}
			
			
			if (validate_required(username,'Domain user name must 
			be filled out!')==false)
			{username.focus();return false}
			
			if (validate_required(password,'Domain password must be 
			filled out!')==false)
			{password.focus();return false}
						
			if ( password.value.length  < passwordMinLength.value )
			{ alert('Password length should be at least '+passwordMinLength.value); 
			  password.focus();return false }
			
			if (password.value.length  > passwordMaxLength.value)
			{alert('Password length should be <= '+passwordMaxLength.value );
                         password.focus();return false}
			
			
			if (validate_required(password2,'Please re-enter site password !')==false)
			{password2.focus();return false}
			
			if (password.value != password2.value)
			{
				alert("Domain User Passwords must match");
				password2.focus();
				return false
			}
		}
	}
	
	
	//outage
	function validateOutageCreateForm(thisform)
	{
		with (thisform)
		{
			if (validate_required(subject,'Subject must be filled out!')==false)
			{subject.focus();return false}
			
			//check community selection
			var communityNamesArr=document.getElementsByName("communityNames[]");
			lengthArr= communityNamesArr.length;			
			var isAnySelected = false;
			
			for (var i=0;i

  From: http://sitestree.com/?p=3479
Categories:JavaScript
Tags:
Post Data:2016-07-09 20:33:19

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

JavaScript – Miscellaneous Validations #JavaScript

function validateDomainName(strValue)

	{

								
		return /www.[a-z0-9_-]+.[a-z]{2, 3}/ig.test(strValue);		
	}

	function validateDomainName(strValue) 
	{
		return /www.[a-z0-9_-]+.[a-z]{2, 3}/ig.test(strValue);		
	}


	//not 100% right, will fix later
	function checkDateFormat()
	{
		var pattern = new RegExp(0|1[0-9]/[0-3][0-9]/[0-9][0-9]);
		if(document.getElementById('timestampStarted').value.match(pattern))
		{
			var date_array = document.getElementById('timestampStarted').value.split('/');
			
			var month = date_array[0];
			var day = date_array[1];
			var year = date_array[2];

			// This instruction will create a date object
			source_date = new Date(year,month,day);
	
			if(month != source_date.getMonth())
			{
				alert('Month is not valid!');
				return false;
			}
	
			if(day != source_date.getDate())
			{
				alert('Day is not valid!');
				return false;
			}
			
			if(year != source_date.getYear())
			{
				alert('Year is not valid!');
				return false;
			}
		}
		else
		{
			alert('Date format is not valid!');
			return false;
		}
	
		return true;
	}



	function validateEmail( strValue) 
	{
		var objRegExp  = /(^[a-z]([a-z_.]*)@([a-z_.]*)([.][a-z]{3})$)|(^
                [a-z]([a-z_.]*)@([a-z_.]*)(.[a-z]{3})(.[a-z]{2})*$)/i;

  		//check for valid email
  		return objRegExp.test(strValue);
	}


	//AJAX Example
	function ajaxFunctionGeneral()
	{
		var page_request = false

		if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
			page_request = new XMLHttpRequest()
		else if (window.ActiveXObject)
		{ // if IE
			try 
			{
				page_request = new ActiveXObject("Msxml2.XMLHTTP")
			} 
			catch (e)
			{
				try
				{
					page_request = new ActiveXObject("Microsoft.XMLHTTP")
				}
				catch (e)
				{
				}
			}
		}
		else		
			return false
		return page_request;
	}

	function reboot(deviceId)
	{
		var response=confirm('Are you sure to reboot');
		
		if(!response)
			exit;
		
		page_request = ajaxFunctionGeneral();
		if (!page_request) return false;
		
		page_request.onreadystatechange=function()
      {
      	if(page_request.readyState==4)
        	{
        		var response=page_request.responseText;
        		var displayArea = document.getElementById('showDiagnosticsResults');
        		displayArea.value = response;
        	}
      }
		page_request.open('GET', '/Inventory/Diagnostics/reboot.php?deviceId='+deviceId, true)
		page_request.send(null)
	}

From: http://sitestree.com/?p=3477
Categories:JavaScript
Tags:
Post Data:2016-07-09 20:34:58

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

#Engineering: #Canada: #Job/Contract/Project: Any #Engineering: #Computer, #Electrical, #Electronics, #Civil, #Chemical, #Mechanical, #Naval, #Biomedical, and misc Engineering

Date Posted:2021-07-15 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

  1. electrical-and-electronics-10006
  2. Electrical Wire Products
  3. Fleet Lighting and Electrical Components
  4. transportation-equipment-and-spares-10029
  5. Fleet Lighting and Electrical Components
  6. architect-and-engineering-services-10048
  7. Architectural & Engineering Services for Ilavut Centre Renovation
  8. Architectural and Engineering Services
  9. Engineering and Architectural Services
  10. Engineering and Architectural Services
  11. Consultants for Detailed Design and Engineering Services For Active Transportation Infrastructure
  12. RFP for ENGINEERING DESIGN CONSULTANT SERVICES for CALGARY REMAND CENTRE Replace Compressors and Water Cooled Chiller for Kitchen Cooler, Replace HVAC System
  13. Engineering Services Tender 2021 & QA for Gravel Crushing
  14. Engineering Services for Intersection Improvement Program
  15. environmental-services-10050
  16. Prime Consultant Landscape Architecture or Civil Engineering Consultant Services for David Thompson Corridor Infrastructure Safety Upgrades
  17. operation-of-government-owned-facilities-10039
  18. Engineering Services for Intersection Improvement Program
  19. Owner’s Engineering Services for the Bow River Bridge
  20. professional-administrative-and-management-support-services-10040
  21. Engineering and Architectural Services
  22. research-and-development-r-d-10036
  23. Software reverse engineering prototypes development (W7701-217332/A)
  24. Engineering Services for Intersection Improvement Program
  25. special-studies-and-analysis-not-r-d-10047
  26. Engineering and Architectural Services
  27. Keywords Used:engineer,civil,mechanical,electrical,electronics,mechatronics,naval,biomedical,computer engineer,software engineer,civil engineer,biomedical,electrical engineer,electronics engineer,mechanical engineer,metallurgical,chemical engineer,industrial engineer,communications engineer,quality assurance engineer,Aerospace engineer,aeronautical engineer,Engineering manager,Agricultural Engineer,Automotive Engineer,Environmental Engineer,Geological Engineer,Marine Engineer,Petroleum Engineer,Acoustic Engineer,Acoustic Engineer,Aerospace Engineer,Agricultural Engineer,Applied Engineer,Architectural Engineer,Audio Engineer,Automotive Engineer,Biomedical Engineer,Chemical Engineer,Civil Engineer,Computer Engineer,Electrical Engineer,Environmental Engineer,Industrial Engineer,Marine Engineer,Materials Science Engineer,Mechanical Engineer,Mechatronic Engineer,Mining and Geological Engineer,Molecular Engineer,Nanoengineering,Nuclear Engineer,Petroleum Engineer,Software Engineer,Structural Engineer,Telecommunications Engineer,Thermal Engineer,Transport Engineer,Vehicle Engineer,engineering

    #Canada: #IT Jobs:#Consultants, #Contractors, #Analysts, #Engineers, #Developers, #Technology Consultants, #IT-Consultants Opportunities2021-07-15

    Apply yourself, or submit others as a candidate, Build a recruitment team to submit others as a candidate, submit RFP to be considered for projects in future, Try to become a vendor so that you are asked to submit consultants/resources in future

    1. construction-services-10004
    2. Prime Consultant Architectural Services Social Sciences Bldg. Façade Replacement
  28. energy-10007
  29. Source List (SL) for Environmental Consulting Services
  30. Prime Consultant for Main Building Foundation Repairs & Site Grading
  31. fire-fighting-security-and-safety-equipment-10010
  32. Source List (SL) for Environmental Consulting Services
  33. architect-and-engineering-services-10048
  34. Consultant Team for Bridgeland Place – Affordable Housing
  35. Prime Consultant Architectural Services Social Sciences Bldg. Façade Replacement
  36. REQUEST FOR PROPOSAL (RFP) for PRIME CONSULTANT SERVICES for EDMONTON – YELLOWHEAD YOUTH CENTER CAMPUS UPGRADES
  37. RFP for ENGINEERING DESIGN CONSULTANT SERVICES for CALGARY REMAND CENTRE Replace Compressors and Water Cooled Chiller for Kitchen Cooler, Replace HVAC System
  38. REQUEST FOR PROPOSAL (RFP) for PRIME CONSULTANT SERVICES for EVANSBURG – GRAND TRUNK K-12 SCHOOL MODERNIZATION (SOLUTION FOR EVANSBURG AND WILDWOOD) 2021 School Capital Announcement
  39. communications-photographic-mapping-printing-and-publication-services-10042
  40. Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
  41. PQR for Destination Development, Management Research and Analytic Consulting Services
  42. PQR for Research and Analytic Consulting Services
  43. educational-and-training-services-10043
  44. Anti-Racism & Anti-Discrimination Exploratory Working Group (AREWG) Consultant
  45. environmental-services-10050
  46. Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
  47. Prime Consultant Landscape Architecture or Civil Engineering Consultant Services for David Thompson Corridor Infrastructure Safety Upgrades
  48. Consulting Services for Mill Creek Improvements
  49. financial-and-related-services-10038
  50. RQQ-2020-FACA-499: VOR + 2nd Stage- Provide Accounting & Tax Consulting Services
  51. Request for Proposal (RFP) for Actuarial and Pension Consulting Services
  52. health-and-social-services-10052
  53. Psychology Consulting and Quality Assurance Services
  54. information-processing-and-related-telecommunications-services-10049
  55. REFONTE DES SITES WEB
  56. Consultant Services for an Information Technology Strategic Plan (ITSP)
  57. Consulting Services: Connected Community Strategy
  58. Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
  59. research-and-development-r-d-10036
  60. Specialist Environmental Consulting Services
  61. special-studies-and-analysis-not-r-d-10047
  62. CONSULTING SERVICES FOR STREETSCAPE ASSESSMENT
  63. Anti-Racism & Anti-Discrimination Exploratory Working Group (AREWG) Consultant
  64. Consulting Services – Construction Material Salvage & Recycling Market Assessment
  65. undefined-10055
  66. RQQ-2020-FACA-499: VOR + 2nd Stage- Provide Accounting & Tax Consulting Services
  67. EPS/BLRS Web Surveillance Solution for Short-Term Rentals in the City of Ottawa