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 "rapidjson/document.h" | |
#include "rapidjson/writer.h" | |
#include "rapidjson/stringbuffer.h" | |
#include <iostream> | |
using namespace rapidjson; | |
int main() { | |
const char* json = "{\"thing\":-1.1030161663305387}"; | |
Document d; |
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 "rapidjson/document.h" | |
#include "rapidjson/writer.h" | |
#include "rapidjson/stringbuffer.h" | |
#include <iostream> | |
using namespace rapidjson; | |
int main() { | |
const char* json = "{\"shit\":-1.1030161663305387}"; | |
Document d; |
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
# CPANM | |
curl -L http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib | |
eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` | |
echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/perl5/environment | |
# Install Perl bundle of W3C dependencies | |
cpanm Bundle::W3C::Validator | |
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 -rupN validator/src/nu/validator/servlet/Main.java validator/src/nu/validator/servlet/Main.java | |
--- validator/src/nu/validator/servlet/Main.java 2012-09-07 00:34:08.000000000 +0200 | |
+++ validator/src/nu/validator/servlet/Main.java 2012-09-07 00:39:46.000000000 +0200 | |
@@ -117,8 +117,10 @@ public class Main { | |
serverSocket.close(); | |
} else { | |
server.start(); | |
- System.in.read(); | |
- server.stop(); | |
+ |
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
// Hide the trigger DIV | |
this.controller.get("myTriggerDiv").hide(); | |
// Show the widget | |
this.controller.get("myTextEditor").show(); | |
this.controller.get("myTextEditor").mojo.focus(); | |
// Top event propagation or else... | |
event.stopPropagation(); |
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
// Setup the TextField so we can show it later | |
this.controller.setupWidget("myTextEditor", | |
this.widgetAttributes, | |
this.widgetModel); | |
// Then hide it until we need it... | |
this.controller.get("myTextEditor").hide(); | |
// Listen for the tap event on the DIV... | |
Mojo.Event.listen(this.controller.get("myTriggerDiv"), |
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
String.prototype.toCamelCase = function(major) { | |
var str = this.toString().replace(/[\-_\s](.)/g, function(m, l) { | |
return l.toUpperCase(); | |
}); | |
if (major) { | |
str = str.substr(0, 1).toUpperCase() + str.substr(1); | |
} | |
return str; |