Skip to content

Instantly share code, notes, and snippets.

View zstartw's full-sized avatar
🌴
On vacation

Just do it zstartw

🌴
On vacation
View GitHub Profile
@kiirpi
kiirpi / log_chunk_length_over_4000_char.java
Created December 2, 2013 10:06
if log message length over than 4000 char
if (sb.length() > 4000) {
Log.v(TAG, "sb.length = " + sb.length());
int chunkCount = sb.length() / 4000; // integer division
for (int i = 0; i <= chunkCount; i++) {
int max = 4000 * (i + 1);
if (max >= sb.length()) {
Log.v(TAG, "chunk " + i + " of " + chunkCount + ":" + sb.substring(4000 * i));
} else {
Log.v(TAG, "chunk " + i + " of " + chunkCount + ":" + sb.substring(4000 * i, max));
}
@hello2pal
hello2pal / MainActivity.java
Last active April 25, 2022 09:08
Play YouTube Video in Your Application
import android.os.Bundle;
import com.google.android.youtube.player.YouTubeBaseActivity;
import com.google.android.youtube.player.YouTubeInitializationResult;
import com.google.android.youtube.player.YouTubePlayer;
import com.google.android.youtube.player.YouTubePlayer.OnInitializedListener;
import com.google.android.youtube.player.YouTubePlayer.Provider;
import com.google.android.youtube.player.YouTubePlayerView;
public class MainActivity extends YouTubeBaseActivity implements
OnInitializedListener {
@qiutaoleo
qiutaoleo / input data
Created May 19, 2011 04:29
Fringe Search for pathfinding 边缘搜索算法路径搜索
#include <hash_map>
#include <iostream>
#include <list>
#include <vector>
#include <algorithm>
using namespace std;
using namespace stdext;
int R,C;//地图行列