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
/var/log/nginx_*.log { | |
daily | |
compress | |
delaycompress | |
rotate 2 | |
missingok | |
nocreate | |
sharedscripts | |
postrotate | |
test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid` |
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
public class Test extends Activity { | |
GridView gv; | |
Gallery g[] = new Gallery[3]; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
gv = (GridView)findViewById(R.id.gridview); | |
gv.setAdapter(new GAdapter()); | |
for (int i = 0; i < g.length; i++) { |
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.example; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.util.SparseIntArray; | |
import android.view.ViewGroup; |
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
country = 'fr' | |
device = "Nokia N95 8Gb" | |
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' | |
mmap_url = 'http://www.google.com/glm/mmap' | |
geo_url = 'http://maps.google.com/maps/geo' | |
from struct import pack, unpack | |
from httplib import HTTP | |
import urllib2 | |
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
// more information here: http://blog.tomtasche.at/2012/10/use-built-in-feedback-mechanism-on.html | |
try { | |
int i = 3 / 0; | |
} catch (Exception e) { | |
ApplicationErrorReport report = new ApplicationErrorReport(); | |
report.packageName = report.processName = getApplication() | |
.getPackageName(); | |
report.time = System.currentTimeMillis(); | |
report.type = ApplicationErrorReport.TYPE_CRASH; |
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 2012 Google Inc. | |
* | |
* 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 |
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
/** | |
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session | |
* app. | |
* @author Dandré Allison | |
*/ | |
public class AccountUtils { | |
/** | |
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}. | |
*/ |
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.fly1tkg.view; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.PorterDuff.Mode; | |
import android.graphics.PorterDuffXfermode; |
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 me.kennydude.spending.widgets; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.*; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.StateListDrawable; | |
import android.text.Editable; | |
import android.text.TextPaint; | |
import android.text.TextWatcher; |
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 com.google.gson.Gson; | |
import com.google.gson.JsonSyntaxException; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.Response.ErrorListener; | |
import com.android.volley.Response.Listener; |
OlderNewer