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> | |
<head> | |
<meta charset="utf-8"> | |
<script> | |
var table = "ãь¢Ðε£ģНiʃқḻмпOÞȡг§ţȗṿẂӾӳƩ"; | |
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
// Keep the URL the same so the browser sees it as the same. | |
channel.originalURI = aRequest.URI; | |
channel.asyncOpen(proxy, aContext); | |
var securityManager = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager); | |
log('got secruity manager!'); | |
var uri = ioService.newURI('resource://pdf.js/web/viewer.html', null, null); | |
var principal = securityManager.getCodebasePrincipal(uri); | |
log('created principal!'); | |
channel.owner = principal; | |
log('hey we changed the owner!'); |
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 epsilon = 1e-8; | |
function getLineLineIntersection(x1, y1, x2, y2, x3, y3, x4, y4, collinearity) { | |
// creating coefficients for lines in the form: a * x + b + y = c | |
var a1 = -(y2 - y1), b1 = (x2 - x1), c1 = (x2 - x1) * y1 - (y2 - y1) * x1; | |
var a2 = -(y4 - y3), b2 = (x4 - x3), c2 = (x4 - x3) * y3 - (y4 - y3) * x3; | |
// finding the intersection | |
var d = a1 * b2 - a2 * b1; | |
if (d == 0) { | |
// two lines are parallel to each other |
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> | |
<canvas id="sample" width="400" height="400"></canvas> | |
<script> | |
var sample = document.getElementById("sample"); | |
function createSample() { | |
var ctx = sample.getContext('2d'); | |
var width = sample.width, height = sample.height; | |
var pixels = ctx.getImageData(0, 0, width, height); | |
var data = pixels.data; | |
var size0 = 5, size1 = 8; |
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
Per http://oli.jp/2011/github-pages-workflow/ | |
Do Setting up GitHub Pages: | |
$ cd /path/to/fancypants | |
$ git symbolic-ref HEAD refs/heads/gh-pages | |
$ rm .git/index | |
$ git clean -fdx | |
$ echo "Shumway home" > index.html | |
$ git add . |
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
// ------ simple sketch | |
line(10, 10, 90, 90); | |
// ------ eye | |
void setup() | |
{ | |
size(200, 200); | |
smooth(); | |
} |
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
diff --git a/content/base/public/nsIDocument.h b/content/base/public/nsIDocument.h | |
--- a/content/base/public/nsIDocument.h | |
+++ b/content/base/public/nsIDocument.h | |
@@ -1424,17 +1424,17 @@ public: | |
*/ | |
bool IsStaticDocument() { return mIsStaticDocument; } | |
/** | |
* Clones the document and subdocuments and stylesheet etc. | |
* @param aCloneContainer The container for the clone document. |
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
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "http://mozilla.github.io" | |
</IfModule> |
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
[alias] | |
squash = !sh -c 'git checkout mozilla/master && git merge --no-commit --squash $0 && git checkout -B $0 && git commit -e' |
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
diff --git a/web/viewer.js b/web/viewer.js | |
index d1ed8d3..217ff85 100644 | |
--- a/web/viewer.js | |
+++ b/web/viewer.js | |
@@ -1801,16 +1801,17 @@ var PageView = function pageView(container, pdfPage, id, scale, | |
element.style.height = Math.ceil(rect[3] - rect[1]) + 'px'; | |
return element; | |
} | |
- function createCommentAnnotation(type, item) { | |
+ function createTextAnnotation(item) { |
OlderNewer