The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
public class Repository extends SQLiteOpenHelper { | |
private static final int VERSION = 1; | |
private static final String DATABASE_NAME = "data.sqlite"; | |
private static File DATABASE_FILE; | |
// This is an indicator if we need to copy the | |
// database file. | |
private boolean mInvalidDatabaseFile = false; | |
private boolean mIsUpgraded = false; | |
private Context mContext; |
#!/bin/bash | |
# no further use for remaining crypto stuff | |
rm -Rf crypto | |
# Package rename org.bouncycastle to org.spongycastle | |
find -name bouncycastle | xargs rename s/bouncycastle/spongycastle/ | |
find bc* -type f | xargs sed -i s/bouncycastle/spongycastle/g |
curl “https://app.crittercism.com/api_beta/proguard/<app_id>" -F proguard=@”<path/to/proguard-mapping.txt>” -F app_version=”app-version-name” -F key=<key> |
package com.bizzby.utils; | |
import android.util.Log; | |
import java.io.PrintWriter; | |
import java.io.StringWriter; | |
public class QLog | |
{ |
package com.enquos.nutrition.dashboard; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.util.DisplayMetrics; | |
import android.view.View; |
/******************************************************************************* | |
* Copyright (c) 2011 GitHub Inc. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Kevin Sawicki (GitHub Inc.) - initial API and implementation | |
*******************************************************************************/ |
package com.scottyab.encryption; | |
/* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. In no event will Google be held liable for any damages | |
* arising from the use of this software. | |
* | |
* Permission is granted to anyone to use this software for any purpose, | |
* including commercial applications, and to alter it and redistribute it | |
* freely, as long as the origin is not misrepresented. |
#! /usr/bin/env python | |
# coding: utf-8 | |
"""This script reads all .java and .kt files from a directory tree and determines if | |
it's necessary to write a Copyright Notice in the beginning of each Java file. | |
It checks that by searching for the word "copyright" in the first few lines. | |
Warning: use it at your own risk. Better have a source control to rollback if | |
necessary. | |
""" |
//explicit (to MyService) | |
Intent intent = new Intent(context, MyService.class); | |
PendingIntent pi = PendingIntent.getService(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); | |
//implicit | |
Intent intent = new Intent("com.my.app.action") | |
PendingIntent pi = PendingIntent.getService(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); |