This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); | |
$table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%d' // get day after convert | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%m' // get month | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%Y' // get year | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%H' // 24h format | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%M' // get minutes | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%S' // get second | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%u' // get day of week | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%U' // get week of year | |
date --date='TZ="Asia/Ho_Chi_Minh" 16:33' +'%Z' // alphabetic time zone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
videoReplace.setOnCompletionListener(new OnCompletionListener() { | |
@Override | |
public void onCompletion(MediaPlayer mp) { | |
mp.seekTo(1); | |
} | |
}); | |
videoReplace.seekTo(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.format("%02d", num); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WEEK | |
Calendar first = Calendar.getInstance(); | |
first.add(Calendar.DAY_OF_WEEK, first.getFirstDayOfWeek() - first.get(Calendar.DAY_OF_WEEK)); | |
int startWeek = first.get(Calendar.DATE); | |
int endWeek = startWeek + 6; | |
// MONTH | |
// start = 1 | |
Calendar date = Calendar.getInstance(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.healtheworld.nicovideoplayer.helper.database; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.MatrixCursor; | |
import android.database.MergeCursor; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import android.support.v7.app.AlertDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Description of VideoStream | |
* | |
* @author Rana | |
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
*/ | |
class StreamVideo { | |
private $path = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$queries = DB::getQueryLog(); | |
$last_query = end($queries); | |
var_dump($last_query['query']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.grasys.shortupload.helper; | |
import android.app.ProgressDialog; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.os.AsyncTask; | |
import java.io.BufferedInputStream; | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2008 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |