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 libxml = require('libxmljs'); | |
var snippetXml = '<snippet><phone>123</phone><car>Ford Mondeo</car></snippet>', | |
snippetDoc = libxml.parseXmlString(snippetXml), | |
xml = '<doc id="123"></doc>', | |
doc = libxml.parseXmlString(xml); | |
doc.root().addChild(snippetDoc.root()); | |
setTimeout(function(){ |
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="windows-1251"?> | |
<root> | |
<!-- Save this file with windows-1251 encoding! --> | |
<hello>Привет, товарищ!</hello> | |
</root> |
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
diff --git a/include/cO3.h b/include/cO3.h | |
index 4f8ee4c..c3121d7 100644 | |
--- a/include/cO3.h | |
+++ b/include/cO3.h | |
@@ -406,6 +406,7 @@ struct cO3 : cScr { | |
// unzip the downloaded module, validates it and put the dll in place | |
bool unpackModule(const Str& name, iStream* zipped, bool update=false ) | |
{ | |
+ /* | |
using namespace zip_tools; |
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 sys = require('sys'), | |
libxml = require('o3-xml'); | |
var snippetXml = '<snippet><name>Sergey Belov</name><phone>+71111111111</phone><car>Ford Mondeo</car></snippet>', | |
snippetDoc = libxml.parseFromString(snippetXml), | |
xml = '<root><group><doc id="123"/></group></root>', | |
doc = libxml.parseFromString(xml); | |
// throws exception | |
doc.documentElement.selectSingleNode('group/doc').appendChild(snippetNode.documentElement); |
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 Q = require('q'); | |
require('../lib/coa').Cmd() | |
.name(process.argv[0]) | |
.helpful() | |
.opt() | |
.name('reject').title('Returns rejected promise') | |
.long('reject') | |
.flag() | |
.act(function(opts) { | |
console.log('** doing --reject act'); |
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
require('../lib/coa').Cmd() | |
.name('cmd') | |
.title('Command test') | |
.helpful() | |
.cmd() | |
.name('command') | |
.title('Do command work') | |
.helpful() | |
.act(function() { | |
console.log('Doing command work...'); |
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
exports.match = function(file) { | |
if (isSvn(file)) return; | |
if (/blocks.*?/.test(file.self)) { | |
file.match = matchBlocksLevel; | |
return file.match(file); | |
} | |
}; | |
function isSvn(file) { | |
return (file.self == '.svn' || /\/\.svn\//.test(file.path)); |
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
#!/usr/bin/env node | |
var S = require('stylus'), | |
FS = require('fs'), | |
URL = require('url'), | |
PATH = require('path'); | |
var path = PATH.resolve('bundle.styl'); | |
S(FS.readFileSync(path, 'utf8')) | |
.set('filename', path) |
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
exports.deps = [ | |
// regular deps | |
]; | |
exports.depsByTechs = { | |
js: { | |
// deps for js tech of current block | |
bemhtml: [ | |
// bemhtml deps for js tech of current block | |
] |
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 Q = require('q'); | |
Q.thenResolve() | |
.then(function() { | |
var d = Q.defer(), | |
step = 0; | |
var interval = setInterval(function() { | |
d.notify('step ' + ++step); | |
}, 1000); |
OlderNewer