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
// Encrypt where jo is input, and query is output and ENCRPYTION_KEy is key | |
byte[] input = jo.toString().getBytes("utf-8"); | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
byte[] thedigest = md.digest(ENCRYPTION_KEY.getBytes("UTF-8")); | |
SecretKeySpec skc = new SecretKeySpec(thedigest, "AES/ECB/PKCS5Padding"); | |
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); | |
cipher.init(Cipher.ENCRYPT_MODE, skc); | |
byte[] cipherText = new byte[cipher.getOutputSize(input.length)]; |
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
.card{ | |
background: #FFF; | |
border-radius: 2px; | |
border: 1px solid #ddd; | |
border-bottom-width: 2px; | |
margin-bottom: 10px; | |
} |
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
<html><head> | |
<meta charset="UTF-8"> | |
<!-- | |
Copyright (c) 2013 by Joe Simpson (http://codepen.io/kennydude/pen/CnDAz) | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 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
public static class BigPictureStyle extends Style { | |
private Bitmap mPicture; | |
private Bitmap mBigLargeIcon; | |
private boolean mBigLargeIconSet = false; | |
public BigPictureStyle() { | |
} | |
public BigPictureStyle(Builder builder) { | |
setBuilder(builder); |
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
while(noSuccess){ | |
try{ | |
tryAgain(); | |
} catch(InvalidStateException e){ | |
break; | |
} catch(SleepDeprevationException e){ | |
sleep( new Hours(8) ); | |
} catch(DeathException e){ | |
break; | |
} |
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.transtimetable.ui; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Paint; | |
import android.graphics.drawable.Drawable; | |
import android.util.StateSet; | |
public class TabBackgroundDrawable extends Drawable { |
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 java.util.ArrayList; | |
import java.util.List; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.app.FragmentTransaction; | |
import android.support.v4.view.ViewPager; | |
import android.util.Log; | |
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
<div class="uac" style="background: #333; opacity: 0.9; position: absolute; top:0;left:0;bottom:0;right:0;display:none"> | |
</div> | |
<div style="position: fixed; top: 50px; right: 0; left: 0; z-index: 999999999;display:none" class="uac"> | |
<div style="background:#fff; margin: 0 auto; text-align: center; width:500px"> | |
<h1>YOU ARE</h1> | |
<img src="http://25.media.tumblr.com/tumblr_mb4mphniug1qlqeu2o1_500.gif" /> | |
</div></div> | |
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script> | |
<script type="text/javascript"> |
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 boolean onCreateOptionsMenu(final Menu menu) { | |
// Inflate Layout here | |
// ProgressBar | |
if(isRefreshing){ | |
ProgressBar p = new ProgressBar(this, null, android.R.attr.progressBarStyleSmall); | |
menu.findItem(R.id.refreshAction).setActionView(p).setEnabled(false); | |
} | |
// Do other crazy stuff here |
NewerOlder