Skip to content

Instantly share code, notes, and snippets.

Lime limeb

Block or report user

Report or block limeb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Canadan jQuery
Object.getOwnPropertyNames(jQuery).forEach(function(n) {
if(!(n[0]=="i"&&)n[1]=="s")return;
var a = n.substring(2,3).toLowerCase() + n.slice(3);
jQuery.fn[a+'Eh'] = jQuery.fn[n];
});
View gist:c3bb55495b02ccacd14e0b72b3a25d77
fun main(args: Array<String>) {
var i = 1;
print("print",{
i = 2;
printUpperCase("uppercase",{
i =3;
println(i);
})
})
}
View gist:3b601977fcfc430171bdef6ac4758b15
import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
private WebView w;
@Override
View gist:f71d33c6153faa41c79f64f53a55fe1f
<!doctype html><head><meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width;"></head>
<a href="javascript:location.reload()">reload</a>
<ul id=playlist>
<li>Call To Arms</li>
</ul>
<script src=https://code.jquery.com/jquery-3.1.1.js></script>
<script>
$("#playlist li").append('<a class=del href="#del" onclick="del(this);return false">X</a>')
function del(a){
View gist:6011d2a4e30a4edf946863b9044cdc2c
package co.a.ezzylearning;
import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
View gist:e1473af8a3de92b546669c21bb23272c
package co.a.ezzylearning;
import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
private WebView w;
View gist:4f7ec900333e07d4580acbf278bf47bf
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.listviewdragginganimation, PID: 3399
java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:386)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
at android.widget.AbsListView.obtainView(AbsListView.java:2347)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1270)
at android.widget.ListView.onMeasure(ListView.java:1182)
at android.view.View.measure(View.java:17547)
at android.widget.RelativeLayout.measureChild(RelativeLayout.java:697)
View gist:ec53eb74375b04c78f808a7f4cfa08f5
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:orientation="horizontal"
android:descendantFocusability="blocksDescendants">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
View gist:489b77eae98d5a4d5c01bc0f0669bafd
<LinearLayout><TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFF"
android:textSize="@dimen/list_text_size"
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:minHeight="@dimen/list_item_height"
android:textColor="#000000"
View gist:c815f2bb0a1b60c2d30ceb5d2eba227d
@Override protected void onResume(){
super.onResume();
AlertDialog.Builder builder1 = new AlertDialog.Builder(getApplicationContext());
builder1.setMessage("Write your message here.");
builder1.setCancelable(true);
builder1.setPositiveButton(
"Yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
You can’t perform that action at this time.