Posts

Erlang - Is it possible to limit the ram consumption when using disc copies in Mnesia? -

i have 4gb ram in system , used 2gb of ram before insertion completed wen using disc_copies. wondering happen if 100 percent of ram consumed? there option limit ram consumed during disc_copies, limiting ram usage 2gb? if looking how limit erlang vm memory usage should use control groups it. if monitor memory usage should use memory monitor memsup os_mon application . $ erl -boot start_sasl erlang/otp 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] ... =progress report==== 22-oct-2015::22:39:46 === application: sasl started_at: nonode@nohost eshell v7.0 (abort ^g) 1> application:start(os_mon). ... =progress report==== 22-oct-2015::22:40:03 === application: os_mon started_at: nonode@nohost ok 2> ... 2> memsup:get_memory_data(). {8162500608,6514708480,{<0.7.0>,426616}} 3> memsup:get_system_memory_data(). [{system_total_memory,8162500608}, {free_swap,5996748800}, {...

javascript - AngularJS: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode -

so had directive: app.directive('customdropdown', function() { return { restrict: 'e', templateurl: '/static/templates/directive_templates/customdropdown.html', link: function(scope, element, attrs) { console.log(attrs.custom-class); } } }) markup: <custom-dropdown custom-class="custom-select-menu"> </custom-dropdown> but, due console.log(attrs.custom-class) error mentioned in question. goes away when change custom-class custom . idea why error popping up? can't use hyphens? attrs.custom-class custom-class not valid identifier in javascript. have 2 choices : rename custom-class else without hypen. use bracket syntax : attrs['custom-class']

html - Click function on element returned from the jquery load func -

i need know how call click jquery function on element returned load func (again jquery). cant elements class name , thinking not existing in dom when try them. here main page: <div id="content"> <div id="main"></div> <div style="clear: both;"></div> </div> i loading additional html content inside #main load() jquery function , works fine. inside #main content this: <div id="home_container"> <div id="left_column" class="home_columns"> <img src="images/code.jpg" alt="code" class="pics home_pics" /> <p class="home_text">code snippets</p> </div> <div id="center_column" class="home_columns"> <img src="images/me_home.jpg" alt="me" class="pics home_pics" /> <p class="home_text">...

solr - java.io.IOException: Running in secure mode, but config doesn't have a keytab -

i config lily using cdh5 commandline. follow document @ search_config_hbase_indexer_for_search . my config file : cat /etc/default/solr solr_port=8983 solr_admin_port=8984 solr_log=/var/log/solr solr_zk_ensemble=host-172-17-110-81:2181/solr solr_hdfs_home=hdfs://hadoop-jkzl:8020/solr solr_hdfs_config=/etc/hadoop/conf solr_kerberos_enabled=true solr_kerberos_keytab=/etc/solr/conf/solr.keytab solr_kerberos_principal=solr/host-172-17-110-81@jkzl #solr_authentication_type=simple solr_authentication_type=kerberos solr_authentication_simple_allow_anon=true solr_authentication_kerberos_keytab=/etc/solr/conf/solr.keytab solr_authentication_kerberos_principal=http/host-172-17-110-81@jkzl solr_authentication_kerberos_name_rules=default solr_authentication_jaas_conf=/etc/solr/conf/jaas.conf cat /etc/solr/conf/jaas.conf client { com.sun.security.auth.module.krb5loginmodule required usekeytab=true useticketcache=false keytab="/etc/solr/conf/solr.keytab" principal="...

c# - find numbers that can be formed from sum of numbers from array in ascending order -

i trying find possible values result of sum of values of given array. example if given array a = [50,100,120,260,360] result [0,50,100,120,150,170,200,220,240,250,260,....] . how implement ? i found 1 article realted find value can't formed using given array. find smallest number can't formed values of given array i found 1 more discussion related mathematics , still unable understand how implement it. can have @ find possible values can formed using values any algorithm or code in c# help. edit we can use single value many times. more results 270 (50*1 + 100*1 + 120) , 300 (100*3), 310 (50 * 1 + 260 *1) etc. this use: func<ienumerable<int>, ienumerable<ienumerable<int>>> getallsubsets = null; getallsubsets = xs => (xs == null || !xs.any()) ? enumerable.empty<ienumerable<int>>() : xs.skip(1).any() ? getallsubsets(xs.skip(1)) .selectmany(ys => new[] { ys, xs.t...

Docker ubuntu image - bash: man: command not found -

am getting started docker , pulled basic ubuntu image. on windows 7 box running docker via docker-machine. do not know why, not able find man command on bash. tried exporting path of man $path still no joy. docker@default:~$ docker run -it ubuntu bash root@2dd12b770666:/# man ls bash: man: command not found root@2dd12b770666:/# whereis man man: /usr/local/man /usr/share/man root@2dd12b770666:/# export path=/usr/local/man:/usr/share/man:$path root@2dd12b770666:/# echo $path /usr/local/man:/usr/share/man:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin root@2dd12b770666:/# man bash: man: command not found root@2dd12b770666:/# if export command not work, not sure if editing bashrc have effect. did not try yet. there else need able run man on docker image? you have install man command in container: sudo apt-get install man

I want to take a photo when app in the background? ios -

i want take photo once every 2 minutes essential app in background. legitimate reasons. possible? no, not. way can take photo through uiimagepickercontroller(or custom through avfoundationframework) requires user action.