Posts

Showing posts from 2014

ios - Swift/Xcode - Search API and compare current value(s) with rest of API - SwiftyJSON & AlamoFire -

firstly, point out, have search function implemented use of search-bar , alamofire. , can download , present data in collectionview . wondering how implement following: this api looks like: students: [ { "firstname": "fred", "lastname": "bloggs", "testscore": "89", }, { "firstname": "frank", "lastname": "thomas", "testscore": "91", }, { "firstname": "joe", "lastname": "morrison", "testscore": "45", }, ] brief example of api. so currently, able download information uicollectionview . struggling pass data have downloaded api detailviewcontroller . trying pass lastname , testscore @ current index path. i wish following: when loading detailviewcontroller wish testscore of selected indexpath , return other students have similar score 3, 5 , 10. involv...

php - How do I handle extra headers appended to top of file via PUT? -

i developing api using php. i accepting xml file via put request. developing app postman see following: ------webkitformboundary0asxhcjef0dqxs1p content-disposition: form-data; name=""; filename="books.xml" content-type: text/xml <?xml version="1.0"?> <catalog> <book id="bk101"> <author>gambardella, matthew</author> <title>xml developer's guide</title> <genre>computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>an in-depth @ creating applications xml.</description> </book> ... </catalog> ------webkitformboundary0asxhcjef0dqxs1p-- i've brought in via echo file_get_contents("php://input") . can intercept or sanitize data appears webkit? form data html forms, not apis. have done <input type="file...

Electronic Data Interchange (EDI) is JSON in this time? -

there lot of talk edi in companies, used in 2017 edi software still used in companies. it's been around decades , finely ingrained in central infrastructure of major retailers, manufacturers, , distributors. that's not json driven apis don't have place. link between 2 in as4, however, as2 still dominates preferred web based transmission standard.

android - Application after leaving background state starts from root activity without calling OnResume method when used memory on device more than 75% -

i working mvvmcross on xamarin android technology. created project main actvity inherited mvxcachingfragmentcompatactivity done on https://github.com/mvvmcross/mvvmcross-samples/tree/master/xplatformmenus/xplatformmenus.droid demo. have bug in mvxactivity, call homeviewmodel using intent go application permissions : intent intent1 = new intent(); intent1.setaction(android.provider.settings.actionapplicationdetailssettings); packageinfo info = activity.packagemanager.getpackageinfo(activity.packagename, 0); android.net.uri uri = android.net.uri.fromparts("package", info.packagename, null); intent1.setdata(uri); activity.startactivity(intent1); but have bug when applications opened on acer iconia 1 10 (more 75% of memory used) , new intent started, when click back, restored mvxcachingfragmentcompatactivity, not calling on homefragment onresume method. could please give me advice or idea how can fix or @ least how can understand happening in program i...

forms - Javascript decimal rounding & global variable trouble -

im building checkout form. following code sets quantity form select box , bottom 1 gives me basic sub total , tax , total. works fine. though i’m sure not best code. <!------quantity calculations & realtime update code----------> function calquantity(){ var units=0; var paymentform = document.forms["payment_form_id"]; var v_quantity = paymentform.elements["quantity"]; <!--need change if price changes --> units = v_quantity.value*19.99; return units; } <!------subtotal - tax - total calculations & realtime update code-----> function calsubtotal(){ var subt = calquantity(); var sub_obj = document.getelementbyid('sub_id'); sub_obj.innerhtml = subt; var tax = document.getelementbyid('tax_id'); var tax = tax.innerhtml = subt * 0.06; var total = document.getelementbyid('total_id'); var total = total.innerhtml = subt + tax; document.w...

python - json.dumps() can not convert a dict whose value is list -

when learn web crawler scrapy, , save data json. found json.dumps () can not work on list of values list,like this: def __init__(self): self.file = codecs.open("mydata2.json","wb",encoding="utf-8") def process_item(self, item, spider): line = json.dumps(i,ensure_ascii=false) + '\n' print(line) self.file.write(line) return item def close_spider(self,spider): self.file.close() it doesn't work.then modify code def __init__(self): self.file = codecs.open("mydata2.json","wb",encoding="utf-8") def process_item(self, item, spider): = dict(item) key in i.keys(): i[key] = str(i[key]) print(i) line = json.dumps(i,ensure_ascii=false) + '\n' print(line) self.file.write(line) return item def close_spider(self,spider): self.file.close() everything right.so how going? maybe there data in origin type can not serialized. if convert s...

javascript innerHTML not changeing because php session -

i start work session in php , mysql have login page check if user exists inside mysql , if true session_start() , session equal user login and have redirect page in page there session_start() , if statement check if there session exists , if true try change <li> inside <ul> document.getelementbyid('id').innerhtml = 'string'; and not work me if try doing else alert('string') work me php file #1: $query = "select * website_users user_name='$checked_user_name' , password='$checked_password';"; $results = mysqli_query($connect_db , $query); if (mysqli_num_rows($results) > 0) { echo "<script>document.getelementbyid('done').innerhtml = 'log in successful'</script>"; $_session['session_name'] = $checked_user_name; header("refresh:2; url=http://10.0.0.14/itzik_website/xss.php"); } else { echo "<script>document.getelemen...

visual c++ - custom or subclass the group box control in vc++ -

how make group box/ static control subclass or custom control. how group box / static controls count. can apply rounded corners group box/ static controls. how make group box/ static control subclass or custom control. derive class cbutton . handle nm_customdraw notification custom drawing. alternatively 1 use bs_ownerdraw window style, mutually exclusive bs_groupbox . when using nm_customdraw original window style flags can kept. note nm_customdraw sent parent window, can reroute message handle in control class this: begin_message_map(cmygroupbox, cbutton) on_notify_reflect(nm_customdraw, oncustomdraw) end_message_map() the definition of oncustomdraw() this: void cmygroupbox::oncustomdraw(nmhdr* pnmhdr, lresult* presult) { auto pnmc = reinterpret_cast<nmcustomdraw*>( pnmhdr ); // query pnmc members , custom drawing documented on msdn. // assign result *presult. } how group box / static controls count. use enumchildwindo...

c++ - Initialise large static class array -

i have template create instance of various objects. template has static array of class declaration supposed create array of class type being passed during creation. in below example myclass static array of class object size 200 - can bigger also. note template can instantiated different objects - type of array changed accordingly. how can initialize static array during declaration - understand need initialize static array when defined itself, if size if more bigger - template <class object> a<object> myclass[200] = { .... new object 200 times...}; or need new / delete overloaded operator defined in template? in such case how array of objects construction & destruction occur? if object references array static before template instantiation? how can initialise static array during declaration [?] if want initialize object s default (no parameter) contructor, it's easy; like template <class object> object a<object>::myclass[200] ...

How do I use a Tkinter button to run a Python script? -

i finished dice roll program i've been working on , want add 1 last thing: want add button says "roll dice". there way run python script tkinter button? i've tried use: from tkinter import * master = tk() def callback(): code here b = button(master, text="button text", command=callback) b.pack() mainloop() but when use that, pygame window black. the code program is: exec(open("dice crop.py").read(), globals()) pygame.locals import * random import randint tkinter import * import pygame import sys pygame.init() font = pygame.font.sysfont("comicsansms",30) screen = pygame.display.set_mode((284,177),0,32) background = pygame.image.load("background.jpg").convert() 1 = pygame.image.load("one.png").convert_alpha() 2 = pygame.image.load("two.png").convert_alpha() 3 = pygame.image.load("three.png").convert_alpha() 4 = pygame.image.load("four.png").convert_alpha() 5 = pygame.ima...

c - Cant get the logic of this code -

how code work input : 20051996 program: delete duplication elements in array for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if (a[i]==a[j]) { for(k=j;k<n;k++) { a[k]=a[k+1]; } n--; j--; } } } the logic pretty simple here element not deleted being exchanged. for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if (a[i]==a[j]) this finding element equal a [i] . number there loop targeting repeated number , cell fed/replaced next cell value. 1 value has been changed remaining cell value swapped next one. for(k=j;k<n;k++) { a[k]=a[k+1]; } n--; j--; and last cell remains , number n , j decreased not refer cell again. removes element makes new element have put counter number of repetition , have slice array or break make work.

Laravel Eloquent resets primary key value after save() called -

i'm using laravel 5.2 , when insert model, primary key id column somehow reset 0. what's happening below. $foomodel = new foomodel(); $foomodel->foo_id = 123; $foomodel->foo_title = 'foo'; echo($foomodel->foo_id); //123 $foomodel->save(); echo($foomodel->foo_id); //0 the data inserted on mysql database, foo_id column reset 0 in php. if it's autoincrement column, know it'll updated next sequence value, column not. there i'm missing? class foomodel extends model { protected $table = 'foo_table'; protected $primarykey = 'foo_id'; protected $guarded = ['foo_id']; protected $casts = [ 'foo_id' => 'integer' ]; } problem solved. needed declare "public $incrementing = false;" in model class. class foomodel extends model { protected $table = 'foo_table'; protected $primarykey = 'foo_id'; public $incrementing = false; pro...

ios - Take snapshots of objects display in Debug Memory Graph in Xcode -

i using debug memory graph tool in xcode profile work. displays hundreds of types of objects every time take sample clicking on debug memory graph button. want figure out increasing objects between 2 samples. number of objects large. guess there should feature taking snapshots, comparing them , figuring out differences. should do?

java - How to store random integers into an instance of a class -

i tasked create 10 instances of square class within loop using 10 random integer values (10 - 20) length , store 10 square instances in sqarray , print out length , area of elements in array. here code square class public class square { private int length; // create constructor takes in len parameter public square(int len){ length = len; } public int getlength(){ return length; } public double calculatearea(){ return length * length; } } //square here code main class public class squareuser { public static void main(string[] args) { //create instance of array sqarray. square[] sqarray = new square [10]; for(int = 0; < sqarray.length; i++) { sqarray[i] = (int) (math.random()*10); } } } as can see, didn't in main class don't know question talking about. have 2 questions: how generate random integer in loop i...

android - How To Create Leaderboard For An Firebase Anonymous User? -

i creating android game has leaderboard show user scores name, profile pic , score list item. later decided remove google login implemented game in order increase user flow game play page. @ same time wanted have users authenticated (for security) without asking them click on login button (where many drop off happening). found anonymous authentication option in firebase authentication section. my question when relay on anonymous login throughout game need have convert anonymous user google user programmatically show them in leaderboard list or google handles automatically/internally? current working flow step 1: connect google client api (see below written code) step 2: authenticate firebase (google sign in method) step 3: show leaderboard current implementation when open leaderboard activity have following code show leadeboard (here user authenticated google signin method), googlesigninoptions gso = new googlesigninoptions.builder(googlesigninoptions.d...

android - Glide Transformation Strange behaviour in recycleview -

Image
i using glide imageview transformation. 1. centercrop roundedcorner code : if (path != null) { glide.with(context) .load(new file(path)) .asbitmap() .transform(new centercrop(context), new roundedcornerstransformation(context, 15, 0, roundedcornerstransformation.cornertype.all)) .diskcachestrategy(all) .placeholder(r.drawable.place_holder_album) .into(holder.eventimage); } xml : <framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:custom="http://schemas.android.com/apk/res-auto" android:layout_width="110dp" android:layout_height="110dp" android:layout_gravity="center_horizontal"> <relativelayout android:id="@+id/layout_image" android:la...

reactjs - React - Render Item inside map function by click event -

let have array 2 items want make click event show content specific index clicked for example : let array = [ {name:test}, {name:test2} ] this.array.map((item,index)=>{ return( <div> {item.name} <button onclick={()=>this.showcontentfunction()} >show content</button> {this.rendercontent()} </div> ) }) now show 2 items want click on first item button , showing hidden content under same item index , not items how can thanks alot ! <button onclick={() => this.showcontentfunction(index)}>show content</button> this general idea. need pass index of item click handler. in click handler, can either edit items in array themselves, setting showcontent boolean 1 of properties, , use this... this.array.map((item,index)=>{ return( <div> {item.name} <button onclick={() => this.showcontentfunction(index)}>show content</button>...

c# - Unity - Dialogue pops up -

in unity: could tell me did wrong. wanted pop dialogue after nearby charecter somehow code doesn't work. public class interactable : monobehaviour { [hideininspector] public navmeshagent playeragent; private bool hasinteracted; public virtual void movetoineraction(navmeshagent playeragent) { hasinteracted = false; this.playeragent = playeragent; playeragent.stoppingdistance = 2.3f; playeragent.destination = this.transform.position; interact (); } void update() { if (!!hasinteracted && playeragent != null && playeragent.pathpending) { if(playeragent.remainingdistance <= playeragent.stoppingdistance) { interact(); hasinteracted = true; } } } public virtual void interact() { debug.log("interacted"); } } !!hasinteracted it should !hasinteracted , guess

create a product with combination of grouped and bundle product magento -

i want create new product combination of bundle product , grouped product in link https://www.urbanladder.com/products/apollo-infinity-sofa?sku=fnsf51apmb30000saaaa showing choose popular set (bundle product) showing or create own set(grouped product) both treated 1 product is there plugin achieve or can admin panel.please help. config.xml <?xml version="1.0"?> <config> <modules> <ajzele_customproduct> <version>0.1.0</version> </ajzele_customproduct> </modules> <global> <models> <customproduct> <class>ajzele_customproduct_model</class> </customproduct> </models> <resources> <customproduct_setup> <setup> <module>ajzele_customproduct</module> <class>mage_c...

continuous integration - Automating Build Process of c++ code using RTC and jenkins -

Image
i know if can automate build, whenever developer deliver changes , send him build report. i looking rtc commands can used in jenkins. till now, able connect rtc, load stream , build locally through jenkins. make sure define workspace on target stream (the 1 delivers occur) then, described in jenkins team-concert plugin : find "build triggers" section. check "poll scm" check box poll incoming changes build workspace. enter schedule. click button beside "schedule" field syntax. you can check every 5 minutes of new change sets have been delivered, , trigger jenkins build way (ie, polling changes). for mail part, independently of rtc, can use jenkins email-ext plugin in order send email after each build. see example " how send email @ every build jenkins " you receive email link jenkins job report page.

In C#, what would be the closest counterpart of Java's JavaFX? -

i've learned java in past, , making 2d graphics, seemed javafx option making graphics. (swing , possibly other stuff weren't updated anymore.) regardless of whether true or not, started learning c#, , couldn't find such equivalents. there seem several different things can used various places have criticized speed or usefulness of few of them. to little less abstract, i'm looking display 2d graphics. a) able control individual pixels. eg. progressively rendering fractals. b) able display existing images in quick succession. animations pictures. c) interactable. being able respond keyboard , mouse buttons etc. d) general application functionality pre-defined buttons, sliders, text boxes, or vector graphics or w/e nice, not necessary current purposes. is there standard / more popular / faster / better option these, or recommend?

php - PHPMail sending email right away -

while i'm trying pull data db, page shows data sending email. how can prevent sending email right away. want happen retrieved data db > shows page > edit page > update db , send email. point want email sent out. here entire edited code per suggestion, $update = filter_input_array(input_post, $update_args); $date = filter_input_array(input_post, $date_args); $result = null; $colcomments = null; $dsn = 'mysql:dbname='.dbname.';host='.dbhost.';port='; try { $conn = new pdo($dsn, dbuser, dbpswd); $conn->setattribute(pdo::attr_errmode, pdo::errmode_exception); if(isset($_post['submit'])) { if(!isset($_session['update'])) { $_session['update'] = true; //retrieve values database if($date['from'] !== null && $date['to'] !== null){ // table data $sql = 'select `id`, `changeid`, `tracker` `scheduled_start_date` between :d1 , :d2...

python - Quick way to upsample numpy array by nearest neighbor tiling -

this question has answer here: how repeat elements of array along 2 axes? 2 answers i have 2d array of integers mxn , , expand array (bm)x(bn) b length of square tile side each element of input array repeated bxb block in final array. below example nested loop. there quicker/builtin way? import numpy np = np.arange(9).reshape([3,3]) # input array - 3x3 b=2. # block size - 2 = np.zeros([a.shape[0]*b,a.shape[1]*b]) # output array - 6x6 # loop, filling tiled values of @ each index i,l in enumerate(a): # lines in j,aij in enumerate(l): # a[i,j] a[b*i:b*(i+1),b*j:b*(j+1)] = aij result ... a= [[0 1 2] [3 4 5] [6 7 8]] = [[ 0. 0. 1. 1. 2. 2.] [ 0. 0. 1. 1. 2. 2.] [ 3. 3. 4. 4. 5. 5.] [ 3. 3. 4. 4. ...

java - Dividing the value of 2 columns in spark dataframe -

Image
i have table in spark stored dataframe. want dataframe(url,url1,ratio) contains ratio,where ratio = count1/count in it. how write operation it? it's straightforward : import spark.implicits._ val newdf = df.withcolumn("ratio", $"count1" / $"count") this line of code add column named ration df , sotore result in newdf edit 1 : (solution in java requested) import org.apache.spark.sql.functions._ dataset<row> newdf = df.withcolumn("ration", col("count1").divide(col("count"))

Remove .php extension with .htaccess -

yes, i've read apache manual , searched here. reason cannot work. closest i've come having remove extension, points root directory. want work in directory contains .htaccess file. i need 3 things .htaccess file. i need remove .php a. have several pages use tabs , url looks page.php#tab - possible? b. have 1 page uses session id appended url make sure came right place, www.domain.com/download-software.php?abcdefg . is possible? in doing this, need remove ".php" links in header nav include file? should ie "<a href="support.php">support</a>" <a href="support">support</a>? i force "www" before every url, it's not domain.com , www.domain.com/page . i remove trailing slashes pages. i'll keep looking, trying, etc. being in sub directory cause issues? gumbo's answer in stack overflow question how hide .html extension apache mod_rewrite should work fine. re 1) chan...

3d - blender axis rotation in its center point -

i exported 3d rotating cube, can't make rotate on 3 axis, mean cube rotates in axis not in center of screen goes edge , out of view, need fixed in middle of screen , rotates on 3 axis center point. more welcome. press r+z (if want rotate z axis) , if want rotate y axis press r+y , on. press twice on r move trackball rotation mode. p.s : question bit vague, assuming you.

apex - Create Class object through class name in Salesforce -

i new salesforce , want code 1 requirement, have api name in string variable through want create object of class. for eg. object name account stored in string variable. string var = 'account' now want create object of 'account'. in java possible class.forname('account') similar approach not working in salesforce apex. can please me out in this. have @ type class. documentation isn't terribly intuitive, perhaps you'll benefit more article introduced it: https://developer.salesforce.com/blogs/developer-relations/2012/05/dynamic-apex-class-instantiation-in-summer-12.html i'm using in managed package code inserts chatter posts (feed items) if org has chatter enabled: sobject fitem = (sobject)system.type.forname('feeditem').newinstance(); fitem.put('parentid', userinfo.getuserid()); fitem.put('body', 'bla bla bla'); insert fitem; (if i'd hardcode feeditem class & insert directly it'd m...

javascript - net::ERR_FILE_NOT_FOUND firebase -

i'am trying add , read image firebase, keep giving me error net::err_file_not_found let database = firebase.database(); var filebutton = document.getelementbyid("filebutton"); var main = document.getelementbyid("imgelement"); var bildeurler = database.ref("bildeuler"); function largeurl(snap) { let url = snap.downloadurl; bildeurler.push(url); } filebutton.addeventlistener('change', function(e) { var file = e.target.files[0]; var storageref = firebase.storage().ref('kora/' + file.name); storageref.put(file).then((largeurl)); }); function visbilder(snap) { let url = snap.val(); main.innerhtml += '<img src="${url}">'; } bildeurler.on("child_added", visbilder);

Trying to parse array list to main activity (android) -

this mainactivity tried using startactivityforresult method result editactivity app crashes when press add button on editactivity. i'm not sure going wrong. public class mainactivity extends appcompatactivity { private list list = new arraylist<custombutton>(); private static final int edit_activity_result_code = 1; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); } @override protected void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); // check secondactivity ok result if (requestcode == edit_activity_result_code) { if (resultcode == result_ok) { bundle args = data.getbundleextra("bundle"); list = (arraylist<object>) args.getserializable("buttonlist"); } } } public void buttoneditopen(view view) { intent mintent = ne...

unity3d - Xbox Live sign-in running Unity to authenticate Azure App Services / Mobile services -

i've got unity xbox live services example , running allowing me sign-in microsoft account via xbox live services in unity. i've got azure app services (mobile services) running in unity query , persist data. app services supports authentication out of box including microsoft account support. does know if can use authentication xbox live services sign-in authentication web calls against microsoft account in app services? it gets complicated :) although can understand frustration. let me give quick overview, i'm happy give more details needed. when dealing sign-in, first step authentication - , there 3 choices on such systems microsoft 1. msa, or microsoft account, consumer systems use, such xbox. 2. aad, or azure active directory, typically enterprise applications. 3. s2s, or server server, typically done either ssl certificate or shared secret. (note similar app secret mentioned above, although app secret less secure since secret app itself, , msa go to...

Intent from notification isn't passed to target activity in Android -

in app have starting activity starts/restore app's activities , pass intent extras if there any: manifest: <activity android:name=".startactivity" android:theme="@style/theme.appcompat.light.noactionbar.fullscreen" android:screenorientation="sensorlandscape"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> code: public class startactivity extends appcompatactivity { @override protected void oncreate(@nullable bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_preloader); string id=getintent().getstringextra("id"); log.d("push~","start activity oncreate:"+id); intent = new...

javascript - CSS not applied to Polymer 2 web component in Chrome -

i have polymer v2 web component defined below. in main page include css file defines style named n-action-button . when open main page in firefox or ie style applied web component, when same in chrome content of web component not styled. everything working fine when application using polymer v1 library. has changed when upgraded polymer v2. i've read in docs on net externally-defined styles should applied web components. have no idea why isn't working under google chrome browser. <link rel="import" href="../polymer/polymer-element.html"> <dom-module id="login-form"> <template> <h1> use username &amp; password sign in. </h1> <form id="form" method="post" action="j_security_check"> <input id="username" name="j_username" type="text" placeholder="username"/> <input t...

Using JQuery AJAX to submit a form to PHP ,empty value -

i have script, submit not post value: $(document).ready(function () { $('#addproductform-<?php echo $row_ks['id']?>').validate({ rules: { nguoilienhe: "required", soluongphong: "required", ngaynhanphong: "required", ngaytraphong: "required", email: { email: true }, songay: { required: true, number: true }, songuoi: { required: true, number: true }, nguoilon: { number: true }, treem: { number: true }, sodienthoai: { required: true, number: true } }, messages: { nguoilienhe: "nhập tên người liên hệ"...

javascript - How to extract multiple hashtags from a JSON object? -

i trying extract "animal" , "fish" hashtags json object below. know how extract first instance named "animal", have no idea how extract both instances. thinking use loop, unsure start it. please advise. data = '{"hashtags":[{"text":"animal","indices":[5110,1521]}, {"text":"fish","indices":[122,142]}],"symbols":[],"user_mentions": [{"screen_name":"test241","name":"test dude","id":4999095,"id_str":"489996095","indices":[30,1111]}, {"screen_name":"test","name":"test","id":11999991, "id_str":"1999990", "indices":[11,11]}],"urls":[]}'; function showhashtag(data){ = 0; obj = json.parse(data); console.log(obj.hashtags[i].text); } showhashtag...

How to find minimal input crashing the Haskell code? -

i have function crashes on inputs. algoritm breaks invariant map should contain value given key. might input invalid. the function of type intmap.intmap [int] -> io int . io used random numbers , crashes on ! function. is possible narrow down error conditions function without refactoring first using haskell tools quickcheck?

reactjs - running node package manager to build but got error -

Image
i trying run react project npm run build , experiencing following bugs terminal! any idea debug it...? you're wrapping function when should below , need make sure type npm install --save react react-dom // ... rest of component getinitialstate: function() { return { term: '' }; }, // ... rest of component

c# - JSON.NET Case Insensitive Deserialization not working -

i need deserialize json object casing of json unknown/inconsistent. json.net supposed case insensitive not working me. my class definition: public class myrootnode { public string action {get;set;} public mydata data {get;set;} } public class mydata { public string name {get;set;} } the json receive has action & data in lowercase , has correct casing myrootnode . i'm using deserialize: myrootnode responseobject = jsonconvert.deserializeobject<myrootnode>(jsonstring); it returns initialised myrootnode action , data properties null. any ideas? edit: added json { "myrootnode":{ "action":"pact", "mydata":{ "name":"jimmy" } } } you need add additional class: public class myrootnodewrapper { public myrootnode myrootnode {get;set;} } and use: myrootnodewrapperresponseobject = jsonconvert.deserializeobject<myrootnodewrapper>...

perl - CGI.pm command line testing is NOT working on my system -

i tested suggestions on post ( how can send post , data perl cgi script via command line? ). but, none of solutions posted in thread work me. wrong? greg bacon's example in above mentioned thread ( accepted answer ) not working on system. tmp> cat /etc/os-release | grep -i pretty_name pretty_name="opensuse 13.1 (bottle) (x86_64)" tmp> perl -version | grep -i version perl 5, version 18, subversion 1 (v5.18.1) built x86_64-linux-thread-multi tmp> cat prog.cgi #! /usr/bin/perl use warnings; use strict; use cgi qw/ :standard -debug /; print "content-type: text/plain\n\n", map { $_ . " => " . param($_) . "\n" } param; tmp> ./prog.cgi foo=bar baz=quux content-type: text/plain tmp> ./prog.cgi content-type: text/plain tmp> none of solutions in thread 2224158 worked me (exporting variable values, supplying input file, command line, etc.) makes me think in cgi.pm module (cgi-4.36) or perl installation or...

How effective and secure is sending user information to facebook in pixel? -

i want re-target users based on purchase on website. example, if purchases kids wear website, want re target user, when launch offer in kids wear range. i read this article. looks effective can send customers mobile/email , purchase category i.e. kids-wear facebook. later, can re-target these these users on facebook if have offer in kids wear. but worried few things: is correct share customer mobile/email facebook. legal consequences of this? should send both email/mobile? if user uses same mobile different email facebook or vice-versa? if can share case study of using mobile/email in campaigns, great.

CloudFlare, free SSL and subdomains with www -

i have somedomain.com on cloudflare free ssl. , have subdomains: eg. pl.somedomain.com . ssl works on: https://somedomain.com https://www.somedomain.com https://en.somedomain.com https://pl.somedomain.com but not works on: https://www.pl.somedomain.com https://www.fr.somedomain.com so looking solution these subdomains work. http://www.fr.somedomain.com redirects https://www.fr.somedomain.com , have error. is solution using .htaccess or page rules this? i not sure if can apply page rules 2 level deep domain names, give following try (based on tutorial cloudflare ): redirect pattern: https://www.*.somedomain.com/* to: https://$1.somedomain.com/$2