Posts

Showing posts from February, 2015

javascript - onclick is not working with document.getElementsByClassName -

i have accordion menu using product descriptions in cms trying develop javascript/css/html speed data entry having same class name encapsulate sections , subsections. saw on website , thought cool, cannot work. e.g sections this: <button class="accordion_f">section 1 title</button> <div class="panel"> <button class="accordion_f">section 1 subsection title</button> <div class="panel"> section 1 contents</div> <button class="accordion_f">section 2 title</button> <div class="panel"> <button class="accordion_f">section 2 subsection title</button> <div class="panel"> section 2 contents</div> , on... section 1 section 1 contents section 1 contents section 2 section 2 contents section 2 contents , on this way can cut , paste content without worrying specific div id names. css <style> button.acc...

php - How to find difference between two time? -

this question has answer here: difference between 2 dates in seconds [duplicate] 1 answer i have 2 variable value date type assigned it. want find difference of 2 variable values. $d1='2016-08-24 12:22:13'; $d2='2016-08-24 12:22:30'; difference of d2-d1 17 seconds. how find in php? // instantiate datetime $datetimefirst = new datetime('2016-08-24 12:20:00'); $datetimesecond = new datetime('2016-08-24 12:34:00'); //calculate difference $difference = $datetimefirst->diff($datetimesecond); //format output echo $difference->format('%y-%m-%d %h:%i:%s'); reference

c - How to fill bitfields with 0xff -

is there way initialize unsigned field in bitfield 0xfff...(according its' size ofcourse) ? if use -1 warning assigning signed unsigned variable. one solution manually create init values in enum , use them: enum init_bit { // etc i_3 = 7u, // use longer names because global space i_4 = 15u, i_5 = 31u, // etc }; you write once , becomes easy: x x = {/*other fields*/, i_4, /*other fields*/}; another solution found init 0 , decrement. defined because dealing unsigned type. if need initialize can create function this: x get_x() { x x; x.a = 0; --x.a; return x; } with optimizations enable compiler direct initialize: get_x: movl $15, %eax ret you can use function initialization: x x = get_x(); of course has disadvantage need init other fields of x in get_x . where x defined as: struct x { unsigned : 4; }; typedef struct x x; it seems tricky initialize bit fields without warnings (gcc 6.1): x x = {-...

list - How to enable/disable item in selecManyCheckbox based on flag -

i need in disabling , enabling item selectmanycheckbox component in jsf page. first of all, selectmanycheckbox component showing 3 chechboxes (loan - health - transfer). list populated bean has code: private list<hrcertificate> hrcertificateslist = new arraylist<hrcertificate>(); //getter , setter private string loanflag=""; @postconstruct public void init() { this.hrcertificateslist.add(new hrcertificate(("loan"), "lc")); this.hrcertificateslist.add(new hrcertificate(("health"), "hi")); this.hrcertificateslist.add(new hrcertificate(("trasnfer"), "te")); } in same bean, running sql statement return either yes or no , value adding loanflag variable.so if flag="y", need enable loan checkbox user can select else need disable selectmanycheckbox . issue facing difficulties in applying logic disable , enable item selectmanycheckbox where in above code listing , enabling ...

Run python in C++ -

i have application written in c++ , testing system (also in c++). testing system pretty complicated , hard change (i want make small changes). class looks this: class derived : public base { public: void somefunc(const anotherclass& file) { } }; there several functions inside. testing system creates derived class instance , uses it's methods stuff. now want able write solution in python. need two-way integration. idea write python function, executed every time when somefunc called. , don't want lose variables' values in python 1 launch of function another. , want able use methods defined in base class instance python. how can achieve these things? i chose boost.python these purposes. now, understand, how use c++ function, or simple class in python after work. don't understand how launch python function c++. the second question - boost.python choice? need fast and, @ same time, easy use. thank help. i recommend using cython sort of thing...

r - How to append date to the filename for logging -

i'm triggering r script via scheduler. r script causes errors (maybe due input problmens). after each run, r-out file history log. log super helpful in checking if went planed unfortunately gets overwritten every day. question is: how can different r-out file each day (e.g. date it) best regards , thank you, phil to generate filename includes current date, take output of sys.date() , use paste0 to compose name of file including date. maybe this: filename <- paste0("r-out_", sys.date(), ".log") #> filename #[1] "r-out_2016-08-24.log" the format of date can changed format() if desired (thanks @konrad reminding this). instance, use format(sys.date(), "%d-%m-%y") obtain day-month-year form typically used, e.g., in europe: filename <- paste0("r-out_", format(sys.date(), "%d-%m-%y"), ".log") we can use sink() to redirect console (standard) output of script file. in case script edi...

MongoDB C# How to delete nested record -

i have following structure { "_id" : "68f77d83-7141-4867-a355-16eda3ebe470", "roles" : [ { "id" : "0001010260", "roleids" : [ "customer", "admin" ] } ] } now try delete 1 roleid "customer" or "admin". have 2 filters combine and. filterdefinition<roleentry> subfilter = builders<roleentry>.filter.eq(p => p.sub, _sub); filterdefinition<roleentry> idfilter = builders<roleentry>.filter.elemmatch(p => p.roles, r => r.id == _role.id); i can delete whole roleids element with. don't know how 1 level deeper. tried updatedefinition<roleentry> updatedefinition = builders<roleentry>.update.unset("roles.$.roleids"); updateresult result = await _roleentryconnector.roleentrycollection.updateoneasync(andfilter, updatedefinition, null...

how to dynamically update topics of SinkConnector in Kafka Connect? -

i have written kafka connect consumer topics, topic change @ runtime, need reconfiguration topics. i know use restful api can update topics there way achieve this? kafka connect intended run service, supports rest api managing connectors. way update through rest api @ run time : put /connectors/{name}/config - update connector's configuration parameters @ run time. request json object - config(map) { "connector.class": "io.confluent.connect.hdfs.hdfssinkconnector", "tasks.max": "20", "topics": "kafkaconnecttopic", "hdfs.url": "hdfs://smoketest:9000", "hadoop.conf.dir": "/etc/hadoop/conf", "hadoop.home": "/etc/hadoop", "flush.size": "1000", "rotate.interval.ms": "100" } response : { "name": "hdfs-sink-connector", "config": { ...

Batch script to pick filename from a text file and find the latest file -

scenario: have multiple releases of product, , each release, folder created in main folder. file modified in various releases. have file names listed in text file. need script to: take each file name filenames.txt file search file name in entire directory (in releases) find latest file copy specified folder i took various pieces of code found on stack overflow, , combined them code: @echo off setlocal enabledelayedexpansion echo. /f "usebackq delims=" %%a in ("filenames.txt") ( set "x=%%a" echo '!x!' set ffpath=c:\svn\nlbavwdocsvn\rep_doc_erpln\trunk\erpln set newpath=c:\lavanya\extracted set newestdate=20160824 echo recursively searching %ffpath% /f %%i in ('dir %ffpath%\ !x! /a:-d /s /b') ( set fulldate=%%~ti echo %ffpath% rem set currdate yyyymmdd format. note: fail if regional settings changed. set currdate=!fulldate:~6,4!!fulldate:~0,2!!f...

java - Is possible to use finish() in to return in previous activities like C>B>A? -

technically have mainactivity "a" then i'll go next activity activity "b" there other activity activity "c" but when use finish, activity b , c returns each other instead backing main activity when route activity b c, , pressing c b , a. don't need use finish() anywhere. because android maintain stack button. automatically push activities , pop activities when back. refer : https://developer.android.com/guide/components/tasks-and-back-stack.html

php - codeigniter global array for a model -

in controller want declare global variable fetch areas db currently i'm passing $data['dropdowns'] in methods in class { $data['dropdowns']=loading other model method $this->load->view('commons/header',$data); } { $data['dropdowns']=loading other model metod $this->load->view('commons/header',$data); } { $data['dropdowns']=loading other model metod $this->load->view('commons/header',$data); } { $data['dropdowns']=loading other model metod $this->load->view('commons/header',$data); } the thing want send $data['area'] views without having declare again , again in each method $data['area']= $this->area_model->get_all_locations(); you want add global variable , per suggest use global function use using send parameter, please check below code. note : please load model in application/config/autoload.php file this simple demo : ...

Trying to get property of non-object in action column in yii2 -

Image
i've customized query in framesearch model , build query findbysql. i'm trying customize action column. gridview looks fine except action column. getting error - framesearch model code - <?php namespace frontend\modules\framestock\models; use yii; use yii\base\model; use yii\data\activedataprovider; use frontend\modules\framestock\models\frame; use frontend\modules\framestock\models\poitemframe; use yii\db\query; use yii\db\command; /** * framesearch represents model behind search form `frontend\modules\framestock\models\frame`. */ class framesearch extends frame { public $purchase; /** * @inheritdoc */ public function rules() { return [ [['f_id'], 'integer'], [['f_brand', 'f_name','purchase'], 'safe'], ]; } /** * @inheritdoc */ public function scenarios() { // bypass scenarios() implementation in parent class ...

sql server 2014 combining data with column name -

i have table this customerno | 8-10 | 10-12 | 12-14 | 14-16 | 16-18 | 18-20| 1 null null thursday null null null 2 friday null null null wednesday monday i want table based on above table customerno | monday(8-10)| monday(10-12)| monday(12-14) | |friday(18-20) 1 false false false false 2 false false false false true if customer called on time , day how should that? its long code, not find other way so: declare @customer table ( customerid int, [monday(8-10)] varchar(10),[monday(10-12)] varchar(10),[monday(12-14)] varchar(10), [monday(14-16)] varchar(10),[monday(16-18)] varchar(10),[monday(18-20)] varchar(10), [tuesday(8-10)] varchar(10),[tuesday(10-12)] varchar(10),[tuesday(12-14)] varchar(10), [tuesday(14-16)] varchar(10),[tuesday(16-18)] varchar(10),[tues...

c# - Unit Testing using Moq and Autofac -

i have following logger logger class , want know best unit testing it. some observations: i needed create interface ifilewrapper in order break dependency system.io dependency , been able user dependency injection (autofac) i able unit testing method filewrapper.writelog implementing ifilewrapper using memorystring if wanted test expected behavior inside method won't able (e.g: throwing exceptions, incorrect path , filename, etc.) /// <summary> /// creates instance of type <see cref="filelogger"/> /// </summary> /// <remarks>implements singleton pattern</remarks> private filelogger() { filename = string.format("\\{0: mmm dd, yy}.log", datetime.now); path = environment.currentdirectory; filewrapper = containerbuilderfactory.container.resolve<ifilewrapper>(); } /// <summary> /// log <paramref name="message"/> in <paramref name="path"/> specified. /// <paramref na...

php - Wordpress URL direct to another root directory -

good day friends, ask assistance on configuring wordpress. i create link user can access web application using url provided below. for example. mydomain.com - wordpress mydomain.com/application/ - web application thank in advance. just put application folder inside wordpress web application folder wp-admin , wp-content etc

java - Android: texture shows up as solid color -

Image
i'm attempting texture show on on square made triangle fan, texture made canvas. main color yellow , smaller box drawn inside of it, final texture solid yellow. yellow square no texture (picture) fragment shadder: public static final string fragmentshadercode_textured = "precision mediump float;" + "varying vec2 v_texcoord;" + "uniform sampler2d s_texture;" + "void main() {" + //"gl_fragcolor = vcolor;"+ " gl_fragcolor = texture2d( s_texture, v_texcoord );" + "}"; texture generation: public static int loadgltexture(string s){ rect r = new rect(); threaddat.get().paint.gettextbounds(s, 0, 1, r); //get string dimensions, yeilds 8x9 pxls bitmap bitmap = bitmap.createbitmap(bestsize(r.width()),bestsize(r.height()), bitmap.config.argb_8888); //example size 16x16pxls log.i...

r - Repeating the same command for x number of times -

this question has answer here: r: read multiple files , label them based on file name 1 answer i trying repeat same command x number of times, simple example read files same names different years 10 times, can this yr2001detail<-read.csv("e:/yr2001detail.csv",stringsasfactors = false,header=true ) yr2002detail<-read.csv("e:/yr2002detail.csv",stringsasfactors = false,header=true ) yr2003detail<-read.csv("e:/yr2003detail.csv",stringsasfactors = false,header=true ) yr2004detail<-read.csv("e:/yr2004detail.csv",stringsasfactors = false,header=true ) yr2005detail<-read.csv("e:/yr2005detail.csv",stringsasfactors = false,header=true ) yr2006detail<-read.csv("e:/yr2006detail.csv",stringsasfactors = false,header=true ) yr2007detail<-read.csv("e:/yr2007detail.csv",stringsasfactors = fal...

wordpress - Change publish date from meta date when publish post -

when post publish, want publish date same date in meta data, imic_sermon_date. here's code. problem stuck when publishing post. function update_sermon_date ($post_id) { //automatically change publish date sermon date when publish/save postfunction update_sermon_date ($post_id) { $sermon_date = get_post_meta($post_id, 'imic_sermon_date', true); $mypost = array ( 'id' => $post_id, 'post_date' => $sermon_date); wp_update_post( $mypost ); } add_action ('save_post', 'update_sermon_date'); can me this? thanks. after searching online, i've fixed code. the code update when post edited. added remove_action , add_action in order prevent code running endless loop. ****//automatically change publish date sermon date when publish/save post function update_sermon_date () { if (defined('doing_autosave') && doing_autosave) return; if ( !current_use...

git - How to configure Selenium+GitHub+Jenkins -

Image
i trying configure selenium+github+jenkins, unable it. able configure selenium + jenkins not github. i want run selenium scripts when new push committed git-hub , jenkins should execute scripts. i searched on internet didn't solution. if required more information on please let me know. if github repository private, you'll need specify ssh key jenkins server connect with. you'll configure project pull down source repository then you'll modify recurrence of building. in case, since want build on push, way i'm familiar it, specifying "poll scm" option in build triggers . in example above, polling github, change, every minute. can learn more post on jenkins cron here as far running test, there many way can that, if using build system ant or maven, this'll trivial. in build steps , you'll execute top level maven, , specify option. (usually mvn test )

mysql - How to Fix the Error Establishing a Database Connection in webuzo -

Image
i have cloud server nginx ubuntu 16.04 installed webuzo , when add scripts automatic see message following errors found : the mysql connection not established. mysql connection not established. ~~~ have root screenshot :

java ee - Hibernate use openConnection inside Transaction and use getCurrentSession outside of Transaction -

i learning hibernate recently, gives me lot of headache, have been using datasource.getconnection while in application, learning session concept in hibernate quite difficult. can't find enough information or confirmed information api/doc too. i have read through this . understand if have container managed transaction (i using hibernatetransactionmanager , spring's transactional annotation), of time, supposed use getcurrentconnection (inside transaction), in return me connection bound transaction context. but sometime have use other people method/code/library/framework possibly inside using openconnection (i not able change code), know, consequence of doing this? connection obtained in way same session getcurrentconnection (since called inside transaction)? or different? if different, bind transaction , managed transaction too? while "managed by" meaning, transaction context set auto-commit false , upon transaction.commit , transaction commit changes (...

java - Send an Array with an HTTP Get -

how can send array http request? i'm using gwt client send request. that depends on target server accepts. there no definitive standard this. see a.o. wikipedia: query string : while there no definitive standard, web frameworks allow multiple values associated single field (e.g. field1=value1&field1=value2&field2=value3 ). [4] [5] generally, when target server uses strong typed programming language java ( servlet ), can send them multiple parameters same name. api offers dedicated method obtain multiple parameter values array. foo=value1&foo=value2&foo=value3 string[] foo = request.getparametervalues("foo"); // [value1, value2, value3] the request.getparameter("foo") work on it, it'll return first value. string foo = request.getparameter("foo"); // value1 and, when target server uses weak typed language php or ror, need suffix parameter name braces [] in order trigger language return array of v...

vba - Web scraping - create object for IE -

Image
sub get_data() set ie = createobject("internetexplorer.application") ie.visible = true ie.navigate "http://www.scramble.nl/military-database/usaf" while ie.busy application.wait dateadd("s", 1, now) loop sendkeys "03-3114" sendkeys "{enter}" end sub the code below searches keyboard typed value 03-3114 , gets data in table. if 'd search value in cell a1 , scrape values table "code, type, cn, unit" in cell range ("b1:e1") should do? you using sendkeys highly unreliable :) why not find name of textbox , search button , directly interact shown below? sub get_data() dim ie object, objinputs object set ie = createobject("internetexplorer.application") ie.visible = true ie.navigate "http://www.scramble.nl/military-database/usaf" while ie.readystate <> 4: doevents: loop '~~> id of textbox want output ie.document.getelementbyid(...

php - Is it good to rewrite your old db migration for unused column in your table? -

removing unused code practice. db migrations script file exception in practice? i have maintain laravel application , i'm in process of cleaning unused code , found out have lots migrations scripts. migration includes adding , dropping table columns. anyone have encountered same situation? thanks! if migration not affect on database, fine remove them. but, if affect, little part adding/removing (same or different) columns, changing types ... current data if in production ; otherwise, refactoring before production good.

iis - appcmd.exe to overwrite a single site's entire xml config (applying the settings to a site that already exists) -

i don't want delete , recreate site want able apply entire config , override settings different. i backed site config %windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml this command throws error: appcmd.exe add site /in < c:\sites.xml error ( message:failed add duplicate collection element "mysite". ) do have break out of iis configuration separate appcmd commands or there way apply entire xml in 1 shot , have override settings? i want have single xml template can push out webservers hosting site. you should try shared config http://www.iis.net/learn/manage/managing-your-configuration-settings/shared-configuration_264 regarding: error ( message:failed add duplicate collection element "mysite". ) it seems can not add website exist. why dont delete , add again new configurations? you can try modify relevant sections.

playframework - Use WSClient in scala app (play framework) -

i'm not sure if there's basic i'm missing, can't figure out how use wsclient . i've seen of examples saying need pass wsclient class dependency, i've done, when run program pass class? for example, class signature is: class myclassname(ws: wsclient) but when instantiate class pass it? i'm happy ignore play! framework stuff if makes easier , use sbt run (which i'm more familiar with). it's unclear where might using wsclient , recommended let play framework 'manage' instance of client. when instantiate application, gets injected: class application @inject() (ws: wsclient) extends controller { ... } what means inside ... have access ws value. can instantiate myclassname using it: class application @inject() (ws: wsclient) extends controller { val myclass = myclassname(ws) // passes injected wsclient myclassname } or can write function returns wsclient , other area of code can call application object object ha...

python - cherrypy.request.body.read() unable handling Windows line breaks? -

i have file following content: foo,foo,foo,^mbar,bar,bar, (vim representation, ^m windows line break) submitting file cherrypy , reading ( cherrypy.request.body.read() ) afterwards prints bar,bar,bar shouldn't print whole file or doing wrong?

Access Form - how do I only display fields and cell values if the cell has data? -

could please me configuring access database? use combo-box @ top of form user selects available work forms (column 1 in table) , displays involved in form. displays every field , reduce information displayed display information if cell has value in it. am using wrong tool? should using report instead? how's table data, much? many thanks my current form my wanted result the way hide empty fields change label field control , set control source following: =iif([fieldname]<>'', "my label:", null) then set canshrink property on both "label" , field yes. finally make sure section it's in (typically detail may have reason use other) has canshrink set yes. when stack controls on top of each other in manner should result posted. note: works reports or if print results of form. if not intend allow entry of data form better served report.

javascript - Issue displaying data in angular model -

i have created dropdown using ng-repeat looks this: <div ng-show="editconfig" class="input-group" theme="bootstrap" style=""> <label class="config-row-element ">product type</label> <select class="dropdown-menu scrollable-menu form-control config-dropdown" style="" ng-model="event.etype" id="etype"> <option value="" selected disabled>select product</option> <option ng-repeat="etype in etypes" ng-value="etype[0]">{{etype[1]}}</option> </select> </div> in controller, of etypes contained in array each etype contains 2 items: 1 name selection must stored in on backend , 1 display name. looks this: $scope.etypes = [['gif','gif booth'], ['photo','photo booth'], ['ipad', 'ipad'], ['video...

powershell - 7 zip command line equivalent to the explorer extension -

Image
i looking 7-zip command line call equivalent explorer extension option of add "foldername.zip" : i have tried: & 7z c:\path\to\secondattempt, c:\path\to\secondattempt.zip and following 7-zip [64] 16.02 : copyright (c) 1999-2016 igor pavlov : 2016-05-21 command line error: unsupported command: c:\path\to\secondattempt, does know command line equivalent of explorer extension 7-zip? fo 7zip should correct syntax . .\7z.exe c:\path\to\secondattempt.zip "c:\path\to\secondattempt" but prefer use directly .net add-type -assemblyname system.io.compression.filesystem [system.io.compression.zipfile]::createfromdirectory("c:\path\to\secondattempt","c:\path\to\secondattempt.zip")

Python filtering strings -

i´m trying make python script rename subtitles file (.srt) filename of video file corresponding episode, when open in vlc subtitles loaded. so far i´ve succeeded in getting file names videos , subs strings on 2 separate lists. need somehow pair video string of episode 1 subtitle corresponding same episode. i´ve tried in lots of differents ways always,most regular patterns, none has worked. here´s example of code : import glob videopaths = glob.glob(r"c:\users\tobia_000\desktop\bbt\video\*.mp4") subspaths = glob.glob(r"c:\users\tobia_000\desktop\bbt\subs\*.srt") #with glob sort filenames of video , subs in separate variables ep1 = [] ep2 = [] ep3 = [] #etc.. this how videopaths , subspaths variables files have. dont have them yet. videopath = ["the.big.bang.theory.s05e24.hdtv.x264-lol.mp4", "the.big.bang.theory.s05e19.hdtv.x264lol.mp4", "the.big.bang.theory.s05e21.hdtv.x264-lol.mp4"] subspath = ["the big bang the...

"Modernized" OAUTH, WebView no more, impact? -

this in reference to: https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html which asks post questions on stack overflow under #google-oauth. two questions developer of email app android. there users have more 1 gmail account, , don't want have add of them system settings. for accounts present in system settings, use google play services, works every time, that's not scenario i'm discussing. for accounts not present there, use webview open https://accounts.google.com/o/oauth2/auth , goes there. 1: can please clarify "new oauth clients" means here? new installs of existing apps (using webview)? or brand new apps? what "user facing notices" going like? 2: what android devices don't have chrome installed? not do, , believe needs android 4.1 whereas app runs on 4.0.3+. does mean owners of these devices going out of luck?

c# - StringBuilder AppendFormat IEnumarble -

i have string builder , list of object , int[] values = new int[] {1,2}; stringbuilder builder = new stringbuilder(); builder.appendformat("{0}, {1}", values ); i see intellisense error none existing arguments in format string why seeing error ,and how should use list parameters inside appendformat the overload of appendformat using (or compiler decided use) has following signature: public stringbuilder appendformat(string format, object arg0) it expecting single argument , therefore format contains 2 arguments ( "{0}, {1}" ) invalid. your intention pass array multiple arguments, overload need use following: public stringbuilder appendformat(string format, params object[] args) note second argument object[] , not int[] . make code use overload, need convert int array object array this: builder.appendformat("{0}, {1}", values.cast<object>().toarray());

javascript - ReactJS: I have a click handler that is skipping the first props method -

import react 'react'; import reactdom 'react-dom'; import axios 'axios'; var mode=[ 'recent', 'alltime']; class header extends react.component { constructor(){ super() } render(){ return <h2>free code camp leader board</h2> } } class leader extends react.component { constructor(props){ super(props) this.state = { users: [], val: props.m } } componentwillreceiveprops(props){ this.setstate({val: props.m}) this.ajax(); } componentwillmount() { this.ajax(); } ajax(){ this.serverrequest = axios.get("https://fcctop100.herokuapp.com/api/fccusers/top/"+this.state.val) .then((result) => { console.log(result.data); var leaders = result.data; this.setstate({ users: leaders }); }); } componentwillunmount() { this.serverrequest.abort(); } rende...

visual studio 2013 - VS2013 TypeScript error MSB6006: "tsc.exe" exited with code 1 -

i have web project typescript files started receiving error message: c:\program files (x86)\msbuild\microsoft\visualstudio\v12.0\typescript\microsoft.typescript.targets(95,5): error msb6006: "tsc.exe" exited code 1. 1> 1>build failed. i have no idea why started. please help this question solved in... see these posts: https://stackoverflow.com/a/41053281/1780318 "tsc.exe" exited code 1 "tsc.exe" exited code 1 when using asp.net 4 mvc

opencart2.x - Opencart translate module -

where im can find file translate words ? check checkout.php , shipping.php screen to edit estimate shipping & taxes, country, region / state, post code text go catalog/language/english(your language)/checkout/shipping.php (for oc version 2.0.3.1 , below oc versions) go catalog/language/english(your language)/total/shipping.php (for oc version 2.1.x) you can see following code present $_['heading_title'] = 'estimate shipping &amp; taxes'; $_['entry_country'] = 'country'; $_['entry_zone'] = 'region / state'; $_['entry_postcode'] = 'post code';

applet - Install cap file in card with error 6985 -

Image
i want install applet on card. generated cap file in eclipse java card tool menu , generate script option. used gpshell.exe install applet. card supports java card platform 2.2.1 eclipse generates cap file java card platform 2.2.2 did steps in link enter link description here recompile applet 2.2.1 i'm not sure did successful.is solotion recompile applet jdk 2.2.1 eclipse? i run gpshell scripts install applet: step install load executed successful load -file test.cap error 6985. i send result i can not use eclipse generat cap file version 2.2.1 can jcisde (java cos)

python - How to provide image to Tesseract from memory -

i'm using tesseract ocr on millions of pdfs, , i'm trying squeeze out performance can. my current pipeline uses convert convert pdf png files (one per page), , uses tesseract on each of those. during profiling, i've discovered lot of time spent writing files disk, reading them again, i'd move of memory. i've got pdf png conversion working in memory, need way pass in-memory blob tesseract instead of giving path file? haven't been able find documentation or examples of this? you can use pytesseract . it's python wrapper google tesseract. usage: image = ... # read image memory result = pytesseract.image_to_string(image, lang="eng")

javascript - Move HTML children elements out of parent and remove the parent element -

trying move children outside of parent remove parent in vanilla javascript. current code looks this: <div class="parent"> <div class="child"></div> <div class="child"></div> </div> desired output: <div class="child"></div> <div class="child"></div> try setting outerhtml property innerhtml property. const parent = document.queryselector('.parent') parent.outerhtml = parent.innerhtml see live demo: console.log('before change: ', document.queryselector('.container').innerhtml) const parent = document.queryselector('.parent') parent.outerhtml = parent.innerhtml console.log('after change: ', document.queryselector('.container').innerhtml) <div class="container"> <div class="parent"> <div class="child"></div> <div class=...

Expression of type scala.collection.Set[scala.Predef.String] doesn't conform to expected type scala.Predef.Set[scala.Predef.String] -

i'm relatively new programming , enjoying using scala teach myself. i've come across problem can't seem wrap head around. here snippet of code i'm trying work on. maps used mutable.map[string, any] def createcompletevoterset(): set[string] = { val firstset = concedevotermap.keyset.diff(votermap.keyset) val secondset = emotevotermap.keyset.diff(votermap.keyset) val thirdset = speedvotermap.keyset.diff(votermap.keyset) var finalset = votermap.keyset ++ firstset ++ secondset ++ thirdset return finalset } the error gives me is: expression of type scala.collection.set[scala.predef.string] doesn't conform expected type scala.predef.set[scala.predef.string] i'm sure find way force same type, possibly toset(), i'm confused error is. give me insight on why error happening , point me in right direction safe way fix it? because there no import set , set[string] means scala.predef.set ( scala.predef._ imported automatically in scala files)...

http - Error 500 in uwsgi routing -

i'm using uwsgi provide access nested directory structure "flat" urls - example file /var/files/f/foo can accessed via http://site/files/foo . i've accomplished using --route "^/files/(.)(.*)\$ static:/var/files/\$1/\$1\$2" . this setup works fine when requested files exist, server closes connection , logs http error 500 when requests nonexistent file. can configured return meaningful? i tried adding --route "^/files/.* return:404" , nothing changed.

Increase number of partitions in a Kafka topic from a Kafka client -

i'm new user of apache kafka , i'm still getting know internals. in use case, need increase number of partitions of topic dynamically kafka producer client. i found other similar questions regarding increasing partition size, utilize zookeeper configuration. kafkaproducer has kafka broker config, not zookeeper config. is there way can increase number of partitions of topic producer side? i'm running kafka version 0.10.0.0. as of kafka 0.10.0.1 (latest release): manav said not possible increase number of partitions producer client. looking ahead (next releases): in upcoming version of kafka, clients able perform topic management actions, outlined in kip-4 . lot of kip-4 functionality completed , available in kafka's trunk ; code in trunk of today allows client create , delete topics. unfortunately, use case, increasing number of partitions still not possible yet -- in scope kip-4 (see alter topics request ) not completed yet. tl;dr: next ver...

swift - Parse/Heroku and Cocoapods -

i'm new ios developing , started working on project parse starter project connected heroku. project, downloaded cocoapods. i'm bit confused , hoping can clarify me. every time work on project, have connect using terminal heroku. have connect every time want use/work on cocoapods libraries? (i downloaded stripe via cocoapods). or connect heroku? i'm bit confused , hope can explain me better. thank you! the short answer no . explain. cocoapods cocoapods dependency manager ios (both swift , objective-c projects) , relevant ios client project. need use cocoapods each time add new dependency podfile example if added line pod 'parse' podfile need go terminal, navigate ios project , run pod install in order add parse ios dependency. heroku heroku deploy server side code. because use parse-server can deploy heroku , after deploy can access ios app because idea of parse server expose relevant backend functionality (e.g. api's, cloud code, push ...

apache - Cannot login with wp-cli generated user wordpress behind reverse proxy -

hello fellows have made custom wordpress image located there: https://github.com/ellakcy/wordpresswithplugins and on entrypoint script using wp-cli in order generate custom user in order preinstall plugins. cannot login control panel generated user wp-cli. do have idea how fix it? the entrypoint of script following: https://github.com/ellakcy/wordpresswithplugins/blob/master/docker-entrypoint.sh i run containers these commands: (for development purpose) docker run --name wpdb -e mysql_root_password=1234 -d mariadb docker run --name mywordpress --link wpdb:mysql -p 8080:80 -ti wp and using apache reverse proxy in order access wordpress running in mywordpress container: <virtualhost *:80> proxypass / http://172.17.0.3/ proxypassreverse http://172.17.0.3/ / </virtualhost> (in place of 172.17.0.3 can ip of container running wordpress) edit 1 i managed login setting network: docker network create --subnet="172.19.0.0/16" wordpres...

css - Sticky Div within Container - no overlap with footer -

i using jsfiddle: jsfiddle in site, getting following error: uncaught typeerror: cannot read property 'top' of undefined the line breaks of jsfiddle: var sidebartop = $sidebar.position().top; what reason? just give idea of trying solve. have div in top of page, , set position fixed. when user scroll bottom of page, div overlaps footer. need to stop (stick) div in place , not go more bottom once passes point it's not breaking on either jsfiddle or on side. there might possibility write js script before html loaded. try write js/jquery code @ end after html page. refferences javascript on bottom of page?