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 harness | |
open canopy | |
open canopy.types | |
open runner | |
open System | |
let mutable baseurl = "http://localhost:49774" | |
let login username password = |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace LensLib | |
{ | |
class Program | |
{ |
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
class BetterDate { | |
private _date: Date; | |
constructor(unixTime: number) { | |
this._date = new Date(unixTime); | |
} | |
toDate(): Date { | |
return this._date; |
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
// This gets around the stock .hasOwnProperty check in React 0.12 that prevents using plain ES6 classes | |
// as a parameter to React.createClass or React.createFactory. Or, at least, this makes it work with | |
// the React.NET transformer -- I cannot testify that this is needed for traditional JSX transformation. | |
class ES6Reactifier { | |
static createFactory(type) { | |
var obj = {}; | |
for (var m in type.prototype) { | |
obj[m] = type.prototype[m]; | |
} |
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
Porting Lucene 4.3.1 code to Lucene.net Guide | |
Note that not all projects build currently in the Lucene.net solution. You can build individual projects as you go. | |
1. Fork a repo that contains the lucene_4_3_0 or branch_4x branch. Since the Apache repo is currently out of sync, you can fork mine: https://github.com/paulirwin/lucene.net.git -- or you can clone the official apache git repo in step 2. | |
2. Clone your repo locally: git clone [https url] | |
3. Switch to the correct branch. If forked from my repo, use lucene_4_3_0: cd lucene.net; git checkout lucene_4_3_0 |
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
public void RunTest() | |
{ | |
var analyzer = new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_43); | |
using (var dir = FSDirectory.Open("C:\\Index\\43TestCases\\TestCase1")) | |
using (var writer = new IndexWriter(dir, new IndexWriterConfig(Lucene.Net.Util.Version.LUCENE_43, analyzer))) | |
{ | |
var doc = new Document(); | |
doc.Add(new IntField("DocID", 123, Field.Store.YES)); | |
doc.Add(new TextField("Text", "Ramaria botrytis, commonly known as the clustered coral, the pink-tipped coral mushroom, or the cauliflower coral, is an edible species of coral fungus in the family Gomphaceae. Its robust fruit body can grow up to 15 cm (6 in) in diameter and 20 cm (8 in) tall, and resembles some marine coral. Its dense branches, which originate from a stout, massive base, are swollen at the tips and divided into several small branchlets. The branches are initially whitish but age to buff or tan, with tips that are pink to reddish. The fl |
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
public void RunTest() | |
{ | |
var analyzer = new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_43); | |
using (var dir = FSDirectory.Open("C:\\Index\\43TestCases\\TestCase1")) | |
using (var writer = new IndexWriter(dir, new IndexWriterConfig(Lucene.Net.Util.Version.LUCENE_43, analyzer))) | |
{ | |
var doc = new Document(); | |
doc.Add(new IntField("DocID", 123, Field.Store.YES)); | |
doc.Add(new TextField("Text", "Ramaria botrytis, commonly known as the clustered coral, the pink-tipped coral mushroom, or the cauliflower coral, is an edible species of coral fungus in the family Gomphaceae. Its robust fruit body can grow up to 15 cm (6 in) in diameter and 20 cm (8 in) tall, and resembles some marine coral. Its dense branches, which originate from a stout, massive base, are swollen at the tips and divided into several small branchlets. The branches are initially whitish but age to buff or tan, with tips that are pink to reddish |
NewerOlder