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
private func selectDrawing(at point: NSPoint) { | |
print("hit test \(view.layer!.hitTest(point)) \n \(view.layer!.hitTest(point)?.className)") | |
print("============================") | |
print("hit test \(view.layer!.hitTest(view.convert(point, from: nil))) \n \(view.layer!.hitTest(view.convert(point, from: nil))?.className)") | |
print("============================") | |
print("hit test \(view.layer!.hitTest(view.layer!.convert(point, from: nil))) \n \(view.layer!.hitTest(view.layer!.convert(point, from: nil))?.className)") | |
print("============================") | |
print("hit test \(view.layer!.hitTest(view.convert(point, to: nil))) \n \(view.layer!.hitTest(view.convert(point, to: nil))?.className)") | |
print("============================") | |
print("hit test \(view.layer!.hitTest(view.layer!.convert(point, to: nil))) \n \(view.layer!.hitTest(view.layer!.convert(point, to: nil))?.className)") |
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
// Show Annotate Screen window and make it key | |
let window = annotateWindowController.window! | |
guard let screen = NSScreen.main else { return } | |
window.setFrame(screen.visibleFrame, display: true) | |
window.backgroundColor = NSColor.white.withAlphaComponent(0.001) | |
window.level = NSWindow.Level.popUpMenu | |
window.orderFrontRegardless() | |
window.makeKeyAndOrderFront(self) |
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
--- | |
layout: null | |
--- | |
[ | |
{% for post in site.posts %} | |
{ | |
"title" : "{{ post.title }}", | |
"url" : "{{ post.url }}", | |
"date" : "{{ post.date | date: "%b %d, %Y" }}", |
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
--- | |
layout: null | |
--- | |
[ | |
{% for post in site.posts %} | |
{ | |
"title" : "{{ post.title }}", | |
"url" : "{{ post.url }}", | |
"date" : "{{ post.date | date: "%B %d, %Y" }}", |
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
function xhr(method, uri, body, handler) { | |
var req = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); | |
req.onreadystatechange = function () | |
{ | |
if (req.readyState == 4 && handler) | |
{ | |
eval('var o=' + req.responseText); | |
handler(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
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.math.BigInteger; | |
/** | |
* Created by IntelliJ IDEA. | |
* | |
* @author: ramswaroop | |
* @date: 9/16/15 |
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
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.EmptyStackException; | |
/** | |
* Created by IntelliJ IDEA. | |
* | |
* @author: ramswaroop | |
* @date: 9/15/15 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |