Posts

Showing posts from January, 2012

wordpress - Woocommerce switch language on order completed mail -

i'm using woocommerce + wpml , set programmatically email order completed. i'm trying using $sitepress->switch_lang() seems not work. add_action( 'woocommerce_order_status_completed', 'mysite_woocommerce_order_status_completed' ); function mysite_woocommerce_order_status_completed($order_id) { global $sitepress; $sitepress->switch_lang('en', true); if($sitepress->get_current_language() == 'en') { $mailer = wc()->mailer(); $recipient = 'customer@mail.com'; $subject = 'your order has been completed'; $content = get_processing_notification_content_completed( $order, $subject, $mailer ); $headers = "content-type: text/html\r\n"; $mailer->send( $recipient, $subject, $content, $headers ); } } function get_processing_notification_content_completed( $order, $heading = false, $mailer ) { $template = 'emails/customer-completed-order.php&#

c++ - Run python scripts (different python verions) with one C program -

i want run few python scripts in threads small c/++ program, need different python versions run these scripts, because package mysqldb isn't working in python3 , packages aren't available in python2. #include <stdio.h> #include <python2.7/python.h> #include <python3/python.h> void main(int argc, char *argv[]) { file* file; py_setprogramname(argv[0]); py_initialize(); pysys_setargv(argc, argv); file = fopen("myscript.py","r"); pyrun_simplefile(file, "myscript.py"); py_finalize(); return; } or via system ("python2.7 myscript1.py arg1 arg2"); system ("python3 myscript2.py arg1 arg2"); do have ideas or way solve problem? you can use system() call execute python scripts, there no need of specifying version of python executable on command line. you can use shebang. use #!/usr/bin/python3 first line scripts want run python3 , #!/usr/bin/python2 in scripts

Wordpress/Woocommerce checkout page 500 error -

im getting 500 error page on woocommerce store checkout page. noticed when cart empty there no error, when add products in it the address https://www.belizajec.si/webshop/checkout/ when debug mode enabled error notice: register_sidebar called incorrectly. no id set in arguments array "translator header" sidebar. defaulting "sidebar-1". manually set id "sidebar-1" silence notice , keep existing sidebar content. please see debugging in wordpress more information. (this message added in version 4.2.0.) in /home/apartkri/public_html/webshop/wp-includes/functions.php on line 4137 fatal error: class 'wc_gateway_paypal' not found in /home/apartkri/public_html/webshop/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php on line 105 thanks did update woocommerce 3.0? make sure theme using compatible woocommerce 3.0. if it's plugin using paypal disable first , see if thats 1 causing issue. seems incompatibility.

iis - How to change localhost to custom url for a project in visual studio? -

i working on outlook web addin (owa) project , downloaded sample project internet showing basic information of selected email. email information showing in .html page , .html page showing in iframe of owa. till point , can see details , handled project downloaded. now our main requirement when user clicks on "inbox" need capture event , something. problem facing owa running in different domain , .html page running using visual studio running in different domain. don't have control on owa , if iframe page , main page both not in same domain can't execute js code parent page elements. owa url: https://inexyz.customdomain.com/owa/#path=/mail iframe url: https://localhost:12345/messageread.html the problem facing how can run addin project incustomdomain.com. if host on local iis while debugging how can append messageread.html page url iframe? there way change localhost:12345 customdomain.com while debuggin using visual studio. to resolve above problem tried

html - Detect CSS class in a page and write if/else in PHP -

i have page need detect css class , apply if/else statement using php. how do that? html <body> <div class="insights"> hello world </div> </body> what php code detect , find "insights" class exists , show "yes, exists". if there's no class of name show "no, doesn't exists." how should achieve this? a simple solution use strpos $contains = str($html, 'class="insights"') !== false; a more complex , robust solution be, use regular expression following class="[^"]*\binsights\b[^"]*" this used in php this $contains = (bool) preg_match('/class="[^"]*\binsights\b[^"]*"/', $html);

android - Can I share images on Twitter without Twitter app -

i'm trying share image on twitter app. i'm using tweetcomposer in code share image on twitter share text not image. not given error or exception. so, want confirm possible share image on twitter without app? yes can share images or links on twitter without application use code.first add socialauth 4.4.jar file in library , then private socialauthadapter socialauthadapter; if (utils.isonline(activity)) { // initialize socialauthadapter responselistener pd = progressdialog.show(activity, null, null); socialauthadapter = new socialauthadapter(new responselistener( share)); // add twitter set provider post on twitter socialauthadapter.addprovider(socialauthadapter.provider.twitter, r.drawable.twitter); // line authorize start socialauthadapter.authorize(activity, socialauthadapter.provider.twitter);

ios - Is it possible for a button to open into a specific tab when using the Tab Bar Controller? -

Image
the question little confusing articulate image little more helpful. here's setup: so, want first view button open firstviewcontroller , , want second view button open secondviewcontroller . if link second view button secondviewcontroller this: i lose tab navigation. , if connect button tabviewcontroller this: then automatically open firstviewcontroller . unless i'm missing something, seems need done little code cannot seem find explains how this. thank you! create storyboard segue viewcontroller tabbarcontroller identifier. assign selelctedindex value of tabbarcontroller in prepareforsegue method @ibaction func firstbtnaction(_ sender: any) { (sender as! uibutton).tag = 0 performsegue(withidentifier: "tabbar", sender: sender) } @ibaction func secbtnaction(_ sender: any) { (sender as! uibutton).tag = 1 performsegue(withidentifier: "tabbar", sender: sender) } override func prepare(for segue: uistoryboard

Spring Data JPA Specification with Generics -

i build filterable datagrid using spring data jpa , specifications.general use of specificationsin way public class userspecification implements specification <user> { @override public predicate topredicate (root<user> root, criteriaquery<?> query, criteriabuilder builder) } but want use specifications in generic types. can use in such structure public class userspecification implements specification <t> { @override public predicate topredicate (root<user> root, criteriaquery<?> query, criteriabuilder builder) }

mercurial - Easy way to setup hgflow for PyCharm -

is there comfortable way use hgflow in pycharm? plugin or custom menu items run "hg flow ..." commands? i know can use cli or operations myself following hgflow using standard set of vcs button, i'm looking more easy way use hgflow in pycharm.

c# - Code to play audio client side (JSON.NET) -

i have installed json.net framework in visual studios c# emulator runs game accessible via browser users around world can play game want them hear audio upon executing command. i don't know javascript therefore i'm hoping can comment code can play audio via .mp3 / wav file (client side). for example game club penguin accessible via browser , have audio client side other penguins can hear it. if audio server side user have download emulator in order hear it. in case users not downloading playing game.

jquery - Image Upload And Crop -

i using js cropper crop image. before using functions upload image when click on brows. in file element. fresher don't know it. when uploading image first time works fine after going wrong. not able understad. function checkfunction() { $("#upload").change(function() { var file = this.files[0]; var imagefile = file.type; var match= ["image/jpeg","image/png","image/jpg"]; if(!((imagefile==match[0]) || (imagefile==match[1]) || (imagefile==match[2]))) { return false; } else { var form_data = new formdata(); form_data.append("file", file) $.ajax({ type: 'post', url: 'upload.php', datatype: 'script', cache: false, contenttype: false, processdata: false,

java - EhCache Spring XML integration namespace -

i'd use ehcache spring. i've followed tutorial said add line spring.xml: <ehcache:annotation-driven cache-manager="ehcachemanager" /> the problem ehcache namespace not present in tutorial. looking on google i've found out following spring configuration: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring

apache spark - How to unnest array with keys to join on afterwards? -

i have 2 tables, namely table1 , table2 . table1 big, whereas table2 small. also, have udf function interface defined below: --table1-- id 1 2 3 --table2-- category b c d e f g udf: foo(id: int): list[string] i intend call udf firstly corresponding categories: foo(table1.id) , return wrappedarray, want join every category in table2 more manipulation. expected result should this: --view-- id,category 1,a 1,c 1,d 2,b 2,c 3,e 3,f 3,g i try find unnest method in hive, no luck, me out? thanks! i believe want use explode function or dataset's flatmap operator . explode function creates new row each element in given array or map column. flatmap operator returns new dataset first applying function elements of dataset, , flattening results. after execute udf foo(id: int): list[string] you'll end dataset column of type array . val fooudf = udf { id: int => ('a' ('a'.toint + id).tochar).map(_.tostring) } // table1 fooudf appl

Cloud Functions for Firebase trigger on time? -

i looking way schedule cloud functions firebase or in other words trigger them on specific time. there no built-in runat/cron type trigger yet. for moment, best option use external service trigger http function periodically. see sample in functions-samples repo more information. i highly recommend reading post on firebase blog: how schedule (cron) jobs cloud functions firebase , video: timing cloud functions firebase using http trigger , cron .

c++ - AOSP GDB doesn't import python pretty printer for stl -

i run gdb pretty printers of python stl debugging. but gdb shows "python scripting not supported in copy of gdb." below information of gdb use $show version gnu gdb (gdb) 7.7 (gdb) show configuration gdb configured follows: configure --host=x86_64-linux-gnu --target=arm-linux-android --with-auto-load-dir=$debugdir:$datadir/auto-load --with-auto-load-safe-path=$debugdir:$datadir/auto-load --with-expat --with-gdb-datadir=/tmp/ndk-xur/build/toolchain/prefix/share/gdb (relocatable) --with-jit-reader-dir=/tmp/ndk-xur/build/toolchain/prefix/lib/gdb (relocatable) --without-libunwind-ia64 --without-lzma --with-separate-debug-dir=/tmp/ndk-xur/build/toolchain/prefix/lib/debug (relocatable) --with-zlib --without-babeltrace aosp gdb location ./prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gdb can let me know how gdb running python script in

mysql - SQL syntax; check the manual that corresponds to your MariaDB server version - delete query -

i can't tell wrong here, have tried replacing id = '$id' , still not working. removing clause makes works fine. id variable not have problem has it's value. can me figure out? thanks $id = $_get['id']; $status = $con->exec("update wine set confirmstatus = 'confirmed' id = '".$id."' "); try without enclosing $id - value within ' ' : $status = $con->exec("update wine set confirmstatus = 'confirmed' id = ".$id); if works, please still consider gordon's comment regarding using parameters...

Can someone help me with the Sublist Predicate (Prolog)? -

i want implement predicate sublist1(i1,i2,l,sub) takes list l , returns sub includes elements of l index i1 index i2. code gives me false time . idea what's wrong? sublist1(0,0,[h|t],[h|sub]). sublist1(i1,i2,[h|t],sub):- i1 =0, i2>=i1, i2-1, sublist1(i1,i,t,[h|sub]). sublist1(i1,i2,[h|t],_):- i1>0, i2>i1, ii1 i1-1, ii2 i2-1, sublist1(ii1,ii2,t,_). algorithmically, should work : % sublist 0 0 should return [h] list sublist1(0,0,[h|t],[h]). % sublist 0 n should return first element followed sublist 0 n-1 of tail sublist1(i1,i2,[h|t],[h|sub]):- i1 0, i2 > 0, ii2 i2 - 1, sublist1(i1,ii2,t,sub). % sublist of [h|t] i1 i2 should return sublist i1-1 i2-1 of t sublist1(i1,i2,[h|t],sub):- i1>0, i2>i1, ii1 i1-1, ii2 i2-1, sublist1(ii1,ii2,t,sub). edit try online (run execute , write sublist1(2,5,[0,1,2,3,4,5,6,7,8],s). example). use alt+91 [ , alt+93 ]

php - Error header location with MariaDB -

i changed hosting need passing mariadb (php5.6), before had innodb (php5.6). the code in previous hosting worked perfectly, why in host no? code: <?php $risultato = mysql_query("select voto serveryoutube", $connessione); if($mybb->user['uid'] > 0) { if(mysql_query(" update serveryoutube set voto = voto + 1 id = '$id' , not exists (select * serveryoutube_vote uid = '$uid' , date_format(lastvote,'%m%d%y') = date_format(now(),'%m%d%y')); ")) { header("location: ../home.php"); } else { echo "error: " . mysql_error(); } } else { echo 'error'; } mysql_close($con); ?> the query work , set +1 voto see white page , not redirect /home.php

eclipse - Web service maven build jar does not work -

Image
i build web service project in jar can deployed on jboss server. can done if compile .war project, makes 12mo content but in pom.xml when want specify .jar project archive makes 10ko , contains nothing picture here's pom.xml file <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>monwebservicefacility</groupid> <artifactid>monwebservicefacility</artifactid> <version>0.0.1-snapshot</version> <!--<packaging>war</packaging>--> <build> <sourcedirectory>src</sourcedirectory> <plugins> <plugin> <artifactid>maven-compiler-plugin</artifactid> <version>3.5.1</version> <configu

model view controller - Bootstrap date picker field validation error wont disappear when selecting a date -

i'm new bootstrap validation , use help. using bootstrap date picker. here: http://eonasdan.github.io/bootstrap-datetimepicker/ datepicker4 context. below code i'm printing out input field , below jquery code using validate. know i'm doing wrong here don't know what. i'm trying validate based off of class here working text fields date picker not. appreciated! @html.textboxfor(m => m.employment.currentemployer.starttimestamp, format: workhistoryviewmodel.format_dateonly, htmlattributes: new { @id = "datetimepicker4", @class = "sw form-control paydate", @maxlength = "40", @type = "text", @placeholder = "from" }) $(document).ready(function () { $('#datetimepicker4').datetimepicker({ picktime: false, format: 'mm-dd-yyyy' }); $('#contact_form').bootstrapvalidator({ feedbackicons: { //valid: 'glyphicon glyphicon-ok', //invalid: 'glyphicon glyphicon

mobile - How to begin reactjs app development -

i beginner of app development using react js , want know if there ide or tool best. thanks! actually react great can control ! think documentation done read documentation , in youtube there chanel velocity360 provides nice videos react js advice through webpack yarn if possible react good luck akmal

swing - Java UserList not populating correctly upon user registration -

i'm writing basic user registration , login swing application. currently, list has 3 users hardcoded in authenticate when login button clicked. the issue i'm having when go register new user. have debugged , after new user added list registration view, number of elements in list increases 4 should. however, when return login page, number of elements in list 3, users hard coded in - problem. here of code. i'll add if requested. (also, i'm not super concerned security @ point, want working). public class user { private final string username; private final string password; public user(string username, string password) { this.username = username; this.password = password; } public string getcheckable() { return username.tolowercase() + "," + password.tolowercase(); } @override public string tostring() { return this.username + this.password; } public boolean equals(user user) { return this.username.equals(user.username) &&

actionscript 3 - AS3 - Multiple Images Turn On/Off Not Working with Second MovieClip -

ok has been driving me insane. as3 knowledge isn't best in world, i'm trying work out i'm going wrong of this. basically, i'm trying @ times, make visible/invisble 2 different movieclips. the weird thing is, 1 responding. , other isn't. both identical aside jpeg contents , names. there setting i'm missing? both have matched movieclip names , instance names... when use code below, hop1 turns off/on, hop2 refuses to! missing stupidly obvious preference? i mention, i'll have modify code work 2 different movieclips, right want both files turn off! package { import flash.display.movieclip; import flash.events.timerevent; import flash.ui.mouse; import flash.utils.timer; import com.boo.customdate; import com.boo.screensaversimple; public class generic extends movieclip { // can set hour of power time start , end time (in 24 hour format e.g. 1330 1:30pm) // if there no hour of power, set both numbers 0

c# - how to remove spaces and identify multiple spaces and place them in a table data from text file? -

i have huge text tables in text file , able read data inside winform application there irregular data coming inside datagrid. needed table is, datagrid. want catch "*( 3)" data , using number want split data below. plate id column can have n number of id's. according plate id's x-coord , y-coord's added them. how place table data inside datagrid without disturbing it's structure? need re-use data datagrid again. *( 3)car plate coordinates: * no. plate plate no. x-coord y-coord * plate type id coord (in) (in) 2 'ca' 1 5 8.6250 -23.3750 32.6249 -23.3750 46.5983 120.6250 46.5983 120.6250 8.6250 120.6250 'ca' 2 5 8.6250 120.6250 46.5983 120.6250 64.6250 306.3959

javascript - react-rangeslider don't show on bootstrap modal -

i'm trying put slider on bootstrap modal doesn't seems working me: i'm having slider's default values printed on screen. screenshot the slidebar component nested inside of modal component. modal component: import react 'react'; import {modal, button} 'react-bootstrap'; import horizontal './horizontal-slider'; import reactdom 'react-dom'; export default class locationmodal extends react.component{ constructor(props){ super(props); this.state={cordinates: props.cordinates, showmodal:props.showmodal} this.togglemodal = this.togglemodal.bind(this); } togglemodal(){ this.setstate({showmodal:! this.state.showmodal}); } getinitialstate() { return { showmodal: false }; } componentwillreceiveprops(nextprops) { this.setstate({ cordinates: nextprops.cordinates, showmodal:nextprops.showmodal }); } render(){ var coorstring =this.state.cordinates[1]+&

Rails. Rewrite clearance controllers -

i try add js in clearance controllers. users-controllers rewrite ok, sessions , passwords controllers not work. user_controller (work): class userscontroller < applicationcontroller def new end def create @user = user.new(user_params) if @user.save sign_in @user redirect_to root_path else respond_to :js end end private def user_params params.require(:user).permit( :email, :password, ) end end sessions_controller (not work): class sessionscontroller < applicationcontroller def new respond_to :js end def create respond_to :js @user = authenticate(params) sign_in(@user) |status| if status.success? #redirect_back_or url_after_create else respond_to :js end end end end sessions/new.html.slim : = form_for :session, html: {id: 'new_session', class: 'new_session'}, url: session_path, remote: true |f

hortonworks data platform - Storm Topology deployment using pre deployed jar -

we have jar contains 6 topologies. deploy these topologies 6 separate calls using /bin/storm jar $local_jar $topology_class $topology_name $ps_env $zk_quorum -c nimbus.host=$nimbus_host $storm_config_args looking @ log output, each time topology submitted jar uploaded nimbus i.e there 6 lines this 9937 [main] info o.a.s.stormsubmitter - uploaded topology jar assigned location:... i want avoid multiple uploading of jar. have tried uploading jar via scp , placing in @ "uploadedjarlocation" on nimbus node ( once). changing deployment code use following each of topologies. nimbusclient = nimbusclient.getconfiguredclient(storm_conf); client = nimbusclient.getclient(); ... client.submittopology(topologyname, uploadedjarlocation, jsonconf, topology.buildtopology()); this has sped things , seems work fine want ask is safe approach, can safely reference uploadedjarlocation pre-uploaded nimbus via scp? are there alternative methods avoid multiple jar upload?

optimization - Calculate Hessian & Gradient of a function using Python -

Image
i'm implementing unconstrained minimization of 2d functions: for search direction, i'm using both steepest descent , newton descent . for step size, i'm using backtracking line search algorithm the code simple (mainly future reference might find helpful) : function optimize(f, df, hess_f, method) looks this: # prepare contour plot fig = pt.figure() xmesh, ymesh = np.mgrid[-5:5:100j,-5:5:100j] fmesh = f(np.array([xmesh, ymesh])) pt.axis("equal") pt.contour(xmesh, ymesh, fmesh) pt.contour(xmesh, ymesh, fmesh, 250) # initial guess + first update of search direction guesses = [np.array([5, 0.1])] x = guesses[-1] s = search_direction(df, hess_f, x, method) not_done = true while not_done: # calculate step size using backtracking line search: alpha_opt = backtracking_alpha(f, df, 0.5, 0.5, x, s) # update step next_guess = x + alpha_opt * s guesses.append(next_guess) # plot current step our updating contour graph: it_array =

node.js - wit.ai runActions how to handle context in follow-up message -

i'm using node-wit develop chatbot application. working fine mostly, i've run problem use of context. i'm using runactions api : this.witclient.runactions(customer._key, messagetext, witcontext).then((newcontext => {} )).catch(reject); i have defined number of actions, set context. this working fine, long context taking place on 1 message. example, if call action called addproduct : addproduct({sessionid, context, text, entities}) { return new promise((resolve, reject) => { context.product = `mynewproduct'; resolve(context); }); }, it show message using 'product' context key. however, when try use on 2 messages, seems have lost context ( example, when asking multiple choice question, , handling response ). if understand how it's working correctly, node-wit doesn't keep context beyond messages ( assumed @ first because i&

c++ - High Frame Rate Using Flycapture SDK and Qt -

i developing project based on camera application. shold retrieve frames high fps. camera model point grey chamelleon u3 serie. flycapture sdk contains 'retrievebuffer' function frames camera buffer. if use function qtimer, gets frames @ 3-4 fps. reason, should use qthread retrieve images. code here: camera.cpp captureframe *worker1; flycapture2::image image; worker1 = new captureframe(cam, &image); worker1->movetothread(thread1); qobject::connect(thread1, signal(started()), worker1, slot(process1())); qobject::connect(worker1, signal(finished1()), thread1, slot(quit())); qobject::connect(worker1, signal(finished1()), this, slot(startcamera2())); qobject::connect(worker1, signal(finished1()), worker1, slot(process1())); qobject::connect(worker1, signal(finished1()), worker1, slot(deletelater())); qobject::connect(thread1, signal(finished()), thread1, slot(deletelater())); thread1->start(qthread::highestpriority); /*......*/

SQL getting rows that match my condition -

i have simple sql table has following : +---------------------+ | id | mode | value | +---------------------+ | 1 | exclude | 10 | | 2 | include | 10 | | 3 | exclude | 10 | | 3 | exclude | 20 | +---------------------+ so imagine these products. product 1, has values 10. product 2 has value 10 only. product 3 has values 10 , 20. i need sql given value, should return products value valid. e.g. value of 10 should return product 2. value of 30 should return product 1 , 3. tried : select * products ( mode = 'include' , value in( 10) ) or ( mode = 'exclude' , value not in ( 10 ) ) for value 10 example, return 4th row, expected based on sql. how can fix it? want group somehow exclude ones based on id , check values inside ? select distinct p.id products p exists ( select 1 products id = p.id , value = 10 , mode = 'include' ) or not exists ( select 1 products id = p.id , value = 10 , mode = 'ex

sql - Test if anything was updated in dynamic query -

i need construct , execute update statement dynamically. need test whether updated @ all. code follows: declare v_table_name text; v_column_name text; v_debug_flag boolean; v_upd_stmt text; begin select nm_table_name, replace(nm_table_name, 'cdb_', 'id_') strict v_table_name, v_column_name m_entity e id=12; v_upd_stmt := format('update %s set id_lock_usr =null, dt_lock=null %s=$1 returning id_lock_usr', v_table_name, v_column_name); execute v_upd_stmt using p_id; end how know if updated? how know if updated ? various options. in plpgsql function, can check special variable found see if last sql command affected rows. if found ... however, dynamic queries execute use get diagnostics instead. the manual : note in particular execute changes output of get diagnostics , not change found . related: dynamic sql (execute) condition if statement a

odbc - Connecting to Redshift with a .Net application deployed on Elastic Beanstalk -

i need connect redshift db in .net web application. installed required odbc driver on windows machine , working fine. when deploy application elastic beanstalk instance error: error [im002] [microsoft][odbc driver manager] data source name not found , no default driver specified is there configuration can on elastic beanstalk fix this? maybe need use driver? connection string looks this "driver={amazon redshift (x86)};server={0};database={1};uid={2};pwd={3};port=5439;" i have tried both x64 , x86 drivers without success

WPF/XAML Intuitive UserControl -

what steps must done make user control, work in such order: <local:myusercontrol itemssource="{binding items}"> <local:myusercontrol.items> <local:myusercontrol.item name="{binding name}"/> </local:myusercontrol.items> </local:myusercontrol> i know itemssource need create dependencyproperty, part inside myusercontrol. example: look below example how used it. this called myusercontrol <usercontrol> <grid> <itemscontrol itemssource="{binding items}"> <itemscontrol.itemspanel> <itemspaneltemplate> <wrappanel /> </itemspaneltemplate> </itemscontrol.itemspanel> <itemscontrol.itemtemplate> <datatemplate> <button content="{binding name}" margin="3,3,3,3"/>

node.js - Modifying each frame in a GIF with GraphicsMagick in Node -

still learning how use graphicsmagick, if wanted manipulate each image in gif (such adding text in location each image) how go doing that? have split separate image files first , process each 1 , merge them gif? or there simpler way graphicsmagick in memory?

asp.net mvc - jQuery Datatables search textbox -

Image
why search textbox not initialize empty? have tried: table.state.clear(); and have tried: "bstatesave": false, // save datatable state(pagination, sort, etc) in cookie. after use filter, redirect view, create new search, come search results textbox has last string used filter. i'm using mvc5 framework. var inittable4 = function () { var table = $('#sample_4'); table.datatable({ "language": { "aria": { "sortascending": ": activate sort column ascending", "sortdescending": ": activate sort column descending" }, "emptytable": "no data available in table", "info": "showing _start_ _end_ of _total_ records", "infoempty": "no records found", "infofiltered": "(filtered1 _max_ total records)",

javascript - Is it possible to build a standalone HTML5 App *without* bundling a browser? -

solutions such electron require bundling entire browser resulting .app build, causes have several gigabytes single hello world app. users have chrome installed on computers, though. possible create standalone .app application uses existing browser open itself, hiding frames / url bar of browser, , has access system resources (fs, child processes, etc.)? edit: i'm thinking on lines of "bundle node.js + html .app opens existing browser (pointing html) without url bar". node.js can access filesystem , communicate app via http, ws, etc. real problem here opening chrome without url bar, guess. i saw nodekit attempt use javascript engine available on each platform. so example on mac it'll use wkwebview , on windows 10 it'll run on javascript universal apps platform. for though, having test on electron makes developing apps simpler , can have functional app in installer under 40mb.

regex - Regular Expressions: Is there an AND operator? -

obviously, can use | (pipe?) represent or , there way represent and well? specifically, i'd match paragraphs of text contain of phrase, in no particular order. use non-consuming regular expression. the typical (i.e. perl/java) notation is: (?= expr ) this means "match expr after continue matching @ original match-point." you can many of these want, , "and." example: (?=match expression)(?=match too)(?=oh, , this) you can add capture groups inside non-consuming expressions if need save of data therein.

Robotic Process Automation (RPA) Express execution error -

i have installed rpa express , recorded process, when tried playing recording showing execution error " unable connect robot". how can resolved? check bot manager status. probably, it's not started. to start bot manager, open rpa express tray menu , click start in bot manager section. if not help, choose components > restart

python - add a scrollbar to a plot tkinter -

i want add scroolbar window printed. on previous try created scroolbar on different window. want them in same window. code: for in range (0,len(id)): # id numbers points w.create_text(yn[i]*scale, xn[i]*scale, text=id[i]) w.pack() in range(0,62): # lines plotted w.create_line(ln[i]*scale, zn[i]*scale, pn[i]*scale, sn[i]*scale) tk.mainloop()

c# - dot net core System.Xml.XMLNode not found -

what equavalent code in dot net core : type[] typearray1 = new type[] { typeof(xmlnode), typeof(string) }; xmlnode not found in system.xml assembly. i have solved problem. i've added system.xml.xmldocument nuget manager , works. for more detail see this .

d3.js - D3 update tick values without updating the domain -

i have x-axis long tick names, , want provide abbreviations tick values. long tick names used set domain. axiselement = d3.axisbottom(scale) .tickvalues(tickvalues); // these long names when axis first drawn chart.append("g") .attr("class", "bottomaxis") .attr("transform", "translate(0, " + height + ")") .call(axiselement); i first draw axis proper long names looks this , , try update ticks using axis.tickvalues() function in d3. updateticks(tickvalues) { chart.select(".bottomaxis").call(this.axiselement.tickvalues(tickvalues)); } but when d3 draws ticks, uses old domain values in scale (which long names) , messes positioning of abbreviated names. looks this . following error: error: <g> attribute transform: expected number, "translate(nan,0)". which, believe, saying tried translate tick according old domain

WP Job Manager Wordpress Plugin Issue -

i've inherited wordpress site wp job manager plugin in jobify theme. i've figured of out, "apply job" button seems outside form: <aside class="job_listing-widget default-widget"> <div class="job-type full-time term-2">full time</div> </aside> <aside class="job_listing-widget default-widget"> <div class="job_application application"> <input type="button" class="application_button button" value="apply job" /> <div class="application_details"> <div role="form" class="wpcf7" id="wpcf7-f2210-p2560-o1" lang="en-us" dir="ltr"> <div class="screen-reader-response"></div> <form action="/job/salesperson-commission-only/#wpcf7-f2210-p2560-o1" method="post" class="wpcf7-form" enctype="multipart/form-data" novalidate="novalida

java - Log4j terminal logs are executing but No Output file -

while executing application, show logs in eclipse ide's console. it's not writing data on external log file created simple application adding log4j logs. code import org.apache.log4j.logger; public class helloexample{ final static logger logger = logger.getlogger(helloexample.class); public static void main(string[] args) { helloexample obj = new helloexample(); obj.runme("milinda"); } private void runme(string parameter){ if(logger.isdebugenabled()){ logger.debug("this debug : " + parameter); } if(logger.isinfoenabled()){ logger.info("this info : " + parameter); } logger.warn("this warn : " + parameter); logger.error("this error : " + parameter); logger.fatal("this fatal : " + parameter); } } my log4j porperty file bellow log4j.rootlogger=error, stdout log4j.appender.stdout=org.a

postgresql - SQL - Insert valid data based on predefined values -

i have 2 tables city , suburb. postgresql code: create table city ( id uuid primary key, name character varying not null, constraint city_id_key unique (id), constraint city_name_key unique (name) ) create table suburb ( id uuid primary key, city_id uuid not null, name character varying not null, constraint fk_suburb_city foreign key (city_id) references city (id), constraint suburb_id_key unique (id), constraint suburb_name_key unique (name) ) i want create table called address storing city + suburb pairs. here ddl address table: create table address ( id uuid not null, city_name character varying not null, suburb_name character varying not null ) i want make sure redundant copies of information inserted address. here example: i want allow inserting address city_name suburb_name pairs: select c.name city_name, s.name suburb_name city c, suburb s c.id = s.city_id result: a - b - c x - y for data above want allow pairs: a - b - c x

How to turn Detached Head into master in git? -

in case of detached head, how remove commits ahead of detached head , turn detached head master? use git reset command make current branch point commit. specifically, commit id want point to, git checkout master , git reset <id> .

problems with maya python api 1.0 MPxGeometryIterator -

i'm writing custom curve maya python api 1.0 , got stuck mpxgeometryiterator: //error: line 1: typeerror: file ..\maya\openmayampx.py line 1092: in method 'mpxgeometryiterator_isdone', argument 1 of type 'mpxgeometryiterator const*' // inside shape call iterator: def geometryiteratorsetup(self, componentlist, components, forreadonly = false): if components.isnull(): result = asmi.autosplinemovableiterator(self, componentlist) else: result = asmi.autosplinemovableiterator(self, components) return result this have far iterator, maya crashes gets called class autosplinemovableiterator(openmayampx.mpxgeometryiterator): def __init__(self, usergeometry, components): super(autosplinemovableiterator, self).__init__(usergeometry, components) self.geometry = usergeometry self.reset() def reset(self): openmayampx.mpxgeometryiterator.reset(self) self.currentpoint = 0 if self.geometry: m

java - Access Android Module Classes From Core Module Classes in libgdx -

i integrating (libgdx) core module android module compile whole project 1 big project. however, @ end of integration, ran problem didn't think before. i not able access functions in android module core module . however, can access android core. used default libgdx setup.jar create libgdx project android. tried include android module dependency in core module leads error stating error: circular reference between projects: :android -> :core -> :android . thought why not make java module such another_module depends on core module , android module depend on another_module . doing led error stating error:module ':core:1.0' depends on 1 or more android libraries jar . tried making another_module java library error same. now sure there solution this. maybe making interface somehow in android module core module can access. i new this. suggestions, recommendations or solution perhaps? well after tons of research figured out solution problem. can