Posts

Bash Script Leet Text Convertor: How to get array to recognize spaces -

the issue code below can not seem array recognize when text has spaces in or not. figured adding ' ' value in array handle this, wrong. haven't found luck searches how array recognize spaces in bash scripting. #!/bin/bash if [ "$1" == "-e" ]; # if cli argument -e opt="encrypt"; # set option encrypt elif [ "$1" == "-d" ]; # if cli argument -d opt="decrypt"; # set option decrypt else # else show proper usage echo "usage - encrypt text: ./l33t.sh -e text"; echo "usage - decrypt text: ./l33t.sh -d text"; exit; fi #creating array leet text , plain text declare -a leet=('ɐ' 'ß' '©' 'Ð' '€' 'ƒ' '&' '#' 'i' '¿' 'x' '£' 'm' '?' 'ø' 'p' 'o' 'Я' '§' '†' 'µ' '^' 'w' '×' '¥' 'z...

sql server - Can I map a decimal property to a float db column -

i'm writing .net web app on top of existing db app (sql server). original developer stored money in float columns instead of money or decimal . want use decimal inside pocos (especially because doing further operations on values after them). unfortunately, cannot touch db schema. there way still use decimal in pocos , tell ef "it's ok, know decimal , float don't along. don't either. best." with no special configuration, error: the specified cast materialized 'system.double' type 'system.decimal' type not valid. i tried using modelbuilder.entity(of mypocotype).property(function(x) x.moneyproperty).hascolumntype("float") , gets me error: schema specified not valid. errors: (195,6) : error 0063: precision facet isn't allowed properties of type float. (195,6) : error 0063: scale facet isn't allowed properties of type float. something work: public class mypocotype { public float floatprop...

vim - Count() function in vimscript -

i reading .vimrc spf13-vim on github, , there didn't understand: " snippets & autocomplete if count(g:spf13_bundle_groups, 'snipmate') bundle 'garbas/vim-snipmate' bundle 'honza/vim-snippets' " source support_function.vim support vim-snippets. if filereadable(expand("~/.vim/bundle/vim-snippets/snippets/support_functions.vim")) source ~/.vim/bundle/vim-snippets/snippets/support_functions.vim endif elseif count(g:spf13_bundle_groups, 'neocomplcache') bundle 'shougo/neocomplcache' bundle 'shougo/neosnippet' bundle 'honza/vim-snippets' elseif count(g:spf13_bundle_groups, 'neocomplete') bundle 'shougo/neocomplete.vim.git' bundle 'shougo/neosnippet' bundle 'honza/vim-snippets' endif what count() function here? check if item (snipmate or neocomplcache...

Java, dynamic class loading from github sources -

okay, trying following: i have java-files on github. want load these dynamic @ runtime. there possibility ? think urlclassloader not working, because dont have url containing folder of files, have url file itself. thanks in advance you can: download java file local system use javacompiler standardjavafilemanager (cf example in javacompiler javadoc) compiler java file class file can save on local system use urlclassloader load class file

c++ - Compiler can't find base class method when called from derived, and the derived defines same named method with additional parameter -

here's link ideone simple code paste: http://ideone.com/bbck3b . the base class has paramtereless function, whereas derived has 1 parameter. public. why compiler fails find a::foo() when called instance of b? the code: #include <iostream> using namespace std; class { public: virtual void foo() { cout << "a::foo" << endl; } }; class b : public { public: void foo(int param) { cout << "b::foo " << param << endl; } }; int main() { b b; b.foo(); } the compiler error: prog.cpp: in function ‘int main()’: prog.cpp:25:11: error: no matching function call ‘b::foo()’ b.foo(); ^ prog.cpp:25:11: note: candidate is: prog.cpp:16:10: note: void b::foo(int) void foo(int param) ^ prog.cpp:16:10: note: candidate expects 1 argument, 0 provided this standard c++ behaviour: base class method hidden derived-class method of same name, regardl...

javascript - baseUrl issue - requireJS -

i experiencing baseurl issue, 404 error, telling me root-app/js/module.js not found. here's how comes first, call <script data-main="js/main" src="js/lib/requirejs/require.js"></script> then in js/main.js , have (for testing mean) require({ paths: { upload: 'js/vendor/module.min' } }, ['js/vendor/main.js'], function(app) { app.add(2, 2); }); but in js/vendor/module.min.js itself, there declarations define(["module"]... , , 1 trigger 404 error. how can circumvent problem ? (sure, can move js/vendor/module.min js/module.min want keep code organized ;). necessary change define(["module"]... define(["vendor/module"]... ? in fact, problem here paths: { upload: 'js/vendor/module.min' } because of declaration define(["module"] in js/vendor/module.min.js suppose can't rename path uplaod , expecting paths: { modu...

usege of uploadify in a spring webflow flow -

this first question here please point me right direction if wrong. i'm experiencing difficulties while trying use uploadify flash based multi file uploader inside spring webflow flow. here detailed explanation of case: here versions of libraries i'm using: spring-webflow 2.3.2 spring-web 3.2.1 springwebmvc 3.2.1 uploadify v3.2 commons-fileupload 1.2.2 commons-io 2.4 commons-codec 1.8 apache tiles 3.0.1 webflow conf <webflow:flow-executor id="flowexecutor"> <webflow:flow-execution-listeners> <webflow:listener ref="loggingflowexecutionlistener" /> </webflow:flow-execution-listeners> <!-- max execution sayisina ciktiktan sonra mevcut execution'larin hepsini kill ediyor --> <webflow:flow-execution-repository max-executions="10" /> </webflow:flow-executor> <webflow:flow-registry id="flowregistry" base-path="/web-inf/views" flow-builder-services...