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
<!-- include font stylesheet in your <head> --> | |
<head> | |
<head> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
</head> | |
<!-- use it in your template --> | |
<div class="material-icons"> | |
<a href="#">home</a> | |
<a href="#">face</a> |
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
let data = `xdsqxnovprgovwzkus[fmadbfsbqwzzrzrgdg]aeqornszgvbizdm | |
itgslvpxoqqakli[arktzcssgkxktejbno]wsgkbwwtbmfnddt[zblrboqsvezcgfmfvcz]iwyhyatqetsreeyhh | |
... | |
kpglgg[mpvkikuabwucwlpqf]cmzkcdnrhwjmfgbmlq | |
spwwppgjgfexuezrixp[rotgzyxzqxyrroafx]tkwxfiamzdjdqpftvq`; | |
let dataArray = data.split(/\n/); | |
// finds ABBA pattern in square brackets | |
let inBracketsRegEx = /(?=\[[a-z]*([a-z])([a-z])\2\1[a-z]*\])(?!\[[a-z]*([a-z])\1{3}[a-z]*\])/; | |
// finds ABBA pattern |
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
<svg class="spinner" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" > | |
<style> | |
.spinner { | |
animation: rotator 5s linear infinite; | |
transform-origin: center; | |
} | |
@keyframes rotator { | |
0% { transform: rotate(0deg); } | |
100% { transform: rotate(360deg); } |
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
/** | |
* LocalStorage for storing string values | |
*/ | |
export function LocalStorage( | |
target: Object, // The prototype of the class | |
decoratedPropertyName: string // The name of the property | |
) { | |
// get and set methods | |
Object.defineProperty(target, decoratedPropertyName, { |
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
/** | |
* SessionStorage for storing string values | |
*/ | |
export function SessionStorage( | |
target: Object, // The prototype of the class | |
decoratedPropertyName: string // The name of the property | |
) { | |
// get and set methods | |
Object.defineProperty(target, decoratedPropertyName, { |
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
export class SomeComponent { | |
/** Attributes */ | |
@LocalStorage | |
public variableToBeStored: string; | |
} |
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 Api = function() { | |
var url = 'https://query.yahooapis.com/v1/public/yql'; | |
var query = 'env "store://datatables.org/alltableswithkeys"; select * from yahoo.finance.historicaldata where symbol = "AAPL" and startDate = "2016-01-01" and endDate = "2017-01-01"'; | |
var def = new $.Deferred(); | |
this.getData = function() { | |
$.ajax({ | |
'url': url, | |
'data': { |
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
package api; | |
import com.ib.controller.ApiController; | |
import java.util.ArrayList; | |
public class API implements ApiController.IConnectionHandler { | |
static API INSTANCE = new API(); | |
Logger m_inLogger = new Logger(); | |
Logger m_outLogger = new Logger(); |
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
package api; | |
import com.ib.controller.ApiConnection.ILogger; | |
public class Logger implements ILogger { | |
@Override | |
public void log(String valueOf) { | |
System.out.print(valueOf); | |
} | |
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 run(input) { | |
var output = "http://translate.google.com/#en/cs/" + encodeURIComponent(input) | |
return output; | |
} |
OlderNewer