Edit: moved to here https://blog.haicon.moe/posts/logitech-f310-to-work-with-macbook-usb-c-port/
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
| var CKEDITORPluginExtras = false; | |
| if (typeof(CKEDITOR) != 'undefined' ) { | |
| CKEDITOR.on('instanceReady',function(event, instance){ | |
| if (CKEDITORPluginExtras) { | |
| return; | |
| } | |
| var config = event.editor.config; | |
| CKEDITOR.instances.body.destroy(); |
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
| // declarations | |
| var positions = []; | |
| // Returns a random integer between min (included) and max (excluded) | |
| // Using Math.round() will give you a non-uniform distribution! | |
| function getRandomInt(min, max) { | |
| return Math.floor(Math.random() * (max - min)) + min; | |
| } | |
| // generate random positions |
This example pulls together various examples of work with trees in D3.js.
The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.
One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.
Dragging can be performed on any node other than root (flare). Dropping can be done on any node.
Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.
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
| var numTiers = 100, | |
| triangle, | |
| start, | |
| stop; | |
| /** | |
| * | |
| * First version uses recursion | |
| * | |
| */ |
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> | |
| <html> | |
| <head> | |
| <style> | |
| /* How to select a range of children | |
| * (Here, 3rd-7th children, inclusive): | |
| */ | |
| ul li:nth-child(n+3):nth-child(-n+7) { | |
| outline: 1px solid #0f0; | |
| } |