Posts

Showing posts from September, 2012

java - Hadoop: Using a Custom Object in a Mapper's Output -

i new hadoop , stumped something: what i'm trying take in list of text-entries in files , have initial mapper crunching on them , output customized object aggregated reducer. i put framework using text values ok--but when try change using our own objects, npe (shown below) here driver's run(): jobconf conf = new jobconf( getconf(), vectorconpreprocessor.class ); conf.setjobname( job_name + " - " + job_isodate ); m_log.info("job name: " + conf.getjobname() ); // need change chain-mapper later on . . . . conf.setinputformat( textinputformat.class ); // reading text files conf.setmapperclass( mapmvandsamples.class ); conf.setmapoutputvalueclass( sparsenessfilter.class ); //conf.setcombinerclass( combinesparsenesstrackers.class ); // not using combiner, because nodes must gathered before reduction conf.setreducerclass( reducesparsenesstrackers.class ); // not sure reducing required here . . . . conf

How to run console command inside php code using thread--Yii Framework -

i'm trying schedule task using php code in yii framework. want execute below command line inside php code using thread function @ intervals of time. this command stored in 1 table along frequency scheduled. using yii scheduler extensions. don't want run console command manually or task scheduled in windows. i want run using timer inside php code. here's i've tried far- yiic scheduler run --name="priorizer" priorizer = d:/xampp/php/php.exe d:/xampp/htdocs/merged/cron.php priorizer //stored in yii-schedules table

Using PHP parameter in Javascript -

i have parameter of php of $test1, want add scenario in js if $test1 exists, show coding in javascript. have drafted code follow , doesn't work. may cause? <script type="text/javascript"><!-- mychart.setxmldata(" "<categories>" + "<category label='1'/>" + "<category label='2'/>" + "</categories>" + if($test1['transactions_tmp']) { "<dataset>" + "<set value='147400'/>" + "<set value='189100'/>" + "</dataset>" + } "</chart>"); // --> </script> try this: <script type="text/javascript"> mychart.setxmldata( "<categories>"

android - java.lang.ClassCastException error when trying to save data in the sqlite on button click -

i have tab in activity when click on button open tab view works fine. after entering data in fields when click on button save it gives me error.may have error in sqlite database constructor not sure.some 1 please help: code tab: package com.example.doctormanager; import android.app.activity; import android.content.contentvalues; import android.content.context; import android.content.intent; import android.database.sqlite.sqlitedatabase; import android.os.bundle; import android.util.log; import android.view.view; import android.view.view.onclicklistener; import android.widget.button; import android.widget.edittext; import android.widget.imagebutton; import android.widget.listview; public class general extends activity { context context; private button proceed; private edittext patient_name,mobile,address,email,dob,age; listview template_list; intent data_intent; string name=""; @override protected void oncreate(bundle sav

java - specifying the message listener interface of an MDB -

i trying define message driven beans using deployment descriptor deploying app websphere , doesn't handle annotations nicely. i'm wondering if there way of specifying message listener interface of mdb in ejb-jar.xml file? you must use @javax.ejb.messagedriven annotation declare ejb type message-driven. can specify following optional attributes: messagelistenerinterface—specifies message listener interface, if haven't explicitly implemented or if bean implements additional interfaces. the bean class must implement, directly or indirectly, message listener interface required messaging type supports or methods of message listener interface. in case of jms, javax.jms.messagelistener interface. activationconfig—specifies array of activation configuration properties configure bean in operational environment. activation configuration properties name-value pairs passed mdb container when mdb deployed. properties can declared in either ejb-jar.xml deploym

c++ - Regarding Hue based Face detection OpenCV -

i have tried implement face detection algo people wide range of skin color, in different illumination conditions (e.g. darkness, disco lights, sunny day). first thing comes in mind based on thresholding of hue , saturation illumination invariant (as mentioned in many papers). wont work when person illuminated blue or red light. in darkness not giving result. i tried using voila jones (haarcascade multiple face detection in opencv), can not detect lot of faces in normal light condition. false detection throught haarcascade method can prevented keeping check of skin percentage. , avoid missing detection, tried find skin portions first , apply voila jones in region. doesnt work. can please suggest feature missing consider face detection in different light conditions ?

sql - what is mysql query for below four tables -

i have 4 tables. user: user_id user_name client_id 1 abhi 1 2 ravi 2 client: client_id client_name products 1 tom cake, patties 2 pet cookie, cake products: product_id product_name 1 cake 2 cookie 3 patties report: report_id product_id 1 1 2 3 3 2 4 1 5 3 if ravi login able see report below: report_id product_id 1 1 3 2 4 1 i need mysql query in "client" table instead of saving multiple values of "product" split , put "product id" rather actual product value that's why have table "product". table "client" not in first normal form . if possible, change structure of table

symfony - Future images in my upload directory don't have the correct permission -

i'm using symfony2 framework in application , works fine. i'm having problem on deployment though: i have upload directory in testing area. directory web/uploads/images. folder has following permission: 700. however, each time upload new image in there, permission on image 600. means image won't show on application. of course, when set permission manually on newly uploaded image, shows correctly. i try using umask didn't work. guess maybe need on symfony2 when upload image. thanks answer you need use umask user you're running symofony application as. look here: http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

jquery - Changing the class name of Google visualization table chart -

here sample google visualization table chart drawn as, table = new google.visualization.chartwrapper({ 'charttype': 'table', 'datatable': data, 'containerid': 'table', 'options': { 'width': '100%', 'showrownumber' : true }, }); table.draw(); the above google visualization table chart has default class name google-visualization-table-table , this link explains how customize individual styles. how can change table's class name using jquery twitter bootstrap style? that, can customize whole table style using class name. tried $(document).ready(function(){ $(".google-visualization-table-table").attr('class', 'table'); $("table").addclass( 'table-bordered table-condensed table-striped' ); }); but doesn't worked me. i updated fiddle provided - see http://jsfiddle.net/8z

java - Podio API, attaching files to items -

i have problem attaching file specific item using java api. know should possible functionality described here in podio documentation https://developers.podio.com/doc/files/attach-file-22518 , examples php , ruby given. cannot find such method in podio java library. find in fileapi methods provide uploading files, not attaching them specific objects described in documentation. use podio api version 0.7.1 any ideas how should done in java? podio uses rest-style api. send standard http-request, , json-formatted data. can without special library programming language. if there no predefined java class you, can call yourself. in end http-call. from ruby implemention, see attach file multipart/form-data, same browser it. there should http-handling java classes you. you need add information api-page, post-parameters , of course url. difficult part authentication headers, need solve problem once.

twilio - Twillio sendDigits for CallerID (outbound calls) -

after searching find twiml noun 'senddigits' sends digits destination number following: <dial record="true" callerid="415-123-1111"> <number senddigits="wwww1928"> 415-123-4567 </number> </dial> what need send digits 'callerid' (we need use callerid's in extension system locally). find nothing in twiml references this. can please tell me work around send digits 'callerid'. thank twilio employee here. think understand you're trying do: want connect person (phone number + extension) person b (phone number + extension). correct? if so, you're half way there, you've coded 2nd half of call (to person b). need use rest api initiate call person a. api call takes 3 parameters: to - phone number person a from - caller id want person see when phone rings (usually twilio #) url - url twiml the twiml send twilio should this: <play digits="123

c# - Hanging when process WaitForExit in for loop -

i creating gui application using visual c# 2010 (.net framework 3.5). how change code no stops responding? for (int = listbox1.items.count - 1; >= 0; i--) { listbox1.selectedindex = i; process myprocess = new process(); myprocess.startinfo.filename = "ffmpeg.exe"; myprocess.startinfo.workingdirectory = ""; myprocess.startinfo.arguments = " -i \"" + listbox1.selecteditem + "\" " + "-y "; myprocess.startinfo.createnowindow = true; myprocess.startinfo.windowstyle = processwindowstyle.hidden; myprocess.start(); myprocess.waitforexit(); listbox1.items.removeat(i); } the convert program time use converting. how show new form or messengebox running application? want respond window. history loop: how do loop through items in list box , remove item? waitforexit , unsurprisingly, block thread until process has exited. alternatively, can use exited event notified when process

.NET How to get Sql response to string? -

after inserting db server's response. example "x rows effected" or other messages, , put them string variable. how implement in code? c# or vb - doesn't matter me. couldn't find specific on this, n00b @ programming. thank kindly.could kindly provide example me? here code: private function insertscr(byval byte2insert byte()) boolean dim _con sqlconnection dim querystmt string dim _cmd sqlcommand dim param sqlparameter try _con = new sqlconnection(my.settings.dbconnstr) querystmt = "update errorlog set screen = @content where(errorlogid = 2)" _cmd = new sqlcommand(querystmt, _con) param = _cmd.parameters.add("@content", sqldbtype.varbinary) param.value = byte2insert _con.open() _cmd.executenonquery() _con.close() return true catch ex exception return false end try end function assuming sql server, sqlconnecti

How to reinstate auto increment during importation of CSV file into MySql while retaining pervious numbering? -

id,created,filenumber,address,city,state,zip 1008,"02/27/2014, 10:28",142840,124 north st,anycity,ny,91111 1007,"02/12/2014, 21:06",142839,424 maple ave,anycity,ny,91111 1006,"02/12/2014, 21:06",142839,143 great pl,anycity,ny,91111 i have "like above" records in comma separated value file format. import table mysql , while doing to: retain existing records same id numbers make id continue increment each record added if 1 of records is deleted don't want records update number (for example, if record id 1007 deleted remaining record numbers 1006 , 1008) , last, not least "filenumber" auto increment on each new record first 2 numbers being year date (e.g. 14 stands 2014) , remaining 4 numbers incrementing each record (e.g 142841, 142842, 142843, etc). example, if record added december 31, 2014, file number should auto increment 142844 , next record addition on january 1, 2015 152845. , want retain each existing records same

python - How to add own class into field if this field is not valid? -

how add own class field if field not valid? for example if field not valid add class="invalid" forms: class myform(forms.form): myfield = forms.charfield() template: {{ form.myfield }} edited answer more precisely. if want specify class error or required fields: class myform(form): error_css_class = 'error' #here can set 'invalid' required_css_class = 'required' ref: https://docs.djangoproject.com/en/1.6/ref/forms/api/ you can change class 1 field with: myfield= forms.charfield(attrs={'class': 'myclass'}) ref: https://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.widget.attrs

sql - How to automatically split a table in a SSIS package -

part of longer ssis task read in 10 mio. rows of data table "trunk" , sort 2 different ids in order join column. it turned out sorting 10 mio. rows our server adn need solution automatically splits 10 mio. rows in table "trunk" multiple parts. currently did manually selecting top 5 mio via sql statement executing package , selecting bottom 5 mio. is there way either automatically or different? while reading data source destination table (trunk), can split it. row counter between source , destination. if row count > 5 m, divert data flow next table. can create table dynamically.

c# - Declaring a string variable to a Textblock in Windows Metro -

i might bit stupid asking question. have not found on net of yet problem. have windows app, listview displaying texblocks names in them , loaded xml file. here xaml code. <listview x:name="listmyloans" rendertransformorigin="0.446,0.54" margin="10,150,1052,10" selectionchanged="listmyloans_selectionchanged_1" grid.rowspan="2"> <listview.itemtemplate> <datatemplate> <grid width="300" height="100" > <textblock x:name="tbtitle" text="{binding title}"></textblock > <textblock x:name="tbmediaindex" text="{binding mediaindex}" visibility="collapsed"/> </grid> </datatem

gwt - Why PlaceRequest doesn't work normally as we expected (GWTP)? -

i using gwtp. there method openurl following: public void openurl(int key){ placerequest request = new placerequest(nametokens.search).with("showdata", "y"); if(key==1){ request.with("firstvariable","2154"); } else if(key==2){ request.with("secondvariable","4454"); } string url = window.location.createurlbuilder().sethash(placemanager.buildhistorytoken(request)).buildstring(); window.open(url, "_blank", null); } there button call openurl(1) , after clicking button open url in form: abc.com#search;showdata=y clearly above url missing firstvariable param part. the correct url should be abc.com#search;showdata=y;firstvariable=2154 i don't know why gwtp didn't read request.with("firstvariable","2154"); part expected. can find out solution? request.with(param, value) returns new placerequest, so request

Perl mySql data to JSON file -

hello trying save mysql detail in json file how save mysql detail in json format ? my perl code #!/usr/bin/perl $file = $db->selectrow("select f.*, s.*, u.usr_login file_usr_login, u.usr_profit_mode (files f, servers s) left join users u on f.usr_id = u.usr_id f.file_code=? , f.srv_id=s.srv_id",$f->{id}); how save $file detail in json ? my $file = $db->selectrow( q[select f.*, s.*, u.usr_login file_usr_login, u.usr_profit_mode (files f, servers s) left join users u on f.usr_id = u.usr_id f.file_code=? , f.srv_id=s.srv_id], $f->{id} ); use json; $json = new json; $file_in_json = $json->encode($file);

ios - I need help animating UICollectionView cell size when collection view size changes -

i have uicollectionview takes entire screen, , inside cells same exact size collection view. when user hits button, collection view animates take half screen (and view shown beside it). fine, cells still size of original collection view. i can call invalidatelayout on collection view's layout, , cause collectionview:layout:sizeforitematindexpath: called , cells recalcualted, , sizes changes, these not animate, snap new size. is there way animate these cell size changes @ same time, or in same animation block animates size change parent collection view? [_collectionview performbatchupdates:^{ (int =0; i<count; i++) { nsindexpath *indexpath = [nsindexpath indexpathforrow:i insection:0]; uicollectionviewcell *cell = [_collectionview cellforitematindexpath:indexpath]; cell.layer.transform = catransform3dmakescale(0.9, 0.9, 1); } } completion:nil];

python - Use tag as attibute in crfsuite -

i'm new in crf , want use crfsuite tag words. read crfsuite's manual , understand format of training data, if want add features have tags of "near words", what's training data file like? i have google around found nothing problem. the short answer supply attributes of word coffee (like w[-1]=drank indicate previous word) , label ( noun ), , crfsuite generates actual indicator functions compose crf model (including feature indicates label of previous word verb ). knows because uses "1st-order markov crf dyad features," described on manual page linked to. one distinction that's important make (and documentation more precise about) difference between "features" , "attributes" features links in model represent either (attribute, label) or (label, label) pairs. so in example, w[-1]=drank attribute supply. combination of w[-1]=drank, noun state feature , transition between labels verb --> noun transition feat

Passing javascript variable from modal to php on the same page -

i stucking problem day.i want perform edit operation on script.my main page called customer-grid-screen.php code comes follows <?php include("header.inc.php"); include("left.inc.php"); include('config.php');?> <div id="page-content-wrapper"> <?php include("pagetitile.inc.php"); ?> <div id="page-content"> <div class="clearfix mrg10b"><a href="javascript:;" class="btn large bg-green float-right modal-customeradd" title=""><span class="button-content">add</span></a></div> <div class="example-box"> <div class="example-code"> <table class="table table-condensed"> <thead> <tr> <th>name</th> <th>details</th> <th>domain</th

vb.net - "Invalid cross-thread access" when changing a WP8 textBlock -

i'm coming vb 6 , semi-new vb.net. i'm writing windows phone 8 application. there's grid in have several textblocks want dynamically display data file stream (that contains scanned data). when wp8 page opens, automatically loads data textblocks. works. before load data file, want "reset" textblocks , hide them. wanted use procedure following every textblock: tbl1.text = "" tbl1.visibility = system.windows.visibility.collapsed this works 1 time: when page loads. procedure not produce error. now when call method again later, when want refresh data shown on page, following error on first line of code shown above: an exception of type 'system.unauthorizedaccessexception' occurred in system.windows.ni.dll not handled in user code additional information: invalid cross-thread access. i'm bit lost now. in vb6 able whatever wanted ui elements. presume i'm making kind of newbie mistake here? i read somewhere dispatcher thing. seem

mysql - How can i separate the data from selected data -

i have column in table name url , contains multiple value " https://www.google.com/#q=how+to+make+a+android+app " , http://www.bing.com/search?q=how+to+make+a+android+app&go=&qs=n&form=qblh&pq=how+to+make+a+android+app&sc=8-15&sp=-1&sk= i want data separately in output website = https://www.google.com keyword = how make android app. any idea plz, how can in mysql . you can use substr() function in php cut string. in case, can characters end of ' https://www.google.com '. read more @ http://ro1.php.net/substr in case want directly in query, can use substr() well. sql syntax goes this: select substr(column, start_position, desired_length) table_name *select substr(column_name, 1, 20) table_name;*

javascript - Sencha touch - Ext.XTemplate if/else not working -

hi new sencha touch. have problem displaying data in ext.dataview.list itemtpl . how setting itemtpl in config itemtpl: new ext.xtemplate( '<div class="featureimageholder"><img class="featureimage" src="{itemimage}" alt="{itemname}" /></div>', '<span class="item">', '<h3 class="salename">{itemname}</h3>', '<span class="priceoptions">', '<tpl for="prices">', '<span class="priceoptionreg">', '<tpl if="priceoptiondesc">{priceoptiondesc}</tpl> ', '<tpl if="priceoptionreg">{priceoptionreg}</tpl> ', '<tpl if="pricereg">${pricereg}</tpl> ',

.net - Razor view engine, parse directly to file -

bit of stab in dark here. we use spark view engine render xml template used within our application reporting purposes. works nicely have hit hurdle in of our xml templates, once processed, large. large in fact causing problem run directly in memory. because of exploring possibility of writing them straight disk. now, looks may possible spark can pass textwriter in render method. i'm unsure whether possible razor view engine. possibly using technique similar described in post. http://buildstarted.com/2010/09/29/razor-view-engine-without-mvc-at-all/ like say, bit of stab in dark appreciated.

printing - How to print a report in Java? -

i came c#. .net offers reporting tool (crystal report) print reports. i'm using jtable populated source. how print records jtable without using jtable.print()? how can control layouting? way print reports in java use java.awt.print , javax.print? birt allows handle data pojo (plain old java object) datasource, consult birt developer channel on youtube, there tutorial that.

java - How to send Socket details through a Socket -

i developing java application in need pass details of socket object remotely connected computer through socket... tried passing socket object in object output stream. "socket" not "serializable" didn't work... can me please? or tell me whether possible or not... thank you... you have solution @ hand. if (the server) have 2 opened sockets, 1 , b have is: read send b , read b send a. when socket or socket b closed (or has error) (the server) close both socket , conversation over. deal scenario, need use select or non-blocking mechanism see socket has data read , act accordingly. recommended use separate thread job, server free attend more clients.

How can the cpu type be read in the linux kernel code (viz. x86, x86_64)? -

i want detect cpu type while kernel booting (viz. x86 or x86_64) can task differently based on cpu type. there simple way know cpu type? how the cpuid instruction ? there module interfacing it, source code is here . if interested, have here or here or here other examples. also have @ this question using cpuid know if system supports sse.

String array java -

when create string array , give string values elements in array pointer string object or hold object itself. in below code each of element i.e. days[0] pointer string objects holds string value or object in array. each element point different string object or same object? how differ primitive type array int[] test= new int[6], these hold int values. thanks string[] days = new array[7]; days[0] = "sunday"; days[1] = "monday"; days[2] = "tuesday"; days[3] = "wednesday"; days[4] = "thursday"; days[5] = "friday"; days[6] = "saturday"; when create string array , give string values elements in array pointer string object or hold object itself. object arrays contain references objects not objects themselves. does each element point different string object or same object? in example each array element references different string , different object. if let's you'd set days[6] = "sunda

Groovy - Encoding issue parsing Korean in XML -

i have xml file utf-8 encoded (both xmlspy , notepad++ show encoding). file contains korean strings display fine in both editors. <table> <column ss:styleid="s63" ss:autofitwidth="0" ss:width="290.25"/> <row ss:autofitheight="0"> <cell> <data ss:type="string">왕복</data> </cell> </row> <row ss:autofitheight="0"> <cell> <data ss:type="string">..에서</data> </cell> </row> <row ss:autofitheight="0"> <cell> <data ss:type="string">편도</data> </cell> </row> <row ss:autofitheight="0"> <cell> <data ss:type="string">기내</data> </cell> </row> </table> i'm using groovy parse xml

javascript - How to handle two different data-main attributes in same page? -

i developing plugin web applications uses many external jss jstree, bootstrap , jquery. using require load of these dynamically. so end user have use plugin include line in there html. <script data-main="http://host.name/pathto/main" src="http://hostname/path.to/require.js"></script> but problem arises when app wants use plugin using requirejs internal purpose. html have 2 requirejs data-main attributes like: // app's requirejs <script data-main="app/lib/main" src="app/lib/require.js"></script> // include plugin have developed. <script data-main="http://host.name/pathto/main" src="http://hostname/path.to/require.js"></script> so when there 2 different requirejs instance loads first one's files , other ones never included. solution in such case when developing addon using requirejs? as you've discovered cannot have 2 data-main on same page. first <scr

php - Browse button for file upload 404 file directory not found -

hi trying create upload section website, have looked @ multiple websites , examples such as: w3schools i have found out there multiple ways these can go wrong example mysql injection each due them using $_files["file"]["type"] . have started follow link instead due being php them selves, php documentation ok point have problem code have @ moment have simple form runs php script check file upload , upload if correct , come invalid if isn't partially working, file uploads if large file 404 file or directory not found error if smaller file size works ideas. the html form <form enctype="multipart/form-data" action="upload_file.php" method="post"> <!-- max_file_size must precede file input field --> <input type="hidden" name="max_file_size" value="300000000" /> <!-- name of input element determines name in $_files array --> send file: <input name="userfile"

TypeError message in Pythons PIL (v2.6): integer expected, got float -

first time i'm in forum. hope i'm specific enough. using imagechops inside pil, i'm trying multiply 2 images (both mode="l") same error message. i've looked everywhere couldn't find useful. i'd appreciate helpful ideas! relevant part of code attached. def point(self, f, searchimage, technique): # technique - inpaint or bicubic dimx, dimy = searchimage.size reader = csv.reader(f) line in reader: #f.readlines(): coord = line print coord if searchimage.size[0] > float(coord[0])+95.5 , searchimage.size[1]\ > float(coord[1])+95.5: box = (float(coord[0])-93.5,float(coord[1])-93.5,\ float(coord[0])+95.5,float(coord[1])+95.5) # left upper right elif searchimage.size[0] < float(coord[0])+95.5 , searchimage.size[1]\ > float(coord[1])+95.5: box = (float(coord[0])-93.5,float(coord[1])-93.5,\ searchimage.si

database - Error causes password change while updating new data in Yii -

while i'm trying update aid field in database function: static function aidinsert() { $model = users::model()->findall(); foreach($model $m) { $code = alphabeticcode(); $aidk = users::model()->findbyattributes(array('aid'=>$code)); if(!empty($aidk)) { $code = alphabeticcode(); } $m->aid = $code; $m->save(); } } (alphabeticcode method method used generate random strings.) the whole user's password stored in password field changed piece of md5 hash, right after function completed. did wrong? using save() saves every attribute default - can specify attributes save: $m->save(true, array('aid')); // true use validation, array specify attributes save

python delete substrings from list of strings -

i have list l=['abc','abcdef','def','defdef','polopolo'] im trying delete strings superstring in list. in case, result should be: ['abcdef','defdef','polopolo'] i have written code: l=['abc','abcdef','def','defdef','polopolo'] res=['abc','abcdef','def','defdef','polopolo'] each in l: l1=[x x in l if x!=each] other in l1: if each in other: res.remove(each) but doesnt seem work. have read cannot remove list while iterating on it. hence copy res., while l original list. in advance. l=['abc','abcdef','def','defdef','polopolo'] print [j i, j in enumerate(l) if all(j not in k k in l[i + 1:])] # ['abcdef', 'defdef', 'polopolo'] we can speed little, sorting list before l = sorted(l, key = len) print [j i, j

ruby on rails - rake aborted! No such file or directory after write admin.css -

i deploy rails code ec2 using capistrano but met same problems while run cd -- /home/stage_deployer/urbox/releases/20140306102215 && rails_env=staging rails_groups=assets bundle exec rake assets:precompile below command debug @ ec2 stage_deployer@ip-172-31-5-59:~/urbox/releases/test$ rails_env=staging rails_groups=assets below log bundle exec rake assets:precompile --trace ** invoke assets:precompile (first_time) ** invoke assets:environment (first_time) ** execute assets:environment ** invoke environment (first_time) ** execute environment i, [2014-03-06t10:33:54.388029 #11702] info -- : ** [raven] raven 0.6.0 ready catch errors assetsync: using /home/stage_deployer/test/releases/test/config/initializers/asset_sync.rb ** execute assets:precompile ... ... i, [2014-03-06t10:34:04.551896 #11702] info -- : writing /home/stage_deployer/urbox/releases/test/public/assets/admin.js i, [2014-03-06t10:34:04.553847 #11702] info -- : writing /home/stage_deployer/urbox/

How can I rename the template directory/folder - Joomla 1.5 -

i want rename not inner folder(rhuk_milkyway оr others). folder "templates". i think 1 of ways protect site regular virus attaks. i changed: 1). folder name 2). paths in file index.php in folder what else must do? i don't think renaming templates folder good. can still see path of template css, js , images in html source. lets rename templates folder secret_folder , when viewing html source see /secret_folder/rhuk_milkyway/css/style.css instead of /templates/rhuk_milkyway/css/style.css . if you're afraid of regular virus attacks - right folder permissions, , should trick.

How can we execute a shell command from a chrome extension; is there a provided way? -

how can execute (shell or bash) command chrome extension; there provided way in chrome api? no. such capability scary. might interested in native messaging api , you'll need distribute native application installer typically requires administrator privileges. your other question suggests that approach won't work use case.

Episerver - delete everything in media / blocks libraries -

i wondering if had good, , importantly - quick ways of deleting in blocks / media libraries without having go through every individual item, , moving trash. this i've been having before importing fresh data site, way have found of doing efficiently put 1 folder sub folders within it, allows me delete folder , of contents. doesn't me current project have ton of assets don't want go through, moving etc.. i'm surprised there isn't way clear library, or select , move trash? thanks, giuseppe there no easy way gui, far know, have deletechildren method on icontentrepository . creating scheduled job or plugin should pretty straightforward. icontentrepository _contentrepository; // whereever var blockroot = new contentreference(123); // whereever, i.e. property on startpage _contentrepository.deletechildren(blockroot, true, accesslevel.noaccess); also, if on media data, remember run "remove abandoned blobs" scheduled job afterwards (unless

iphone - User can download same application in many device using same apple id -

user can download same application in many device using same apple id? written in document? or there restriction on downloading same app ? if testing app in multiple devices in development phase have add devices udid in apple account. no issue same appid

java - LibGDX text not centered in smaller viewport -

Image
i'm working on libgdx game uses smaller viewport. public static float box_scale = 10; public static final float virtual_width = (int) (320 / box_scale); public static final float virtual_height = (int) (480 / box_scale); float viewportheight = myconstants.screen.virtual_height; float viewportwidth = myconstants.screen.virtual_height * gdx.graphics.getwidth() / gdx.graphics.getheight(); example viewport can have size (32, 48). use scene2d rendering. reason whenever create textbutton text never centered. bitmapfont used button. freetypefontparameter fontparam = new freetypefontparameter(); fontparam.size = 14; freetypefontgenerator generator2 = new freetypefontgenerator(gdx.files.internal("data/font.ttf")); labelfont = generator2.generatefont(fontparam); labelfont.setscale(1f / box_scale); labelfont.setcolor(color.black); if set box_scale value 1 textbutton acts normal need simulating box2d world. guess create separate labels each button , positio

c# - Windows 8 Background Task Progress Handler Not Activating -

i've written background task in win 8 app i'm working on periodically check new items in feeds. task works , if app runs, fires off it's completion handler. however, cannot progression event handler fire. i'm using helper class register event/re-attach handlers public static async void registerbackgroundtask(string taskname, string entrypoint, uint checktime, backgroundtaskcompletedeventhandler completionmethod, backgroundtaskprogresseventhandler progresshandler = null) { var backgroundaccessstatus = await backgroundexecutionmanager.requestaccessasync(); if (backgroundaccessstatus == backgroundaccessstatus.allowedmayuseactiverealtimeconnectivity || backgroundaccessstatus == backgroundaccessstatus.allowedwithalwaysonrealtimeconnectivity) { foreach (var task in backgroundtaskregistration.alltasks) { if (task.value.name == taskname)

java - Daemon Thread prevents JVM from terminating - possible reasons? -

i need develop maven plugin can start apache ftp-server, run daemon (does not halt build process) , stop goal. unfortunately first attempt daemon threads fails: public class ftpserverdaemon { public static void main(final string[] args) throws exception { thread thread = new thread(new runnable() { @override public void run() { org.apache.ftpserver.main.daemon.main(args); } }); thread.setdaemon(true); thread.start(); thread.sleep(10000); } } the bad thing here jvm not terminate after 10 seconds runs indefinitely. if daemon.main black-box code (however source available ), can prevent jvm terminating in daemon thread? agree assylias , chrylis comments. instead of org.apache.ftpserver.main.daemon.main(args); can try other code there? loop lasts more time main thread sleeps should do, printing number every n se

c++ - link to boost::thread fails -

i'm trying install program called mgiza. compiles cmake , requires boost libraries. used commands cmake . make when run 'make' following errors: d4norm.cxx:(.text+0x95b): undefined reference `boost::system::generic_category()' and likes. inserted following line in cmakelists.txt: find_package( boost 1.41 components system) it worked because more files compiled , warning above disappeared, got warnings: main.cpp:(.text+0x7174): undefined reference `boost::thread::hardware_concurrency()' although have find_package( boost 1.41 components thread) in cmakelists. doing wrong? you need search thread component: find_package(boost 1.41 components thread system) in newer versions of boost.thread should link against boost.chrono find_package(boost components thread chrono system) then need link executable against , add includes: # check if worked out if(boost_found) add_executable(main main.cpp) # executable or library or whatever tar

java - Read file and store values into two arrays, one for each line -

i got code here: try{ filereader file = new filereader("/users/tda/desktop/readfiles/tentares.txt"); bufferedreader br = new bufferedreader(file); string line = null; while((line = br.readline()) != null){ string[] values = line.split(","); grp1 = new int[values.length]; for(int i=0; i<grp1.length; i++){ try { grp1[i]= integer.parseint(values[i]); }catch (numberformatexception e) { continue; } } system.out.println(arrays.tostring(grp1)); } system.out.println(""); br.close(); }catch(ioexception e){ system.out.println(e); } this file im reading contains. grp1:80,82,91,100,76,65,85,88,97,55,69,88,75,97,81 grp2:72,89,86,85,99,47,79,88,100,76,83,94,84,82,93 right im storing values