:s/\(\W\)\(\u\{2,10\}\)\(\W\)/\1\\ac{\2}\3/g :s/\(\W\)\(\u\{2,10\}\)$/\1\\ac{\2}/g :s/^\(\u\{2,10\}\)\(\W\)/\\ac{\1}\2/g :s/^\(\u\{2,10\}\)$/\\ac{\1}/g
:s/\(\W\)\(\u\{2,10\}\)\(\W\)/\1\\ac{\2}\3/g :s/\(\W\)\(\u\{2,10\}\)$/\1\\ac{\2}/g :s/^\(\u\{2,10\}\)\(\W\)/\\ac{\1}\2/g :s/^\(\u\{2,10\}\)$/\\ac{\1}/g
char *readLine() {
int bufSize = 1024;
static char *buf = malloc(sizeof(char) * (1 + bufSize));
static int bytesAfterNewLine = 0; // number of bytes left from last call
static int lastpos = 0; // where the leftover starts
int totalBytes = 0; // total number of bytes in the array
int foundLineBreak = 0;
if (bytesAfterNewLine != 0) {
memmove(buf, buf + lastpos, bytesAfterNewLine);
totalBytes = bytesAfterNewLine;
lastpos = 0;
}
while (true) {
for (; lastpos < totalBytes; ++lastpos) {
if (buf[lastpos] == '\n') {
buf[lastpos] == '\0';
bytesAfterNewLine = totalBytes - lastpos - 1;
foundLineBreak = 1;
lastpos = (last + 1) % bufSize;
break;
}
}
if (foundLineBreak) break;
if (bufSize == totalBytes) {
bufSize *= 2;
buf = realloc(buf, bufSize + 1);
}
int bytes = 0;
while (true) {
bytes = read(buf + totalBytes, bufSize - totalBytes);
if (bytes != 0) break;
}
if (bytes == -1) {
buf[totalBytes] = '\0';
break;
}
totalBytes += bytes;
}
if (totalBytes == 0 && foundLineBreak == 0) {
return NULL:
} else {
return buf;
}
}
This stupid and simple problem has been bugging me for ages!!! There is a simple workaround for me.
Select the blank paragraph, go to Font dialog, in tab "Font", select "Hidden", then the annoying blank page just disappears.
Note: if you turn on "Show paragraph marks and other hidden formatting symbols", the hidden text will be shown.
httpinfilters=rabbit.filter.ReverseProxy,rabbit.filter.HttpBaseFilter,rabbit.filter.DontFilterFilter,rabbit.filter.BlockFilter,rabbit.filter.RevalidateFilter
......
[rabbit.filter.ReverseProxy]
# This filter is not enabled by default, add it to httpinfilters if you want it.
# This Filter makes rabbit work as an accellerator for one web site.
# Change requests
transformMatch=^/(.*)
transformTo=http://<target_host>:<port>/$1
# Deny proxy requests, you probably want this.
# deny=^http(s?)://.*
deny=
# If we want to allow admin access.
allowMeta=true
java -jar jars/rabbit4.jar -f conf/rabbit.confEdit file conf/mapred-site.xml to change amount of memory allocated to sorting:
<property>
<name>io.sort.mb</name>
<value>300</value>
</property>
Edit file conf/mapred-site.xml to change amount of memory allocated to each map/reduce task:
<property>
<name>mapred.child.java.opts</name>
<value>-Xmx800m</value>
</property>
Edit file conf/hadoop-env.sh to change amount of memory allocated to Hadoop daemons:
export HADOOP_HEAPSIZE=1000
Edit file conf/hdfs-site.xml to change ports used by HDFS
<property>
<name>dfs.secondary.http.address</name>
<value>0.0.0.0:51090</value>
</property>
<property>
<name>dfs.datanode.address</name>
<value>0.0.0.0:51010</value>
</property>
<property>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:51075</value>
</property>
<property>
<name>dfs.datanode.https.address</name>
<value>0.0.0.0:51475</value>
</property>
<property>
<name>dfs.datanode.ipc.address</name>
<value>0.0.0.0:51020</value>
</property>
<property>
<name>dfs.http.address</name>
<value>0.0.0.0:51070</value>
</property>
<property>
<name>dfs.https.address</name>
<value>0.0.0.0:51470</value>
</property>
Edit file conf/mapred-site.xml o change ports used by MapReduce
<property>
<name>mapred.job.tracker.http.address</name>
<value>0.0.0.0:51030</value>
</property>
<property>
<name>mapred.task.tracker.http.address</name>
<value>0.0.0.0:51060</value>
</property>
tar zvcf name.tar.gz --exclude path/to/dir1 --exclude path/to/dir2 path/to/tar
Note:
Recently, I need to install RPM to RedHat Linux, but I don't have root access. I found this post: http://ajaya.name/?p=6353. However, some commands in the command are not correct or need more clarification. So I wrote down my experience below.
%_rpmlock_path lib/rpm/__db.000 rpm --initdb \
--root /home/<user_name>/rpm-local/ \
--dbpath /home/<user_name>/rpm-local/lib/rpm
rpm --root /home/<user_name>/rpm-local/ \
--dbpath /home/<user_name>/rpm-local/lib/rpm \
-ivh package.rpm
rpm --root /home/<user_name>/rpm-local \
--dbpath /home/<user_name>/rpm-local/lib/rpm \ --relocate /usr=/home/<user_name>/rpm-local \
--nodeps \
-ivh package.rpm
This post shows how to add "Edit with Vim" and "Tab Edit with Vim" items to context menu (pop out when you right click a file) in Windows.
Run regedit.exe, go to HKEY_LOCAL_MACHINE/SOFTWARE/Classes/*/shell/
It seems that latest versions of vim automatically create the registry entry:
Hadoop uses log4j via Apache common logging. The config file is conf/log4j.properties.
Some important variables are set in the command line. Following is a snippet cut from the whole command line used to launch HDFS name node.
-Dhadoop.root.logger=INFO,DRFA
-Dhadoop.log.dir=/N/u/hdfs/programs/hadoop-0.21.0/bin/../logs
-Dhadoop.log.file=hadoop-hdfs-namenode-b009.log
-Dhadoop.home.dir=/N/u/hdfs/programs/hadoop-0.21.0/bin/..
-Dhadoop.id.str=hdfs
You can see that log dir, log file, log level, logger are set. DRFA is defined in conf/log4j.properties.