This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>File Transfer Example</title> | |
<script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
// Wait for PhoneGap to load | |
document.addEventListener("deviceready", onDeviceReady, false); | |
This file contains hidden or 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 | |
print_r($_FILES); | |
$new_image_name = "namethisimage.jpg"; | |
move_uploaded_file($_FILES["file"]["tmp_name"], "/srv/www/upload/".$new_image_name); | |
?> |
This file contains hidden or 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 Json { | |
public static JSONObject getJson(String url){ | |
InputStream is = null; | |
String result = ""; | |
JSONObject jsonObject = null; | |
// HTTP | |
try { |
This file contains hidden or 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
<form method="post" id="infoForm"> | |
<input type="text" name="first_name" id="first_name" value="" placeholder="First Name" /> | |
<input type="text" name="last_name" id="last_name" value="" placeholder="Last Name" /> | |
<input type="text" name="email" id="email" value="" placeholder="Email" /> | |
<button type="submit">Submit</button> | |
</form> |
This file contains hidden or 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
$('#infoForm').submit(function() { | |
var postTo = 'http://yourdomain.com/test.php'; | |
$.post(postTo,({first_name: $('[name=first_name]').val(), last_name: $('[name=last_name]').val(), email: $('[name=email]').val()}), | |
function(data) { | |
alert(data); | |
if(data != "") { | |
// do something | |
} else { |
This file contains hidden or 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
#!/bin/bash | |
array=( | |
'first' | |
'second' | |
'third' | |
) | |
for i in "${array[@]}" | |
do | |
echo $i | |
done |
This file contains hidden or 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
<style> | |
.dropdown { | |
height:40px; | |
} | |
.dropdown ul { | |
list-style-type:none; | |
margin:0; | |
padding:0; | |
} |
This file contains hidden or 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
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
// This is more like it! | |
}); | |
</script> |
This file contains hidden or 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
#dropdown { | |
font-family:Arial, Helvetica, sans-serif; | |
font-size:12px; | |
margin: 0; | |
padding: 0; | |
z-index: 30; | |
} | |
#dropdown li { | |
margin: 0; |
This file contains hidden or 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 | |
$default_avatar = 'http://zacvineyard.com/blog/wp-content/themes/zac/images/default-avatar.png'; | |
?> | |
<a id="comments"></a> | |
<h2>Comments</h2> | |
<?php if($comments) : ?> | |
<ol class="comments"> | |
<?php foreach($comments as $comment) : ?> | |
<li id="comment-<?php comment_ID(); ?>" class="<?php if ($comment->user_id == 1) echo "authcomment";?>"> | |
<?php if ($comment->comment_approved == '0') : ?> |
OlderNewer