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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=de-de" type="text/javascript" charset="UTF-8"></script> | |
</head> | |
<body onload="init();"> | |
<div id="myMap" style="position: relative; width: 800px; height: 300px;"></div> |
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
/** | |
* Moves the NavBar "outside" of the map so that it doesn't interfer with Map.setView | |
* and adds a subtle shadow on the NavBar and its dropdown menus. | |
*/ | |
#YourMapContainer { | |
overflow: hidden; | |
} | |
#YourMapContainer .MicrosoftMap { |
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
/************************ | |
* Class definition | |
************************/ | |
var MyObjectClass = function(parameters){ | |
var $ = jQuery; | |
var context = this; | |
/** |
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
var map = new Microsoft.Maps.Map( | |
document.getElementById("map"), | |
{ | |
credentials: "YOUR-BING-KEY", | |
mapTypeId: Microsoft.Maps.MapTypeId.auto | |
} | |
); | |
Microsoft.Maps.Events.addHandler(map, "imagerychanged", | |
function(){ |
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 | |
function MODULENAME_init(){ | |
global $custom_theme; | |
$custom_theme = 'garland'; | |
} | |
/** | |
* Theme name callback: without parameters. |
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 | |
/** | |
* Defines a theme callback function per registered path. | |
*/ | |
function MODULENAME_menu_alter(&$items) { | |
$items['node/%node']['theme callback'] = 'MODULENAME_default_node_theme'; | |
$items['node/%node/edit']['theme callback'] = 'MODULENAME_edit_node_theme'; | |
$items['node/%node/edit']['theme arguments'] = array(1); | |
} |
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 | |
/** | |
* In Drupal 6, `taxonomy_select_nodes` was able to filter by multiple terms, | |
* but Drupal 7 accepts only one TermID. | |
*/ | |
function taxonomy_select_nodes_multiple($tids = array(), $operator = 'or'){ | |
$nids = array(); | |
if (variable_get('taxonomy_maintain_index_table', TRUE)){ |
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 | |
/** | |
* Implementation of hook_menu(). | |
* | |
* Add a shortcut to "create node" in the Admin page for users | |
* that have the permission to create at least one type, in Drupal 6. | |
*/ | |
function MODULENAME_menu(){ | |
return array( |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Touchsensor in X3DOM</title> | |
<link href="x3dom.css" rel="stylesheet" /> | |
<style> | |
#myDiv { | |
color: blue; |
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
/** | |
* `target` is where you want to look at. | |
* | |
* `position` is the SFVec3f location of your viewpoint. | |
* | |
* `orientation ` is the resulting SFRotation of your viewpoint. | |
* | |
* Optionally, modify `new SFVec3f(0, 0, -1)` to change the roll. | |
* | |
*/ |