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
HttpClient authenticatedHttpClient = new StdHttpClient.Builder().host("host").port(5984).username("user").password("pass").build(); | |
CouchDbInstance dbInstance = new StdCouchDbInstance(authenticatedHttpClient); | |
CouchDbConnector db = dbInstance.createConnector("luscinia", true); | |
List<String> countries = new ArrayList<String>(); | |
countries.add("Paris");countries.add("Marseille");countries.add("Bordeaux");countries.add("Toulouse"); | |
Map<String, List<String>> majorCitiesByCountry = new HashMap<String, List<String>>(); | |
majorCitiesByCountry.put("France", countries); | |
Map<String, Object> referenceData = new HashMap<String, Object>(); |
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
// Where map is a filled hashmap | |
for (Map.Entry<String, String> entry : map.entrySet()) | |
{ | |
String key = entry.getKey(); | |
String value = entry.getValue(); | |
System.out.printf("%s %s\n", key, 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
package uk.ac.brookes.arnaudbos.luscinia.views; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.miscwidgets.widget.EasingType.Type; | |
import org.miscwidgets.widget.ExpoInterpolator; | |
import org.miscwidgets.widget.Panel; | |
import roboguice.inject.InjectExtra; |
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 uk.ac.brookes.arnaudbos.luscinia.widget; | |
import uk.ac.brookes.arnaudbos.luscinia.R; | |
import android.content.Context; | |
import android.graphics.drawable.Drawable; | |
import android.view.LayoutInflater; | |
import android.widget.ImageView; | |
import android.widget.RelativeLayout; | |
import android.widget.TextView; |
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 interface ScrollViewListener | |
{ | |
void onScrollChanged(SynchronizerScrollView scrollView, int x, int y, int oldx, int oldy); | |
} |
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
Capitalized, short (50 chars or less) summary | |
More detailed explanatory text, if necessary. Wrap it to about 72 | |
characters or so. In some contexts, the first line is treated as the | |
subject of an email and the rest of the text as the body. The blank | |
line separating the summary from the body is critical (unless you omit | |
the body entirely); tools like rebase can get confused if you run the | |
two together. | |
Write your commit message in the present tense: "Fix bug" and not "Fixed |
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
http://i.stack.imgur.com/P0xJO.png |
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
NSDecimalNumber * n1 = [NSDecimalNumber decimalNumberWithString:[weather.vitesseMaxMS stringValue]]; | |
NSDecimalNumber * n2 = [NSDecimalNumber decimalNumberWithString:@"3.6"]; | |
NSDecimalNumber * res = [n1 decimalNumberByMultiplyingBy:n2]; |
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
theView.backgroundColor = [UIColor clearColor]; | |
CAGradientLayer *layer = (CAGradientLayer *)theView.layer; | |
CGColorRef liteColor = [UIColor colorWithWhite:0.92f alpha:0.8f].CGColor; | |
CGColorRef darkColor = [UIColor colorWithWhite:0.32f alpha:0.8f].CGColor; | |
layer.colors = [NSArray arrayWithObjects:(id)liteColor, (id)darkColor, nil]; |
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
UIToolbar *tools = [[UIToolbar alloc] | |
initWithFrame:CGRectMake(0.0f, 0.0f, 103.0f, 44.01f)]; // 44.01 shifts it up 1px for some reason | |
tools.clearsContextBeforeDrawing = NO; | |
tools.clipsToBounds = NO; | |
tools.tintColor = [UIColor colorWithWhite:0.305f alpha:0.0f]; // closest I could get by eye to black, translucent style. | |
// anyone know how to get it perfect? | |
tools.barStyle = -1; // clear background | |
NSMutableArray *buttons = [[NSMutableArray alloc] initWithCapacity:3]; | |
// Create a standard refresh button. |
OlderNewer