CLICK HERE TO EARN MONEY FREE

Sunday, July 21, 2019

Arraylist and Forlop

package com.anand.model; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; import org.json.JSONException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; public class Test { public static void main(String[] args) throws JsonProcessingException, JSONException { ArrayList dataList = buildData(); ArrayList uniqueList = getUniqueList(dataList); ArrayList> response = buildResponse(uniqueList); response = buildCompleteResponse(dataList, uniqueList, response); ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter(); String json = ow.writeValueAsString(response); System.out.println(json); } private static ArrayList> buildCompleteResponse(ArrayList dataList, ArrayList uniqueList, ArrayList> response) { for (int i = 0; i < dataList.size(); i++) { int poistion = i; int mtd = dataList.get(i).getMTD() > 0 ? response.get(poistion).get(0).getMTD() + 1 : response.get(poistion).get(0).getMTD() + 0; response.get(poistion).get(0).setMTD(mtd); int ytd = dataList.get(i).getYTD() > 0 ? response.get(poistion).get(0).getYTD() + 1 : response.get(poistion).get(0).getYTD() + 0; response.get(poistion).get(0).setYTD(ytd); int inflight = dataList.get(i).getIN_FLIGHT() > 0 ? response.get(poistion).get(0).getIN_FLIGHT() + 1 : response.get(poistion).get(0).getIN_FLIGHT() + 0; response.get(poistion).get(0).setIN_FLIGHT(inflight); response.get(poistion).get(0).setName(dataList.get(i).getName()); response.get(poistion).get(0).getNFIDArray().add(dataList.get(i).getNFID()); } return response; } public static ArrayList getUniqueList(ArrayList dataList) { ArrayList uniqueList = new ArrayList<>(); for (int i = 0; i < dataList.size(); i++) { uniqueList.add(dataList.get(i).getName()); } Set uniqueSet = new HashSet(uniqueList); ArrayList mainList = new ArrayList(); mainList.addAll(uniqueSet); return mainList; } public static ArrayList> buildResponse(ArrayList uniqueList) { ArrayList> response = new ArrayList<>(); for (int i = 0; i < uniqueList.size(); i++) { Values values = new Values(); ArrayList valueList = new ArrayList(); ArrayList nfidLsit = new ArrayList(); values.setNFIDArray(nfidLsit); valueList.add(values); response.add(valueList); } return response; } public static ArrayList buildData() { ArrayList dataList = new ArrayList<>(); for (int i = 0; i <10000; i++) { dataList.add(new Data("SA", "Design"+i, "2000"+i, 1, 0, 1, 1, 0, 1)); } return dataList; } }

Monday, April 11, 2016

MongoDB installation in windows and CRUD Operations

Saturday, April 9, 2016

Learn Git hub in 15 mins

Tuesday, April 14, 2015

Get 1000+ Likes in Facebook - 100% Working Auto Like Tricka


Tired Of Waiting For The Persons To Like Your Status? Want(Or Pretend) To Be Famous Person In Your Group?

To be true it is everyone's dream to be the most famous person on facebook.

Getting more no. of likes for your status and photos show your popularity. Facebook is the most feminist website where only girls get loads of likes.

Step 1: At first Go to Go Hit Likes and Register an account for free.







Step 2: Once Registered,Login with your Username and Password.




Step 3: Now,Visit http://more.gohitlikes.com/coupons.php and Redeem following coupons


 8018-4219-2078-7068

It will give you approximately 7000 coins which is enough to get a lot of Likes on Facebook.
Step 4: Now Open your dashboard and Click on Add Page.





Step 5: Select the type of page (Facebook Likes, Facebook Photo Likes, Facebook Share, Facebook Followers, Website, Instagram Likes, Instagram Followers, LinkedIn Share, Myspace Connections, Pinterest Followers, Pinterest Likes, Twitter Tweets, Twitter Followers, Traffic Exchange, Youtube Views, Youtube Subscribers, Youtube Share) and add your page there.





Step 6: Add the URL of your Page, Page Title, Select the coin spend on every like.Leave the rest option as default and finally Click on Add Page.


Step 7: Now Its time to sit back. I have already provided you coupon to get 7000 coins. So, you do not need to worry about it. People shall automatically come to your link and like them. Only your coins will be deducted on every like. But, as I said you have too much coin to spend. Although, If you want to get more coins then you can do so by liking other's page, status, pictures etc.






-------------------------------------------------------------------------------------------------------

OR
--------------------------------------------------------------------------------------------------------------------------


You might have thought that there is no way of getting too many likes on facebook and still dreaming about it.

If you are such a person, you have come to the right place.


So here is how you can get auto likes.




(click on the image to enlarge)


  • After you click on 'click here' you might be asked to allow permissions to a facebook application. After installing copy the url of that page which is your Access Token, it will be like

https://www.facebook.com/connect/login_success.html#access_token=AAABempp6Ls0BAFriXnchu3
RI3fTkTrrHqVI8LmZBWBTrZBd0VgpGSVXwBctohE3vp0mvM49wF1BRvF2Lqi6i3xSrGbsZCcZD&expires_in=0


  • Copy it and paste on the box provided in AutoLike4u homepage and click submit.
(click on the image to enlarge)


  • Wait for the next page to load with some subscribe buttons. Subscribe any one there and click submit button.(Subscribing is not compulsory)

  • Next page you get will be having your 5 recent updates with a subscribe button corresponding to each. Click on the submit button of your update for which you need hooping likes.
  • Most probably after doing this you may be asked to login to your facebook account again. This doesn't happen all the time. Its good if it happens so.
  • Repeat the submission on autolike4u to get hooping number of likes.

Wednesday, March 18, 2015

How to get Tether onto your Windows computer

These instructions will explain how to get Tether onto your Windows computer. All you need to do is follow the instructions below. If you have a Mac and need the instructions, click here.
Instructions

Download and install the Tether PC software:
http://tether.com/a/tether.exe
Connect your Android to your computer with the USB cable that came with your Android. On your Android phone go to Settings > Applications > Development and check USB debugging.
Once the download completes on your PC, please run the setup and follow the instructions. At some point you may see a screen that says it can't verify the publisher, this is because we are using Google's default Android Drivers. Please be sure to agree and install these drivers.
During the Install process it will install Tether on your Android over USB.
Run Tether on your PC and on your Android. You will be prompted to select USB. Please go ahead and connect it.
You should now see data/packets flowing on Tether. That means you're connected!
If you're happy with Tether and want to purchase simply visit the following website: http://tether.com/android/order
If you're having problems and not interested in our product, we would appreciate your feedback: http://tether.com/support

Trick to Remove Items From Right-Click Menu


Most annoying thing about windows, after the installation of too many applications the context menu becomes too large. Some applications shortcuts are useful but most of them are useless .You should put only those items in right click menu which you use frequently.However there is no direct method to remove an item from the right click menu and you have make changes in the registry.

Registry contains all the information about components and applications running on Windows operating system. So, small change in registry settings may cause big irreversible damage. It is recommended to create a backup of all the registry files before doing any changes in it.

Trick to Remove Items From Right-Click Menu

 Open Run from the start menu and search for regedit in it.
  Now in Registry Settings window, Navigate to HKEY_CLASSES_ROOT\*\shellexe\ContextMenuHandlers

Now from the list, Right Click on the item which you want to remove from your Context menu
Select delete from the menu.
Refresh your Desktop and Right Click on any icon and you will be glad to see that unwanted item is removed from context menu.
Along with removing items from the Context Menu you also add System files in it

Saturday, March 14, 2015

How to Enable Right click on Website when it is Disabled


PROCEDURE TO ENABLE RIGHT CLICK ON DIFFERENT BROWSERS
CHROME
1) Go to Chrome "Menu " and click on "Settings", Menu was located on the Top Right side Of your browser
2) Now Go to " Content Settings "
3) Then Click on Do not Run any java script on Websites
4) Please restart your Browser
5) Now Right click will be Enabled and you can copy content from the Website
MOZILLA
1) Go to Tools in the Mozilla menu and then open the "Options"
2) Now after Browsing to Options click on "Content"
3) In the Content there is option of Enable "Javascript" ,Disable it
4) Restart your Browser once
5) Now we can Copy the Text from Website easily with Firefox
INTERNET EXPLORER
1) Go to Tools and then "Options"
2) After Options go to Security , then Click on "Custom Level"
3) Scroll to the "Scripting Section" on the Bottom, then search for Active Scripting
4) Disable the "Active Scripting" and Restart your Browser
Now you can copy text from website without using any Softwares
NOTE- Please Change the Settings to Default, after you have used this trick Before Lot of Applications are Running on Java, you cannot Browse smoothly Without Javascript
NAINA

Installing Apache Tomcat Server

Installing Apache Tomcat ServerWTP LogoWTP Home


In this tutorial, you will install an Apache Tomcat server using the Server Installed Runtimes preference page.

Installing server runtime

  1. If you do not have Apache Tomcat on your machine, you will first need to download and unzip Apache Tomcat (this scenario was written using Apache Tomcat version 5.0.28, but other versions can be substituted).
  2. Start the Eclipse WTP workbench.
  3. Open Window -> Preferences -> Server -> Installed Runtimes to create a Tomcat installed runtime.
  4. Click on Add... to open the New Server Runtime dialog, then select your runtime under Apache (Apache Tomcat v5.0 in this example):

  5. Click Next , and fill in your Tomcat installation directory :

  6. Ensure the selected JRE is a full JDK and is of a version that will satisfy Apache Tomcat (this scenario was written using SUN JDK 1.4.2_06). If necessary, you can click on Installed JREs... to add JDKs to Eclipse.
  7. Click Finish .

Installing and Configuring the Apache HTTP Server


The Apache HTTP Server must be installed and configured on all nodes in the assigned failover domain, if used, or in the cluster. The basic server configuration must be the same on all nodes on which it runs for the service to fail over correctly. The following example shows a basic Apache HTTP Server installation that includes no third-party modules or performance tuning.
On all node in the cluster (or nodes in the failover domain, if used), install the httpd RPM package. For example:
rpm -Uvh httpd-<version>.<arch>.rpm
To configure the Apache HTTP Server as a cluster service, perform the following tasks:
  1. Edit the /etc/httpd/conf/httpd.conf configuration file and customize the file according to your configuration. For example:
    • Specify the directory that contains the HTML files. Also specify this mount point when adding the service to the cluster configuration. It is only required to change this field if the mount point for the web site's content differs from the default setting of /var/www/html/. For example:
      DocumentRoot "/mnt/httpdservice/html"
      
    • Specify a unique IP address to which the service will listen for requests. For example:
      Listen 192.168.1.100:80
      
      This IP address then must be configured as a cluster resource for the service using the Cluster Configuration Tool.
    • If the script directory resides in a non-standard location, specify the directory that contains the CGI programs. For example:
      ScriptAlias /cgi-bin/ "/mnt/httpdservice/cgi-bin/"
      
    • Specify the path that was used in the previous step, and set the access permissions to default to that directory. For example:
      <Directory /mnt/httpdservice/cgi-bin">
      AllowOverride None
      Options None 
      Order allow,deny 
      Allow from all 
      </Directory>
      
      Additional changes may need to be made to tune the Apache HTTP Server or add module functionality. For information on setting up other options, refer to the Red Hat Enterprise Linux System Administration Guide and the Red Hat Enterprise Linux Reference Guide.
  2. The standard Apache HTTP Server start script, /etc/rc.d/init.d/httpd is also used within the cluster framework to start and stop the Apache HTTP Server on the active cluster node. Accordingly, when configuring the service, specify this script by adding it as a Script resource in the Cluster Configuration Tool.
  3. Copy the configuration file over to the other nodes of the cluster (or nodes of the failover domain, if configured).
Before the service is added to the cluster configuration, ensure that the Apache HTTP Server directories are not mounted. Then, on one node, invoke the Cluster Configuration Tool to add the service, as follows. This example assumes a failover domain named httpd-domain was created for this service.

  1. Add the init script for the Apache HTTP Server service.
    • Select the Resources tab and click Create a Resource. The Resources Configuration properties dialog box is displayed.
    • Select Script form the drop down menu.
    • Enter a Name to be associated with the Apache HTTP Server service.
    • Specify the path to the Apache HTTP Server init script (for example, /etc/rc.d/init.d/httpd) in theFile (with path) field.
    • Click OK.
  2. Add a device for the Apache HTTP Server content files and/or custom scripts.
    • Click Create a Resource.
    • In the Resource Configuration dialog, select File System from the drop-down menu.
    • Enter the Name for the resource (for example, httpd-content.
    • Choose ext3 from the File System Type drop-down menu.
    • Enter the mount point in the Mount Point field (for example, /var/www/html/).
    • Enter the device special file name in the Device field (for example, /dev/sda3).
  3. Add an IP address for the Apache HTTP Server service.
    • Click Create a Resource.
    • Choose IP Address from the drop-down menu.
    • Enter the IP Address to be associated with the Apache HTTP Server service.
    • Make sure that the Monitor Link checkbox is left checked.
    • Click OK.
  4. Click the Services property.
  5. Create the Apache HTTP Server service.
    • Click Create a Service. Type a Name for the service in the Add a Service dialog.
    • In the Service Management dialog, select a Failover Domain from the drop-down menu or leave it asNone.
    • Click the Add a Shared Resource to this service button. From the available list, choose each resource that you created in the previous steps. Repeat this step until all resources have been added.
    • Click OK.
  6. Choose File => Save to save your changes.

Apache Tomat8 on UNIX machine

Knowledge Base


How To Install Apache Tomcat 8 on Ubuntu 12.04
Filed under: Technical Support
Apache Tomcat is an open source web server used to deploy and serve JavaServer Pages (JSP) and Java servlets.
Pre-Flight Check
  • These instructions are intended specifically for installing Apache Tomcat 8 on Ubuntu 12.04.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 12.04 server, and I’ll be logged in as root.
  • As of the publication of this tutorial Apache Tomcat 8 is in beta. To install a production version visit our tutorial oninstalling Apache Tomcat 7.
Step 1: Install Tomcat from Binary
First, head-on-over to the Apache Tomcat 8 Download site.
Then, under the heading 8.0.5 (the current version as of May 2014), or whichever is the newest version at the time you read this article, you’ll see Binary Distributions. Under Binary Distributions you’ll see Core and then tar.gz. Right click on tar.gz and copy the URL.
From your server, download Apache Tomcat 8 from the URL you copied in the previous step:
wget http://mirrors.ibiblio.org/apache/tomcat/tomcat-8/v8.0.5/bin/apache-tomcat-8.0.5.tar.gz
Alternatively, if you download the file to your local desktop, you’ll want to transfer the file to your Liquid Web server. If you need help with that, check out this article: Using SFTP and SCP Instead of FTP

After the download completes, decompress the file:
tar xvzf apache-tomcat-8.0.5.tar.gz
Now, move the file into a proper location:
mv apache-tomcat-8.0.5 /opt/tomcat
Step 2: Install Java 7
Before you can use Tomcat you’ll have to install the Java Development Kit (JDK) 7. First let’s check to see if Java is installed:
java -version
If that returns the following then Java hasn’t yet been installed:
The program 'java' can be found in the following packages:
To install Java, simply run the following command (and at the prompt enter to continue):
apt-get install openjdk-7-jdk
Step 3: Configure .bashrc
Now let’s set the environment variables in .bashrc:
vim ~/.bashrc
Note: If you have questions about Vim, check out our new user tutorial on Vim!

Add this information to the end of the file:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export CATALINA_HOME=/opt/tomcat
Simply save and exit .bashrc, then make the changes effective by running the following command:
. ~/.bashrc
Step 4: Test Run
Tomcat and Java should now be installed and configured on your server. To activate Tomcat, run the following script:
$CATALINA_HOME/bin/startup.sh
You should get a result similar to:
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64/
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.
Verify that Tomcat is working by visiting the_IP_of_your_server:8080. For example: http://127.0.0.1:8080

Wednesday, March 11, 2015

ajax in jquery

$.ajax({
    url:'email.php',  // passing parameter to cetrain php page
    type: "POST",   //method
    data: 'email='+$('input[name=email]').val(),    // geting value of textbox or combox
    success:function(html) {    
        $('#mydiv').html(html);                      //get response set particular field
    }
});
Or for GET, even easier:                      //simila like in GET method

$.ajax({
    url:'email.php?email='+$('input[name=email]').val(),
    success:function(html) {
        $('#mydiv').html(html);
    }
});

AJAX TUTORIAL

AJAX TUTORIAL

ajax tutorial
AJAX tutorial covers concepts and examples of AJAX technology for beginners and professionals.
AJAX is an acronym for Asynchronous JavaScript and XML. It is a group of inter-related technologies like javascript, dom, xml, html, css etc.
AJAX allows you to send and receive data asynchronously without reloading the web page. So it is fast.
AJAX allows you to send only important information to the server not the entire page. So only valuable data from the client side is routed to the server side. It makes your application interactive and faster.

Where it is used?

There are too many web applications running on the web that are using ajax technology like gmail, facebook,twitter,google map, youtube etc.

Tuesday, March 10, 2015

10 Essential Tips To Increase Android’s Performance

As it is with any other desktop or mobile operating system, the performance of your Android OS will start to diminish after you use it for some time. Mobile operating systems are supposed to be lighter and faster to keep up with our need to be on the move, yet still give us access to everything. Want to have the best of both worlds? Then, it’s time to do some housekeeping.
If you have noticed that your Android phones performance have been ‘slowing down’, particularly after you’ve been loading it up with tons of Android apps (we don’t blame you) from the Google Play store, we have a few tips to share with you.
With just a few tweaks and changes, you’d probably be able to breathe life into your Android specifically those that have been updated to Android 4.0 and above.

1. Know Your Device

It is important that you learn about the capabilities and drawbacks of your phone. Don’t overburden your phone with resource-hungry apps which would otherwise degrade your phone’s performance at your expense.

2. Update Your Android

If you haven’t updated your Android phone to the latest firmware, you should. Google brings great improvements to each new release of the Android operating system, including updates that ensure stability, higher performance speed and connectivity along with other user-friendly new features.
Tablets can also run on ICS and Jelly Bean now; you should be able to update it until Android 4.1 Jelly Bean via System updates (Check under ‘About phone’).

3. Remove Unwanted Apps

Every app you install in your phone take some storage space and runs some background processes. The more storage space occupied or the more background processes running on your phone, the slower your phone’s performance.
Don’t install apps you hardly use. Keep only the apps that you need and if you have got an app that isn’t really useful, you can uninstall or disable it.

4. Disable Unnecessary Apps

‘Performance assistant’ was introduced in Android ICS to help you disable apps that you don’t need. Disabling apps is different from uninstalling apps – uninstallation remove application files from the phone but no file is removed/deleted when you disable it. These disabled apps are not shown on the home screen or app tray but you can re-enable them for use whenever you need them.

5. Update Apps

You should regularly update your phone’s installed apps from Google Play. Try to get updates your apps when they are available in Google Play. Developers fix bugs and add features in new released versions of apps. Updated apps perform better and faster, and will less likely crash your phone.

6. Use High-Speed Memory Card

The memory card is the storage space of your phone. Phones with low internal memory can get a boost from high-capacity memory cards for maximum storage space. But it adds not only capacity but also speed to the mix. You can get between 2GB to 32GB worth of storage space to support high speed read/write operations. Always go for memory cards of Class 6 or Class 10 for your Android phone if you seek performance for your phone.

7. Keep Fewer Widgets

Widgets are not apps, which only run once you choose to activate them. No, widgets are always running in the background; they are active all the time. While some Android users use it to keep track of the weather, and their important dates, others use widgets like ‘Extended controls’ for quick access for essential configurations such as switching Wi-Fi, Bluetooth or their GPS on or off.
They do have their uses but bear in mind that having too many of them running on your homescreen will cause your device’s performance to slow down.

8. Avoid Live Wallpapers

You must be loving Android’s live wallpaper feature. Phones (from different manufacturers) come with different live wallpapers but you should know that live wallpapers that are badly made will need more CPU cycles to run, thus draining the battery faster. Everytime you activate the home screen, you run not only your apps but also your live wallpaper.

9. Stop Syncing

Sync is a very good feature which synchronizes your data with Google servers. Keeping sync on, you can get notifications whenever new mail comes in or when you get new notifications or updates for apps. To do this, it does a refresh at every preset interval (e.g. it checks your mail every 5 minutes for new incoming mail), and this will eat into your android’s performance for other activities.
You can keep Sync off for unrequired services or only have it on when you need to transfer or upload materials to Google servers.

10. Turn Off Animations

What animations? Well, if you haven’t noticed, your phone screen actually fades out and in as you switch from one task to the other. To see this in action Go to Settings > Developer Options > Window Animation Scale > Animation scale 10x. Then choose Window Animation Scale again to see the fade in effect in ‘slow-mo’.
When you choose Animation off, the screen just snaps to position without animation. You can also turn off Transition Animation Scale in the same way. If you are a heavy user, you’d probably notice that your Android performs faster with all animations off.

Bonus:

Use Task Killer/Manager

Download any free Task Killer apps or Task Managers from Google Play. Some of the good ones are Advanced Task Killer and Super Task Killer Free. Use a task killer to kill background processes and other apps that you don’t need or you don’t use.
Set options to automatically kill unnecessary apps (based on your selections) after every set period of time. Some of the examples include Update Manager (updates don’t come every minute/hour) or any manufacturer-installed app which you don’t require.

Root Your Android

As Android is built on the Linux kernel, like any other OS, it also can be rooted. Rooting your Android gives you administrator level access on your phone, which means that you can uninstall the apps that came with your phone but may not be what you want to use.
You can then flash it with custom ROMs that may be a better fit to your job requirements or personality, or to enhance the performance and battery life of your phone. You can even update your phone to the latest OS or updates that could otherwise be unsupported for your phone model.
When Not to Root
There are a number of factors against rooting your Android device; for one thing, most manufacturers deem your phone warranty voided if your phone has been rooted. You also need to know what you are doing to avoid screwing everything up, beyond repair. This is called ‘bricking’ a.k.a. turning your phone into a useless brick. So think it through before you use this method to enhance the performance of your Android.

Use Lightweight Background Apps

Everyone enjoys listening to music but imagine how much memory the music player app requires to play a whole album for you. It’s the same with other types of background apps you may have. Use lightweight apps for these purposes, e.g., you can install a music player that requires 1 MB installation space (and thus less RAM too) than the ones requiring 10 MB or more.
 

TEKONOLOGY Copyright © 2011 -- Template created by TEKONOLOGY -- Powered by Blogger