This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HtmlTargetElement("*", Attributes = "[asp-if]")] | |
public class IfTagHelper : TagHelper | |
{ | |
/// <summary> | |
/// Shows the element when this condition is true | |
/// </summary> | |
[HtmlAttributeName("asp-if")] | |
public bool IsTrue { get; set; } = true; | |
public override void Process(TagHelperContext context, TagHelperOutput output) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stringify = function(obj, prop) { | |
var placeholder = '____PLACEHOLDER____'; | |
var fns = []; | |
var json = JSON.stringify(obj, function(key, value) { | |
if (typeof value === 'function') { | |
fns.push(value); | |
return placeholder; | |
} | |
return value; | |
}, 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function evaluate(code, args = {}) { | |
// Call is used to define where "this" within the evaluated code should reference. | |
// eval does not accept the likes of eval.call(...) or eval.apply(...) and cannot | |
// be an arrow function | |
return function evaluateEval() { | |
// Create an args definition list e.g. "arg1 = this.arg1, arg2 = this.arg2" | |
const argsStr = Object.keys(args) | |
.map(key => `${key} = this.${key}`) | |
.join(','); | |
const argsDef = argsStr ? `let ${argsStr};` : ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Faulting application name: java.exe, version: 7.0.400.43, time stamp: 0x521c3d55 | |
Faulting module name: ntdll.dll, version: 6.2.9200.16579, time stamp: 0x51637f77 | |
Exception code: 0xc0000374 | |
Fault offset: 0x00000000000ebd59 | |
Faulting process id: 0x14c4 | |
Faulting application start time: 0x01ceba3c7c7a19fe | |
Faulting application path: C:\Program Files\Java\jdk1.7.0_40\jre\bin\java.exe | |
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll | |
Report Id: ba6238e6-262f-11e3-beac-78e3b5b94d68 | |
Faulting package full name: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<solid android:color="#CCC" /> | |
</shape> | |
</item> | |
<item android:bottom="2.5dp" android:left="1dp" android:right="1dp" android:top="0.5dp"> | |
<shape android:shape="rectangle"> | |
<solid android:color="#FFF" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.get("Table") | |
.update("Name = ?, Test = ?, Age = ?", "", 12, 12) | |
. | |
=.?\?(.?,)? | |
=.*?\?(.*?(,|;|.))? | |
=.*?\?(.*?(,|;|.))?. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
pom { | |
project { | |
artifactId = archivesBaseName | |
groupId = group | |
version = version | |
} | |
}.writeTo('$buildDir/pom.xml') | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.4.1' | |
} | |
} | |
apply plugin: 'android' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
... | |
applicationVariants.each { variant -> | |
def apk = variant.outputFile | |
def name = apk.getName().replace('.apk', versionName + '.apk'); | |
variant.outputFile = new File(apk.parentFile, name); | |
} | |
... |