Monday, December 29, 2014

Youtube tricks

Replace "youtube" with "listentoyoutube" in the URL to download the audio of the video.

Replace "youtube" with "ssyoutube" in the URL to download the video in any quality available.

Replace "youtube" with "nsfwyoutube" to bypass age restriction.

Replace "youtube" with "youtubeskip" in the URL and you won't see ads.

Replace "youtube" with "listenonrepeat" in the URL to repeat the video automatically .

Replace "youtube" with "gifyoutube" in the URL to convert video into gif format .

Wednesday, August 6, 2014

Share your mouse and keyboard

Most people think of their computers as single, isolated units. Our mission is to change that so people think of all their computers as a single seamless system.
Synergy brings your computers together in one cohesive experience; its free and open source cross-platform software for sharing one mouse and keyboard between multiple computers on your desk. It works on Windows, Mac OS X and Linux allowing you to seamlessly move your mouse cursor between computers.

Synergy brings your devices together in one cohesive experience.

  • We're fully cross platform, which we've been doing for 10 years.
  • KVMs single out your machines, Synergy brings them together.
  • Seamlessly move your mouse to any computer and start typing.
  • Works on all major operating systems (Windows, Mac OS X, and Linux).
  • Share your clipboard (copy and paste) between your computers.
  • Drag and drop files from one computer to another (Premium).
  • Encryption keeps sensitive data safe on public networks.
  • Save space on your desktop by using one keyboard and mouse.
  • Network-based (IP) software KVM switch (non-video).
  • An alternative to a keyboard/mouse USB switch.
  • Useful for multiboxing (WoW and other games).
  • Easily turn your old laptop or desktop PC into a second screen.
  • Avoid needing VNC for computers close by.
  • Make use of your Raspberry Pi on your desktop.

Download: http://synergy-project.org/download/

Tuesday, May 27, 2014

Talk to strangers




Talking with strangers is one of the way to pass time and find new friends.Last sunday i started searching some sites for this purpose and i found few that were good.Below i am providing the list of some sites and apps that allow you to chat with strangers...

One of my favorite site for this purpose.I like it very much.Here you will find maximum nuber of people online and from all over the world.Omegle also provide video chatting.

This is the second option available.Here also you will find lots of interesting people.

3)Chatuos
Here mostly indians are found.This is an android app.

I hope you will enjoy chatting with strangers.

Tuesday, April 15, 2014

Download any website in linux!



If you ever need to download an entire Web site, hers's the trick
 wget can do this job

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains website.org \
     --no-parent \
         www.test.in
This command downloads the Web site

Sunday, February 16, 2014

Save Web pages as PDF!




If you want to save any web page as pdf you only require chrome.Chrome will let you save any page as pdf.

Let's see how we can do this:

1) Open you web page in chrome.
2)Press ctrl+p.
3)Print dialog will open.In print dialog change destination to "Save As PDF"
4)Hit the print button.

Your web page will be saved as pdf.

Using above steps you can convert any file to pdf. You just have open that file in chrome.

Tuesday, February 4, 2014

When to use RESTful design for web service development !



A RESTful design may be appropriate when the following conditions are met.
  • The web services are completely stateless. A good test is to consider whether the interaction can survive a restart of the server.

  • A caching infrastructure can be leveraged for performance. If the data that the web service returns is not dynamically generated and can be cached, the caching infrastructure that web servers and other intermediaries inherently provide can be leveraged to improve performance. However, the developer must take care because such caches are limited to the HTTP GET method for most servers.

  • The service producer and service consumer have a mutual understanding of the context and content being passed along. Because there is no formal way to describe the web services interface, both parties must agree out of band on the schemas that describe the data being exchanged and on ways to process it meaningfully. In the real world, most commercial applications that expose services as RESTful implementations also distribute so-called value-added toolkits that describe the interfaces to developers in popular programming languages.

  • Bandwidth is particularly important and needs to be limited. REST is particularly useful for limited-profile devices, such as PDAs and mobile phones, for which the overhead of headers and additional layers of SOAP elements on the XML payload must be restricted.

  • Web service delivery or aggregation into existing web sites can be enabled easily with a RESTful style. Developers can use such technologies as JAX-RS and Asynchronous JavaScript with XML (AJAX) and such toolkits as Direct Web Remoting (DWR) to consume the services in their web applications. Rather than starting from scratch, services can be exposed with XML and consumed by HTML pages without significantly refactoring the existing web site architecture. Existing developers will be more productive because they are adding to something they are already familiar with rather than having to start from scratch with new technology.

Monday, February 3, 2014

Getting location in android!



Below is a demo code for getting location from your android devices.

MainActivity.class

package com.gpsdemo;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import android.R.string;
import android.app.Activity;
import android.content.Context;
import android.location.Address;
import android.location.Criteria;
import android.location.Geocoder;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.os.Bundle;
import android.provider.SyncStateContract.Constants;
import android.util.Log;
import android.view.Menu;
import android.widget.TextView;

public class MainActivity extends Activity {
provider
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        LocationManager locationManager;
        String context = Context.LOCATION_SERVICE;
        locationManager = (LocationManager)getSystemService(context);
        Criteria criteria = new Criteria();
        criteria.setAccuracy(Criteria.ACCURACY_FINE);
        criteria.setAltitudeRequired(false);
        criteria.setBearingRequired(false);
        criteria.setCostAllowed(true);
        criteria.setPowerRequirement(Criteria.POWER_LOW);
        String provider = locationManager.getBestProvider(criteria, true);
        ArrayList<String> a=(ArrayList<String>)locationManager.getProviders(true);
        Location location =locationManager.getLastKnownLocation(provider);
        updateWithNewLocation(location);provider
        locationManager.requestLocationUpdates(provider, 200, 1,locationListener);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
  
    private void updateWithNewLocation(Location location) {
        Log.d("com.gpsdemo","update");
        String latLongString;
        TextView myLocationText;
        myLocationText = (TextView)findViewById(R.id.myLocationText);
        String addressString = "No address found";
        if (location != null) {
        double lat = location.getLatitude();
        double lng = location.getLongitude();
        latLongString = "Lat:" + lat + "\nLong:" + lng;
        double latitude = location.getLatitude();
        double longitude = location.getLongitude();
        Geocoder gc = new Geocoder(this, Locale.getDefault());
        try {
        List<Address> addresses = gc.getFromLocation(latitude, longitude, 1);
        StringBuilder sb = new StringBuilder();
        if (addresses.size() > 0) {
        Address address = addresses.get(0);
        for (int i = 0; i < address.getMaxAddressLineIndex(); i++)
        sb.append(address.getAddressLine(i)).append("\n");
        sb.append(address.getLocality()).append("\n");
        sb.append(address.getPostalCode()).append("\n");
        sb.append(address.getCountryName());
        }
        addressString = sb.toString();
        } catch (IOException e) {}
        } else {
        latLongString = "No location found";
        }
        myLocationText.setText("Your Current Position is:\n" +
        latLongString);
        }
    private LocationListener locationListener = new LocationListener() {
        public void onLocationChanged(Location location) {
            Log.d("com.gpsdemo","update");
        updateWithNewLocation(location);
        }
        public void onProviderDisabled(String provider){
        updateWithNewLocation(null);
        }provider
        public void onProviderEnabled(String provider){ }
        public void onStatusChanged(String provider, int status,
        Bundle extras){ }
        };
}

activity_main.xml

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/myLocationText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@+string/hello"
/>
</LinearLayout>








AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.gpsdemo"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="18" />

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.gpsdemo.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Problems Encountered:

1) object of provider was null.
    Location provider were off.You can activate them in location and service of settings in your tablet/phone.
2)location object was null.
    gps network was not coming in basement go outside it will work like a charm.

Sunday, February 2, 2014

Format drive in Linux!



Formatting a drive in Linux is not a big issue.Linux provide an inbuilt utility "Disks" that can be used for this purpose.Steps for formatting drive using disks are as follow:

1) Open disks utility.
2)Select your drive to format.
3)Click setting icon and click format option.
4)Select erase and format type according to your requirements.
5)Click format.

Now formatting will start.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews