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/xapian-applications/omega/Makefile.am b/xapian-applications/omega/Makefile.am | |
index ae10f2ad6e2b..0393b6fa6c0b 100644 | |
--- a/xapian-applications/omega/Makefile.am | |
+++ b/xapian-applications/omega/Makefile.am | |
@@ -181,7 +181,7 @@ libtransform_la_LIBADD = $(PCRE_LIBS) | |
omega_SOURCES = omega.cc query.cc cgiparam.cc utils.cc configfile.cc date.cc\ | |
cdb_init.cc cdb_find.cc cdb_hash.cc cdb_unpack.cc jsonescape.cc loadfile.cc\ | |
datevalue.cc common/str.cc sample.cc urlencode.cc weight.cc expand.cc\ | |
- csvescape.cc timegm.cc | |
+ csvescape.cc timegm.cc md5.cc md5wrap.cc |
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
$httpheader{Content-Type,text/html; charset=utf-8}<!DOCTYPE html><html lang="en"> | |
<meta http-equiv="refresh" content="0.1;url=$cgi{URL}"> | |
$log{clicks.log, "$cgi{QUERYID}\t""$cgi{DOCID}"} | |
</html> |
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
<script type="text/javascript"><!-- | |
function clicklog() { | |
// Redirect to the clicklog template with $id of the clicked document. | |
// We could do something like: | |
// window.location.assign("../clicklog") | |
// to redirect to the clicklog template. | |
// I'm not sure about how we could pass $query and the clicked doc $id to the template. | |
return true; // To allow following the href link in the <a> tag i.e. document url. | |
} | |
// --> |
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
Command: Indexing | |
sudo /usr/local/bin/omindex -v --db=/var/lib/omega/data/default --url=/ /var/www | |
Output: | |
[Entering directory ""] | |
Indexing "ci_10.htm" as text/html ... already indexed | |
Indexing "ci_07.htm" as text/html ... already indexed | |
Indexing "ci_30.htm" as text/html ... already indexed | |
Indexing "ci_39B.htm" as text/html ... already indexed | |
Indexing "ci_20.htm" as text/html ... already indexed | |
Indexing "ci_33.htm" as text/html ... already indexed |
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
namespace mlpack { | |
namespace nn { | |
class Autoencoder { | |
public: | |
Autoencoder(const arma::mat& data, | |
const size_t inputSize, | |
const size_t hiddenSize, | |
NoiseLayerType&& noiseLayer = NoisetLayerType()); | |
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
checksum@inspiron:~/Documents/xapian/build/xapian-applications/omega$ git diff | |
diff --git a/xapian-applications/omega/omegatest b/xapian-applications/omega/omegatest | |
index b8505e2cf040..d6c9d78814e4 100755 | |
--- a/xapian-applications/omega/omegatest | |
+++ b/xapian-applications/omega/omegatest | |
@@ -302,6 +302,18 @@ testcase '.~~D' DOCIDORDER=D | |
testcase '.~~' DOCIDORDER=X # Buggy, but kept for compatibility. | |
testcase '.~~' DOCIDORDER=x # Buggy, but kept for compatibility. | |
+# Feature tests for $highlight{}. |
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
# Tests for $highlight. | |
printf '$highlight{$cgi{a},$cgi{b},$cgi{c},$cgi{d}}' > "$TEST_TEMPLATE" | |
testcase 'A list of <b>words</b>' P=text a="words" b="A list of words" c="<b>" d="</b>" |
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
unordered_map<string, int> word_to_occurrence; | |
// Build map before line 755 in query.cc by calling the method build_word_map. | |
void build_word_map(const string& list) { | |
string word; | |
int count = 0; | |
for (size_t i = 0; i <= list.length(); ++i) | |
{ |
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
// Initialise the parameters mem, g and g2. | |
arma::mat mem = arma::ones<arma::mat>(iterate.n_rows, iterate.n_cols); | |
arma::mat g = arma::zeros<arma::mat>(iterate.n_rows, iterate.n_cols); | |
arma::mat g2 = arma::zeros<arma::mat>(iterate.n_rows, iterate.n_cols); | |
// And update the iterate. | |
arma::mat r = 1 / (mem + 1); |
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> | |
#include <vector> | |
#include <ctime> | |
#include <armadillo> | |
using namespace std; | |
using namespace arma; | |
int main() { | |
mat A = randu<mat>(10000,10000); |
NewerOlder