Skip to content

Commit

Permalink
Merge branch 'master' of github.com:h2oai/h2o
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasnykodym committed Apr 16, 2015
2 parents 82c1f92 + 58d1238 commit 03ba976
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,14 @@ dw_3:
mkdir $(BUILD_WEBSITE_DIR)
cp -r h2o-docs/build/html/* $(BUILD_WEBSITE_DIR)
mkdir -p $(BUILD_WEBSITE_DIR)/bits
cp -p docs/H2O-Algorithms-Road-Map.pdf $(BUILD_WEBSITE_DIR)/bits
cp -p docs/0xdata_H2O_Algorithms.pdf $(BUILD_WEBSITE_DIR)/bits
cp -rp target/javadoc $(BUILD_WEBSITE_DIR)/bits
mkdir -p $(BUILD_WEBSITE_DIR)/bits/hadoop
cp -p hadoop/README.txt $(BUILD_WEBSITE_DIR)/bits/hadoop
cp -p docs/H2O_on_Hadoop_0xdata.pdf $(BUILD_WEBSITE_DIR)/bits/hadoop
cp -p docs/sparkling_water_meetup.pdf $(BUILD_WEBSITE_DIR)/bits
cp -p docs/h2o_datasheet.pdf $(BUILD_WEBSITE_DIR)/bits
cp -p docs/H2ODeveloperCookbook.pdf $(BUILD_WEBSITE_DIR)/bits
cp -p docs/DeploymentModels_v1.pdf $(BUILD_WEBSITE_DIR)/bits
mkdir -p $(BUILD_WEBSITE_DIR)/bits/ec2
cp -p ec2/README.txt $(BUILD_WEBSITE_DIR)/bits/ec2
@if [ -f R/h2o_package.pdf ]; then \
Expand All @@ -302,7 +301,6 @@ dw_3:
sed -i -e "s/SUBST_RELEASE_NAME/$(RELEASE_NAME)/g; s/SUBST_PROJECT_VERSION/$(PROJECT_VERSION)/g; s/SUBST_BUILD_NUMBER/$(BUILD_NUMBER)/g" $(BUILD_WEBSITE_DIR)/deployment/hadoop_tutorial.html
sed -i -e "s/SUBST_RELEASE_NAME/$(RELEASE_NAME)/g; s/SUBST_PROJECT_VERSION/$(PROJECT_VERSION)/g; s/SUBST_BUILD_NUMBER/$(BUILD_NUMBER)/g" $(BUILD_WEBSITE_DIR)/Ruser/Rinstall.html
sed -i -e "s/SUBST_RELEASE_NAME/$(RELEASE_NAME)/g; s/SUBST_PROJECT_VERSION/$(PROJECT_VERSION)/g; s/SUBST_BUILD_NUMBER/$(BUILD_NUMBER)/g" $(BUILD_WEBSITE_DIR)/deployment/ec2_build_ami.html
sed -i -e "s/SUBST_RELEASE_NAME/$(RELEASE_NAME)/g; s/SUBST_PROJECT_VERSION/$(PROJECT_VERSION)/g; s/SUBST_BUILD_NUMBER/$(BUILD_NUMBER)/g" $(BUILD_WEBSITE_DIR)/deployment/H2O_Hadoop_Mapr.html

#
# Set appropriately for your data size to quickly try out H2O.
Expand Down
19 changes: 16 additions & 3 deletions src/main/java/water/AutoBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,22 @@ public AutoBuffer putStr2( String s ) {
put1('\\'); // The extra backslash
off=i; // Advance the "so far" variable
}
// Replace embedded newline & tab with quoted newlines
if( b[i] == '\n' ) { putA1(b,off,i); put1('\\'); put1('n'); off=i+1; }
if( b[i] == '\t' ) { putA1(b,off,i); put1('\\'); put1('t'); off=i+1; }
// Handle remaining special cases in JSON
if( b[i] == '/' ) { putA1(b,off,i); put1('\\'); put1('/'); off=i+1; continue;}
if( b[i] == '\b' ) { putA1(b,off,i); put1('\\'); put1('b'); off=i+1; continue;}
if( b[i] == '\f' ) { putA1(b,off,i); put1('\\'); put1('f'); off=i+1; continue;}
if( b[i] == '\n' ) { putA1(b,off,i); put1('\\'); put1('n'); off=i+1; continue;}
if( b[i] == '\r' ) { putA1(b,off,i); put1('\\'); put1('r'); off=i+1; continue;}
if( b[i] == '\t' ) { putA1(b,off,i); put1('\\'); put1('t'); off=i+1; continue;}
// ASCII Control characters
if( b[i] == 127 ) { putA1(b,off,i); put1('\\'); put1('u'); put1('0'); put1('0'); put1('0'); put1(b[i]); off=i+1; continue;}
if( b[i] >= 0 && b[i] < 32 ) {
String hexStr = Integer.toHexString(b[i]);
putA1(b, off, i); put1('\\'); put1('u');
for (int j = 0; j < 4 - hexStr.length(); j++) put1('0');
for (int j = 0; j < hexStr.length(); j++) put1(hexStr.charAt(hexStr.length()-j-1));
off=i+1;
}
}
return putA1(b,off,b.length);
}
Expand Down

0 comments on commit 03ba976

Please sign in to comment.