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
hello = -> | |
console.log("Hello World!") | |
hello() |
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 jp.hoge.webview; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.KeyEvent; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class MainActivity extends Activity { |
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
import android.app.Activity; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.support.v4.content.WakefulBroadcastReceiver; | |
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { |
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
import android.app.IntentService; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; | |
import com.google.android.gms.gcm.GoogleCloudMessaging; | |
public class GcmIntentService extends IntentService { | |
private final String PUSH_MSG_KEY = "message"; |
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
import android.app.Activity; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.KeyEvent; | |
import android.content.Context; | |
import com.google.android.gms.gcm.GoogleCloudMessaging; | |
import com.google.android.gms.iid.InstanceID; |
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
Bundle bundle = intent.getExtras(); | |
String message = bundle.getString("message"); | |
try { | |
Bundle extras = intent.getExtras(); | |
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this); | |
String messageType = gcm.getMessageType(intent); | |
if (!extras.isEmpty()) { | |
NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext()); |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
context = getApplicationContext(); | |
gcm = GoogleCloudMessaging.getInstance(this); | |
registerInBackground(); | |
webView = (WebView) findViewById(R.id.webview); |
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
import android.os.AsyncTask; | |
import android.util.Base64; | |
import org.json.JSONObject; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; |
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 result = null; | |
RequestBody body = new FormEncodingBuilder() | |
.addEncoded("key1", "value1") | |
.addEncoded("key2", "value2") | |
.addEncoded("key3", "value3") | |
.build(); | |
// リクエストオブジェクトを作って | |
Request request = new Request.Builder() | |
.url(base_url) |
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
<?php | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
require_once __DIR__ . '/../config/config.php'; | |
$blogConfigFile = __DIR__ .'/../config/blog_config.php'; | |
$arrBlogConfig = include $blogConfigFile; | |
$blogConfig = $arrBlogConfig["blogConfig"]; | |
$cli = new Goutte\Client(); |
OlderNewer