Tab separated table - Excel / Google Sheet to Wiki table converter
Input : Paste Tab-separated table data ( eg : row/column from Excel, Google Docs etc)
Output : MediaWiki formatted table
Source : GitHub
debug
to write debugging messages which should not be printed when the application is in production. info
for messages similar to the "verbose" mode of many applications. warn
for warning messages which are logged to some log but the application is able to carry on without a problem. error
for application error messages which are also logged to some log but, still, the application can hobble along.
Such as when some administrator-supplied configuration parameter is
incorrect and you fall back to using some hard-coded default value. fatal
for critical messages, after logging of which the application quits abnormally. <g:if test="${env != "production"}">
//your logic
</g:if>
switch(Environment.current.getName()){
case "development":
//do your stuff 1
break;
case "test":
//do your stuff 2
break;
case "production":
//do your stuff 3
break;
case "my_environment": // for custom environment : my_environment
//todo:
break;
}
if(Environment.current.getName()=="development") {
//do your stuff
}
git config --global credential.helper cache
This caches the credentials for 15 minutes ( 900 seconds) by default. If you want a longer timeout period (say3600 seconds), you can do the following :
git config --global credential.helper
'cache --timeout=3600'
String url = "http://........"; // your media URL here
//String url = "rtsp://........";
//String url = "file:///sdcard/intro.3gp"; //local file
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource(url); //Sets the data source (file-path or http/rtsp URL) to use
mediaPlayer.prepare()
mediaPlayer.start();
mediaPlayer.prepareAsync();
//You can show progress dialog here untill it prepared to play
mediaPlayer.setOnPreparedListener(new OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
//Called when the media file is ready for playback.
mp.start();
}
});
mediaPlayer.setOnErrorListener(new OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
return false;
}
});