Posts

email - PHP PDO send e-mail code only sends if text-only - need to send HTML -

i'm making code (1) moves records 1 table (in same database), (2) sends contents of table 1 pre-determined e-mail, , (3) delete contents of table 1 - simulating "add cart" feature. my problem code below successful in sending e-mail if $headers not sent on mail(). however, need send table contents html or @ least allow different records. if chance e-mail isn't sent, delete part of code isn't executed either. doing wrong? thanks in advance! modified code (that works if don't send $headers ) <?php include '../config/database.php'; date_default_timezone_set('cet'); $date = date('y-m-d h:i:s'); $query = "insert claims_archive (t20pctid, total_amount, user_id, sent) select t20pctid, total_amount, user_id, @date cart t20pctid '%sony%'"; $stmt = $con->prepare($query); if ($stmt->execute()) { $query = "select t.t20pctid, t.main_artist, t.track_title, t.original_album,...

javascript - d3 v4 + react + es6 + crossfilter: Selection.exit().remove() not working -

i'm using crossfilter.js , d3.js v4 es6 style react in attempt make dimensional charts context brushing. essentially, took this example , converted es6. the problem have selection.exit().remove() not working such on each redraw, more , more circles appended svg g element. redraws triggered when brush created. checked running selection.exit() .attr('class', d => { console.log('anything'); return 'anything'; }) .remove(); but nothing outputted i'm thinking data selection not valid. here context: componentdidmount() { const el = reactdom.finddomnode(this); // mounted svg element const svg = d3.select(el) .attr('width', 300) .attr('height', 500); const g = svg.append('g') .attr('transform', 'translate(32,32)'); let circles = g.append('g') .selectall('circle'); const brushgroup = g.append('g') .attr('class', 'brush...

java - How to access Sqllite DB installed in android from web portal through USB -

we have android app , web portal developed in java client, sqllite db installed in android app. want offline sync , in order connecting android device pc through usb . possible access sqllite db installed in android device web portal? i appreciate answer. i dont think can directly access usb database stored in apllications private memory not in sdcard,but can export database via code in app (just viewing purpose) , upload file server public class exportdb { final static string sample_db_name = "yourdatabase"; public static void exportdb(context context){ file sd = environment.getexternalstoragedirectory(); file data = environment.getdatadirectory(); filechannel source=null; filechannel destination=null; string currentdbpath = "/data/"+ "your.package.name" +"/databases/"+sample_db_name; string backupdbpath = sample_db_name; file currentdb = new file(data, currentdbpath...

VSTS NuGet Packager error: "Path cannot be null." -

while moving vsts online builds, i'm running following error during nuget packager step in package artifacts nuget package based on nuspec file in project. 2016-07-28t04:24:41.7652305z ##[error]path cannot null. 2016-07-28t04:24:41.7652305z ##[error]parameter name: path my nuget packager step's path variable looks this: *\projectname1.nuspec;*\projectname2.nuspec; i checked in nuget.exe 3.4.4 solution in .nuget folder along nuget.config. then, in advanced settings, specified nuget.exe used entering following path "path nuget.exe" $(build.sourcesdirectory)\.nuget\nuget.exe this didn't seem help. prior this, other steps working correctly , projects compiling without issues. also, when run nuget.exe pack command locally these .nuspec files, packages created successfully. any input appreciated. thank you. after frustration , endless hours, have found solution. just update nuget packager step's path: *\projectname1.nuspec;*\proje...

php - Best ways learn basic web security -

i'm 16 , lot of web design people. front end design apart occasional bit of php when handling forms. while know how manage basic sterilisation , validation, learn more intricate things user management , login systems. know way around js, mysql , php, etc... don't feel confident securing such systems. know there not 1 solve guide web security, wondering if knows helpful guides, resources, etc.... also, somewhere start. what want learn about: setting , acquiring ssl certificates handling ssl certificates building secure login systems using cookies security purposes general php security sql security my end goal able build sites users who's basic info can securely store (no payment details) in sql database. want able create user sign login , editing system. have created before not ssl. question how learn ssl? could someone... - direct me guide. - direct me examples. - point me in right direction. (examples big post) said quite broad question sorry (as ha...

Maya Python: Accessing outer function variable from inner function -

i want write ui window using python, following code, function running correctly, there problem, when choose item in textscrolllist, should call inner function 'update()' , highlight corresponding object in scene. however, object cannot chosen correctly , shows error message this: "object 'alertwindow|formlayout164|textscrolllist27' not found." i think happens because inner function update() cannot access variable tsl in outer function, know how can revise code? def alertwindow(): if(cmds.window('mainwindow', q =true, exists = true,)): cmds.deleteui('mainwindow') ui = cmds.window('mainwindow', title = 'alert!', maximizebutton = false, minimizebutton = false, resizetofitchildren = true, widthheight = (250, 300), sizeable = false) myform=cmds.formlayout( ) txt = cmds.text(label = 'please check following objects :') tsl = cmds.textscrolllist(width = 200, height = 200, enable = tr...

Convert AppleScript sdef to TypeScript .d.ts? -

most os x applications (particularly ones written apple) scriptable using either applescript or javascript. api each application supports described sdef file. (see e.g. sdef /applications/safari.app .) is there way automatically generate .d.ts files .sdef files, , create ambient typings suitable use typescript?