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
class Superclass : Equatable { | |
let foo: Int | |
init(foo: Int) { self.foo = foo } | |
func equal(to: Superclass) -> Bool { | |
return foo == to.foo | |
} | |
} |
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
############### | |
# OS X Finder # | |
############### | |
.DS_Store | |
#################### | |
## Build generated # | |
#################### | |
build/ |
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 | |
if [ $# -ne 1 ]; then | |
echo | |
echo " Usage: dex-methods.sh [dex file to explore] " | |
echo | |
echo | |
else | |
NUMBER=`cat $@ | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'` | |
echo "The number of methods found is: " $NUMBER | |
fi |
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
@Test | |
public void shouldGetOutOfMemoryErrorUsingStringBufferButNotUsingStringWritter(){ | |
int stringBuilderCapacity = 1024; | |
StringBuilder stringBuilder = new StringBuilder(stringBuilderCapacity); | |
String randomString = new BigInteger(stringBuilderCapacity++, new SecureRandom()).toString(32); | |
try { | |
while (true) { | |
stringBuilder.append(randomString); | |
stringBuilderCapacity *= 2; | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="config_app_name">AVélib</string> | |
<string name="config_authority">com.cyrilmottier.android.avelib.citybikes</string> | |
<string name="config_com.google.android.maps.v2.api_key">XXX</string> | |
</resources> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>[YOUR GROUP ID GOES HERE]</groupId> | |
<artifactId>[YOUR ARTIFACT ID GOES HERE]</artifactId> | |
<version>[YOUR ARTIFACT VERSION GOES HERE]</version> |
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 Square, Inc. | |
package com.squareup.test; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import com.actionbarsherlock.ActionBarSherlock; | |
import com.actionbarsherlock.app.ActionBar; | |
import com.actionbarsherlock.internal.ActionBarSherlockCompat; |
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 MyModule extends AbstractModule { | |
@Override | |
void configure() { | |
bind(String.class).annotatedWith(UserAgent.class).to(UserAgentProvider.class); | |
} | |
} | |
public class MyComponent { | |
String userAgent; |