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 area(poly){ | |
var s = 0.0; | |
var ring = poly.coordinates[0]; | |
for(i= 0; i < (ring.length-1); i++){ | |
s += (ring[i][0] * ring[i+1][1] - ring[i+1][0] * ring[i][1]); | |
} | |
return 0.5 *s; | |
} |
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
module.exports = { | |
chainWebpack: config => { | |
config.module.rule('pdf') | |
.test(/\.(pdf)(\?.*)?$/) | |
.use('file-loader') | |
.loader('file-loader') | |
.options({ | |
name: 'assets/pdf/[name].[hash:8].[ext]' | |
}) |
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 | |
use Drupal\Core\Url; | |
/** | |
* Implements hook_preprocess_HOOK() for block.html.twig. | |
*/ | |
function themename_preprocess_block(&$variables) { | |
// Get Title of Block's parent Node. | |
$request = \Drupal::request(); |
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
/** | |
* Custom Style by ninghao.net, based on seti ui & seti syntax theme. | |
*/ | |
.tab-bar .tab.active:before { | |
border-bottom: solid 1px #0f4e72; | |
} | |
.tab-bar .tab.active { | |
border-bottom: solid 1px #0f4e72; | |
} |
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
// Without cheating by running the code, | |
// what do these 3 result in? | |
function foo(a) { | |
a(); | |
function a() { | |
console.log("yay"); | |
} | |
} |