mirror of https://github.com/microsoft/vscode.git
bring back vscode-colorize-tests
This commit is contained in:
parent
0e7f3d0d8c
commit
af2bcd4d46
|
@ -0,0 +1,2 @@
|
||||||
|
out
|
||||||
|
node_modules
|
|
@ -0,0 +1,17 @@
|
||||||
|
// A launch configuration that compiles the extension and then opens it inside a new window
|
||||||
|
{
|
||||||
|
"version": "0.1.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Launch Tests",
|
||||||
|
"type": "extensionHost",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeExecutable": "${execPath}",
|
||||||
|
"args": ["${workspaceFolder}/../../", "${workspaceFolder}/test", "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out" ],
|
||||||
|
"stopOnEntry": false,
|
||||||
|
"sourceMaps": true,
|
||||||
|
"outDir": "${workspaceFolder}/out",
|
||||||
|
"preLaunchTask": "npm"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"command": "npm",
|
||||||
|
"type": "shell",
|
||||||
|
"presentation": {
|
||||||
|
"reveal": "silent"
|
||||||
|
},
|
||||||
|
"args": ["run", "compile"],
|
||||||
|
"isBackground": true,
|
||||||
|
"problemMatcher": "$tsc-watch"
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"name": "vscode-colorize-tests",
|
||||||
|
"description": "Colorize tests for VS Code",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"publisher": "vscode",
|
||||||
|
"license": "MIT",
|
||||||
|
"private": true,
|
||||||
|
"activationEvents": [
|
||||||
|
"onLanguage:json"
|
||||||
|
],
|
||||||
|
"main": "./out/colorizerTestMain",
|
||||||
|
"enableProposedApi": true,
|
||||||
|
"engines": {
|
||||||
|
"vscode": "*"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"jsonc-parser": "2.2.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^12.19.9"
|
||||||
|
},
|
||||||
|
"contributes": {
|
||||||
|
"semanticTokenTypes": [
|
||||||
|
{
|
||||||
|
"id": "testToken",
|
||||||
|
"description": "A test token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"semanticTokenModifiers": [
|
||||||
|
{
|
||||||
|
"id": "testModifier",
|
||||||
|
"description": "A test modifier"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"semanticTokenScopes": [
|
||||||
|
{
|
||||||
|
"scopes": {
|
||||||
|
"testToken": [
|
||||||
|
"entity.name.function.special"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"productIconThemes": [
|
||||||
|
{
|
||||||
|
"id": "Test Product Icons",
|
||||||
|
"label": "The Test Product Icon Theme",
|
||||||
|
"path": "./producticons/test-product-icon-theme.json",
|
||||||
|
"_watch": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) <2013> <Elegant Themes, Inc.>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
// ElegantIcons from https://www.elegantthemes.com/icons/elegant_font.zip
|
||||||
|
"fonts": [
|
||||||
|
{
|
||||||
|
"id": "elegant",
|
||||||
|
"src": [
|
||||||
|
{
|
||||||
|
"path": "./ElegantIcons.woff",
|
||||||
|
"format": "woff"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"weight": "normal",
|
||||||
|
"style": "normal",
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"iconDefinitions": {
|
||||||
|
"chevron-down": {
|
||||||
|
"fontCharacter": "\\43",
|
||||||
|
},
|
||||||
|
"chevron-right": {
|
||||||
|
"fontCharacter": "\\45"
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"fontCharacter": "\\e062"
|
||||||
|
},
|
||||||
|
"warning": {
|
||||||
|
"fontCharacter": "\\e063"
|
||||||
|
},
|
||||||
|
"settings-gear": {
|
||||||
|
"fontCharacter": "\\e030"
|
||||||
|
},
|
||||||
|
"files": {
|
||||||
|
"fontCharacter": "\\e056"
|
||||||
|
},
|
||||||
|
"extensions": {
|
||||||
|
"fontCharacter": "\\e015"
|
||||||
|
},
|
||||||
|
"debug-alt-2": {
|
||||||
|
"fontCharacter": "\\e072"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import 'mocha';
|
||||||
|
import * as assert from 'assert';
|
||||||
|
import { commands, Uri } from 'vscode';
|
||||||
|
import { join, normalize } from 'path';
|
||||||
|
import * as fs from 'fs';
|
||||||
|
|
||||||
|
function assertUnchangedTokens(fixturesPath: string, resultsPath: string, fixture: string, done: any) {
|
||||||
|
const testFixurePath = join(fixturesPath, fixture);
|
||||||
|
|
||||||
|
return commands.executeCommand('_workbench.captureSyntaxTokens', Uri.file(testFixurePath)).then(data => {
|
||||||
|
try {
|
||||||
|
if (!fs.existsSync(resultsPath)) {
|
||||||
|
fs.mkdirSync(resultsPath);
|
||||||
|
}
|
||||||
|
let resultPath = join(resultsPath, fixture.replace('.', '_') + '.json');
|
||||||
|
if (fs.existsSync(resultPath)) {
|
||||||
|
let previousData = JSON.parse(fs.readFileSync(resultPath).toString());
|
||||||
|
try {
|
||||||
|
assert.deepStrictEqual(data, previousData);
|
||||||
|
} catch (e) {
|
||||||
|
fs.writeFileSync(resultPath, JSON.stringify(data, null, '\t'), { flag: 'w' });
|
||||||
|
if (Array.isArray(data) && Array.isArray(previousData) && data.length === previousData.length) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
let d = data[i];
|
||||||
|
let p = previousData[i];
|
||||||
|
if (d.c !== p.c || hasThemeChange(d.r, p.r)) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// different but no tokenization ot color change: no failure
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fs.writeFileSync(resultPath, JSON.stringify(data, null, '\t'));
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
} catch (e) {
|
||||||
|
done(e);
|
||||||
|
}
|
||||||
|
}, done);
|
||||||
|
}
|
||||||
|
|
||||||
|
function hasThemeChange(d: any, p: any): boolean {
|
||||||
|
let keys = Object.keys(d);
|
||||||
|
for (let key of keys) {
|
||||||
|
if (d[key] !== p[key]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
suite('colorization', () => {
|
||||||
|
const testPath = normalize(join(__dirname, '../test'));
|
||||||
|
const fixturesPath = join(testPath, 'colorize-fixtures');
|
||||||
|
const resultsPath = join(testPath, 'colorize-results');
|
||||||
|
|
||||||
|
for (const fixture of fs.readdirSync(fixturesPath)) {
|
||||||
|
test(`colorize: ${fixture}`, function (done) {
|
||||||
|
assertUnchangedTokens(fixturesPath, resultsPath, fixture, done);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
|
@ -0,0 +1,73 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import * as vscode from 'vscode';
|
||||||
|
import * as jsoncParser from 'jsonc-parser';
|
||||||
|
|
||||||
|
export function activate(context: vscode.ExtensionContext): any {
|
||||||
|
|
||||||
|
const tokenTypes = ['type', 'struct', 'class', 'interface', 'enum', 'parameterType', 'function', 'variable', 'testToken'];
|
||||||
|
const tokenModifiers = ['static', 'abstract', 'deprecated', 'declaration', 'documentation', 'member', 'async', 'testModifier'];
|
||||||
|
|
||||||
|
const legend = new vscode.SemanticTokensLegend(tokenTypes, tokenModifiers);
|
||||||
|
|
||||||
|
const outputChannel = vscode.window.createOutputChannel('Semantic Tokens Test');
|
||||||
|
|
||||||
|
const documentSemanticHighlightProvider: vscode.DocumentSemanticTokensProvider = {
|
||||||
|
provideDocumentSemanticTokens(document: vscode.TextDocument): vscode.ProviderResult<vscode.SemanticTokens> {
|
||||||
|
const builder = new vscode.SemanticTokensBuilder();
|
||||||
|
|
||||||
|
function addToken(value: string, startLine: number, startCharacter: number, length: number) {
|
||||||
|
const [type, ...modifiers] = value.split('.');
|
||||||
|
|
||||||
|
const selectedModifiers = [];
|
||||||
|
|
||||||
|
let tokenType = legend.tokenTypes.indexOf(type);
|
||||||
|
if (tokenType === -1) {
|
||||||
|
if (type === 'notInLegend') {
|
||||||
|
tokenType = tokenTypes.length + 2;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let tokenModifiers = 0;
|
||||||
|
for (const modifier of modifiers) {
|
||||||
|
const index = legend.tokenModifiers.indexOf(modifier);
|
||||||
|
if (index !== -1) {
|
||||||
|
tokenModifiers = tokenModifiers | 1 << index;
|
||||||
|
selectedModifiers.push(modifier);
|
||||||
|
} else if (modifier === 'notInLegend') {
|
||||||
|
tokenModifiers = tokenModifiers | 1 << (legend.tokenModifiers.length + 2);
|
||||||
|
selectedModifiers.push(modifier);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
builder.push(startLine, startCharacter, length, tokenType, tokenModifiers);
|
||||||
|
|
||||||
|
outputChannel.appendLine(`line: ${startLine}, character: ${startCharacter}, length ${length}, ${type} (${tokenType}), ${selectedModifiers} ${tokenModifiers.toString(2)}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
outputChannel.appendLine('---');
|
||||||
|
|
||||||
|
const visitor: jsoncParser.JSONVisitor = {
|
||||||
|
onObjectProperty: (property: string, _offset: number, _length: number, startLine: number, startCharacter: number) => {
|
||||||
|
addToken(property, startLine, startCharacter, property.length + 2);
|
||||||
|
},
|
||||||
|
onLiteralValue: (value: any, _offset: number, length: number, startLine: number, startCharacter: number) => {
|
||||||
|
if (typeof value === 'string') {
|
||||||
|
addToken(value, startLine, startCharacter, length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
jsoncParser.visit(document.getText(), visitor);
|
||||||
|
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
context.subscriptions.push(vscode.languages.registerDocumentSemanticTokensProvider({ pattern: '**/*semantic-test.json' }, documentSemanticHighlightProvider, legend));
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const testRunner = require('../../../test/integration/electron/testrunner');
|
||||||
|
|
||||||
|
const suite = 'Integration Colorize Tests';
|
||||||
|
|
||||||
|
const options: any = {
|
||||||
|
ui: 'tdd',
|
||||||
|
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||||
|
timeout: 60000
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
|
options.reporter = 'mocha-multi-reporters';
|
||||||
|
options.reporterOptions = {
|
||||||
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
|
mochaJunitReporterReporterOptions: {
|
||||||
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
testRunner.configure(options);
|
||||||
|
|
||||||
|
export = testRunner;
|
|
@ -0,0 +1,9 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/// <reference path="../../../../src/vs/vscode.d.ts" />
|
||||||
|
/// <reference path="../../../../src/vs/vscode.proposed.d.ts" />
|
||||||
|
/// <reference types='@types/node'/>
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.alert('hello');
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
window.alert('hello');
|
||||||
|
</script>
|
|
@ -0,0 +1 @@
|
||||||
|
<ion-view><button-view/><font-face></font-face></ion-view>
|
|
@ -0,0 +1,3 @@
|
||||||
|
#f(@hm: "broken highlighting in VS Code") {
|
||||||
|
content: "";
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
<html>
|
||||||
|
<script type='text/html'>
|
||||||
|
<div class='foo'></div>
|
||||||
|
</script>
|
||||||
|
<script type='module'>
|
||||||
|
var x = 9;
|
||||||
|
</script>
|
||||||
|
<script type='text/ng-template'>
|
||||||
|
<div class='foo'></div>
|
||||||
|
</script>
|
||||||
|
<body class='bar'>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM ubuntu
|
||||||
|
MAINTAINER Kimbro Staken
|
||||||
|
|
||||||
|
RUN apt-get install -y software-properties-common python
|
||||||
|
RUN add-apt-repository ppa:chris-lea/node.js
|
||||||
|
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y nodejs
|
||||||
|
#RUN apt-get install -y nodejs=0.6.12~dfsg1-1ubuntu1
|
||||||
|
RUN mkdir /var/www
|
||||||
|
|
||||||
|
ADD app.js /var/www/app.js
|
||||||
|
|
||||||
|
CMD ["/usr/bin/node", "/var/www/app.js"]
|
|
@ -0,0 +1,42 @@
|
||||||
|
package foo;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runners.*;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Multi line comment
|
||||||
|
*/
|
||||||
|
public class TestClass {
|
||||||
|
|
||||||
|
private String aString;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Note:</p> Hello
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
|
public void doSomething(int a) {
|
||||||
|
double b = 0.0;
|
||||||
|
double c = 10e3;
|
||||||
|
long l = 134l;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* multiline comment
|
||||||
|
*/
|
||||||
|
@SuppressWarnings(value = "aString")
|
||||||
|
private long privateMethod(long b){
|
||||||
|
for (int i = 0; i < 9; i++) {
|
||||||
|
System.out.println("Hello" + i);
|
||||||
|
}
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
//single line comment
|
||||||
|
@Test
|
||||||
|
public void someTests() {
|
||||||
|
int hex = 0x5;
|
||||||
|
Vector<Number> v = new Vector();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
test1 : dsd
|
||||||
|
test2 : abc-def
|
||||||
|
test-3 : abcdef
|
||||||
|
test-4 : abc-def
|
|
@ -0,0 +1,9 @@
|
||||||
|
<script>
|
||||||
|
...
|
||||||
|
<?php
|
||||||
|
foreach($actID AS $act) {
|
||||||
|
echo 'divNames.push(\'[nid='.$act.']\');';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
...
|
||||||
|
</script>
|
|
@ -0,0 +1,4 @@
|
||||||
|
- blue: a="brown,not_brown"
|
||||||
|
- not_blue: foo
|
||||||
|
- blue: foo="}"
|
||||||
|
- not_blue: 1
|
|
@ -0,0 +1,9 @@
|
||||||
|
swagger: '2.0'
|
||||||
|
info:
|
||||||
|
description: 'The API Management Service API defines an updated and refined version
|
||||||
|
of the concepts currently known as Developer, APP, and API Product in Edge. Of
|
||||||
|
note is the introduction of the API concept, missing previously from Edge
|
||||||
|
|
||||||
|
'
|
||||||
|
title: API Management Service API
|
||||||
|
version: initial
|
|
@ -0,0 +1 @@
|
||||||
|
<hello></hello>
|
|
@ -0,0 +1,88 @@
|
||||||
|
.PHONY: all
|
||||||
|
all: echo hello
|
||||||
|
|
||||||
|
.PHONY: hello
|
||||||
|
hello: main.o factorial.o \
|
||||||
|
hello.o $(first) $($(filter second,second)) \
|
||||||
|
# This is a long \
|
||||||
|
comment inside prerequisites.
|
||||||
|
g++ main.o factorial.o hello.o -o hello
|
||||||
|
|
||||||
|
# There are a building steps \
|
||||||
|
below. And the tab is at the beginning of this line.
|
||||||
|
|
||||||
|
main.o: main.cpp
|
||||||
|
g++ -c main.cpp
|
||||||
|
|
||||||
|
factorial.o: factorial.cpp
|
||||||
|
g++ -c factorial.cpp $(fake_variable)
|
||||||
|
|
||||||
|
hello.o: hello.cpp \
|
||||||
|
$(Colorizing with tabs at the beginning of the second line of prerequisites)
|
||||||
|
g++ -c hello.cpp -o $@
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm *o hello
|
||||||
|
|
||||||
|
.PHONY: var
|
||||||
|
var:
|
||||||
|
# "$$" in a shell means to escape makefile's variable substitution.
|
||||||
|
some_shell_var=$$(sed -nre 's/some regex with (group)/\1/p')
|
||||||
|
|
||||||
|
.PHONY: echo
|
||||||
|
echo:
|
||||||
|
echo "#" and '#' in quotes are not comments \
|
||||||
|
and '\' will be continued
|
||||||
|
@echo Shell is not printed out, just a message.
|
||||||
|
@-+-+echo Error will be ignored here; invalidcommand
|
||||||
|
# And we can see variables are highlited as supposed to be:
|
||||||
|
@echo '$(CC) $(shell echo "123") -o $@'
|
||||||
|
@-./point-and-slash-should-not-be-highlighted
|
||||||
|
|
||||||
|
define defined
|
||||||
|
$(info Checking existance of $(1) $(flavor $(1)))
|
||||||
|
$(if $(filter undefined,$(flavor $(1))),0,1)
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifeq ($(strip $(call defined,TOP_DIR)),0)
|
||||||
|
$(info TOP_DIR must be set before including paths.mk)
|
||||||
|
endif
|
||||||
|
|
||||||
|
-include $(TOP_DIR)3rdparty.mk
|
||||||
|
|
||||||
|
ifeq ($(strip $(call defined,CODIT_DIR)),0)
|
||||||
|
$(info CODIT_DIR must be set in $(TOP_DIR)3rdparty.mk)
|
||||||
|
endif
|
||||||
|
|
||||||
|
CXXVER_GE480 := $(shell expr `$(CXX) -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40800)
|
||||||
|
|
||||||
|
ok := ok
|
||||||
|
$(info Braces {} in parentheses ({}): ${ok})
|
||||||
|
${info Parentheses () in braces {()}: $(ok)}
|
||||||
|
|
||||||
|
ifeq ("${ok}", "skip")
|
||||||
|
$(ok))}
|
||||||
|
${ok}})
|
||||||
|
endif
|
||||||
|
|
||||||
|
result != echo "'$(ok)' $(shell echo "from inlined shell")"
|
||||||
|
$(info $(result))
|
||||||
|
|
||||||
|
# Below is a test of variable assignment without any spacing.
|
||||||
|
var=val
|
||||||
|
var?=val
|
||||||
|
var:=123
|
||||||
|
var!=echo val
|
||||||
|
var:=val \
|
||||||
|
notvar=butval
|
||||||
|
var:=$(val:.c=.o)
|
||||||
|
|
||||||
|
var-$(nested-var)=val
|
||||||
|
|
||||||
|
# Spaces in a nested shell will hurt a colorizing of variable,
|
||||||
|
# but not so much.
|
||||||
|
var-$(shell printf 2) := val2
|
||||||
|
$(info Should be 'val2' here: $(var-2))
|
||||||
|
|
||||||
|
export a ?= b:c
|
|
@ -0,0 +1 @@
|
||||||
|
var e [][]*aType // ( comments after var are now green )
|
|
@ -0,0 +1,3 @@
|
||||||
|
#ifndef _UCRT
|
||||||
|
#define _UCRT
|
||||||
|
#endif
|
|
@ -0,0 +1,3 @@
|
||||||
|
#ifndef _UCRT
|
||||||
|
#define _UCRT
|
||||||
|
#endif
|
|
@ -0,0 +1,13 @@
|
||||||
|
# h
|
||||||
|
|
||||||
|
<pre><code>
|
||||||
|
# a
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
# h
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
# a
|
||||||
|
a</pre>
|
||||||
|
|
||||||
|
# h
|
|
@ -0,0 +1,3 @@
|
||||||
|
.ssdsd
|
||||||
|
|
||||||
|
// asdsdas
|
|
@ -0,0 +1,26 @@
|
||||||
|
impl Foo<A,B>
|
||||||
|
where A: B
|
||||||
|
{ }
|
||||||
|
|
||||||
|
impl Foo<A,B> for C
|
||||||
|
where A: B
|
||||||
|
{ }
|
||||||
|
|
||||||
|
impl Foo<A,B> for C
|
||||||
|
{
|
||||||
|
fn foo<A,B> -> C
|
||||||
|
where A: B
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn foo<A,B> -> C
|
||||||
|
where A: B
|
||||||
|
{ }
|
||||||
|
|
||||||
|
struct Foo<A,B>
|
||||||
|
where A: B
|
||||||
|
{ }
|
||||||
|
|
||||||
|
trait Foo<A,B> : C
|
||||||
|
where A: B
|
||||||
|
{ }
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||||
|
<WorkFine>
|
||||||
|
<NoColorWithNonLatinCharacters_АБВ NextTagnotWork="something" Поле="tagnotwork">
|
||||||
|
<WorkFine/>
|
||||||
|
<Error_АБВГД/>
|
||||||
|
</NoColorWithNonLatinCharacters_АБВ>
|
||||||
|
</WorkFine>
|
|
@ -0,0 +1,13 @@
|
||||||
|
#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators) \
|
||||||
|
namespace { \
|
||||||
|
struct der : public base \
|
||||||
|
{ \
|
||||||
|
void f(); \
|
||||||
|
}; \
|
||||||
|
static void func() { \
|
||||||
|
der v; \
|
||||||
|
v.f(); \
|
||||||
|
} \
|
||||||
|
DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, func, decorators) \
|
||||||
|
} \
|
||||||
|
inline DOCTEST_NOINLINE void der::f()
|
|
@ -0,0 +1,10 @@
|
||||||
|
struct Foo {
|
||||||
|
Foo();
|
||||||
|
int a;
|
||||||
|
int b;
|
||||||
|
int c;
|
||||||
|
};
|
||||||
|
Foo::Foo()
|
||||||
|
: a(1),
|
||||||
|
// b(2),
|
||||||
|
c(3) {}
|
|
@ -0,0 +1,3 @@
|
||||||
|
std::tuple_element<0, std::pair<pugi::xml_node, std::map<std::basic_string<char>, pugi::xml_node, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, pugi::xml_node> > > > >::type dnode
|
||||||
|
|
||||||
|
std::_Rb_tree_iterator<std::pair<const long, std::pair<pugi::xml_node, std::map<std::basic_string<char>, pugi::xml_node, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, pugi::xml_node> > > > > > dnode_it = dnodes_.find(uid.position)
|
|
@ -0,0 +1,6 @@
|
||||||
|
let a = Array<number>(); // Highlight ok here
|
||||||
|
|
||||||
|
interface egGenericsInArray {
|
||||||
|
a: Array<number>;
|
||||||
|
}
|
||||||
|
let s = "nothing should fail here...";
|
|
@ -0,0 +1,7 @@
|
||||||
|
:root {
|
||||||
|
--spacing-unit: 6px;
|
||||||
|
--cell-padding: (4 * var(--spacing-unit));
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
padding-left: calc(4 * var(--spacing-unit, 5px));
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
:root {
|
||||||
|
--spacing-unit: 6px;
|
||||||
|
--cell-padding: (4 * var(--spacing-unit));
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
padding-left: calc(4 * var(--spacing-unit, 5px));
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
<script>console.log('x')</script>
|
||||||
|
<style>test { display: none }</style>
|
||||||
|
<a onblur="doBlur()" onclick='doClick()' ondrag=doDrag()></a>
|
||||||
|
<div style="x { }"></div>
|
||||||
|
<div style='y { }'></div>
|
||||||
|
<div style=z{}></div>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<#
|
||||||
|
.
|
||||||
|
#>
|
|
@ -0,0 +1 @@
|
||||||
|
rowData.push(callback(new Cell(row, col, false)));
|
|
@ -0,0 +1,17 @@
|
||||||
|
let keyCode = 0;
|
||||||
|
if(!(keyCode === 8 || (keyCode>=48 && keyCode<=57))) {}
|
||||||
|
for (let i=0; i<5; i++) {}
|
||||||
|
for (var i=0; i<5; i++) {}
|
||||||
|
for (let i=0; i<5; i++) {}
|
||||||
|
for (; i<5;) {}
|
||||||
|
for (let i=0; 1+( i<<5 ) < 5;i++) {}
|
||||||
|
var p = 1?2:(3<4?5:6);
|
||||||
|
class A<X, Y> { }
|
||||||
|
class A1<T extends { a: () => string }> { }
|
||||||
|
class B { }
|
||||||
|
class C { }
|
||||||
|
function foo<T>() { return 1;}
|
||||||
|
let x1: A<(param?: number) => void, B>;
|
||||||
|
let x2: A<C | B, C & B>;
|
||||||
|
const t = 1 < (5 > 10 ? 1 : 2);
|
||||||
|
var f6 = 1 < foo<string>();
|
|
@ -0,0 +1,4 @@
|
||||||
|
function foo(isAll, startTime, endTime) {
|
||||||
|
const timeRange = isAll ? '所有时间' : `${startTime} - ${endTime}`;
|
||||||
|
return true;
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
function* foo2() {
|
||||||
|
yield 'bar';
|
||||||
|
yield* ['bar'];
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
function foo3() {
|
||||||
|
const foo = (): any => ({ 'bar': 'baz' })
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* @typedef {{
|
||||||
|
* id: number,
|
||||||
|
* fn: !Function,
|
||||||
|
* context: (!Object|undefined)
|
||||||
|
* }}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
goog.dom.animationFrame.Task_;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {{
|
||||||
|
* measureTask: goog.dom.animationFrame.Task_,
|
||||||
|
* mutateTask: goog.dom.animationFrame.Task_,
|
||||||
|
* state: (!Object|undefined),
|
||||||
|
* args: (!Array|undefined),
|
||||||
|
* isScheduled: boolean
|
||||||
|
* }}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
goog.dom.animationFrame.TaskSet_;
|
|
@ -0,0 +1 @@
|
||||||
|
export var foo = () => new RegExp('');
|
|
@ -0,0 +1,5 @@
|
||||||
|
class A2 extends B1 {
|
||||||
|
public count: number = 9;
|
||||||
|
public resolveNextGeneration(cell : A2) {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
let s1 = {
|
||||||
|
k: {
|
||||||
|
k1: s,
|
||||||
|
k2: 1
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,15 @@
|
||||||
|
regex = /Hello (\d+) #{user}/g
|
||||||
|
2 / 3
|
||||||
|
2/3
|
||||||
|
|
||||||
|
a = b/c + d/g
|
||||||
|
someOtherStuff
|
||||||
|
|
||||||
|
name="hello"
|
||||||
|
test=/// #{name}
|
||||||
|
|
||||||
|
fancyRegExp = ///
|
||||||
|
(\d+) # numbers
|
||||||
|
(\w*) # letters
|
||||||
|
$ # the end
|
||||||
|
///
|
|
@ -0,0 +1,4 @@
|
||||||
|
var x = `Hello ${foo}!`;
|
||||||
|
console.log(`string text line 1
|
||||||
|
string text line 2`);
|
||||||
|
x = tag`Hello ${ a + b } world ${ a * b }`;
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
this.foo = 9;
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
:root {
|
||||||
|
--spacing-unit: 6px;
|
||||||
|
--cell-padding: (4 * var(--spacing-unit));
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
padding-left: calc(4 * var(--spacing-unit, 5px));
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
title VSCode Dev
|
||||||
|
|
||||||
|
pushd %~dp0\..
|
||||||
|
|
||||||
|
:: Node modules
|
||||||
|
if not exist node_modules call .\scripts\npm.bat install
|
||||||
|
|
||||||
|
:: Get electron
|
||||||
|
node .\node_modules\gulp\bin\gulp.js electron
|
||||||
|
|
||||||
|
:: Build
|
||||||
|
if not exist out node .\node_modules\gulp\bin\gulp.js compile
|
||||||
|
|
||||||
|
:: Configuration
|
||||||
|
set NODE_ENV=development
|
||||||
|
|
||||||
|
call echo %%LINE:rem +=%%
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
endlocal
|
|
@ -0,0 +1,30 @@
|
||||||
|
/* C Program to find roots of a quadratic equation when coefficients are entered by user. */
|
||||||
|
/* Library function sqrt() computes the square root. */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h> /* This is needed to use sqrt() function.*/
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
float a, b, c, determinant, r1,r2, real, imag;
|
||||||
|
printf("Enter coefficients a, b and c: ");
|
||||||
|
scanf("%f%f%f",&a,&b,&c);
|
||||||
|
determinant=b*b-4*a*c;
|
||||||
|
if (determinant>0)
|
||||||
|
{
|
||||||
|
r1= (-b+sqrt(determinant))/(2*a);
|
||||||
|
r2= (-b-sqrt(determinant))/(2*a);
|
||||||
|
printf("Roots are: %.2f and %.2f",r1 , r2);
|
||||||
|
}
|
||||||
|
else if (determinant==0)
|
||||||
|
{
|
||||||
|
r1 = r2 = -b/(2*a);
|
||||||
|
printf("Roots are: %.2f and %.2f", r1, r2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
real= -b/(2*a);
|
||||||
|
imag = sqrt(-determinant)/(2*a);
|
||||||
|
printf("Roots are: %.2f+%.2fi and %.2f-%.2fi", real, imag, real, imag);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
#if B4G_DEBUG_CHECK
|
||||||
|
fprintf(stderr,"num_candidate_ret=%d:", num_candidate);
|
||||||
|
for(int i=0;i<num_candidate;++i)
|
||||||
|
fprintf(stderr,"%d,",user_candidate[i]);
|
||||||
|
fprintf(stderr,";");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void main(O obj) {
|
||||||
|
LOG_INFO("not hilighted as string");
|
||||||
|
LOG_INFO(obj << ", even worse; " << obj.x << " check this out.");
|
||||||
|
// everything from this point on is interpeted as a string literal...
|
||||||
|
O x;
|
||||||
|
std::unique_ptr<O> o(new O);
|
||||||
|
// sadness.
|
||||||
|
|
||||||
|
sprintf(options, "STYLE=Keramik;TITLE=%s;THEME=%s", ...);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main2() {
|
||||||
|
printf(";");
|
||||||
|
// the rest of
|
||||||
|
asm("movw $0x38, %ax; ltr %ax");
|
||||||
|
fn("{};");
|
||||||
|
|
||||||
|
// the rest of
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
;; from http://clojure-doc.org/articles/tutorials/introduction.html
|
||||||
|
|
||||||
|
(require '[clojure.string :as str])
|
||||||
|
(def the-answer 42)
|
||||||
|
[1 2 3] ; A vector
|
||||||
|
[1 :two "three"]
|
||||||
|
{:a 1 :b 2}
|
||||||
|
#{:a :b :c}
|
||||||
|
'(1 2 3)
|
||||||
|
(def my-stuff ["shirt" "coat" "hat"]) ; this is more typical usage.
|
||||||
|
|
||||||
|
(my-func (my-func2 arg1
|
||||||
|
arg2)
|
||||||
|
(other-func arg-a
|
||||||
|
(foo-bar arg-x
|
||||||
|
arg-y
|
||||||
|
(+ arg-xx
|
||||||
|
arg-yy
|
||||||
|
arg-zz))
|
||||||
|
arg-b))
|
||||||
|
'(+ 1 2 3)
|
||||||
|
;; ⇒ (+ 1 2 3)
|
||||||
|
(let [width 10
|
||||||
|
height 20
|
||||||
|
thickness 2]
|
||||||
|
(println "hello from inside the `let`.")
|
||||||
|
(* width
|
||||||
|
height
|
||||||
|
thickness))
|
||||||
|
|
||||||
|
;; Vectors
|
||||||
|
(def v [:a :b :c])
|
||||||
|
(def li '(:a :b :c))
|
||||||
|
(conj v :d) ; ⇒ [:a :b :c :d]
|
||||||
|
(conj li :d) ; ⇒ (:d :a :b :c)
|
||||||
|
|
||||||
|
v ; ⇒ is still [:a :b :c]
|
||||||
|
li ; ⇒ is still (:a :b :c)
|
||||||
|
|
||||||
|
;; Maps
|
||||||
|
(def m {:a 1 :b 2})
|
||||||
|
(assoc m :c 3) ; ⇒ {:a 1 :c 3 :b 2}
|
||||||
|
(dissoc m :b) ; ⇒ {:a 1}
|
||||||
|
|
||||||
|
(def my-atom (atom {:foo 1}))
|
||||||
|
;; ⇒ #'user/my-atom
|
||||||
|
@my-atom
|
||||||
|
;; ⇒ {:foo 1}
|
||||||
|
(swap! my-atom update-in [:foo] inc)
|
||||||
|
;; ⇒ {:foo 2}
|
||||||
|
@my-atom
|
||||||
|
;; ⇒ {:foo 2}
|
|
@ -0,0 +1,28 @@
|
||||||
|
"""
|
||||||
|
A CoffeeScript sample.
|
||||||
|
"""
|
||||||
|
|
||||||
|
class Vehicle
|
||||||
|
constructor: (@name) =>
|
||||||
|
|
||||||
|
drive: () =>
|
||||||
|
alert "Drive #{@name}"
|
||||||
|
|
||||||
|
class Car extends Vehicle
|
||||||
|
drive: () =>
|
||||||
|
alert "Driving #{@name}"
|
||||||
|
|
||||||
|
c = new Car "Volvo"
|
||||||
|
|
||||||
|
while onTheRoad()
|
||||||
|
c.drive()
|
||||||
|
|
||||||
|
vehicles = (new Car for i in [1..100])
|
||||||
|
|
||||||
|
startRace = (vehicles) -> [vehicle.drive() for vehicle in vehicles]
|
||||||
|
|
||||||
|
fancyRegExp = ///
|
||||||
|
(\d+) # numbers
|
||||||
|
(\w*) # letters
|
||||||
|
$ # the end
|
||||||
|
///
|
|
@ -0,0 +1,33 @@
|
||||||
|
// classes example
|
||||||
|
#include <iostream>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
#define EXTERN_C extern "C"
|
||||||
|
|
||||||
|
class Rectangle {
|
||||||
|
int width, height;
|
||||||
|
public:
|
||||||
|
void set_values (int,int);
|
||||||
|
int area() {return width*height;}
|
||||||
|
};
|
||||||
|
|
||||||
|
void Rectangle::set_values (int x, int y) {
|
||||||
|
width = x;
|
||||||
|
height = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
long double operator "" _w(long double);
|
||||||
|
#define MY_MACRO(a, b)
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
1.2_w; // calls operator "" _w(1.2L)
|
||||||
|
asm("movl %a %b");
|
||||||
|
MY_MACRO(1, 2);
|
||||||
|
Rectangle rect;
|
||||||
|
rect.set_values (3,4);
|
||||||
|
cout << "area: " << rect.area();
|
||||||
|
Task<ANY_OUTPUT_TYPE, ANY_INPUT_TYPE>::links_to;
|
||||||
|
int t = 2;
|
||||||
|
if (t > 0) puts("\n*************************************************");
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
namespace SampleNamespace
|
||||||
|
{
|
||||||
|
class TestClass
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
int[] radii = { 15, 32, 108, 74, 9 };
|
||||||
|
const double pi = 3.14159;
|
||||||
|
foreach (int radius in radii) {
|
||||||
|
double circumference = pi * (2 * radius);
|
||||||
|
// Display the number of command line arguments:
|
||||||
|
System.Console.WriteLine("Circumference = {0:N2}", circumference);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
@{
|
||||||
|
var total = 0;
|
||||||
|
var totalMessage = "";
|
||||||
|
@* a multiline
|
||||||
|
razor comment embedded in csharp *@
|
||||||
|
if (IsPost) {
|
||||||
|
|
||||||
|
// Retrieve the numbers that the user entered.
|
||||||
|
var num1 = Request["text1"];
|
||||||
|
var num2 = Request["text2"];
|
||||||
|
|
||||||
|
// Convert the entered strings into integers numbers and add.
|
||||||
|
total = num1.AsInt() + num2.AsInt();
|
||||||
|
<italic><bold>totalMessage = "Total = " + total;</bold></italic>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Add Numbers</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Enter two whole numbers and then click <strong>Add</strong>.</p>
|
||||||
|
<form action="" method="post">
|
||||||
|
<p><label for="text1">First Number:</label>
|
||||||
|
<input type="text" name="text1" />
|
||||||
|
</p>
|
||||||
|
<p><label for="text2">Second Number:</label>
|
||||||
|
<input type="text" name="text2" />
|
||||||
|
</p>
|
||||||
|
<p><input type="submit" value="Add" /></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@* now we call the totalMessage method
|
||||||
|
(a multi line razor comment outside code) *@
|
||||||
|
|
||||||
|
<p>@totalMessage</p>
|
||||||
|
|
||||||
|
<p>@(totalMessage+"!")</p>
|
||||||
|
|
||||||
|
An email address (with escaped at character): name@@domain.com
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,159 @@
|
||||||
|
/* css Zen Garden default style v1.02 */
|
||||||
|
/* css released under Creative Commons License - http://creativecommons.org/licenses/by-nc-sa/1.0/ */
|
||||||
|
/* This file based on 'Tranquille' by Dave Shea */
|
||||||
|
/* You may use this file as a foundation for any new work, but you may find it easier to start from scratch. */
|
||||||
|
/* Not all elements are defined in this file, so you'll most likely want to refer to the xhtml as well. */
|
||||||
|
/* Your images should be linked as if the CSS file sits in the same folder as the images. ie. no paths. */
|
||||||
|
/* basic elements */
|
||||||
|
|
||||||
|
@import "mystyle.css";
|
||||||
|
@import url("mystyle.css");
|
||||||
|
@import url("bluish.css") projection, tv;
|
||||||
|
|
||||||
|
.html {
|
||||||
|
padding: 0;
|
||||||
|
font-style: 0;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font: 75% georgia, sans-serif;
|
||||||
|
line-height: 1.88889;
|
||||||
|
color: #555753;
|
||||||
|
background: #fff url(blossoms.jpg) no-repeat bottom right;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-image: -webkit-linear-gradient(top, start-color, end-color);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(start-color), to(end-color));
|
||||||
|
background-image: -moz-linear-gradient(top, start-color, end-color);
|
||||||
|
background-image: linear-gradient(to bottom, start-color, end-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font: italic normal 1.4em georgia, sans-serif;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
color: #7D775C;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:link {
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #B7A5DF;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #D4CDDC;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover,
|
||||||
|
a:focus,
|
||||||
|
a:active {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #9685BA;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* specific divs */
|
||||||
|
|
||||||
|
.page-wrapper {
|
||||||
|
background: url(zen-bg.jpg) no-repeat top left;
|
||||||
|
padding: 0 175px 0 110px;
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro {
|
||||||
|
min-width: 470px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
background: transparent url(h1.gif) no-repeat top left;
|
||||||
|
margin-top: 10px;
|
||||||
|
display: block;
|
||||||
|
width: 219px;
|
||||||
|
height: 87px;
|
||||||
|
float: left;
|
||||||
|
text-indent: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
padding-top: 20px;
|
||||||
|
height: 87px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary {
|
||||||
|
clear: both;
|
||||||
|
margin: 20px 20px 20px 10px;
|
||||||
|
width: 160px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary p {
|
||||||
|
font: italic 1.1em/2.2 georgia;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preamble {
|
||||||
|
clear: right;
|
||||||
|
padding: 0px 10px 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.supporting {
|
||||||
|
padding-left: 10px;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a:link,
|
||||||
|
footer a:visited {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
margin-left: 600px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .wrapper {
|
||||||
|
font: 10px verdana, sans-serif;
|
||||||
|
background: transparent url(paper-bg.jpg) top left repeat-y;
|
||||||
|
padding: 10px;
|
||||||
|
margin-top: 150px;
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar li a:link {
|
||||||
|
color: #988F5E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar li a:visited {
|
||||||
|
color: '#B3AE94';
|
||||||
|
}
|
||||||
|
|
||||||
|
.extra1 {
|
||||||
|
background: transparent url(cr2.gif) top left no-repeat;
|
||||||
|
position: absolute;
|
||||||
|
top: 40px;
|
||||||
|
right: 0;
|
||||||
|
width: 148px;
|
||||||
|
height: 110px;
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
// from https://msdn.microsoft.com/en-us/library/dd233160.aspx
|
||||||
|
|
||||||
|
// The declaration creates a constructor that takes two values, name and age.
|
||||||
|
type Person(name:string, age:int) =
|
||||||
|
let mutable internalAge = age
|
||||||
|
|
||||||
|
new(name:string) = Person(name, 0)
|
||||||
|
|
||||||
|
member this.Name = name
|
||||||
|
// A read/write property.
|
||||||
|
member this.Age
|
||||||
|
with get() = internalAge
|
||||||
|
and set(value) = internalAge <- value
|
||||||
|
|
||||||
|
member this.HasABirthday () = internalAge <- internalAge + 1
|
||||||
|
member this.IsOfAge targetAge = internalAge >= targetAge
|
||||||
|
override this.ToString () =
|
||||||
|
"Name: " + name + "\n" + "Age: " + (string)internalAge
|
|
@ -0,0 +1,25 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/base64"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
dnsName := "test-vm-from-go"
|
||||||
|
storageAccount := "mystorageaccount"
|
||||||
|
c := make(chan int)
|
||||||
|
|
||||||
|
client, err := management.ClientFromPublishSettingsFile("path/to/downloaded.publishsettings", "")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// create virtual machine
|
||||||
|
role := vmutils.NewVMConfiguration(dnsName, vmSize)
|
||||||
|
vmutils.ConfigureDeploymentFromPlatformImage(
|
||||||
|
&role,
|
||||||
|
vmImage,
|
||||||
|
fmt.Sprintf("http://%s.blob.core.windows.net/sdktest/%s.vhd", storageAccount, dnsName),
|
||||||
|
"")
|
||||||
|
}
|
|
@ -0,0 +1,219 @@
|
||||||
|
|
||||||
|
// Hello World
|
||||||
|
println "Hello world!"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Variables:
|
||||||
|
|
||||||
|
You can assign values to variables for later use
|
||||||
|
*/
|
||||||
|
|
||||||
|
def x = 1
|
||||||
|
println x
|
||||||
|
|
||||||
|
x = new java.util.Date()
|
||||||
|
println x
|
||||||
|
|
||||||
|
x = -3.1499392
|
||||||
|
println x
|
||||||
|
|
||||||
|
x = false
|
||||||
|
println x
|
||||||
|
|
||||||
|
x = "Groovy!"
|
||||||
|
println x
|
||||||
|
|
||||||
|
/*
|
||||||
|
Collections and maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Creating an empty list
|
||||||
|
def technologies = []
|
||||||
|
|
||||||
|
/*** Adding a elements to the list ***/
|
||||||
|
|
||||||
|
// As with Java
|
||||||
|
technologies.add("Grails")
|
||||||
|
|
||||||
|
// Left shift adds, and returns the list
|
||||||
|
technologies << "Groovy"
|
||||||
|
|
||||||
|
// Add multiple elements
|
||||||
|
technologies.addAll(["Gradle","Griffon"])
|
||||||
|
|
||||||
|
/*** Removing elements from the list ***/
|
||||||
|
|
||||||
|
// As with Java
|
||||||
|
technologies.remove("Griffon")
|
||||||
|
|
||||||
|
// Subtraction works also
|
||||||
|
technologies = technologies - 'Grails'
|
||||||
|
|
||||||
|
/*** Iterating Lists ***/
|
||||||
|
|
||||||
|
// Iterate over elements of a list
|
||||||
|
technologies.each { println "Technology: $it"}
|
||||||
|
technologies.eachWithIndex { it, i -> println "$i: $it"}
|
||||||
|
|
||||||
|
/*** Checking List contents ***/
|
||||||
|
|
||||||
|
//Evaluate if a list contains element(s) (boolean)
|
||||||
|
contained = technologies.contains( 'Groovy' )
|
||||||
|
|
||||||
|
// Or
|
||||||
|
contained = 'Groovy' in technologies
|
||||||
|
|
||||||
|
// To sort without mutating original, you can do:
|
||||||
|
sortedTechnologies = technologies.sort( false )
|
||||||
|
|
||||||
|
|
||||||
|
//Replace all elements in the list
|
||||||
|
Collections.replaceAll(technologies, 'Gradle', 'gradle')
|
||||||
|
|
||||||
|
//Shuffle a list
|
||||||
|
Collections.shuffle(technologies, new Random())
|
||||||
|
|
||||||
|
//Clear a list
|
||||||
|
technologies.clear()
|
||||||
|
|
||||||
|
//Creating an empty map
|
||||||
|
def devMap = [:]
|
||||||
|
|
||||||
|
//Add values
|
||||||
|
devMap = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy']
|
||||||
|
devMap.put('lastName','Perez')
|
||||||
|
|
||||||
|
//Iterate over elements of a map
|
||||||
|
devMap.each { println "$it.key: $it.value" }
|
||||||
|
devMap.eachWithIndex { it, i -> println "$i: $it"}
|
||||||
|
|
||||||
|
//Evaluate if a map contains a key
|
||||||
|
assert devMap.containsKey('name')
|
||||||
|
|
||||||
|
//Get the keys of a map
|
||||||
|
println devMap.keySet()
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
// read only property
|
||||||
|
final String name = "Roberto"
|
||||||
|
|
||||||
|
// read only property with public getter and protected setter
|
||||||
|
String language
|
||||||
|
protected void setLanguage(String language) { this.language = language }
|
||||||
|
|
||||||
|
// dynamically typed property
|
||||||
|
def lastName
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Logical Branching and Looping
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Groovy supports the usual if - else syntax
|
||||||
|
def x = 3
|
||||||
|
|
||||||
|
if(x==1) {
|
||||||
|
println "One"
|
||||||
|
} else if(x==2) {
|
||||||
|
println "Two"
|
||||||
|
} else {
|
||||||
|
println "X greater than Two"
|
||||||
|
}
|
||||||
|
|
||||||
|
//Groovy also supports the ternary operator:
|
||||||
|
def y = 10
|
||||||
|
def x = (y > 1) ? "worked" : "failed"
|
||||||
|
assert x == "worked"
|
||||||
|
|
||||||
|
//Groovy supports 'The Elvis Operator' too!
|
||||||
|
//Instead of using the ternary operator:
|
||||||
|
|
||||||
|
displayName = user.name ? user.name : 'Anonymous'
|
||||||
|
|
||||||
|
//We can write it:
|
||||||
|
displayName = user.name ?: 'Anonymous'
|
||||||
|
|
||||||
|
//For loop
|
||||||
|
//Iterate over a range
|
||||||
|
def x = 0
|
||||||
|
for (i in 0 .. 30) {
|
||||||
|
x += i
|
||||||
|
}
|
||||||
|
|
||||||
|
//Iterate over a list
|
||||||
|
x = 0
|
||||||
|
for( i in [5,3,2,1] ) {
|
||||||
|
x += i
|
||||||
|
}
|
||||||
|
|
||||||
|
//Iterate over an array
|
||||||
|
array = (0..20).toArray()
|
||||||
|
x = 0
|
||||||
|
for (i in array) {
|
||||||
|
x += i
|
||||||
|
}
|
||||||
|
|
||||||
|
//Iterate over a map
|
||||||
|
def map = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy']
|
||||||
|
x = 0
|
||||||
|
for ( e in map ) {
|
||||||
|
x += e.value
|
||||||
|
}
|
||||||
|
|
||||||
|
def technologies = ['Groovy','Grails','Gradle']
|
||||||
|
technologies*.toUpperCase() // = to technologies.collect { it?.toUpperCase() }
|
||||||
|
|
||||||
|
def user = User.get(1)
|
||||||
|
def username = user?.username
|
||||||
|
|
||||||
|
def clos = { println "Hello World!" }
|
||||||
|
|
||||||
|
def sum = { a, b -> println a+b }
|
||||||
|
sum(2,4)
|
||||||
|
|
||||||
|
def x = 5
|
||||||
|
def multiplyBy = { num -> num * x }
|
||||||
|
println multiplyBy(10)
|
||||||
|
|
||||||
|
def clos = { print it }
|
||||||
|
clos( "hi" )
|
||||||
|
|
||||||
|
def cl = {a, b ->
|
||||||
|
sleep(3000) // simulate some time consuming processing
|
||||||
|
a + b
|
||||||
|
}
|
||||||
|
|
||||||
|
mem = cl.memoize()
|
||||||
|
|
||||||
|
def callClosure(a, b) {
|
||||||
|
def start = System.currentTimeMillis()
|
||||||
|
mem(a, b)
|
||||||
|
println "Inputs(a = $a, b = $b) - took ${System.currentTimeMillis() - start} msecs."
|
||||||
|
}
|
||||||
|
|
||||||
|
callClosure(1, 2)
|
||||||
|
|
||||||
|
//Another example:
|
||||||
|
import groovy.transform.TypeChecked
|
||||||
|
|
||||||
|
@TypeChecked
|
||||||
|
Integer test() {
|
||||||
|
Integer num = "1"
|
||||||
|
|
||||||
|
Integer[] numbers = [1,2,3,4]
|
||||||
|
|
||||||
|
Date date = numbers[1]
|
||||||
|
|
||||||
|
return "Test"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//CompileStatic example:
|
||||||
|
import groovy.transform.CompileStatic
|
||||||
|
|
||||||
|
@CompileStatic
|
||||||
|
int sum(int x, int y) {
|
||||||
|
x + y
|
||||||
|
}
|
||||||
|
|
||||||
|
assert sum(2,5) == 7
|
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="entry">
|
||||||
|
<h1>{{title}}</h1>
|
||||||
|
{{#if author}}
|
||||||
|
<h2>{{author.firstName}} {{author.lastName}}</h2>
|
||||||
|
{{else}}
|
||||||
|
<h2>Unknown Author</h2>
|
||||||
|
{{/if}}
|
||||||
|
{{contentBody}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#unless license}}
|
||||||
|
<h3 class="warning">WARNING: This entry does not have a license!</h3>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
|
<div class="footnotes">
|
||||||
|
<ul>
|
||||||
|
{{#each footnotes}}
|
||||||
|
<li>{{this}}</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1>Comments</h1>
|
||||||
|
|
||||||
|
<div id="comments">
|
||||||
|
{{#each comments}}
|
||||||
|
<h2><a href="/posts/{{../permalink}}#{{id}}">{{title}}</a></h2>
|
||||||
|
<div>{{body}}</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<h1>Comments</h1>
|
||||||
|
|
||||||
|
<div id="comments">
|
||||||
|
{{#each comments}}
|
||||||
|
<h2><a href="/posts/{{../permalink}}#{{id}}">{{title}}</a></h2>
|
||||||
|
<div>{{body}}</div>
|
||||||
|
{{/each}}
|
||||||
|
<p>{{./name}} or {{this/name}} or {{this.name}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="entry">
|
||||||
|
{{!-- only output author name if an author exists --}}
|
||||||
|
{{#if author}}
|
||||||
|
<h1>{{firstName}} {{lastName}}</h1>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="post">
|
||||||
|
{{> userMessage tagName="h1" }}
|
||||||
|
|
||||||
|
<h1>Comments</h1>
|
||||||
|
|
||||||
|
{{#each comments}}
|
||||||
|
{{> userMessage tagName="h2" }}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
|
@ -0,0 +1,13 @@
|
||||||
|
struct VS_OUTPUT
|
||||||
|
{
|
||||||
|
float4 Position : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
VS_OUTPUT main(in float4 vPosition : POSITION)
|
||||||
|
{
|
||||||
|
VS_OUTPUT Output;
|
||||||
|
|
||||||
|
Output.Position = vPosition;
|
||||||
|
|
||||||
|
return Output;
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>VSCode Tests</title>
|
||||||
|
<link href="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.css" rel="stylesheet" />
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
color: purple;
|
||||||
|
background-color: #d8da3d;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="mocha"></div>
|
||||||
|
|
||||||
|
<!--<script src="https://cdn.rawgit.com/jquery/jquery/2.1.4/dist/jquery.min.js"></script>
|
||||||
|
<script src="https://cdn.rawgit.com/Automattic/expect.js/0.3.1/index.js"></script>-->
|
||||||
|
<script src="/out/vs/loader.js"></script>
|
||||||
|
<script src="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
mocha.setup('tdd');
|
||||||
|
|
||||||
|
require.config({
|
||||||
|
baseUrl: '/out',
|
||||||
|
paths: {
|
||||||
|
assert: '/test/assert.js'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
require({{ modules }}, function () {
|
||||||
|
mocha.run();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner hidden">
|
||||||
|
<span class=codicon></span>
|
||||||
|
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
|
||||||
|
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,10 @@
|
||||||
|
; last modified 1 April 2001 by John Doe
|
||||||
|
[owner]
|
||||||
|
name=John Doe
|
||||||
|
organization=Acme Widgets Inc.
|
||||||
|
|
||||||
|
[database]
|
||||||
|
; use IP address in case network name resolution is not working
|
||||||
|
server=192.0.2.62
|
||||||
|
port=143
|
||||||
|
file="payroll.dat"
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
var gulp = require('gulp');
|
||||||
|
var tsb = require('gulp-tsb');
|
||||||
|
var util = require('./lib/util');
|
||||||
|
var watcher = require('./lib/watch');
|
||||||
|
var assign = require('object-assign');
|
||||||
|
|
||||||
|
var compilation = tsb.create(assign({ verbose: true }, require('./tsconfig.json').compilerOptions));
|
||||||
|
|
||||||
|
gulp.task('compile', function() {
|
||||||
|
return gulp.src('**/*.ts', { base: '.' })
|
||||||
|
.pipe(compilation())
|
||||||
|
.pipe(gulp.dest(''));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('watch', function() {
|
||||||
|
var src = gulp.src('**/*.ts', { base: '.' });
|
||||||
|
|
||||||
|
return watcher('**/*.ts', { base: '.' })
|
||||||
|
.pipe(util.incremental(compilation, src))
|
||||||
|
.pipe(gulp.dest(''));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('default', ['compile']);
|
||||||
|
|
||||||
|
function cloneArray(arr) {
|
||||||
|
_.foo();
|
||||||
|
var r = [];
|
||||||
|
for (var i = 0, len = arr.length; i < len; i++) {
|
||||||
|
r[i] = doClone(arr[i]);
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
// a comment
|
||||||
|
"options": {
|
||||||
|
"myBool": true,
|
||||||
|
"myInteger": 1,
|
||||||
|
"myString": "String\u0056",
|
||||||
|
"myNumber": 1.24,
|
||||||
|
"myNull": null,
|
||||||
|
"myArray": [ 1, "Hello", true, null, [], {}],
|
||||||
|
"myObject" : {
|
||||||
|
"foo": "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
var ToggleText = React.createClass({
|
||||||
|
getInitialState: function () {
|
||||||
|
return {
|
||||||
|
showDefault: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
toggle: function (e) {
|
||||||
|
// Prevent following the link.
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
// Invert the chosen default.
|
||||||
|
// This will trigger an intelligent re-render of the component.
|
||||||
|
this.setState({ showDefault: !this.state.showDefault })
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function () {
|
||||||
|
// Default to the default message.
|
||||||
|
var message = this.props.default;
|
||||||
|
|
||||||
|
// If toggled, show the alternate message.
|
||||||
|
if (!this.state.showDefault) {
|
||||||
|
message = this.props.alt;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h1>Hello {message}!</h1>
|
||||||
|
<a href="" onClick={this.toggle}>Toggle</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
React.render(<ToggleText default="World" alt="Mars" />, document.body);
|
|
@ -0,0 +1,50 @@
|
||||||
|
@import "mystyle.css";
|
||||||
|
@import url("mystyle.css");
|
||||||
|
@import url("bluish.css") projection, tv;
|
||||||
|
|
||||||
|
@base: #f938ab;
|
||||||
|
|
||||||
|
.box-shadow(@style, @c) when (iscolor(@c)) {
|
||||||
|
border-radius: @style @c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
|
||||||
|
.box-shadow(@style, rgba(0, 0, 0, @alpha));
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
color: saturate(@base, 5%);
|
||||||
|
border-color: lighten(@base, 30%);
|
||||||
|
|
||||||
|
div {
|
||||||
|
.box-shadow((0 0 5px), 30%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
h1 {
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
p { font-size: 12px;
|
||||||
|
a { text-decoration: none;
|
||||||
|
&:hover { border-width: 1px }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@the-border: 1px;
|
||||||
|
@base-color: #111;
|
||||||
|
@red: #842210;
|
||||||
|
|
||||||
|
#header {
|
||||||
|
color: (@base-color * 3);
|
||||||
|
border-left: @the-border;
|
||||||
|
border-right: (@the-border * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
color: (@base-color + #003300);
|
||||||
|
border-color: desaturate(@red, 10%);
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
[2017-12-21 12:47:29.584] [renderer1] [trace] CommandService#executeCommand workbench.view.explorer
|
||||||
|
[2017-12-21 12:47:29.614] [renderer1] [trace] CommandService#executeCommand setContext
|
||||||
|
[2017-12-21 12:47:29.632] [renderer1] [trace] SCMService#registerSCMProvider
|
||||||
|
[2017-12-21 12:47:29.636] [renderer1] [trace] CommandService#executeCommand setContext
|
||||||
|
[2017-12-21 12:47:32.164] [renderer1] [trace] CommandService#executeCommand workbench.action.showCommands
|
||||||
|
[2017-12-21 12:47:33.122] [renderer1] [trace] CommandService#executeCommand workbench.action.openLogFile
|
||||||
|
[2017-12-21 12:47:34.249] [renderer1] [trace] CommandService#executeCommand workbench.action.openLogViewer
|
||||||
|
[2017-12-21 12:47:48.078] [renderer1] [trace] CommandService#executeCommand workbench.action.showCommands
|
||||||
|
[2017-12-21 12:47:49.294] [renderer1] [trace] CommandService#executeCommand workbench.action.reloadWindow
|
|
@ -0,0 +1,12 @@
|
||||||
|
-- defines a factorial function
|
||||||
|
function fact (n)
|
||||||
|
if n == 0 then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return n * fact(n-1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
print("enter a number:")
|
||||||
|
a = io.read("*number") -- read a number
|
||||||
|
print(fact(a))
|
|
@ -0,0 +1,52 @@
|
||||||
|
//
|
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "UseQuotes.h"
|
||||||
|
#import <Use/GTLT.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
Multi
|
||||||
|
Line
|
||||||
|
Comments
|
||||||
|
*/
|
||||||
|
@implementation Test
|
||||||
|
|
||||||
|
- (void) applicationWillFinishLaunching:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)onSelectInput:(id)sender
|
||||||
|
{
|
||||||
|
NSString* defaultDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0];
|
||||||
|
|
||||||
|
NSOpenPanel* panel = [NSOpenPanel openPanel];
|
||||||
|
[panel setAllowedFileTypes:[[NSArray alloc] initWithObjects:@"ipa", @"xcarchive", @"app", nil]];
|
||||||
|
|
||||||
|
[panel beginWithCompletionHandler:^(NSInteger result)
|
||||||
|
{
|
||||||
|
if (result == NSFileHandlingPanelOKButton)
|
||||||
|
[self.inputTextField setStringValue:[panel.URL path]];
|
||||||
|
}];
|
||||||
|
return YES;
|
||||||
|
|
||||||
|
int hex = 0xFEF1F0F;
|
||||||
|
float ing = 3.14;
|
||||||
|
ing = 3.14e0;
|
||||||
|
ing = 31.4e-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(id) initWithParams:(id<anObject>) aHandler withDeviceStateManager:(id<anotherObject>) deviceStateManager
|
||||||
|
{
|
||||||
|
// add a tap gesture recognizer
|
||||||
|
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
|
||||||
|
NSMutableArray *gestureRecognizers = [NSMutableArray array];
|
||||||
|
[gestureRecognizers addObject:tapGesture];
|
||||||
|
[gestureRecognizers addObjectsFromArray:scnView.gestureRecognizers];
|
||||||
|
scnView.gestureRecognizers = gestureRecognizers;
|
||||||
|
|
||||||
|
return tapGesture;
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,106 @@
|
||||||
|
# Header 1 #
|
||||||
|
## Header 2 ##
|
||||||
|
### Header 3 ### (Hashes on right are optional)
|
||||||
|
## Markdown plus h2 with a custom ID ## {#id-goes-here}
|
||||||
|
[Link back to H2](#id-goes-here)
|
||||||
|
|
||||||
|
### Alternate heading styles:
|
||||||
|
Alternate Header 1
|
||||||
|
==================
|
||||||
|
Alternate Header 2
|
||||||
|
------------------
|
||||||
|
|
||||||
|
<!-- html madness -->
|
||||||
|
<div class="custom-class" markdown="1">
|
||||||
|
<div>
|
||||||
|
nested div
|
||||||
|
</div>
|
||||||
|
<script type='text/x-koka'>
|
||||||
|
function( x: int ) { return x*x; }
|
||||||
|
</script>
|
||||||
|
This is a div _with_ underscores
|
||||||
|
and a & <b class="bold">bold</b> element.
|
||||||
|
<style>
|
||||||
|
body { font: "Consolas" }
|
||||||
|
</style>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
* Bullet lists are easy too
|
||||||
|
- Another one
|
||||||
|
+ Another one
|
||||||
|
|
||||||
|
+ nested list
|
||||||
|
|
||||||
|
This is a paragraph, which is text surrounded by
|
||||||
|
whitespace. Paragraphs can be on one
|
||||||
|
line (or many), and can drone on for hours.
|
||||||
|
|
||||||
|
Now some inline markup like _italics_, **bold**,
|
||||||
|
and `code()`. Note that underscores
|
||||||
|
in_words_are ignored.
|
||||||
|
|
||||||
|
````application/json
|
||||||
|
{ value: ["or with a mime type"] }
|
||||||
|
````
|
||||||
|
|
||||||
|
> Blockquotes are like quoted text in email replies
|
||||||
|
>> And, they can be nested
|
||||||
|
|
||||||
|
1. A numbered list
|
||||||
|
> Block quotes in list
|
||||||
|
2. Which is numbered
|
||||||
|
3. With periods and a space
|
||||||
|
|
||||||
|
And now some code:
|
||||||
|
|
||||||
|
// Code is just text indented a bit
|
||||||
|
which(is_easy) to_remember();
|
||||||
|
|
||||||
|
And a block
|
||||||
|
|
||||||
|
~~~
|
||||||
|
// Markdown extra adds un-indented code blocks too
|
||||||
|
|
||||||
|
if (this_is_more_code == true && !indented) {
|
||||||
|
// tild wrapped code blocks, also not indented
|
||||||
|
}
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Text with
|
||||||
|
two trailing spaces
|
||||||
|
(on the right)
|
||||||
|
can be used
|
||||||
|
for things like poems
|
||||||
|
|
||||||
|
### Horizontal rules
|
||||||
|
|
||||||
|
* * * *
|
||||||
|
****
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Markdown plus tables ##
|
||||||
|
|
||||||
|
| Header | Header | Right |
|
||||||
|
| ------ | ------ | -----: |
|
||||||
|
| Cell | Cell | $10 |
|
||||||
|
| Cell | Cell | $20 |
|
||||||
|
|
||||||
|
* Outer pipes on tables are optional
|
||||||
|
* Colon used for alignment (right versus left)
|
||||||
|
|
||||||
|
## Markdown plus definition lists ##
|
||||||
|
|
||||||
|
Bottled water
|
||||||
|
: $ 1.25
|
||||||
|
: $ 1.55 (Large)
|
||||||
|
|
||||||
|
Milk
|
||||||
|
Pop
|
||||||
|
: $ 1.75
|
||||||
|
|
||||||
|
* Multiple definitions and terms are possible
|
||||||
|
* Definitions can include multiple paragraphs too
|
||||||
|
|
||||||
|
*[ABBR]: Markdown plus abbreviations (produces an <abbr> tag)
|
|
@ -0,0 +1,52 @@
|
||||||
|
//
|
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "UseQuotes.h"
|
||||||
|
#import <Use/GTLT.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
Multi
|
||||||
|
Line
|
||||||
|
Comments
|
||||||
|
*/
|
||||||
|
@implementation Test
|
||||||
|
|
||||||
|
- (void) applicationWillFinishLaunching:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)onSelectInput:(id)sender
|
||||||
|
{
|
||||||
|
NSString* defaultDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0];
|
||||||
|
|
||||||
|
NSOpenPanel* panel = [NSOpenPanel openPanel];
|
||||||
|
[panel setAllowedFileTypes:[[NSArray alloc] initWithObjects:@"ipa", @"xcarchive", @"app", nil]];
|
||||||
|
|
||||||
|
[panel beginWithCompletionHandler:^(NSInteger result)
|
||||||
|
{
|
||||||
|
if (result == NSFileHandlingPanelOKButton)
|
||||||
|
[self.inputTextField setStringValue:[panel.URL path]];
|
||||||
|
}];
|
||||||
|
return YES;
|
||||||
|
|
||||||
|
int hex = 0xFEF1F0F;
|
||||||
|
float ing = 3.14;
|
||||||
|
ing = 3.14e0;
|
||||||
|
ing = 31.4e-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(id) initWithParams:(id<anObject>) aHandler withDeviceStateManager:(id<anotherObject>) deviceStateManager
|
||||||
|
{
|
||||||
|
// add a tap gesture recognizer
|
||||||
|
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
|
||||||
|
NSMutableArray *gestureRecognizers = [NSMutableArray array];
|
||||||
|
[gestureRecognizers addObject:tapGesture];
|
||||||
|
[gestureRecognizers addObjectsFromArray:scnView.gestureRecognizers];
|
||||||
|
scnView.gestureRecognizers = gestureRecognizers;
|
||||||
|
|
||||||
|
return tapGesture;
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,48 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Example page</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
function functionName(){
|
||||||
|
|
||||||
|
// Code to be executed
|
||||||
|
}
|
||||||
|
/* Example PHP file
|
||||||
|
multiline comment
|
||||||
|
*/
|
||||||
|
|
||||||
|
$cards = array("ah", "ac", "ad", "as",
|
||||||
|
"2h", "2c", "2d", "2s");
|
||||||
|
|
||||||
|
srand(time());
|
||||||
|
|
||||||
|
for($i = 0; $i < 52; $i++) {
|
||||||
|
$count = count($cards);
|
||||||
|
$random = (rand()%$count);
|
||||||
|
|
||||||
|
if($cards[$random] == "") {
|
||||||
|
$i--;
|
||||||
|
} else {
|
||||||
|
$deck[] = $cards[$random];
|
||||||
|
$cards[$random] = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
srand(time());
|
||||||
|
$starting_point = (rand()%51);
|
||||||
|
print("Starting point for cut cards is: $starting_point<p>");
|
||||||
|
|
||||||
|
// display shuffled cards (EXAMPLE ONLY)
|
||||||
|
for ($index = 0; $index < 52; $index++) {
|
||||||
|
if ($starting_point == 52) { $starting_point = 0; }
|
||||||
|
print("Uncut Point: <strong>$deck[$index]</strong> ");
|
||||||
|
$starting_point++;
|
||||||
|
}
|
||||||
|
|
||||||
|
function foo bar(){}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,46 @@
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
my $badfound = 0;
|
||||||
|
sub check_line {
|
||||||
|
my($fn, $line) = @_;
|
||||||
|
|
||||||
|
# Check for that =.
|
||||||
|
if($line =~ /^\s*if\s*\(.*[^!<>=]=([^=].*\)|\))/) {
|
||||||
|
if(!$badfound) {
|
||||||
|
print("The following suspicious lines were found:\n");
|
||||||
|
$badfound = 1;
|
||||||
|
}
|
||||||
|
print "$fn:$.: $line\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# This function opens and reads one file, and calls
|
||||||
|
# check_line to analyze each line. Call it with the
|
||||||
|
# file name.
|
||||||
|
#
|
||||||
|
sub check_file {
|
||||||
|
my($fn) = @_;
|
||||||
|
|
||||||
|
if(!open(IN, $fn)) {
|
||||||
|
print "Cannot read $fn.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
my($line);
|
||||||
|
while($line = <IN>)
|
||||||
|
{
|
||||||
|
chomp $line;
|
||||||
|
check_line($fn,$line);
|
||||||
|
}
|
||||||
|
|
||||||
|
close IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Go through the argument list and check each file
|
||||||
|
#
|
||||||
|
while(my $fn = shift @ARGV) {
|
||||||
|
check_file($fn);
|
||||||
|
}
|
||||||
|
if(!$badfound) { print "No suspicious lines were found.\n"; }
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Copyright Microsoft Corporation
|
||||||
|
|
||||||
|
function Test-IsAdmin() {
|
||||||
|
try {
|
||||||
|
$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||||
|
$principal = New-Object Security.Principal.WindowsPrincipal -ArgumentList $identity
|
||||||
|
return $principal.IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator )
|
||||||
|
} catch {
|
||||||
|
throw "Failed to determine if the current user has elevated privileges. The error was: '{0}'." -f $_
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Invoke-Environment()
|
||||||
|
{
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory=1)][string]$Command
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach($_ in cmd /c "$Command 2>&1 & set") {
|
||||||
|
if ($_ -match '^([^=]+)=(.*)') {
|
||||||
|
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Write-Host -Object 'Initializing Azure PowerShell environment...';
|
||||||
|
|
||||||
|
# PowerShell commands need elevation for dependencies installation and running tests
|
||||||
|
if (!(Test-IsAdmin)){
|
||||||
|
Write-Host -Object 'Please launch command under administrator account. It is needed for environment setting up and unit test.' -ForegroundColor Red;
|
||||||
|
}
|
||||||
|
|
||||||
|
$env:AzurePSRoot = Split-Path -Parent -Path $env:AzurePSRoot;
|
||||||
|
|
||||||
|
if (Test-Path -Path "$env:ADXSDKProgramFiles\Microsoft Visual Studio 12.0") {
|
||||||
|
$vsVersion="12.0"
|
||||||
|
} else {
|
||||||
|
$vsVersion="11.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
$setVSEnv = '"{0}\Microsoft Visual Studio {1}\VC\vcvarsall.bat" x64' -f $env:ADXSDKProgramFiles, $vsVersion;
|
||||||
|
|
||||||
|
Invoke-Environment -Command $setVSEnv;
|
|
@ -0,0 +1,27 @@
|
||||||
|
// h1(name=maintainer.name)
|
||||||
|
// | Maintainer:
|
||||||
|
// = ' ' + maintainer.name
|
||||||
|
table
|
||||||
|
tr
|
||||||
|
td(style='width: '+(100/2)+'%').
|
||||||
|
Twitter
|
||||||
|
td= maintainer.twitter
|
||||||
|
tr
|
||||||
|
td(style='width: '+(100/2)+'%').
|
||||||
|
Blog
|
||||||
|
td= maintainer.blog
|
||||||
|
|
||||||
|
- var user = { name: 'John' }
|
||||||
|
if user
|
||||||
|
div.welcomebox
|
||||||
|
// Filtered inline output
|
||||||
|
p.
|
||||||
|
Welcome, #{user.name}
|
||||||
|
else
|
||||||
|
div.loginbox
|
||||||
|
form(name="login", action="/login", method="post")
|
||||||
|
input(type="text", name="user")
|
||||||
|
input(type="password", name="pass")
|
||||||
|
input(type="submit", value="login")
|
||||||
|
|
||||||
|
p #[code samp] — Regular text. #[samp This is sample text] more text.
|
|
@ -0,0 +1,24 @@
|
||||||
|
# © Microsoft. All rights reserved.
|
||||||
|
|
||||||
|
#' Add together two numbers.
|
||||||
|
#'
|
||||||
|
#' @param x A number.
|
||||||
|
#' @param y A number.
|
||||||
|
#' @return The sum of \code{x} and \code{y}.
|
||||||
|
#' @examples
|
||||||
|
#' add(1, 1)
|
||||||
|
#' add(10, 1)
|
||||||
|
add <- function(x, y) {
|
||||||
|
x + y
|
||||||
|
}
|
||||||
|
|
||||||
|
add(1, -2, 2.0)
|
||||||
|
add(1.0e10, 2.0e10)
|
||||||
|
|
||||||
|
paste("one", NULL)
|
||||||
|
paste(NA, 'two')
|
||||||
|
|
||||||
|
paste("multi-
|
||||||
|
line",
|
||||||
|
'multi-
|
||||||
|
line')
|
|
@ -0,0 +1,46 @@
|
||||||
|
# encoding: utf-8
|
||||||
|
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||||
|
# Changes may cause incorrect behavior and will be lost if the code is
|
||||||
|
# regenerated.
|
||||||
|
|
||||||
|
module Azure::ARM::Scheduler
|
||||||
|
#
|
||||||
|
# A service client - single point of access to the REST API.
|
||||||
|
#
|
||||||
|
class SchedulerManagementClient < MsRestAzure::AzureServiceClient
|
||||||
|
include Azure::ARM::Scheduler::Models
|
||||||
|
include MsRestAzure
|
||||||
|
|
||||||
|
# @return job_collections
|
||||||
|
attr_reader :job_collections
|
||||||
|
|
||||||
|
#
|
||||||
|
# Creates initializes a new instance of the SchedulerManagementClient class.
|
||||||
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
||||||
|
# @param base_url [String] the base URI of the service.
|
||||||
|
# @param options [Array] filters to be applied to the HTTP requests.
|
||||||
|
#
|
||||||
|
def initialize(credentials, base_url = nil, options = nil)
|
||||||
|
super(credentials, options)
|
||||||
|
@base_url = base_url || 'https://management.azure.com'
|
||||||
|
|
||||||
|
fail ArgumentError, 'credentials is nil' if credentials.nil?
|
||||||
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
|
||||||
|
@credentials = credentials
|
||||||
|
|
||||||
|
@job_collections = JobCollections.new(self)
|
||||||
|
@jobs = Jobs.new(self)
|
||||||
|
@api_version = '2016-01-01'
|
||||||
|
@long_running_operation_retry_timeout = 30
|
||||||
|
@generate_client_request_id = true
|
||||||
|
if MacOS.version >= :mavericks
|
||||||
|
version = `#{MAVERICKS_PKG_PATH}/usr/bin/clang --version`
|
||||||
|
else
|
||||||
|
version = `/usr/bin/clang --version`
|
||||||
|
end
|
||||||
|
version = version[/clang-(\d+\.\d+\.\d+(\.\d+)?)/, 1] || "0"
|
||||||
|
version < latest_version
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,15 @@
|
||||||
|
use std::io;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("Guess the number!");
|
||||||
|
|
||||||
|
println!("Please input your guess.");
|
||||||
|
|
||||||
|
let mut guess = String::new();
|
||||||
|
|
||||||
|
io::stdin().read_line(&mut guess)
|
||||||
|
.ok()
|
||||||
|
.expect("Failed to read line");
|
||||||
|
|
||||||
|
println!("You guessed: {}", guess);
|
||||||
|
}
|
|
@ -0,0 +1,340 @@
|
||||||
|
// snippets from the Sass documentation at http://sass-lang.com/
|
||||||
|
|
||||||
|
/* css stuff */
|
||||||
|
/* charset */
|
||||||
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
/* nested rules */
|
||||||
|
#main {
|
||||||
|
width: 97%;
|
||||||
|
p, div {
|
||||||
|
font-size: 2em;
|
||||||
|
a { font-weight: bold; }
|
||||||
|
}
|
||||||
|
pre { font-size: 3em; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* parent selector (&) */
|
||||||
|
#main {
|
||||||
|
color: black;
|
||||||
|
a {
|
||||||
|
font-weight: bold;
|
||||||
|
&:hover { color: red; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* nested properties */
|
||||||
|
.funky {
|
||||||
|
font: 2px/3px {
|
||||||
|
family: fantasy;
|
||||||
|
size: 30em;
|
||||||
|
weight: bold;
|
||||||
|
}
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* nesting conflicts */
|
||||||
|
tr.default {
|
||||||
|
foo: { // properties
|
||||||
|
foo : 1;
|
||||||
|
}
|
||||||
|
foo: 1px; // rule
|
||||||
|
foo.bar { // selector
|
||||||
|
foo : 1;
|
||||||
|
}
|
||||||
|
foo:bar { // selector
|
||||||
|
foo : 1;
|
||||||
|
}
|
||||||
|
foo: 1px; // rule
|
||||||
|
}
|
||||||
|
|
||||||
|
/* extended comment syntax */
|
||||||
|
/* This comment is
|
||||||
|
* several lines long.
|
||||||
|
* since it uses the CSS comment syntax,
|
||||||
|
* it will appear in the CSS output. */
|
||||||
|
body { color: black; }
|
||||||
|
|
||||||
|
// These comments are only one line long each.
|
||||||
|
// They won't appear in the CSS output,
|
||||||
|
// since they use the single-line comment syntax.
|
||||||
|
a { color: green; }
|
||||||
|
|
||||||
|
/* variables */
|
||||||
|
$width: 5em;
|
||||||
|
$width: "Second width?" !default;
|
||||||
|
#main {
|
||||||
|
$localvar: 6em;
|
||||||
|
width: $width;
|
||||||
|
|
||||||
|
$font-size: 12px;
|
||||||
|
$line-height: 30px;
|
||||||
|
font: #{$font-size}/#{$line-height};
|
||||||
|
}
|
||||||
|
$name: foo;
|
||||||
|
$attr: border;
|
||||||
|
p.#{$name} {
|
||||||
|
#{$attr}-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* variable declaration with whitespaces */
|
||||||
|
// Set the color of your columns
|
||||||
|
$grid-background-column-color : rgba(100, 100, 225, 0.25) !default;
|
||||||
|
|
||||||
|
/* operations*/
|
||||||
|
p {
|
||||||
|
width: (1em + 2em) * 3;
|
||||||
|
color: #010203 + #040506;
|
||||||
|
font-family: sans- + "serif";
|
||||||
|
margin: 3px + 4px auto;
|
||||||
|
content: "I ate #{5 + 10} pies!";
|
||||||
|
color: hsl(0, 100%, 50%);
|
||||||
|
color: hsl($hue: 0, $saturation: 100%, $lightness: 50%);
|
||||||
|
}
|
||||||
|
/* functions*/
|
||||||
|
$grid-width: 40px;
|
||||||
|
$gutter-width: 10px;
|
||||||
|
@function grid-width($n) {
|
||||||
|
@return $n * $grid-width + ($n - 1) * $gutter-width;
|
||||||
|
}
|
||||||
|
#sidebar { width: grid-width(5); }
|
||||||
|
|
||||||
|
/* @import */
|
||||||
|
@import "foo.scss";
|
||||||
|
$family: unquote("Droid+Sans");
|
||||||
|
@import "rounded-corners", url("http://fonts.googleapis.com/css?family=#{$family}");
|
||||||
|
#main {
|
||||||
|
@import "example";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @media */
|
||||||
|
.sidebar {
|
||||||
|
width: 300px;
|
||||||
|
@media screen and (orientation: landscape) {
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @extend */
|
||||||
|
.error {
|
||||||
|
border: 1px #f00;
|
||||||
|
background-color: #fdd;
|
||||||
|
}
|
||||||
|
.seriousError {
|
||||||
|
@extend .error;
|
||||||
|
border-width: 3px;
|
||||||
|
}
|
||||||
|
#context a%extreme {
|
||||||
|
color: blue;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
.notice {
|
||||||
|
@extend %extreme !optional;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @debug and @warn */
|
||||||
|
@debug 10em + 12em;
|
||||||
|
@mixin adjust-location($x, $y) {
|
||||||
|
@if unitless($x) {
|
||||||
|
@warn "Assuming #{$x} to be in pixels";
|
||||||
|
$x: 1px * $x;
|
||||||
|
}
|
||||||
|
@if unitless($y) {
|
||||||
|
@warn "Assuming #{$y} to be in pixels";
|
||||||
|
$y: 1px * $y;
|
||||||
|
}
|
||||||
|
position: relative; left: $x; top: $y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* control directives */
|
||||||
|
|
||||||
|
/* if statement */
|
||||||
|
p {
|
||||||
|
@if 1 + 1 == 2 { border: 1px solid; }
|
||||||
|
@if 5 < 3 { border: 2px dotted; }
|
||||||
|
@if null { border: 3px double; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if else statement */
|
||||||
|
$type: monster;
|
||||||
|
p {
|
||||||
|
@if $type == ocean {
|
||||||
|
color: blue;
|
||||||
|
} @else {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* for statement */
|
||||||
|
@for $i from 1 through 3 {
|
||||||
|
.item-#{$i} { width: 2em * $i; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* each statement */
|
||||||
|
@each $animal in puma, sea-slug, egret, salamander {
|
||||||
|
.#{$animal}-icon {
|
||||||
|
background-image: url('/images/#{$animal}.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* while statement */
|
||||||
|
$i: 6;
|
||||||
|
@while $i > 0 {
|
||||||
|
.item-#{$i} { width: 2em * $i; }
|
||||||
|
$i: $i - 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* function with controlstatements */
|
||||||
|
@function foo($total, $a) {
|
||||||
|
@for $i from 0 to $total {
|
||||||
|
@if (unit($a) == "%") and ($i == ($total - 1)) {
|
||||||
|
$z: 100%;
|
||||||
|
@return '1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@return $grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @mixin simple*/
|
||||||
|
@mixin large-text {
|
||||||
|
font: {
|
||||||
|
family: Arial;
|
||||||
|
size: 20px;
|
||||||
|
weight: bold;
|
||||||
|
}
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
|
.page-title {
|
||||||
|
@include large-text;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* mixin with parameters */
|
||||||
|
@mixin sexy-border($color, $width: 1in) {
|
||||||
|
border: {
|
||||||
|
color: $color;
|
||||||
|
width: $width;
|
||||||
|
style: dashed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p { @include sexy-border(blue); }
|
||||||
|
|
||||||
|
/* mixin with varargs */
|
||||||
|
@mixin box-shadow($shadows...) {
|
||||||
|
-moz-box-shadow: $shadows;
|
||||||
|
-webkit-box-shadow: $shadows;
|
||||||
|
box-shadow: $shadows;
|
||||||
|
}
|
||||||
|
.shadows {
|
||||||
|
@include box-shadow(0px 4px 5px #666, 2px 6px 10px #999);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* include with varargs */
|
||||||
|
@mixin colors($text, $background, $border) {
|
||||||
|
color: $text;
|
||||||
|
background-color: $background;
|
||||||
|
border-color: $border;
|
||||||
|
}
|
||||||
|
$values: #ff0000, #00ff00, #0000ff;
|
||||||
|
.primary {
|
||||||
|
@include colors($values...);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* include with body */
|
||||||
|
@mixin apply-to-ie6-only {
|
||||||
|
* html {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include apply-to-ie6-only {
|
||||||
|
#logo {
|
||||||
|
background-image: url(/logo.gif);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $attr {
|
||||||
|
@mixin apply-to-ie6-only {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* attributes */
|
||||||
|
[rel="external"]::after {
|
||||||
|
content: 's';
|
||||||
|
}
|
||||||
|
/*page */
|
||||||
|
@page :left {
|
||||||
|
margin-left: 4cm;
|
||||||
|
margin-right: 3cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* missing semicolons */
|
||||||
|
tr.default {
|
||||||
|
foo.bar {
|
||||||
|
$foo: 1px
|
||||||
|
}
|
||||||
|
foo: {
|
||||||
|
foo : white
|
||||||
|
}
|
||||||
|
foo.bar1 {
|
||||||
|
@extend tr.default
|
||||||
|
}
|
||||||
|
foo.bar2 {
|
||||||
|
@import "compass"
|
||||||
|
}
|
||||||
|
bar: black
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rules without whitespace */
|
||||||
|
legend {foo{a:s}margin-top:0;margin-bottom:#123;margin-top:s(1)}
|
||||||
|
|
||||||
|
/* extend with interpolation variable */
|
||||||
|
@mixin error($a: false) {
|
||||||
|
@extend .#{$a};
|
||||||
|
@extend ##{$a};
|
||||||
|
}
|
||||||
|
#bar {a: 1px;}
|
||||||
|
.bar {b: 1px;}
|
||||||
|
foo {
|
||||||
|
@include error('bar');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* css3: @font face */
|
||||||
|
@font-face { font-family: Delicious; src: url('Delicious-Roman.otf'); }
|
||||||
|
|
||||||
|
/* rule names with variables */
|
||||||
|
.orbit-#{$d}-prev {
|
||||||
|
#{$d}-style: 0;
|
||||||
|
foo-#{$d}: 1;
|
||||||
|
#{$d}-bar-#{$d}: 2;
|
||||||
|
foo-#{$d}-bar: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* keyframes */
|
||||||
|
@-webkit-keyframes NAME-YOUR-ANIMATION {
|
||||||
|
0% { opacity: 0; }
|
||||||
|
100% { opacity: 1; }
|
||||||
|
}
|
||||||
|
@-moz-keyframes NAME-YOUR-ANIMATION {
|
||||||
|
0% { opacity: 0; }
|
||||||
|
100% { opacity: 1; }
|
||||||
|
}
|
||||||
|
@-o-keyframes NAME-YOUR-ANIMATION {
|
||||||
|
0% { opacity: 0; }
|
||||||
|
100% { opacity: 1; }
|
||||||
|
}
|
||||||
|
@keyframes NAME-YOUR-ANIMATION {
|
||||||
|
0% { opacity: 0; }
|
||||||
|
100% { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* string escaping */
|
||||||
|
[data-icon='test-1']:before {
|
||||||
|
content:'\\';
|
||||||
|
}
|
||||||
|
/* a comment */
|
||||||
|
$var1: '\'';
|
||||||
|
$var2: "\"";
|
||||||
|
/* another comment */
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
||||||
|
ROOT=$(dirname $(dirname $(realpath "$0")))
|
||||||
|
else
|
||||||
|
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEVELOPER=$(xcode-select -print-path)
|
||||||
|
LIPO=$(xcrun -sdk iphoneos -find lipo)
|
||||||
|
|
||||||
|
function code() {
|
||||||
|
cd $ROOT
|
||||||
|
|
||||||
|
# Node modules
|
||||||
|
test -d node_modules || ./scripts/npm.sh install
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
export NODE_ENV=development
|
||||||
|
|
||||||
|
# Launch Code
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
exec ./.build/electron/Electron.app/Contents/MacOS/Electron . "$@"
|
||||||
|
else
|
||||||
|
exec ./.build/electron/electron . "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
code "$@"
|
|
@ -0,0 +1,15 @@
|
||||||
|
Shader "Example/Diffuse Simple" {
|
||||||
|
SubShader {
|
||||||
|
Tags { "RenderType" = "Opaque" }
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma surface surf Lambert
|
||||||
|
struct Input {
|
||||||
|
float4 color : COLOR;
|
||||||
|
};
|
||||||
|
void surf (Input IN, inout SurfaceOutput o) {
|
||||||
|
o.Albedo = 1;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
Fallback "Diffuse"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE VIEW METRIC_STATS (ID, MONTH, TEMP_C, RAIN_C) AS
|
||||||
|
SELECT ID,
|
||||||
|
MONTH,
|
||||||
|
(TEMP_F - 32) * 5 /9,
|
||||||
|
RAIN_I * 0.3937
|
||||||
|
FROM STATS;
|
|
@ -0,0 +1,13 @@
|
||||||
|
var teamScore = 0
|
||||||
|
var greeting = "Hello!"
|
||||||
|
var multiLineString = """
|
||||||
|
This is a multi-line string!
|
||||||
|
"""
|
||||||
|
func hasAnyMatches(list: [Int], condition: (Int) -> Bool) -> Bool {
|
||||||
|
for item in list {
|
||||||
|
if condition(item) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
|
@ -0,0 +1,111 @@
|
||||||
|
/* Game of Life
|
||||||
|
* Implemented in TypeScript
|
||||||
|
* To learn more about TypeScript, please visit http://www.typescriptlang.org/
|
||||||
|
*/
|
||||||
|
|
||||||
|
module Conway {
|
||||||
|
|
||||||
|
export class Cell {
|
||||||
|
public row: number;
|
||||||
|
public col: number;
|
||||||
|
public live: boolean;
|
||||||
|
|
||||||
|
constructor(row: number, col: number, live: boolean) {
|
||||||
|
this.row = row;
|
||||||
|
this.col = col;
|
||||||
|
this.live = live
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GameOfLife {
|
||||||
|
private gridSize: number;
|
||||||
|
private canvasSize: number;
|
||||||
|
private lineColor: string;
|
||||||
|
private liveColor: string;
|
||||||
|
private deadColor: string;
|
||||||
|
private initialLifeProbability: number;
|
||||||
|
private animationRate: number;
|
||||||
|
private cellSize: number;
|
||||||
|
private world;
|
||||||
|
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.gridSize = 50;
|
||||||
|
this.canvasSize = 600;
|
||||||
|
this.lineColor = '#cdcdcd';
|
||||||
|
this.liveColor = '#666';
|
||||||
|
this.deadColor = '#eee';
|
||||||
|
this.initialLifeProbability = 0.5;
|
||||||
|
this.animationRate = 60;
|
||||||
|
this.cellSize = 0;
|
||||||
|
this.world = this.createWorld();
|
||||||
|
this.circleOfLife();
|
||||||
|
}
|
||||||
|
|
||||||
|
public createWorld() {
|
||||||
|
return this.travelWorld( (cell : Cell) => {
|
||||||
|
cell.live = Math.random() < this.initialLifeProbability;
|
||||||
|
return cell;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public circleOfLife() : void {
|
||||||
|
this.world = this.travelWorld( (cell: Cell) => {
|
||||||
|
cell = this.world[cell.row][cell.col];
|
||||||
|
this.draw(cell);
|
||||||
|
return this.resolveNextGeneration(cell);
|
||||||
|
});
|
||||||
|
setTimeout( () => {this.circleOfLife()}, this.animationRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public resolveNextGeneration(cell : Cell) {
|
||||||
|
var count = this.countNeighbors(cell);
|
||||||
|
var newCell = new Cell(cell.row, cell.col, cell.live);
|
||||||
|
if(count < 2 || count > 3) newCell.live = false;
|
||||||
|
else if(count == 3) newCell.live = true;
|
||||||
|
return newCell;
|
||||||
|
}
|
||||||
|
|
||||||
|
public countNeighbors(cell : Cell) {
|
||||||
|
var neighbors = 0;
|
||||||
|
for(var row = -1; row <=1; row++) {
|
||||||
|
for(var col = -1; col <= 1; col++) {
|
||||||
|
if(row == 0 && col == 0) continue;
|
||||||
|
if(this.isAlive(cell.row + row, cell.col + col)) {
|
||||||
|
neighbors++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return neighbors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public isAlive(row : number, col : number) {
|
||||||
|
if(row < 0 || col < 0 || row >= this.gridSize || col >= this.gridSize) return false;
|
||||||
|
return this.world[row][col].live;
|
||||||
|
}
|
||||||
|
|
||||||
|
public travelWorld(callback) {
|
||||||
|
var result = [];
|
||||||
|
for(var row = 0; row < this.gridSize; row++) {
|
||||||
|
var rowData = [];
|
||||||
|
for(var col = 0; col < this.gridSize; col++) {
|
||||||
|
rowData.push(callback(new Cell(row, col, false)));
|
||||||
|
}
|
||||||
|
result.push(rowData);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public draw(cell : Cell) {
|
||||||
|
if(this.cellSize == 0) this.cellSize = this.canvasSize/this.gridSize;
|
||||||
|
|
||||||
|
this.context.strokeStyle = this.lineColor;
|
||||||
|
this.context.strokeRect(cell.row * this.cellSize, cell.col*this.cellSize, this.cellSize, this.cellSize);
|
||||||
|
this.context.fillStyle = cell.live ? this.liveColor : this.deadColor;
|
||||||
|
this.context.fillRect(cell.row * this.cellSize, cell.col*this.cellSize, this.cellSize, this.cellSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var game = new Conway.GameOfLife();
|
|
@ -0,0 +1,25 @@
|
||||||
|
' Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
|
||||||
|
Public Sub LongTask(ByVal Duration As Single, _
|
||||||
|
ByVal MinimumInterval As Single)
|
||||||
|
Dim Threshold As Single
|
||||||
|
Dim Start As Single
|
||||||
|
Dim blnCancel As Boolean
|
||||||
|
|
||||||
|
' The Timer property of the DateAndTime object returns the seconds
|
||||||
|
' and milliseconds that have passed since midnight.
|
||||||
|
Start = CSng(Timer)
|
||||||
|
Threshold = MinimumInterval
|
||||||
|
|
||||||
|
Do While CSng(Timer)< (Start + Duration)
|
||||||
|
' In a real application, some unit of work would
|
||||||
|
' be done here each time through the loop.
|
||||||
|
If CSng(Timer)> (Start + Threshold) Then
|
||||||
|
RaiseEvent PercentDone( _
|
||||||
|
Threshold / Duration, blnCancel)
|
||||||
|
' Check to see if the operation was canceled.
|
||||||
|
If blnCancel Then Exit Sub
|
||||||
|
Threshold = Threshold + MinimumInterval
|
||||||
|
End If
|
||||||
|
Loop
|
||||||
|
End Sub
|
|
@ -0,0 +1,20 @@
|
||||||
|
<project>
|
||||||
|
<target name="jar">
|
||||||
|
<mkdir dir="build/jar"/>
|
||||||
|
<jar destfile="build/jar/HelloWorld.jar" basedir="build/classes">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="oata.HelloWorld"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
<!-- The stuff below was added for extra tokenizer testing -->
|
||||||
|
<character id="Lucy">
|
||||||
|
<hr:name>Lucy</hr:name>
|
||||||
|
<hr:born>1952-03-03</hr:born>
|
||||||
|
<qualification>bossy, crabby and selfish</qualification>
|
||||||
|
</character>
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="inputPanel.Orientation" Value="Vertical"/>
|
||||||
|
<Setter Target="inputButton.Margin" Value="0,4,0,0"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</project>
|
|
@ -0,0 +1,18 @@
|
||||||
|
# sequencer protocols for Laser eye surgery
|
||||||
|
---
|
||||||
|
- step: &id001 # defines anchor label &id001
|
||||||
|
instrument: Lasik 2000
|
||||||
|
pulseEnergy: 5.4
|
||||||
|
spotSize: 1mm
|
||||||
|
|
||||||
|
- step: *id001 # refers to the first step (with anchor &id001)
|
||||||
|
- step: *id001
|
||||||
|
spotSize: 2mm
|
||||||
|
- step: *id002
|
||||||
|
- {name: John Smith, age: 33}
|
||||||
|
- name: Mary Smith
|
||||||
|
age: 27
|
||||||
|
men: [John Smith, Bill Jones]
|
||||||
|
women:
|
||||||
|
- Mary Smith
|
||||||
|
- Susan Williams
|
|
@ -0,0 +1,31 @@
|
||||||
|
die("[$sheet->{label}] Unexpected sheet format.") unless (
|
||||||
|
$sheet->{"$date_col$row"} =~ /CALL_DATE/i &&
|
||||||
|
$sheet->{"$pixel_cols[4]$row"} =~ /Home_Bind_Count/i
|
||||||
|
);
|
||||||
|
|
||||||
|
$row++;
|
||||||
|
while ($row < $sheet->{maxrow}) {
|
||||||
|
$row++;
|
||||||
|
$total_lines++;
|
||||||
|
|
||||||
|
my $date = $sheet->{"$date_col$row"};
|
||||||
|
next unless $date;
|
||||||
|
(warning "Unexpected date format: '$date'"), next unless ($date =~ /^2\d\d\d-\d\d-\d\d$/);
|
||||||
|
|
||||||
|
my $phone = trim($sheet->{"$phone_col$row"});
|
||||||
|
(warning "Unexpected phone format: '$phone'."), next unless ($phone =~ /^\d{10}$/);
|
||||||
|
|
||||||
|
info $phone;
|
||||||
|
next if ($date gt $date_to || $date lt $date_from);
|
||||||
|
|
||||||
|
my @pixels = (0) x 5;
|
||||||
|
for (1..4) {
|
||||||
|
$pixels[$_] = trim($sheet->{"$pixel_cols[4]$row"});
|
||||||
|
(warning "Pixel $_ is not a number in the row # $row."), next unless looks_like_number($pixels[$_]);
|
||||||
|
};
|
||||||
|
|
||||||
|
for (1..4) {
|
||||||
|
add_phone_activity($date, $phone, "pixel-$_", $pixels[$_]) if $pixels[$_];
|
||||||
|
};
|
||||||
|
$parsed_lines++;
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
for(var i=0;i<9;i++){for(var j;j<i;j++){if(j+i<3)return i<j;}}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es6"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,442 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"c": "<",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "script",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "type",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html meta.attribute.type.html entity.other.attribute-name.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.other.attribute-name: #9CDCFE",
|
||||||
|
"light_plus": "entity.other.attribute-name: #FF0000",
|
||||||
|
"dark_vs": "entity.other.attribute-name: #9CDCFE",
|
||||||
|
"light_vs": "entity.other.attribute-name: #FF0000",
|
||||||
|
"hc_black": "entity.other.attribute-name: #9CDCFE"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "=",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html meta.attribute.type.html punctuation.separator.key-value.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\"",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html meta.attribute.type.html string.quoted.double.html punctuation.definition.string.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string.quoted.double.html: #0000FF",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string.quoted.double.html: #0000FF",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "text/javascript",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html meta.attribute.type.html string.quoted.double.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string.quoted.double.html: #0000FF",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string.quoted.double.html: #0000FF",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\"",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html meta.attribute.type.html string.quoted.double.html punctuation.definition.string.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string.quoted.double.html: #0000FF",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string.quoted.double.html: #0000FF",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\t",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "window",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.function-call.js variable.other.object.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "variable: #9CDCFE",
|
||||||
|
"light_plus": "variable: #001080",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "variable: #9CDCFE"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ".",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.function-call.js punctuation.accessor.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "alert",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.function-call.js entity.name.function.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.function: #DCDCAA",
|
||||||
|
"light_plus": "entity.name.function: #795E26",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "entity.name.function: #DCDCAA"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "(",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.brace.round.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "'",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js string.quoted.single.js punctuation.definition.string.begin.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "hello",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js string.quoted.single.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "'",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js string.quoted.single.js punctuation.definition.string.end.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ")",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.brace.round.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ";",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js punctuation.terminator.statement.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "<",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js-ignored-vscode",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "/",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "script",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "<",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "script",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.start.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\t",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "window",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.function-call.js variable.other.object.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "variable: #9CDCFE",
|
||||||
|
"light_plus": "variable: #001080",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "variable: #9CDCFE"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ".",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.function-call.js punctuation.accessor.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "alert",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.function-call.js entity.name.function.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.function: #DCDCAA",
|
||||||
|
"light_plus": "entity.name.function: #795E26",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "entity.name.function: #DCDCAA"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "(",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.brace.round.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "'",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js string.quoted.single.js punctuation.definition.string.begin.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "hello",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js string.quoted.single.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "'",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js string.quoted.single.js punctuation.definition.string.end.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ")",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js meta.brace.round.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ";",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html source.js punctuation.terminator.statement.js",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "meta.embedded: #D4D4D4",
|
||||||
|
"light_plus": "meta.embedded: #000000",
|
||||||
|
"dark_vs": "meta.embedded: #D4D4D4",
|
||||||
|
"light_vs": "meta.embedded: #000000",
|
||||||
|
"hc_black": "meta.embedded: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "<",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html source.js-ignored-vscode",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "/",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "script",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.embedded.block.html meta.tag.metadata.script.end.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,167 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"c": "<",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "ion-view",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "<",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "button-view",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "/>",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "<",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "font-face",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.start.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "</",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.end.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "font-face",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.end.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.end.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "</",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.end.html punctuation.definition.tag.begin.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "ion-view",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.end.html entity.name.tag.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag: #569CD6",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag: #569CD6",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ">",
|
||||||
|
"t": "text.html.derivative meta.tag.custom.end.html punctuation.definition.tag.end.html",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "punctuation.definition.tag: #808080",
|
||||||
|
"light_plus": "punctuation.definition.tag: #800000",
|
||||||
|
"dark_vs": "punctuation.definition.tag: #808080",
|
||||||
|
"light_vs": "punctuation.definition.tag: #800000",
|
||||||
|
"hc_black": "punctuation.definition.tag: #808080"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,233 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"c": "#",
|
||||||
|
"t": "source.css.less meta.selector.css entity.other.attribute-name.id punctuation.definition.entity.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "source.css.less entity.other.attribute-name.id: #D7BA7D",
|
||||||
|
"light_plus": "source.css.less entity.other.attribute-name.id: #800000",
|
||||||
|
"dark_vs": "source.css.less entity.other.attribute-name.id: #D7BA7D",
|
||||||
|
"light_vs": "source.css.less entity.other.attribute-name.id: #800000",
|
||||||
|
"hc_black": "source.css.less entity.other.attribute-name.id: #D7BA7D"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "f",
|
||||||
|
"t": "source.css.less meta.selector.css entity.other.attribute-name.id",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "source.css.less entity.other.attribute-name.id: #D7BA7D",
|
||||||
|
"light_plus": "source.css.less entity.other.attribute-name.id: #800000",
|
||||||
|
"dark_vs": "source.css.less entity.other.attribute-name.id: #D7BA7D",
|
||||||
|
"light_vs": "source.css.less entity.other.attribute-name.id: #800000",
|
||||||
|
"hc_black": "source.css.less entity.other.attribute-name.id: #D7BA7D"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "(",
|
||||||
|
"t": "source.css.less meta.brace.round.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "@",
|
||||||
|
"t": "source.css.less variable.other.less punctuation.definition.variable.less",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "variable.other.less: #9CDCFE",
|
||||||
|
"light_plus": "variable.other.less: #FF0000",
|
||||||
|
"dark_vs": "variable.other.less: #9CDCFE",
|
||||||
|
"light_vs": "variable.other.less: #FF0000",
|
||||||
|
"hc_black": "variable.other.less: #D4D4D4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "hm",
|
||||||
|
"t": "source.css.less variable.other.less",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "variable.other.less: #9CDCFE",
|
||||||
|
"light_plus": "variable.other.less: #FF0000",
|
||||||
|
"dark_vs": "variable.other.less: #9CDCFE",
|
||||||
|
"light_vs": "variable.other.less: #FF0000",
|
||||||
|
"hc_black": "variable.other.less: #D4D4D4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ":",
|
||||||
|
"t": "source.css.less punctuation.separator.key-value.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.css.less",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\"",
|
||||||
|
"t": "source.css.less string.quoted.double.css punctuation.definition.string.begin.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "broken highlighting in VS Code",
|
||||||
|
"t": "source.css.less string.quoted.double.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\"",
|
||||||
|
"t": "source.css.less string.quoted.double.css punctuation.definition.string.end.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ")",
|
||||||
|
"t": "source.css.less meta.brace.round.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.css.less",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "{",
|
||||||
|
"t": "source.css.less meta.property-list.css punctuation.section.property-list.begin.bracket.curly.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.css.less meta.property-list.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "content",
|
||||||
|
"t": "source.css.less meta.property-list.css entity.name.tag.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "entity.name.tag.css: #D7BA7D",
|
||||||
|
"light_plus": "entity.name.tag: #800000",
|
||||||
|
"dark_vs": "entity.name.tag.css: #D7BA7D",
|
||||||
|
"light_vs": "entity.name.tag: #800000",
|
||||||
|
"hc_black": "entity.name.tag.css: #D7BA7D"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ":",
|
||||||
|
"t": "source.css.less meta.property-list.css punctuation.separator.key-value.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.css.less meta.property-list.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\"",
|
||||||
|
"t": "source.css.less meta.property-list.css meta.property-value.css string.quoted.double.css punctuation.definition.string.begin.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "\"",
|
||||||
|
"t": "source.css.less meta.property-list.css meta.property-value.css string.quoted.double.css punctuation.definition.string.end.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ";",
|
||||||
|
"t": "source.css.less meta.property-list.css punctuation.terminator.rule.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "}",
|
||||||
|
"t": "source.css.less meta.property-list.css punctuation.section.property-list.end.bracket.curly.css",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue