Skip to content

Instantly share code, notes, and snippets.

@JacobHsu
JacobHsu / index.php
Last active December 22, 2015 03:18
<html>
<head>
<title>Maps Test</title>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri() ?>/map.js"></script>
<?php wp_head(); ?>
</head>
@JacobHsu
JacobHsu / page.php
Created September 2, 2013 03:09
wordpress/wp-content/themes/
<title><?php echo get_stylesheet_directory_uri() ?></title>
<?php get_header(); ?>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri() ?>/map.js"></script>
<?php $page_for_posts = get_option( 'page_for_posts' );?>
<!doctype html>
<html lang="en">
<head>
<title>Google maps and geolocation - Google maps jQuery plugin</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-language" content="en" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="keywords" content="Google maps, jQuery, plugin, Geolocation, Geo positioning" />
<meta name="description" content="An example with jQuery, Google Maps and geolocation using Google maps jQuery plugin" />
@JacobHsu
JacobHsu / map.php
Last active December 22, 2015 08:39
<?php
error_reporting(E_ALL^E_NOTICE^E_WARNING); //關閉PHP的所有錯誤提示
//參數接收
// $user_id = $_POST['user_id'];
//測試資料
$user_id = 17;
@JacobHsu
JacobHsu / map.js
Last active December 22, 2015 08:39
var infowindow = new google.maps.InfoWindow();
//var pinkmarker = new google.maps.MarkerImage('./pink_Marker.png', new google.maps.Size(20, 34) );
//var shadow = new google.maps.MarkerImage('./shadow.png', new google.maps.Size(37, 34) );
function initialize() {
document.getElementById("debug").innerHTML= debugStr;
//document.getElementById('map').index = 1;
map = new google.maps.Map(document.getElementById('map_canvas'), {
<!doctype html>
<html lang="en">
<head>
<title>Example with Google maps and jQuery - Google maps jQuery plugin</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="keywords" content="Google maps, jQuery, plugin" />
<meta name="description" content="An example how to use jQuery and Google placee api with Google maps jQuery plugin" />
@JacobHsu
JacobHsu / MainActivity.java
Last active August 29, 2015 14:04
Hello World! with PhoneGap, Android and Eclipse
package com.example.helloworld;
//import android.support.v7.app.ActionBarActivity;
//import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@JacobHsu
JacobHsu / jsbin.gdrivebtn.html
Last active August 29, 2015 14:04
#API #Google Drive - Creating a Save Button
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Google Drive - Creating a Button</title>
</head>
<script src="https://apis.google.com/js/platform.js"></script>
<body>
<div class="g-savetodrive" data-src="http://example.com/pug-snores.mp3" data-filename="pug-snores.mp3" data-sitename="pic of pugs"></div>
@JacobHsu
JacobHsu / HelloAngular.html
Last active August 29, 2015 14:04
#Angular.js - Creating a Store Module
<!DOCTYPE html>
<html ng-app="gemStore">
<head>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
</head>
<body>
<h1>{{"Hello, Angular!"}}</h1>
</body>
@JacobHsu
JacobHsu / more-gems.html
Last active August 29, 2015 14:04
#angular.js :BUILT-IN DIRECTIVES
<!DOCTYPE html>
<html ng-app="gemStore">
<head>
<link rel="stylesheet" type="text/css" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.min.js"></script>
</head>
<body class="container" ng-controller="StoreController as store">
<div class="product row" ng-repeat="product in store.products">
<h3>