Skip to content

Instantly share code, notes, and snippets.

@taycaldwell
taycaldwell / collatz
Last active December 31, 2015 21:59
Collatz Conjecture for Java
/*
* Rithms
* collatz.java
*
* Collatz Conjecture - Start with a number n > 1.
* Find the number of steps it takes to reach one
* using the following process: If n is even, divide
* it by 2. If n is odd, multiply it by 3 and add 1.
*/
@taycaldwell
taycaldwell / create.cpp
Last active December 31, 2015 21:59
Create a GeneralCharacterData_Legacy.ini file.
/*
Rithms
Creates a GeneralCharacterData_Legacy.ini file for League of Legends.
File path is hardcoded for Windows in this version.
If you have a Mac, just change the file path to the proper Riot Games folder.
*/
#include <fstream>
@taycaldwell
taycaldwell / freqdecrypt.cpp
Created March 13, 2014 05:36
Decryption by English letter frequencies
#include <iostream>
#include <fstream>
#include <string>
#include <ctype.h>
using namespace std;
char freq[26] = {'E', 'T', 'A', 'O', 'I', 'N', 'S', 'H',
'R', 'D', 'L', 'C', 'U', 'M', 'W', 'F',
'G', 'Y', 'P', 'B', 'V', 'K', 'J', 'X',
@taycaldwell
taycaldwell / dictionary.txt
Created March 15, 2014 18:51
dictionary of words to be used with my frequency decryption
This file has been truncated, but you can view the full file.
aa
aah
aahed
aahing
aahs
aal
aalii
aaliis
aals
aardvark
@taycaldwell
taycaldwell / freqdecrypt.cpp
Created April 8, 2014 02:18
Decrypt plaintext by letter frequencies
#include <iostream>
#include <fstream>
#include <string>
#include <ctype.h>
using namespace std;
char freq[26] = {'E', 'T', 'A', 'O', 'I', 'N', 'S', 'H',
'R', 'D', 'L', 'C', 'U', 'M', 'W', 'F',
'G', 'Y', 'P', 'B', 'V', 'K', 'J', 'X',
@taycaldwell
taycaldwell / steam.styles
Created June 6, 2014 06:42
custom/personal/minimal Steam skin
steam.styles
{
colors
{
// colors section can include colors in "R G B A" form, or references to already defined colors;
// it can also include just general settings controls can pull from for extra customization
black="0 0 0 255"
almostBlack="23 22 20 255"
white="255 255 255 255"
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.util.Log;
import android.widget.ImageView;
import java.io.InputStream;
public class DownloadImageTask extends AsyncTask<String, Void, Bitmap> {
ImageView image;
@taycaldwell
taycaldwell / MainActivity.java
Created December 15, 2014 10:14
Using riot-api-java within Android app. (AsyncTask)
public class MainActivity extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final Button button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
@taycaldwell
taycaldwell / GlobalClass.java
Created December 15, 2014 10:15
Using riot-api-java within Android app.
import android.app.Application;
import main.java.riotapi.RiotApi;
public class GlobalClass extends Application {
private RiotApi api;
public GlobalClass() {
this.api = new RiotApi("API-KEY");
}
@taycaldwell
taycaldwell / static_data_maps_endpoint.md
Last active August 29, 2015 14:13
Riot Games API (Static Data - maps)

###GET - /api/lol/static-data/{region}/v1.2/map


####Response Classes


Return Value: MapDataDto