Monday 31 August 2015

How to integrate the LinkedIn with OpenERP(Odoo)?

Step-1 Install the Web LinkedIn module.

Step-2 After that custmozie .py(Python file) file:

In below example, I have custmozied .py file. You can directly copy the below python code in your .py file.

import openerpimport openerp.addons.webfrom openerp.osv import fields, osvclass Binary(openerp.http.Controller):

For full blog about How to integrate the LinkedIn with OpenERP(Odoo)visit FindNerd.
You can also increase your tech knowledge through findnerd by giving answers of tech queries at findnerd's Tech Q & A Section.



jQuery .prop() vs .attr()

Jquery .attr():

    Get the value of an attribute for the first element in the set of matched elements.

    An attribute value may only be a string.

Jquery .prop():
Gets the value of a property for the first element in the set of matched elements.
A property can be of any type. For example, the checked property is of Boolean type.

For full blog about jQuery .prop() vs .attr() visit FindNerd.
You can also visit findnerd to ask tech queries related to Android,php,iPhone,Javascript etc.

Sunday 23 August 2015

Thread States and Lifecycle in Java

Thread Lifecycle: Want to start the multithreaded programming? Before starting you need to know what is Thread and what is the life cycle of the Thread. Thread having different states and life cycle methods. To know about the thread you can Visit my last post Java Thread Example. Here we will talk about the life-cycle of the Thread.
Following are the states in the life cycle of the Threads :
  1. New: When we initialize the new thread using new operator, new thread is created and state is called New Thread. In this state thread is not active or running.
  2. Runnable: At the time when we call Thread.start() method, state of thread object changed to Runnable and it's now on OS that it when or how it will get CPU to run. In this state the control is given to Thread scheduler to finish its execution.
To View full blog about Thread States and Lifecycle in Java visit FindNerd.

Thursday 20 August 2015

How can we resolve conflict between prototype and jQuery?

To resolve a conflict between jQuery and prototype, use below method



jQuery.noConflict



and using jQuery instead of



$('code').code;
jQuery.noConflict();
jQuery(function($)



To view the full code about How can we resolve conflict between prototype and jQuery? visit the link mentioned.
Also visit the javascript developer forum to ask questions related to java, or you can also post your queries in other programming languages like Android,PHP, Javascript, HTML etc. on ask tech query section.

Wednesday 19 August 2015

Java Thread Example

Thread: Thread is a lightweight process. Thread requires less memory space and resources to create and exists in the process, thread shares data and resources of the process.
Every Java application has at least one Thread (main thread). There are some threads running in the background by default like garbage collector, memory management etc. But as a application's point of view we can create more then one threads as per our requirement.
Java provides two ways to create a thread programmatically.

For full blog about Java Thread Example visit FindNerd.

You can check more informative blogs and tutorials at java development blogs section and can also browse the java developer forum for posting and viewing latest questions on java development.

Tuesday 18 August 2015

Difference between Service, Provider and Factory in AngularJs

In this blog we will discuss about the differences b/w services ,provider and factory in angular jS
a)Service-
This will return the actual function with an instance of the function.
Syntax-
module.service( 'serviceName', function );
b)Factory-
This will return the actual value returned by the function.
Syntax-
module.factory( 'factoryName', function );
c)Provider-
This will return the value returned by the $get function of the function.
Syntax-
module.provider( 'providerName', function );
TO read full blog about Difference between Service, Provider and Factory in AngularJs visit FindNerd.


Monday 17 August 2015

Difference between get() and load() methods in Hibernate

What is the difference between get() and load(): The most important question for the interview's perspectives that what is the difference between get and load methods in Hibernate? Developers use both the functions when coding but most of them use them without knowing the pros and cons of these methods.
In this article we will try to make you understand the similarities and difference between hibernate load and get methods.

Similarities between load() and get() methods :
  1. The load() and get() both methods used to retrieve object (a row) from database.
  2. Syntax wise both load() and get() methods are same.
  3. load() method is older whereas get() is new, but both belongs to Hibernate API.
  4. load() and get() both methods belongs to Session interface.
To read full article about Difference between get() and load() methods in Hibernate visit Findnerd.
You can also ask questions and check your knowledge on Java by posting and giving answers of tech queries on our java developer forum

Friday 14 August 2015

Check if an element is visible in viewport



Hi Friends,
Many times we get into a situation where we want to know whether an element exists within a viewport of browser or not.
Here below. I am writing a function to check whether an elements exists in a viewport or not.
It will return true or false and by using this, one can use it in different situations.
.

First we will store the DOM element into a variable
var element = document.getElementById("element_id");
Case 1: If we want to know element is completely inside the viewport.
function checkIfElementIsWithinViewport(element) {    if((element != undefined) && (element != null)) {        var element_offets = el.getBoundingClientRect();
To read more about check if an element is visible in viewport visit FindNerd.
You can also ask questions related to Javascript in our javascript forum section.

Thursday 13 August 2015

Creating a table in Android SQLite

There are situation when we need to maintain(store) data at our application level, this is mainly done when we try to execute functionalists at offline mode. So for these kind scenarios android sdk has provide us class known as SQLiteOpenHelper with the help of which we can maintain a database.
The very first step is to learn how to create a table. And before that you should know what is Table and Columns . It is very basic terminology of sqlite. So briefly we can say that table is a structure with various columns in which we store the data of a particular data type. Lets take up an example a very common example. Suppose you need to save an employee data, here I’m just saving the name of employee, his salary, his designation. You can have more information as per your requirement.
To know more about Creating a table in Android SQLite please visit FindNerd.
Apart from this you can also ask your Android Programming problems or queries at Android Developer Forum & the experts here in this forum will resolve your queries within shortest possible time frame.

Wednesday 12 August 2015

Java Thread Join Example

join() method in Java Thread : The join() method of a Thread class allows the current thread to wait until the thread in which it is called will die. Sometime a question is asked in the interviews that How can we make sure main() is the last thread to finish in Java Program? So the answer is here that the join() method is give to the way to confirm that all the child threads are finished execution before main thread terminated.



There are three overloaded join functions:
  1. public final void join(): This method pause the current thread until the thread on which it’s called is terminated.If in any case the current thread is interrupted It throws InterruptedException.
  2. public final synchronized void join(long millis): This method is used to pause the thread on which it’s called to be terminated(dead) or wait for specified milliseconds......
To read full blog about Java Thread Join Example visit FindNerd
Get in contact with FindNerd's tech experts for various programming problems. Nowadays most of the queries asked by users is from java developer forum section

Tuesday 11 August 2015

How to sort a list items alphabetically using JavaScript

Hello All,
Working with HTML and JavaScript, many time we render html in our page with the help of JavaScript, like adding a list that has many list items.
To show that list in a alphabetical order (ascending or descending order) in our HTML page using JavaScript we can use following block of code:
function SortList(elementId) {    var mylist = $("#" + elementId);    $(mylist).children("li").sort(function (item1, item2) {        var compFirst = $(item1).text().toUpperCase();        var compSecond = $(item2).text().toUpperCase();        if (!((compFirst != "") || (compSecond == "DEFAULT"))) {            return (compFirst < compSecond) ? -1 : (compFirst > compSecond) ? 1 : 0;

To view full blog about How to sort a list items alphabetically using JavaScript visit FindNerd.
You can also ask questions of javascript at our Javascript Developer Forum Section.

Monday 10 August 2015

Difference between autowire byName and byType in Spring

Spring framework provides the way to inject the bean dependencies using the autowire functionality. By default autowire functionality is disabled in spring framework. A developer explicitly define the autowiring configuration in spring configuration xml file. And this point is to remember that autowiring is only supported for object dependencies.
The difference between byType and byName autowiring is as follows :
  1. Autowire byType will search for a bean in configuration file, whose id match with the property type to be wired whereas autowire byName will search for a bean whose id is matching with the property name to be wired.
  2. As a syntax wise difference is as follows:
    package com.evon;
    public class Company {    private Employee emp;    public String setEmp(Employee emp) {     this .emp = emp;     }          }
To view full blog about Difference between autowire byName and byType in Spring visit FindNerd.
You can also read such more blogs at our Java Development Blogs section.
You can also ask question related to Java at our Java developer forum.



Friday 7 August 2015

Remove/add list using ng-click

Here is an simple example to add and delete list using angular ng-click

Html -

    <div ng-app="nameApp" ng-controller="TitleCtrl">
        <ul>
          <li ng-repeat="name in names">{{name}}
          <a href="" ng-click="removeName(name)">remove</a></li>
        </ul>
        <form ng-submit="addName()">
          <input type="text" ng-model="enteredName">
          <input type="submit" value="+">
        </form>
      </div>

For full blog about Remove/add list using ng-click visit Findnerd.

Also if you have any query related to javascript then you can post it on our javascript questions and answers developer forum. We are Happy to hear you!!!

Thursday 6 August 2015

How to add a Podfile in your Project

Below is the step-wise process for integrating a Podfile easily in your Application.
  1. Open Terminal
  2. Change the directory in Terminal to the location where your Xcode project resides.
  3. When you reach to the desired project location in which you want to add a PodFile. You can create an empty file by using the command “touch Podfile”.
  4. Then by using “open Podfile” command you can open the file you have created before and then add the desired podfile to that and close the window.
To read this full blog about Integrating a Podfile in a Project visit FindNerd.
FindNerd is a social platform for tech nerds to share knowledge by posting blogs, forums on web development along with job freelancing & project management feature.

Wednesday 5 August 2015

Java connectivity JDBC driver

Hi Friends,
This article will help you to identify basic connectivity using JDBC driver in Java. There are only four categories of JDBC driver provided by SUN, Type 1, 2, 3, and 4, which is explained below −



Type 1: JDBC-ODBC (Bridge Driver)
In a Type 1 driver, a JDBC bridge is used to access ODBC drivers installed on each system. One can configure ODBC on his system in a DSN ( Data Source Name) which will represent target of that database.
It was mostly used driver as it configures database in Access. But nowadays it is used only for test purpose besides that other DBMS drivers are being used.



Type 2: JDBC-Native API Driver
In a Type 2 driver, JDBC API calls are converted into native C/C++ API calls, which are unique to the database. These drivers are basically provided by the database vendors only and used in the same manner as the JDBC-ODBC Bridge. So vendor specific driver needs to be used on user system.
For full blog about Java connectivity JDBC driver Visit Findnerd.
FindNerd -A platform/social network that covers all of your needs like tech queries, post blogs,can schedule a meeting,record your desktop and share, post tech jobs etc.
On Findnerd, most of the queries asked from the section of Android, iPhone, HTML and Java developer forums.

Registering Service using value in angularJS

A service is created by a service factory and service factories are functions which are created by a service provider(constructor function).
When instantiating service provider, there must be a property named $get, which holds service factory logic.
The $provide provide helping method for registering services with the help of $injector.


When we talk about registering a service using value, here value is nothing more than a simple injectable value. The value can be a string, number, array, function, object. The difference between value and constant is, it can not be injected into configuration. It accepts two parameters, that are: name and value. Syntax is:


value(name, value);
For full Blog about Registering Service using value in angularJS visit FindNerd.
You can ask technology related questions at FindNerd Forum section. Mostly questions asked from the community Java, Androip, PHP and JavaScript forums.

Tuesday 4 August 2015

JSP Life Cycle



JSP is a server side scripting language. JSP is used to develop web applications. We can do everything on JSP which we can do with Servlet. In JSP we can add the Java code inside the HTML tags.


There are three service methods provided by JSP:
  1. public void jspInit()
  2. public void _jspService(HttpServletRequest request, HttpServletResponse response)
  3. public void jspDestroy()



Following is the Life-cycle of JSP :
  1. Parsing JSP : JSP page is first compiled for the syntax or other errors.
  2. Translation from JSP to Servlet : After successfully parsing, the JSP is translated to the Servlet or Java file.
  3. Compiling the Servlet : In this phase converted Servlet is compiled to class file.
  4. Class Loading : Loading the Servlet class into memory.
  5. Installation : Creating Servlet instance in memory.
For full blog about JSP Life Cycle visit FindNerd.
You can also find such more blogs related to Java at our Java Developers community section.
If you have any queries related to java,you can also post it on java questions and answers forum of FindNerd.

Monday 3 August 2015

Validations in Angular JS

Hello all,
We usually validate our HTML form before submitting it as it's a good practice to do that and to validate the HTML form we can use JavaScript Validation in client side, or we can also use custom JQuery code where we can apply different type logics and Regex to validate the form.
As an example we have following code packet which demonstrate the Validation feature of AngularJS :
<body ng-app="myApp">    <div class="container signInMainDiv">        <div class="table-responsive form-group">            <div ng-controller="AddUserController">                <form name="htmlForm" id="htmlForm" role="form" style="border:none; box-shadow:none;" ng-submit="htmlForm.$valid && addFormDetails(formDetails)">
For more, view the full Blog about Validation in Angular JS visit FindNerd.
FindNerd gives users a special Desktop Recording tool to record and share programming problems with others, and also provide a fantastic platform in the form of forums to ask questions and provide answers of the questions posted on findnerd. Here the most searched topis are related to Android, HTML, iphone, Javascript question and Answers .