Skip to content

Instantly share code, notes, and snippets.

View cdoger's full-sized avatar

Candemir Doger cdoger

View GitHub Profile
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
// getListView().setDrawSelectorOnTop(true);
// getListView().setSelector(R.drawable.selector);
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
getListView().setDividerHeight(0);
getListView().setItemChecked(9, true);
// getListView().setCacheColorHint(0);
}
#!/bin/bash
function f() {
sleep "$1"
echo "$1"
}
while [ -n "$1" ]
do
f "$1" &
shift
done
#!/bin/bash
function f() {
sleep "$1"
echo "$1"
}
while [ -n "$1" ]
do
f "$1" &
shift
done
public class SingletonClient {
private static final SingletonClient instance = new SingletonClient();
private static DefaultHttpClient client;
public static SingletonClient getInstance() {
setClient(new DefaultHttpClient());
return instance;
}
public static DefaultHttpClient getClient() {
<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="2" >
<Button
android:layout_column="0"
android:layout_columnSpan="1"
android:layout_gravity="fill|center"
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/main_first_linear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
<ResCustInfo diffgr:id="ResCustInfo2" msdata:rowOrder="0">
<RecID>2</RecID>
<CTitle>1</CTitle>
<CName>cd</CName>
<CSurName>dgr</CSurName>
<HomeTaxAccNo>12345678912</HomeTaxAccNo>
<ContactAddr>H</ContactAddr>
<InvoiceAddr>H</InvoiceAddr>
<AddrHomeCountryCode>1</AddrHomeCountryCode>
<AddrHome>a</AddrHome>
public boolean isSelected(float x, float y) {
return x > left && x < right && y < bottom && y > top;
}
@cdoger
cdoger / border.java
Last active December 20, 2015 19:49
public void move(float newX, float newY) {
if (isSelected) {
this.x = newX;
this.y = newY;
left = x - BezierCurve.RADIUS - SENSITIVITY;
top = y - BezierCurve.RADIUS - SENSITIVITY;
right = x + BezierCurve.RADIUS + SENSITIVITY;
bottom = y + BezierCurve.RADIUS + SENSITIVITY;
}
}
public boolean checkPoints(float x, float y) {
boolean sthSelected = false;
sthSelected = point1.isSelected(x, y);
if (!sthSelected)
sthSelected = point2.isSelected(x, y);
if (!sthSelected)
sthSelected = controlPoint.isSelected(x, y);
return sthSelected;