Posts

Showing posts from April, 2014

Braintree js/php full working example working like Paypal Express Checkout? -

i'm trying understand if it's convenient client switch paypal express checkout braintree, find latter way complicated , hard understand (terrible docs, reference good). documentation lacks complete working examples, pages needed can change api credentials , works. fundamental system/api logic , workflow. i have checkout system customer's data , basket_id, form redirect customer paypal passing these data, , once customer completes payment paypal calls url on server sending data sent plus transaction id, , way mark basket_id/order paid , assign transaction. , no sensitive payment data typed or pass through our server/network. how on braintree js+php? full , complete sandbox working example can change credentials , have working code understand logics? faster reading quite confusing documentation. thanks!

Java -version shows old version of java -

i have jdk 1.7_51 , jre 1.7.79 update. java_home set c:\program files\java\jdk1.7.0_51 , jre_home set c:\program files\java\jre7(update 79) , path points jdk 1.7_51/bin. why java -version doesn't point java 7 79 update? points java 7 update 51. should ideally point jre update 79. when type in command prompt java searches path env variable , first result hits - returns. since pointed path jdk 1.7_51 - that's you're getting. java_home environment variable defined agreed protocol applications uses java. not apply when type in command prompt java -version (or java + other switch).

import project from github into android studio says it's not gradle based project -

as title says, i've imported project i've been working on github android studio. has build.gradle files, , settings.gradle. why it's not gradle based file? am missing needed when pulled github? followed android studio import github option. else have do...? when try gradle sync, tells me project isn't gradle based.

javascript - Chrome extension that modifies response headers -

i working on extension modify response headers. did extension , think modifies header value, problem modified header value not appear in inspect element window (network tab). the headers suppose change set-cookie headers , after code changes value can see new value cookie viewer extension (editthiscookie), behavior of content stays if cookie not modified (content modifies based on cookie value). i attach code below of script , manifest file. manifest.json { "manifest_version": 2, "name": "getting started example", "description": "getting started example", "version": "1.0", "browser_action": { "default_icon": "assets/logo.png", "default_popup": "index.html" }, "background": { "scripts": ["main.js"] }, "permissions": [ "activetab", "webrequest", "we

html - DIV wrapper/centering not working cross browser -

i'm putting 2 divs next each other inside of wrapper. works designed on chrome, looks horrific on both ie , ff. don't know else try i've tried clear:both; in every place can think of , still looks miserable. please help! thank you! the webpage is: http://www.thorelectriclongboards.com/contact.php i not know how of needed, here code webpage: <html> <head> <title>thor electric longboards</title> <link href='http://fonts.googleapis.com/css?family=roboto+condensed' rel='stylesheet' type='text/css'> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"> <link rel="icon" href="img/favicon.ico" type="image/x-icon"> </head> <style> .title { font-weight

linux - Creating named pipes in Java -

i experimenting creating named pipes using java. using linux. however, running problem writing pipe hangs. file fifo = fifocreator.createfifopipe("fifo"); string[] command = new string[] {"cat", fifo.getabsolutepath()}; process = runtime.getruntime().exec(command); filewriter fw = new filewriter(fifo.getabsolutefile()); bufferedwriter bw = new bufferedwriter(fw); bw.write(boxstring); //hangs here bw.close(); process.waitfor(); fifocreator.removefifopipe(fifo.tostring()); fifocreator: @override public file createfifopipe(string fifoname) throws ioexception, interruptedexception { path fifopath = propertiesmanager.gettmpfilepath(fifoname); process process = null; string[] command = new string[] {"mkfifo", fifopath.tostring()}; process = runtime.getruntime().exec(command); process.waitfor(); return new file(fifopath.tostring()); } @override public file getfifopipe(string fifoname) { p

visual studio - Update a nuget package for all projects from a private source -

i need update package package01 , lives in private source , multiple projects in solution version 1.0.1 newest version 1.1.0. if doing update package manager ui, step needs repeated many times. is possible in 1 step? suggestion. you can update package projects in solution package manager ui or package manager console. using manage packages dialog right click solution , select manage packages solution. update package. able update multiple projects in 1 step. you can similar thing package manager console. command below update jquery latest version projects in solution. update-package jquery there more documentation on update-command on nuget web site.

php - Dismiss Bootstrap Badges Notification -

navbar image the badge show number chat notification, want ask how dismiss notification badge if click announcement thank you well didn't share code — it's hard answer question — pretty generic way of hiding jquery this: $("#hide").click(function(){ $(".badge").hide(); }); i'm assuming html looks this <p><a href="#" id="hide">announcement</a><span class="badge">1</span></p>

Deploying Python-django project on Heroku -

i'm trying deploy small test app on heroku, gets pushed heroku master no errors on running app gives application error. checked heroku logs , got following error : **2015-07-11t03:56:03.004853+00:00 app[web.1]: file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 118, in init_process 2015-07-11t03:56:03.048862+00:00 app[web.1]: [2015-07-11 03:56:03 +0000] [3] [info] reason: worker failed boot. 2015-07-11t03:56:03.004854+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2015-07-11t03:56:03.004855+00:00 app[web.1]: file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2015-07-11t03:56:03.004857+00:00 app[web.1]: self.callable = self.load() 2015-07-11t03:56:03.004858+00:00 app[web.1]: file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2015-07-11t03:56:03.004859+00:00 app[web.1]: return self.load_wsgiapp() 2015-07-11t03

python - Cython: have sequence of Extension Types as attribute of another Extension Type with access to cdef methods -

suppose defined following cython class cdef class kernel: cdef readonly double def __init__(self, double a): self.a = cdef public double getvalue(self, double t): return self.a*t now i'd define extension type has sequence of kernels attribute. like: cdef class model: cdef readonly kernel[:] kernels cdef unsigned int n_kernels def __init__(self, kernel[:] ker): self.kernels = ker self.n_kernels = ker.shape[0] cdef double run(self, double t): cdef int cdef double out=0.0 in range(self.n_kernels): out += self.kernels[i].getvalue(t) return out however, doesn't work. first need substitute kernel[:] with object[:] , otherwise following error gcc ‘pyobject’ has no member named ‘__pyx_vtab’ if use object[:] compiles fine error when attempting access getvalue method: attributeerror: "attributeerror: "'cytest.kernel' object has no attribute

html - How to get a request parameters like a associative array -

let have list of text fields. every text field responsible product id, , want know how items should buy. the result parameters should { :1 => 2, :5 => 8 } , means user buy 2 items of product id 1, , 8 items of product id 5. what's expected name attributes of expected input[type="text"] html tags case? let's have <input type="text" name="product<?php echo $product_id; >"></input> you can submit value using jquery var x = $('input[name=\'product' + pid + '\']').val(); // pid product_id on server can use $this->request->get['product'.$pid];//pid product_id

How NOT to combine all CSS into one file with SASS and bootstrap -

i'm relatively new sass , bootstrap. use bootstrap sass , struggle little bit concept. i used css this: 1 base css-file basic layout (eq. base.css). every template includes additionally different css-file (eq. sitemap.css, team.css, news.css). css-files contain parts of respective templates. can overwrite definitions in previous files. in sass compiled in 1 file. in combination bootstrap struggle concept used until now. every time want add new css-file existing definitions, error because have reinclude complete bootstrap structure. if reinclude it, whole bootstrap code gets written additional files (eq. sitemap.css, team.css, news.css) too. if include both files in html-tree, bootstrap definitions (like whole normalize block) gets defined 2 or more times. i have setup: - css |-- source | |-- base.scss | |-- team.scss | |-- vendors | | |-- bootstrap... └-- output |-- base.css └-- team.css in base.scss include bootstrap stuff. need bootstrap stuff in team.scss, no

Can I use rsync to capture diffs from multiple systems against a baseline? -

i've got event coming have many students using laptops work. of systems duplicated baseline image. i'm trying capture data has been changed/modified on systems during event. first thought put timestamp file in baseline image , use 'find --newer timestampfile' generate list of files have changed since baseline created , up. occurred me rsync might able using --backup , --backup-dir options. it's perfect, except 1 thing. also, work based on checksums rather timestamp. in testing set test filesystems on local disk simulate actions. if run like: rsync -cavhp --fake-super --backup --backup-dir=/backup/host1-backup host1-fs baseline-fs it works fine , difference baseline first host directory, subsequent host directories don't work correctly. it's if using checkpoint set first sync. is there way tell rsync not update in baseline directory can rsync changes multiple target hosts against base? thanks, -d some more time rsync , i've figured

How to turn off/reduce console output for PubNub iOS SDK 4.0? -

pubnub ios sdk 4.0 generate lots of console outputs. useful developing pubnub portion crowd out other console output. how turn off/reduce console output? the following tried don't work. [pnlog enabled:no]; [pnlog enableloglevel:pnsilentloglevel]; [pnlog setloglevel:pnsilentloglevel]; so after pubnub objective-c update (version 4.0.2) [pnlog setloglevel:pnsilentloglevel]; would work. other available log level defined in pnstructures.

python - Deleting multiple objects within JSON -

name_list = [{'name': 'john'}, {'name': 'johan'}, {'name': 'john'}] in xrange(len(name_list)): if name_list[i]["name"] == "john": del name_list[i] after first time recognizing john, deletes object breaks out of function. how can continue traversing till end , delete every single json object has john name? many guys! you shouldn't remove items form sequence iterating over. it's safer build new dictionary without elements don't want: new_list = [d d in name_list if d['name'] != 'john']

asp.net - Grid view display issue -

i have data table display below in grid view , done edit, update & cancel operation on it, work fine id | title | number | state 585344 issue 1 140024 in progress but want display below in grid view , doing edit, update & cancel operation on it, how please help.... id-585344 title-issue 1 number-140024 state-in progress i suggest instead of going gridview go listview (as using .net 4.0), can achieve desired output.

configuration - Atom JSHint for JavaScript inside HTML -

i started using atom . installed linter-jshint , jshint after setting jshint executable path. had jshint working on javascript files. however, after several hours still cannot work javascript in html files. looked in package.json , docs did not find works. i saw there flag --extract=[auto|always|never] . not sure how use in atom. linter-jshint package has lintinlinejavascript configuration can enable make lint html files. you can find more configuration in github readme .

flex+bison, sections with different syntaxes -

i working on parser in flex & bison supposed parse source codes have different sections have different syntaxes. think of php, "stupidly" dumps until finds <?php , goes syntactic part parses stuff , when finds ?> goes dumping. so while in "dumping" section, scanner should provide raw strings. meaningful tokens (while, openparenthesis, identifier, etc.) should provided in syntactic sections , \ starts syntactic section. i have found can give flex rules different "start conditions" , can switch between different scanners like %x semantic %x dump %% <dump>"\\" { begin(semantic); } <dump>. { (*yylval).stringvalue = yytext; return yy::parser::token::char;} <semantic>"while" {return yy::parser::token::while;} which need here. my problem end of syntactic section cannot described regular expression, decision cannot done within scanner, has made parser. want go dump mode "in be

javascript - Tables are stacking instead of replacing -

i find hard create title question want know how make code (that creates tables derived value of input) stop stacking tables every time event made. when input " 2 " creates 2 tables when input " 3 " adds 3 tables thus, 5 tables made instead of 3 . i want want code create tables derived input box rather stacking up. how can achieve this? <html> <body> <input type="text" onblur="myfunction()" onchange="myfunction" id="dino"> <br> <table id="mytable"> <script> function myfunction() { var value = document.getelementbyid("dino").value; (var = 0; < value; i++){ var tr = document.createelement('tr'); var td1 = document.createelement('td'); var td2 = document.createelement('td'); var td3 = document.createelement('td'); var var_input_days = document.createelement("input"); var_input_days.set

Java, JDBC: Updating & displaying values in/from SQLite db -

question: how update numberofwins in db program runs(rounds of poker played), & @ end of program execution, display data in/from db? background: this standard console based poker game. table dealer(creates hands) & executes rounds. pokergamemain, main. have classes card, deck, player, wallet. 3 players dealt cards, creating hand, hands played, there winner & looser, round. have included current code on these classes context. my questions 2 database/jdbc/sqlite classes(sqlitejdbc, database) attempting implement. i've added these solely learning purposes. i'm attempting gain knowledge of database/jdbc/sqlite & maven(which have used manage sqlite dependency). i've working pretty diligently @ program i'm having little trouble seeing how pull together. question again: primary) how i: create db(poker)...done think. create table(players), 2 columns(palyername, numberofwins)...done think. create 3 rows(player1-3)...done think. upda

permissions - Android Studio isn't recognizing the checkSelfPermission -

is possible run google sample - runtimepermissionsbasic on devices os less mnc (android m)? this project comes with: compilesdkversion "android-mnc" targetsdkversion "mnc" so far good, running on less m os get: install_failed_older_sdk but when changed to: compilesdkversion 22 targetsdkversion "mnc" the android studio isn't recognizing checkselfpermission (...) method so far good, running on less m os get: install_failed_older_sdk that because setting compilesdkversion android-mnc forces minsdkversion mnc default. there recipes changing behavior . but when changed to... android studio isn't recognizing checkselfpermission (...) method checkselfpermission() introduced in m developer preview , not exist on older versions of android.

sql server - Update Value of all XML tags in T-SQL -

is there way replace value of multiple occurrences of tag in xml in sql server? i need check specific tag (firstname) , replace of values another. here sample xml: <root> <patient> <firstname>something</firstname> <middleinitial>w</middleinitial> <lastname>west</lastname> </patient> <patient> <firstname>another</firstname> <middleinitial>e</middleinitial> <lastname>east</lastname> </patient> </root> my desired output is: <root> <patient> <firstname>test</firstname> <middleinitial>w</middleinitial> <lastname>west</lastname> </patient> <patient> <firstname>test</firstname> <middleinitial>e</middleinitial> <lastname>east</lastname> </patient> </root> i have modify statement change first occurrence

c# - My database system cannot find the file specified in asp.net -

Image
i trying retrieve data database following code: public partial class populate : system.web.ui.page { sqlconnection scon = new sqlconnection("data source = localhost; integrated security = true; initial catalog = populate"); protected void page_load(object sender, eventargs e) { stringbuilder htmlstring = new stringbuilder(); if(!ispostback) { using (sqlcommand scmd = new sqlcommand()) { scmd.connection = scon; scmd.commandtype = commandtype.text; scmd.commandtext = "select * populate"; scon.open(); sqldatareader articlereader = scmd.executereader(); htmlstring.append("'populate page:'"); if (articlereader.hasrows) { while (articlereader.read()) { htmlstring.append(artic

expanded event to TreeView wpf -

i have treeview hierarchicaldatatemplate, , want add expanded event <treeview name="files" margin="0,0,569,108" grid.row="1" itemssource="{binding s1}"> <treeview.itemtemplate> <hierarchicaldatatemplate itemssource="{binding members}"> <stackpanel orientation="horizontal"> <textblock text="{binding name}" /> </stackpanel> <hierarchicaldatatemplate.itemtemplate> <datatemplate> <checkbox name="checkbox111" checked="filecheckbox_checked" unchecked="filecheckbox_unchecked" ischecked="{binding c}"/> <

excel - Copy files with auto rename -

i have 2 files static names , want use vba copy these files place, original names used, windows 7 shows options: copy , overwrite, don´t copy , copy rename original file. is possible vba third option? maybe help: sub copyandrenameifexistselsecopy() dim fname string, dname string fname = "c:\temp\folder1\one.txt" dname = "c:\temp\folder2\one.txt" rname = "c:\temp\folder2\one_renamed.txt" if dir(dname) <> "" filecopy fname, rname else filecopy fname, dname end if end sub

r - RPostGreSQL with maintenance-db -

i'm trying connect postgre database using rpostgresql. here's code : drv <- dbdriver("postgresql") con <- dbconnect(drv, dbname='dbname', host='10.10.111.111', port='1983',user='user' password='pass') i able connect database using pgadmin same parameters, difference that, in pgadmin, have "maintenance-db" line can't fill in dbconnect. tried put maintenance-db in dbname, doesn't work. noticed now, no db expert, don't know "maintenance-db" thing... appreciated ! had same problem database hosted on heroku. heroku using maintenance-db , forces ssl usage - not supported rpostgresql. had switch rjdbc worked well http://www.rforge.net/rjdbc/ http://ryepup.unwashedmeme.com/blog/2010/11/17/working-with-r-postgresql-ssl-and-mssql/ hope helps out.

How do you detect if a Ruby instance has been changed after creation? -

how detect if ruby instance has been changed after creation? i'm trying stay away known gems activemodel::dirty , writing lightweight solution return simple true or false if object's instance variables have been changed after point. this regular ruby object, not rails object rails specific tools don't work. i saw posts on hijacking attr_writer, didn't know if comprehensive , couldn't figure out how it. can me? thanks. afaik there's no lightweight solution this. possible hack write c extension plugs gc , checks if instance variable changed.

excel - Formula and text combined within VBA code -

i having issue combining formula text in vba format. can hel :) line of code errors 1004 error is; range("d4").value = "=control page'!$m$9&" cost challenge fte tracker month" i pick values within worksheet controlpage'!$m$9 , combine text cost challenge fte tracker month. i sure should simple fix. any appreciated. thanks sean how about: range("d4").formula = "='control page'!$m$9 & " & """ cost challenge fte tracker month"""

c# - How can I add two rows in a single pdf cell? -

Image
i generatng barcode. want insert student code under barcode label. how can this?my code is foreach (gridviewrow row in grdbarcode.rows) { datalist dl = (datalist)row.findcontrol("datalistbarcode"); pdfcontentbyte cb = new pdfcontentbyte(writer); pdfptable barcodetable = new pdfptable(6); barcodetable.settotalwidth(new float[] { 100,10,100,10,100,10 }); barcodetable.defaultcell.border = pdfpcell.no_border; barcode128 code128 = new barcode128(); code128.codetype = barcode.code128_ucc; foreach (datalistitem dli in dl.items) { string barcodename= ((label)dli.findcontrol("lblbarcode")).text; string studentcode= ((label)dli.findcontrol("lblstudcode")).text; code128.code = "*" + productid1 + "*"; itextsharp.text.image image128 = code128.createimagewithbarcode(cb, null, null); barcodetable.addcell(image128); barcodetable.addcell(""); } doc.add

facebook php sdk - Notice: Undefined index php sdk for Graph API -

i send facebook request using graph api , array below result. when trying execute code: $a=count($obj_1['events']->data); i following message notice: undefined index: events i have tried like: $obj_1[0]->events->data $obj_1->events->data $object[0]->['events']->data and googled trying figure out. trying rid of notice because script runs intended... pls :) array( [events] => stdclass object ( [data] => array ( [0] => stdclass object ( [name] => [start_time] => [timezone] => [id] => ) ) [paging] => stdclass object ( ) ) [id]

c# - Should I cache a WindowsIdentity object in a MVC app? If so, what's the best way to do it? -

i'm generating windowsidentity object in mvc application , i'd ideally cache won't hitting ad on every request; problem exception: "safe handle has been closed" i've read somewhere error pops because after request ends, iis closes handle of thread principal (in case windows principal instantiate using cached windows identity). cutting point, should caching object? caching token better idea? or should give on idea of caching of those? thanks in advance! if using logonuser create windows tokens - there optimization , caching going on in windows kernel. i stay away trying optimize that, , noticed, should leave handle management os.

php - How to check if an image is incompleted (missing data)? -

so have program on raspberry pi supposed regularly backup blog onto it. i'm running manually. today internet connection extremely slow killed program in middle of download. did save of downloaded data managed , program reads image exists , skips it. sure can delete , have program re-download me want make sure doesn't happen again in future. i'm working php on server side. command use saving images is copy($url, $path); i'm doing simple check if file exists. if(!file_exists($path)) the image files on server of png , jpg file formats. dumb me, forgot write had tried. have found multiple questions solutions don't seem work. of them claim imagecreatefromtype($img) should return false in situations. php manual: returns image resource identifier on success, false on errors. i'm getting "premature end of jpeg file" seemed should have returned false didn't. returns same value if image not corrupt, resource id #6 it great

javascript - Remove element/s from an array -

how can remove item/s array in javascript ? function restructurechatboxes() { align = 0; (x in chatboxes) { chatboxtitle = chatboxes[x]; if ($("#chatbox_"+chatboxtitle).css('display') != 'none') { if (align == 0) { $("#chatbox_"+chatboxtitle).css('right', '20px'); } else { width = (align)*(225+7)+20; $("#chatbox_"+chatboxtitle).css('right', width+'px'); } align++; } } } and want remove chatbox when closed list. function closechatbox(chatboxtitle) { //here remove list ? $('#chatbox_'+chatboxtitle).css('display','none'); restructurechatboxes(); $.post("chat.php?action=closechat", { chatbox: chatboxtitle} , function(data){ }); } thanks answers. first, find index of element want remove: var array = [2, 5

excel - How to edit text in a function cell in Numbers for Mac -

my pc isn't set @ moment i'm having bunch of excel work on mac using numbers. have function applied split addresses 4 different columns, need change few minor details in some. since of data output functions don't know how change data without having delete function , retype cell scratch. in excel know theres way kind of rasterize data , make editable. how do in numbers? just highlight cells you're interested in changing, , paste them in new column "paste formula results" edit menu. the new column has plain values.

javascript - Access Variable from a different function without creating global variables -

i've started using casperjs web automation, , confusing me little. how access local variables 1 function another? example: casper.start('http://google.com', function(){ var somevar = 20; }); casper.thenopen('http://google.com/analytics', function(){ // how can access somevar?jav }); i know somevar not in scope in second function, how access somevar in second function without defining globals? without using globals say, create third function (bean) have var somevar = 20; local variable , provide getter , setter functions use others. var sharedspace = (function(){ var shared = 20; //initialization return { getshared: function(){ return shared; }, setshared: function(val){ shared = val; } } })(); (function(){ alert(sharedspace.getshared()); sharedspace.setshared(500) })(); (function(){ alert(sharedspace.gets

Android dynamic Linear Layout modification -

i want display view 1st textview image view, or image , textview, both horizontally , vertically, depending on user parameters. planned create linear layout dynamically , place image view , text view @ runtime. can please give pointers on methods use? new android.

scala - Remove case class field before storing to MongoDB -

i'm writing generic update method simplify save case class change mongodb. model t trait has following function: def update(id: bsonobjectid, t: t)(implicit writer: oformat[t]): future[writeresult] = { collection.update(json.obj("_id" -> id), t) } when i'm calling it, fails following error: caused by: reactivemongo.api.commands.updatewriteresult: databaseexception['the _id field cannot changed {_id: objectid('4ec58120cd6cad6afc000001')} {_id: "4ec58120cd6cad6afc000001"}.' (code = 16837)] which makes sense cause mongodb not allow update document id though same value. i'm wondering how remove _id case-class instance update in mongodb. guess have tuple instance before converted bson, don't know how that. example case class: case class user( _id: bsonobjectid, email: string } thanks i agree ipoteka. use findandmodify command reactive mongo. there example gist here should help.

javascript - How to use an array element as an index of another array -

i've 2 arrays in javascript code. want use element of array x index array y . you can see i've numbers in array x , there possible , easy way can it. <script> var x = [1,2,3,4,6] var y = ["kin","kim","jong","ving","gon","von","rick"] </script> like y+x[4] //(not code idea) must print "rick" . i tried y+x[4] //i know that's stupid but not working. please provide answer in javascript. you should read mdn - array more. var x = [1,2,3,4,6] var y = ["kin","kim","jong","ving","gon","von","rick"] var index = x[4]; //6 console.log(y[index]); // @ index 6, value "rick" or y[x[4]] // "rick"

php - WooCommerce - related products by tags and categories -

i want display 8 "related products" in every product page of site based on tags. if there less 8 results fill gaps products in same categories. here code i'm using showing tag-related products ( functions.php ): //new "related products" function woocommerce function get_related_custom( $id, $limit = 5 ) { global $woocommerce; // related products found category , tag $tags_array = array(0); $cats_array = array(0); // tags $terms = wp_get_post_terms($id, 'product_tag'); foreach ( $terms $term ) $tags_array[] = $term->term_id; // categories (removed / commented) /* $terms = wp_get_post_terms($id, 'product_cat'); foreach ( $terms $term ) $cats_array[] = $term->term_id; */ // don't bother if none set if ( sizeof($cats_array)==1 && sizeof($tags_array)==1 ) return array(); // meta query $meta_query = array(); $meta_query[] = $woocommerce->query->visibility_meta_query(); $meta_query[] = $woocommerce->query->sto

ios - Custom segue animations using SWRevealViewController -

i'm using swrevealviewcontroller main menu on app. for 1 menu item have several uiviewcontrollers each own uinavigationcontroller. in each view have bottom tool bar buttons show(push) each view. currently segue animations swipe left. disable animation , tried set custom animations because i'm using swrevealviewcontroller have no idea how that. each way i've tried loses revealviewcontroller , access menu. can help? i've played around different segue types , found works no animation. set segue type present modally in ib. set presentation current context (default stop swreveal working) , uncheck animates creating custom animations or transitions beyond expertise @ moment, works want achieve.

javascript - AJAX + jQuery confusion? -

so right i'm trying understand piece of code: vader.attraction = {}; vader.servicebaseurl = './services/' var scriptlocation = vader.servicebaseurl + 'attraction?callback=?'; $.ajax(scriptlocation, { datatype: 'jsonp', error: function (jqxhr, textstatus, errorthrown) { console.log(errorthrown); }, success: function (data) { vader.attraction.data = data; } }); i can understand gist of of it, uses jquery 's .ajax() method data. question on line right here: vader.servicebaseurl = './services/' var scriptlocation = vader.servicebaseurl + 'attraction?callback=?'; what ./services/ , attraction?callback=? come from?? attraction?callback=? part, ajax ? i'm pretty sure attraction table name in database..... can't figured out syntax, , i've googled callback=? no avail so.... maybe dumb question, i'm confused since i'm new ajax , jquery , , javascript in general..... ap

Python 3- Writing dictionaries with dictionary values to CSV files -

i've tried google- i've not been able find solution works dictionaries dictionary values. let me explain little simpler. i have dictionary of ticket codes, , each ticket code dictionary, containing 'name' , 'redeemed'- name being ticket owner , redeemed being whether ticket has been redeemed. data loaded csv file named ticketcodes, contains 1000 lines of data. have system truncate file ready writing, solutions have found writing csv don't work. apologize if duplicate- may not have searched hard enough. if is, please can link me solution? thank much! json better format writing out python dict data. however, if of dict's have same keys potentially format csv document dict key's column names. for example: # assuming data list of dictionaries the_data = [{'col1': 'data1', 'col2': 'data2'}, {'col1': 'data3', 'col2': 'data4'}, {'col1': 'da