This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module com.example.AppConfig | |
// self import | |
import "AppConfig.pkl" | |
/// The profile to use. | |
local profile = read?("prop:profile") as ("dev"|"prod")? | |
/// The modifier to apply, if any. | |
local modifier = read?("prop:modifier") as ("canary"|"ci")? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "package://pkg.pkl-lang.org/pkl-pantry/org.json_schema.contrib@1.0.3#/internal/ModulesGenerator.pkl" | |
import "package://pkg.pkl-lang.org/pkl-pantry/org.json_schema@1.0.1#/Parser.pkl" | |
import "package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.uri@1.0.0#/URI.pkl" | |
jsonFiles = read*("schemas/*.json") | |
converted: Listing<ModulesGenerator> = new Listing { | |
for (filename, file in jsonFiles) { | |
new ModulesGenerator { | |
rootSchema = Parser.parse(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java b/pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java | |
index e1b6d236f..2fdb39b82 100644 | |
--- a/pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java | |
+++ b/pkl-core/src/main/java/org/pkl/core/service/ExecutorSpiImpl.java | |
@@ -37,11 +37,9 @@ import org.pkl.core.resource.ResourceReaders; | |
import org.pkl.executor.spi.v1.ExecutorSpi; | |
import org.pkl.executor.spi.v1.ExecutorSpiException; | |
import org.pkl.executor.spi.v1.ExecutorSpiOptions; | |
-import org.pkl.executor.spi.v2.ExecutorSpi2; | |
-import org.pkl.executor.spi.v2.ExecutorSpiException2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
template<class T> | |
class LinkedList | |
{ | |
private: | |
T* value; | |
LinkedList* nextNode = nullptr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Daniel Chao on 12/18/15. | |
// | |
#include <iostream> | |
#include <set> | |
#include <sstream> | |
#include <string> | |
#include <fstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.typeclassified.cssr | |
import breeze.linalg.DenseVector | |
import com.typeclassified.cssr.parse.ParseNode | |
import scala.collection.mutable.ArrayBuffer | |
object CSSRState { | |
def apply(histories: ArrayBuffer[ParseNode] = ArrayBuffer()) = new CSSRState(histories) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Albert knows the date, but not the month. Otherwise, he wouldn't know for sure that Bernard also doesn't know Cheryl's birthday. There are two dates in there that's unique. | |
2. Since Bernard knows it's not a unique date, he knows it's not June 18th nor May 19th | |
3. If you take out those two months, there's only one month left that only occurs once. Since Bernard now knows the month for sure, we know it's in June. | |
Conclusion: Cheryl's birthday is on June 17th |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app') | |
.factory('authentication', [ | |
'user', | |
'$state', | |
function(user, $state){ | |
return { | |
authenticate: function(protect){ | |
return user.identify() | |
.then(function(){ | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app') | |
.factory('authentication', [ | |
'user', | |
function(user){ | |
return { | |
authentication: function(){ | |
return user.identify(); | |
} | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app') | |
.factory('authentication', [ | |
'user', | |
function(user){ | |
return { | |
authentication: function(){ | |
return user.identify(); | |
} | |
}; | |
} |
NewerOlder