vi ~/.vimrc
paste lines:
enjoy
paste lines:
set nocompatible:wq
syntax on
enjoy
1: <bean id="mongoOperations" class="ru.sample.dal.utils.ImMemoryMongoFactory" factory-method="provide" scope="prototype"/>
2:
3: <bean id="mongoTemplate" class="ru.sample.dal.utils.ImMemoryMongoFactory" factory-method="provide" scope="prototype"/>
4:
5: public class ImMemoryMongoFactory {
6: private static Fongo fongo = new Fongo("name");
7:
8: public static MongoOperations provide() {
9: return new MongoTemplate(fongo.getMongo(), "database");
10: }
11: }
<dependency>and you are looking for stable version of a plugin, you should be using following:
<groupId>org.jvnet.ws.wadl</groupId>
<artifactId>wadl-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<groupId>org.jvnet.ws.wadl</groupId>this is the most recent and least bogous version of plugin. Nothat you will have to refactor code if you was using client generated by wadl plugin. Also note that to reach endpoints with compound paths like
<artifactId>wadl-client-plugin</artifactId>
<version>1.1.3</version>
-Dcom.sun.management.jmxremote.port=8086Once that done add connection and start samplingapplication
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
to something likefill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);
helped me out.
fill.size = _.fillsize[0] * abs(sx)/1.34 + "pt" + S + _.fillsize[1] * abs(sy)/1.34 + "pt";
Access deniedI don't know why this is happening, don't even want to know. So here is a quick recepie to avoid that.
fatal: The remote end hung up unexpectedly
1. set GIT_SSH environment variable to point to plink.exe [C:\putty\plink.exe]Should be working from now on, without need to provide password all the time.
2. ssh to remote host where repo is
3. cd ~
4. mkdir .ssh
5. cd .shh
6. ssh-keygen -t dsa (hit enter all the time)
7. cat id_dsa.pub >> authorized_keys
8. copy id_dsa to your windows machine (somewhere)
9. run puttygen.exe
10. press "Load" - open id_dsa file
11. press "Save private key" (save somewhere)
12. run pageant.exe
13. add key that you saved fro puttygen to pageant
14. git clone...
sphinx_lm_convert -i model.lm -o model.dmp
sphinx_lm_convert -i model.dmp -ifmt dmp -o model.lm -ofmt arpaAfter you've got that running, you should list all audio files that you want use for training and their matching phrases in remaining files:
1. ./autogen.sh (It won't start right away, but will print what software packages are missing)Now try
2. sudo apt-get install autoconf
3. sudo apt-get install libtool
4. sudo apt-get install automake
5. sudo apt-get install bison
6. sudo ./autogen.sh
8. sudo make
9. sudo make install
10. export LD_LIBRARY_PATH=/usr/local/lib
sphinx_lm_convertIf you can see following message:
ERROR: "cmd_ln.c", line 675: No arguments given, available options are:Than everything works fine.
Arguments list definition:
[NAME] [DEFLT] [DESCR]
-case Ether 'lower' or 'upper' - case fold to lower/upper case (NOT UNICODE AWARE)
-debug Verbosity level for debugging messages
-help no Shows the usage of the tool
-i Input language model file (required)
-ienc Input language model text encoding (no conversion done if not specified)
-ifmt Input language model format (will guess if not specified)
-logbase 1.0001 Base in which all log-likelihoods calculated
-mmap no Use memory-mapped I/O for reading binary LM files
-o Output language model file (required)
-oenc utf8 Output language model text encoding
-ofmt Output language model file (will guess if not specified)
if( Object.prototype.toString.call( myObj ) === '[object Array]' ) {}source: http://stackoverflow.com/questions/4775722/javascript-check-if-object-is-array
InvalidDataAccessApiUsageException: Command execution failed: Error [db assertion failure], Command = { "mapreduce" : ... }The error message will include whole command, an will give you no clues about what actually went wrong. Try executing following command from terminal and repeat issue:
tail -f /var/log/mongodb/mongodb.logtrace information will get printed to log and you'll see it in terminal. You should be looking for messages as following:
JS Error: TypeError: myVar has no properties nofile_b:69
print('variable state is : ' + myVar) ;
MapReduceOptions options = MapReduceOptions.options();this way scope parameter will be passed as a pure JSON map object, which will be automatically mapped to js object by MongoDB.
Map vars = new HashMap();
try {
ObjectMapper mapper = new ObjectMapper();
DBObject dbo = new BasicDBObject(mapper.convertValue(myobject, Map.class));
vars.put("myparamName",dbo);
} catch (Exception e) {
logger.error(e);
}
options.scopeVariables(vars);
{with such an object it would be possible to do the following to invoke function:
member1 : "value1",
action : function() {
...
}
}
obj.action()In order to do that one would have to implement custom serializer class
public class MySerializer extends JsonSerializer<MyTO> {
public void serialize(MyTO value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
jgen.writeStartObject();
jgen.writeObjectField("member1", value.getMember1());
jgen.writeFieldName("action");
jgen.writeRaw(":" + value.getAction());
}
}
sudo apt-get install ant3. install sharutils
sudo apt-get install sharutils4. navigate to desired folder
cd /usr/share5. install svn
sudo apt-get install subversion6. checkout files
sudo svn co https://cmusphinx.svn.sourceforge.net/svnroot/cmusphinx/trunk/sphinx47. run jsapi.sh
sudo sh ./sphinx4/lib/jsapi.sh8. build project
cd sphinx4 sudo ant