This re-styles your sublime text 3 sidebar to be dark, it fits default Twilight theme.
Go to Menu > Preferences > Browse Packages, save the Default.sublime-theme file into the "User" folder.
Based on:
<?php | |
if($field['value'] == "") | |
return; | |
$crud->route = $field['route']; | |
?> | |
<div @include('crud::inc.field_wrapper_attributes') > | |
<h3 style="margin-top:0">{!! $field['label'] !!}</h3> | |
<div class="array-container form-group"> |
-- | |
-- Table Structure | |
-- | |
CREATE TABLE `territories` ( | |
`id` varchar(6) COLLATE utf8mb4_unicode_ci NOT NULL, | |
`name` varchar(127) COLLATE utf8mb4_unicode_ci NOT NULL, | |
`level` enum('1','2','3') COLLATE utf8mb4_unicode_ci NOT NULL, | |
`parent_id` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
ajax = (url, data, success, error, method) => { | |
var params = typeof data == 'string' ? data : Object.keys(data).map( | |
k => encodeURIComponent(k) + '=' + encodeURIComponent(data[k]) | |
).join('&'); | |
if(method === undefined) | |
method = "POST"; | |
var xhr = new XMLHttpRequest(); | |
xhr.open(method, url); |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
public class Main { | |
public static void main(String[] args) { | |
new Main(); | |
} |
<snippet> | |
<content><![CDATA[ | |
{{ __("$TM_SELECTED_TEXT") }} | |
]]></content> | |
<tabTrigger>t</tabTrigger> | |
<scope>text.blade.php</scope> | |
</snippet> |
This re-styles your sublime text 3 sidebar to be dark, it fits default Twilight theme.
Go to Menu > Preferences > Browse Packages, save the Default.sublime-theme file into the "User" folder.
Based on:
.tree-view { | |
.icon:before { | |
display:none; | |
} | |
.list-group li:not(.list-nested-item), .list-tree li:not(.list-nested-item), .list-group li.list-nested-item > .list-item, .list-tree li.list-nested-item > .list-item { | |
line-height: 21px; | |
} | |
.list-group .selected:before, .list-tree .selected:before { | |
height: 21px; | |
} |
// -------------------- | |
// Penalty Shoot-out | |
// Ilustrated example at https://jsfiddle.net/promatik/yo00Lr4e/ | |
// -------------------- | |
function checkPenaltyShootOutEnd(round, score1, score2, total_rounds, first_shooter) { | |
return Math.abs(score1-score2) > (round > total_rounds ? round % 2 : Math.ceil((10-round) / 2) - (first_shooter ^ score1 < score2 ? 0 : round % 2)); | |
} | |
// -------------------- |
This re-styles your sublime text sidebar to be dark, it fits default Twilight theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
function guessingGame(testcases, useMidPoint) { | |
useMidPoint = useMidPoint || false; | |
var correct = i = 0, | |
r = Math.random; | |
for (i=testcases;i;i--) { | |
var a = r(), b = r(), k = useMidPoint ? 0.5 : r(); | |
correct += (k < a && a > b) || (k > a && a < b); | |
} | |