Skip to content

Instantly share code, notes, and snippets.

@jagneshchawla
jagneshchawla / audio length Mp3 class- PHP
Created September 29, 2012 10:45
Calculate Audio length of MP3 music - With PHP
//-----------usage------------
$f = "song.mp3";
$m = new mp3file($f);
$a = $m->get_metadata();
if ($a['Encoding']=='Unknown')
echo "?";
else if ($a['Encoding']=='VBR')
$len= $a['Length mm:ss'];
@jagneshchawla
jagneshchawla / android-volley-server-lib.java
Last active February 17, 2017 05:16
Android Http requests can be handle with Server helper class using Volley. It make easy to send http requests in android.
package helpers;
import android.app.ProgressDialog;
import android.content.Context;
import android.widget.Toast;
import com.android.volley.DefaultRetryPolicy;
import com.android.volley.NoConnectionError;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
@jagneshchawla
jagneshchawla / android-common-utility.java
Created June 16, 2016 16:39
Android common utility functions which can be used in any app. Single file with max utilities.
package helpers;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;