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
Jul 17
#Canada: #IT Jobs:#Consultants, #Contractors, #Analysts, #Engineers, #Developers, #Technology Consultants, #IT-Consultants Opportunities2021-07-18
Jul 17
#Sensor: #Canada: #Job/Contract/Project: #Sensor, #Tracking, #Fusion, #Estimation, #Surveillance, #sensor network, #target #tracking, #security 2021-07-18
Date Posted:2021-07-18 .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
Keywords Used:sensor,fusion,sensor network,tracking,target tracking,surveillance,self driving car,self-driving,estimation,security,signal processing,image processing,autonomouse vehicle,facial recognition,signal,recognition,sensor fusion
Jul 17
EJB 3: Statefull EJB #Java Short Notes
States need to be maintained between calls. In EJB3 all beans are homeless [no home interface]//ShoppingCartBean.javaimport java.io.Serializable;import java.util.HashMap;import javax.ejb.Remove;import javax.ejb.Stateful;import javax.ejb.Remote;@Stateful@Remote(ShoppingCart.class)public class ShoppingCartBean implements ShoppingCart, Serializable{ private HashMap cart = new HashMap(); public void buy(String product, int quantity) { if (cart.containsKey(product)) { int currq = cart.get(product); currq += quantity; cart.put(product, currq); } else { cart.put(product, quantity); } } public HashMap getCartContents() { return cart; } @Remove public void checkout() { System.out.println("To be implemented"); }}//ShoppingCart.java//remote interfaceimport java.util.HashMap;import javax.ejb.Remove;public interface ShoppingCart{ void buy(String product, int quantity); HashMap getCartContents(); @Remove void checkout();}//client//Client.java//client uses JNDI to look up for EJB servicesimport java.util.HashMap;import javax.naming.InitialContext;import org.jboss.tutorial.stateful.bean.ShoppingCart;public class Client{ public static void main(String[] args) throws Exception { InitialContext ctx = new InitialContext(); ShoppingCart cart = (ShoppingCart) ctx.lookup("ShoppingCartBean/remote"); System.out.println("Buying 1 memory stick"); cart.buy("Memory stick", 1); System.out.println("Buying another memory stick"); cart.buy("Memory stick", 1); System.out.println("Buying a laptop"); cart.buy("Laptop", 1); System.out.println("Print cart:"); HashMap fullCart = cart.getCartContents(); for (String product : fullCart.keySet()) { System.out.println(fullCart.get(product) + " " + product); } System.out.println("Checkout"); cart.checkout(); System.out.println("Should throw an object not found exception by invoking on cart after @Remove method"); try { cart.getCartContents(); } catch (javax.ejb.EJBNoSuchObjectException e) { System.out.println("Successfully caught no such object exception."); } }}
From: http://sitestree.com/?p=4833
Categories:Java Short Notes
Tags:
Post Data:2008-11-20 09:48:27
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
Jul 17
EJB 2: How to build a stateless EJB #Java Short Notes
EJB 2: How to build a stateless EJB
- Install an EJB Server
- Specify the EJB Remote Interface
- Specify the Home Interface
- Write the EJB bean Class
- Create the ejb-jar File
- Deploy the EJB bean
- Write the EJB Client
- Run the Client
From: http://sitestree.com/?p=4832
Categories:Java Short Notes
Tags:
Post Data:2007-03-12 03:44:24
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
Jul 17
EJB 3: Stateless Bean #Java Short Notes
No need to maintain the state of a bean between calls. //CalculatorBean.java@Statelesspublic class CalculatorBean implements CalculatorRemote, CalculatorLocal{ public int add(int x, int y) { return x + y; } public int subtract(int x, int y) { return x - y; }}//CalculatorRemote.javaimport javax.ejb.Remote;@Remotepublic interface CalculatorRemote extends Calculator{}//CalculatorLocal.java import javax.ejb.Local;@Localpublic interface CalculatorLocal extends Calculator{}//Client.javaimport tutorial.stateless.bean.Calculator;import tutorial.stateless.bean.CalculatorRemote;import javax.naming.InitialContext;public class Client{ public static void main(String[] args) throws Exception { InitialContext ctx = new InitialContext(); Calculator calculator = (Calculator) ctx.lookup("CalculatorBean/remote"); System.out.println("1 + 1 = " + calculator.add(1, 1)); System.out.println("1 - 1 = " + calculator.subtract(1, 1)); }}
From: http://sitestree.com/?p=4831
Categories:Java Short Notes
Tags:
Post Data:2011-05-30 17:27:29
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
Jul 17
What is Spring Framework? What does it mean to J2EE developers #Java Short Notes
What is Spring Framework? What does it mean to J2EE developers?
Spring is a light-weight framework, very often referred as an alternative/competitor to EJB, for the development of enterprise-type applications.
Spring provides many features such as declarative transaction management, access to remote logic using RMI or web services, mailing facilities and
database abstraction.
Features of Spring Framework
- Transaction Management: A generic abstraction layer for transaction management that removes low-level interactions
- JDBC Exception Handling: An exception hierarchy to simplify the error handling strategy
- Integration with Hibernate, JDO, and iBATIS
- AOP Framework: Aspect Oriented Programming Framework
- MVC Framework: Spring provides MVC web application framework built on core Spring functionality
Spring Architecture
- Spring AOP: Provides declarative enterprise services such as declarative transaction management
- Spring ORM: Provides integration layers for object-relational mapping APIs, including JDO, Hibernate and iBatis for database access.
- Spring Web: Provides web application development stack that includes Spring MVC.
- Spring DAO: Provides standardization to data access using the technologies like JDBC, Hibernate or JDO.
- Spring Context: Provides support for using message sources, and resources. It is based on Java bean.
- Spring Web MVC: Provides MVC for web applications.
- Spring Core: Provides Dependency Injection features
From: http://sitestree.com/?p=4828
Categories:Java Short Notes
Tags:
Post Data:2007-09-08 00:28:07
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
Jul 17
Unit Testing in Eclipse for Java #Java Short Notes
Unit Testing in Eclipse for Java: just an overview
Why Unit Test?
Say, you have written some Java classes, before making use of them in real application functionalities, it’s always better to check whether the classes (their functions/methods) are working properly. Unit tests simply test a single unit like a single class, or a single function at a time. It’s almost always a good practice to design the software first, also design the classes and their methods along with interactions among classes, early in the project. After, classes and their methods are written, you should do some testing to make sure they are working properly.
How to Unit test in Eclipse?
1. You need to add junit.jar in your project build path. You can do that by selecting the project, then right click, then select properties, the java build path, then libraries tab, and then add jars/add external jars and select JUnit.jar.
2. You can create a folder to keep your unit test codes say unittestcodes.
3. The basic idea is, to test a class, you will need to create a test case class with methods like setUp, tearDown, and test methods for all the methods that you want to test (one for one). The setUp() method can be used to create the data for testing [you have to write the code though]. The other test methods will call the corresponding class methods using the data to check if the methods are working properly or not. Methods like assertTrue may come handy in the test methods.
4. How to create these test classes and test methods?
Right click the folder for testcode like unittestcodes, select new, select other, type Junit in the text box, select Junit test case…and then provide other parameters like the name of your test class, which class do you want to test, do you want to have setUp(), tearDown() methods or not?. In the next step, you have to select which methods of the class you want to test. Then the test class (skeleton) will be written for you.
5. In the setUp() method, write code to build test data. From the other test methods call the related class methods to test them.
6. How to run the experiment: right click the name of this test class from the left window, select run as, select Junit test case. Now analyze the output and fix the class methods if required. Try with different data, data from different ranges, boundary value data and you know what to test in your use cases. From: http://sitestree.com/?p=4821
Categories:Java Short Notes
Tags:
Post Data:2007-03-28 00:33: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
Jul 17
How to upload data from an excel file to database using servlets? #Java Short Notes
Use third party API bundles like jexcelApi.
http://jexcelapi.sourceforge.net/.
—
create an XML file to define the structure of your excel file like how many columns, column names, corresponding database table/class column/variable name,
Create a Java class that can retrieve information from that xml file. You can use XPATH and DOM for the purpose. check http://www.ibm.com/developerworks/library/x-javaxpathapi.html for ideas
—
write an html form that use input type=’file’, the form action should point to the servlet that will collect data from the excel file and store it in the database. servlet will collect data from the input stream
———–
in the servlet use the class that represents the xml file. to get information about the file that will help mapping the excel file data to the corresponding table column. You can also create a class representing the database table. From servlet extract data, create an object of table class type, and create a function that takes the object and inserts into the table.
—————
How servlet will process the excel file:
jexcelAPI Workbook class represents the total workbook
use getsheet method of workbook class to get the sheet number 0,1,2….
use getCell method of worksheet to get a particular cell object in the excel file
use getContents on the cell object to get data in string type.
from the XML file having excel file structure, you can get number of columns in the file. So you can write a look that will read data row,column wise from the excel file
—-
code to process excel file [in servlet]
Workbook workbook = Workbook.getWorkbook(new File(“myfile.xls”));
Sheet sheet = workbook.getSheet(0);
Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1);
String stringa1 = a1.getContents();
String stringb2 = b2.getContents();
String stringc2 = c2.getContents();
———————-
check the following webpage, it provides file upload and extract data from input stream in servlet applications
http://jexcelapi.sourceforge.net/resources/faq/
From: http://sitestree.com/?p=4801
Categories:Java Short Notes
Tags:
Post Data:2011-07-14 06:40:06
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
Jul 17
Linked List and Iterator in Java #Java Short Notes
/* * LinkedList.java * * Created on January 10, 2008, 8:51 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package linkedlist;import java.util.List;import java.util.LinkedList;import java.util.Iterator;import java.util.ListIterator;import java.util.Collections;import java.util.Random;/** * * @author Sayed */public class LinkedListTest { /** Creates a new instance of LinkedList */ public LinkedListTest() { } /** *Example operations using linked lists */ public void linkedListOperation(){ final int MAX = 10; int counter = 0; //create two linked lists List listA = new LinkedList(); List listB = new LinkedList(); //store data in the linked list A for (int i = 0; i < MAX; i++) { System.out.println(" - Storing Integer(" + i + ")"); listA.add(new Integer(i)); } //print data from the linked list using iterator Iterator it = listA.iterator(); while (it.hasNext()) { System.out.println(it.next()); } //print data from the linked list using listIterator. counter = 0; ListIterator liIt = listA.listIterator(); while (liIt.hasNext()) { System.out.println("Element [" + counter + "] = " + liIt.next()); System.out.println(" - hasPrevious = " + liIt.hasPrevious()); System.out.println(" - hasNext = " + liIt.hasNext()); System.out.println(" - previousIndex = " + liIt.previousIndex()); System.out.println(" - nextIndex = " + liIt.nextIndex()); System.out.println(); counter++; } //retrieve data from the linked list using index for (int j=0; j < listA.size(); j++) { System.out.println("[" + j + "] - " + listA.get(j)); } //find the location of an element int locationIndex = listA.indexOf("5"); System.out.println("Index location of the String "5"" is: "" + locationIndex); //find the first and the last location of an element System.out.println(""First occurance search for String ""5"". Index = "" + listA.indexOf(""5"")); System.out.println(""Last Index search for String ""5"". Index = "" + listA.lastIndexOf(""5"")); //create a sublist from the list List listSub = listA.subList(10
From: http://sitestree.com/?p=4788
Categories:Java Short Notes
Tags:
Post Data:2013-04-04 09:12:30
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
Jul 17
MVC : Struts : Java : Industry Web Application #Java Short Notes
Industries use frameworks for application development quite often. For example: Java concepts like JSP, Servlet, Swing, Bean, JDBC can be used directly to create web-applications but when such applications become big, it becomes difficult to maintain and develop them further. Hence, frameworks like struts are used to develop large web-based Java applications. This makes maintenance and further development easier. If you need to write a very simple web application with a few pages, then you might consider using JSP/Servlet directly otherwise Struts like frameworks are better options.Struts-1 uses the concept Model View Architecture (MVC) and provides the controller. In MVC model, Model represents business logic, View represents user interfaces, and Controller represents/controls control flow of the application. Struts' control layer is based on standard technologies like Java Servlets, JavaBeans, ResourceBundles, and XML, as well as various Apache Commons packages, like BeanUtils and Chain of Responsibility. For the Model, struts-1 framework can interact with standard data access technologies, like JDBC and EJB, as well as most any third-party packages, like Hibernate, iBATIS, or Object Relational Bridge. For the View, the framework works well with JavaServer Pages, including JSTL and JSF, as well as Velocity Templates, XSLT, and other presentation systems.The framework's Controller acts as a bridge between the application's Model and the web View. When a request is received, the Controller invokes an Action class. The Action class consults with the Model to examine or update the application's state. The framework provides an ActionForm class to help transfer data between Model and View.Struts-1 Configuration-----------------------web.xml is one of the configuration files. It is an XML-formatted file that works as a deployment descriptor. struts-config.xml is another resource file to initialize the applications resources. These resources include ActionForms to collect input from users, ActionMappings to direct input to server-side Actions, and ActionForwards to select output pages.Sample struts-config.xml file. Other resources like Validators can be initialized here.
From: http://sitestree.com/?p=4787
Categories:Java Short Notes
Tags:
Post Data:2010-03-13 02:59:40
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
