Skip to content

Instantly share code, notes, and snippets.

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];
});
fun main(args: Array<String>) {
var i = 1;
print("print",{
i = 2;
printUpperCase("uppercase",{
i =3;
println(i);
})
})
}
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
<!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){
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 {
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;
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)
<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"
<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"
@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) {