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
<?php | |
set_time_limit(0); | |
$answer_not_found = TRUE; | |
$counter = 1; | |
echo("breaking sweet captcha in progress."); | |
while($answer_not_found) | |
{ | |
$source = file_get_contents('http://sweetcaptcha.com'); | |
preg_match('/question_[0-9]{1,}\\.png/', $source, $matches_question); | |
$question_number = explode('_',$matches_question[0]); |
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
def addrev(n) | |
b = 0 | |
n.split(' ').each do |a| | |
b+= a.to_s.reverse.to_i | |
end | |
return b.to_s.reverse.to_i | |
end | |
a = true | |
i = j = 0 |
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 ExamplaryMapActivity extends RoboMapActivity { | |
@InjectView(R.id.mapview) | |
private MapView mapView; | |
@Override | |
protected void onCreate(Bundle bundle) { | |
enableHWAccel(mapView, false); | |
} | |
@TargetApi(11) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
const char binary[] = "11001"; | |
int decimal = strtol(binary, NULL, 2); | |
printf("binary = \"%s\", decimal = %d = 0x%02X\n", | |
binary, decimal, decimal); | |
return 0; |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" > | |
<TextView | |
android:id="@+id/custom_font" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:text="This is our custom font" /> |
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
TextView txt = (TextView) findViewById(R.id.custom_font); | |
Typeface font = Typeface.createFromAsset(getAssets(), "Custom_Font.ttf"); | |
txt.setTypeface(font); |
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 MyEditText extends EditText{ | |
public MyEditView(Context context, AttributeSet attrs, int defStyle) { | |
super(context, attrs, defStyle); | |
init(); | |
} | |
public MyEditView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
init(); |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" > | |
<com.myapp.widget.MyEditText | |
android:id="@+id/custom_font" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:text="This is our custom font" /> |
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
@InjectResource(R.drawable.actionbar_custom_background) | |
private Drawable actionBarCustomBackground; | |
public void onCreate() { | |
getSupportActionBar().setBackgroundDrawable(actionBarCustomBackground); | |
} |
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 EndlessScrollListener implements OnScrollListener { | |
private int visibleThreshold = 20; | |
private int currentPage = 0; | |
@Override | |
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { | |
} | |
@Override |
OlderNewer