- [Data Structures] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#data-structures)
- [Linked Lists] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#linked-lists)
- [Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#trees)
- [Binary Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-trees)
- [Binary Search Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-search-tree)
- [Red-Black Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#red-black-tree)
- [AVL Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#avl-tree)
- [Tries] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#tries)
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
mList.setOnScrollListener(new OnScrollListener() { | |
List<ViewPropertyAnimator> animations = new ArrayList<ViewPropertyAnimator>(); | |
@Override | |
public void onScrollStateChanged(AbsListView view, int scrollState) { | |
if (scrollState == SCROLL_STATE_IDLE) { | |
int firstVisiblePosition = view.getFirstVisiblePosition(); | |
int lastVisiblePosition = view.getLastVisiblePosition(); | |
for(int i = lastVisiblePosition; i >= firstVisiblePosition; 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
public class Alerts { | |
class Alert { | |
byte cell_id; | |
byte type; | |
Calendar start_datetime = new GregorianCalendar(); | |
byte duration; | |
byte data1; | |
} |
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 MainActivity extends ActivityCompat { | |
/* | |
* ACTIVITY CODE | |
*/ | |
public String getStiredValue() { | |
SharedPreferences prefs = context.getSharedPreferences(PREFS, MODE_PRIVATE); | |
return prefs.getString(KEY, DEF_VALUE); | |
} |
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
// | |
// Source code recreated from a .class file by IntelliJ IDEA | |
// (powered by Fernflower decompiler) | |
// | |
package com.google.firebase.provider; | |
import android.content.ContentProvider; | |
import android.content.ContentValues; | |
import android.content.Context; |
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
final AlertDialog dialog = builder.create(); | |
dialog.setOnShowListener( new OnShowListener() { | |
@Override | |
public void onShow(DialogInterface arg0) { | |
dialog.getButton(AlertDialog.BUTTON_POSITIVE); | |
dialog.getButton(AlertDialog.BUTTON_NEGATIVE); | |
} | |
}); |
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 void addItem(ergebnisseListView item, int location) { | |
if(location > 0 && location < listData.size()) { | |
listData.add(item, location); | |
} else { | |
listData.add(item); | |
} | |
notifyDatasetChanged(); | |
} | |
public void addItem(ergebnisseListView item) { |
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
#!/bin/bash | |
# Rick Astley in your Terminal. | |
# By Serene Han and Justine Tunney <3 | |
version='1.1' | |
rick='http://keroserene.net/lol' | |
video="$rick/astley80.full.bz2" | |
# TODO: I'll let someone with mac or windows machine send a pull request | |
# to get gsm going again :) | |
audio_gsm="$rick/roll.gsm" | |
audio_raw="$rick/roll.s16" |
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 org.teamsik.apps.hackingchallenge; | |
import android.content.Context; | |
import android.util.Base64; | |
public abstract class a | |
{ | |
public static boolean a(Context paramContext, String paramString) | |
{ | |
byte[] arrayOfByte1 = a(paramString); |
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 synchronized static void registerService(Context applicationContext) { | |
Intent serviceIntent = new Intent(applicationContext, GcmRegistrationService.class); | |
PendingIntent scheduleIntetnt = PendingIntent.getService(GlideApplication.applicationContext, REQUEST_CODE, serviceIntent, PendingIntent.FLAG_UPDATE_CURRENT); | |
if (scheduleIntetnt == null) { | |
if(DEBUG) { | |
Utils.log(TAG, "no need to schedule again since there is already a PendingIntent in the queue", 1); | |
} | |
return; | |
} | |
long now = System.currentTimeMillis(); |
NewerOlder