Posts

Showing posts from September, 2014

wcf REST Ping timeout -

i have set iis authentification = basic, , create account windows login = pda , password = xxx. but when client acces service, got message timeout public stream pingserver() { //string leurl = "http://localhost:81/code/wcfservice_rest_suivicolis/wcfservice_rest_suivicolis/service1.svc"; string leurl = "http://xxx.yyy.zzz/fa85/service1.svc/"; string result = "",errpb=""; try { var myrequest = (httpwebrequest)webrequest.create(leurl); myrequest.credentials = new system.net.networkcredential("pda", "xxx"); myrequest.method = "put"; myrequest.contentlength = 0; var response = (httpwebresponse)myrequest.getresponse(); if (response.statuscode == httpstatuscode.ok) { // si le serveur ok result =...

php - Group by portion not appears in codeigniter datatable query -

i trying use group in datatable query per below: but group portion not appears in query printed. datatable query: $this->datatables->select('banks_users.id,users.created_at,username'); $this->datatables->from('banks_users'); $this->datatables->join('users', 'banks_users.users_id = users.id', 'left outer'); $this->datatables->join('banks', 'banks.id = banks_users.banks_id', 'left outer'); $this->datatables->join('branches_agents', 'branches_agents.users_id = users.id'); $this->datatables->join('branches', 'branches.id = branches_agents.branches_id'); $this->datatables->join('banks_countries', 'banks_countries.banks_id = banks_users.banks_id', 'left outer'); $this->datatables->join('countries', 'countries.id = banks_countries.countries_id', 'left outer'); $this->datatables->where(...

android - Error:Execution failed for task ':Application:transformClassesWithJarMergingForDebug' -

this question has answer here: transformexception duplicate entry common.annotations.beta 3 answers while running android application in android studio, got following error: error: execution failed task':app:transformclasseswithjarmergingfordebug'. com.android.build.api.transform.transformexception: java.util.zip.zipexception: duplicate entry: android/support/annotation/layoutres.class where error come / how resolve issue? you have added com.android.support:support-annotations: 2 times. surely, not directly, 1 of dependencies depends on it. run console (inside project folder): gradlew app:dependencies , see depends on support annotations library. then, exclude dependencies

Checking Android app for OpenSSL vulnerability -

i used terminal command unzip -p app.apk | strings | grep "openssl" suggested here i following result in terminal: gmscore_openssl +com.android.org.conscrypt.opensslsocketimpl 7org.apache.harmony.xnet.provider.jsse.opensslsocketimpl openssl 1.0.2h 3 may 2016 %s(%d): openssl internal error, assertion failed: %s openssl dh method openssl x9.42 dh method openssl pkcs#3 dh method openssl cmac method openssl hmac method openssl ec algorithm openssl rsa method openssl dsa method openssl ecdsa method openssl ecdh method need read openssl faq, http://www.openssl.org/support/faq.html openssl default openssl default user interface openssl 'dlfcn' shared library method tlsv1 part of openssl 1.0.2h 3 may 2016 sslv3 part of openssl 1.0.2h 3 may 2016 dtlsv1 part of openssl 1.0.2h 3 may 2016 md5 part of openssl 1.0.2h 3 may 2016 sha1 part of openssl 1.0.2h 3 may 2016 sha-256 part of openssl 1.0.2h 3 may 2016 sha-512 part of openssl 1.0.2h 3 may 2016 big number part o...

android - Remote testing with Google sign in -

Image
my app built use google play services api , relies on google sign in. i've decided add instrumented tests project. i'm able run them locally on emulator or real device, i've faced problem on remote emulator within ci server (i'm using travis ci). when app launches first time, user prompted google account , following screen appears. when happens locally i'm able enter password , keep tests alive, on remote server can nothing , tests fail. so here question: how can add google account device (emulator) command line/espresso code/via travis ci tools? possible using adb/avd command line tools?

javascript - TypeError: Upload.upload is not a function -

i have function, , throw exception: $scope.uploadavatar = function(avatar, user) { upload.upload({ url: 'api/v1/user' + user.id + '/', avatar: avatar, method: 'put' }) }; typeerror: upload.upload not function my scripts includes: <script src="/static/js/main.js"></script> <script src="/static/js/bootstrap.min.js"></script> <script src="/static/js/posts_controller.js"></script> <script src="/static/js/jquery.equalheights.min.js"></script> <script src="/static/js/video.js/video.js"></script> <script src="/static/js/swiper.jquery.min.js"></script> <script src="/static/ng-file-upload/fileapi.js"></script> <script src="/static/ng-file-upload/ng-file-upload.js"></script> <script src="/static/ng-file-upload...

ios - How to share text or custom url to facebook using uiactivityviewcontroller? -

i want share custom url not start 'https/http' , 'puzzle://', 'puzzle' url scheme. sharing string instead of url. able share link/text via twitter & email using uiactivityviewcontroller. somehow, facebook dialog box shows nothing. tell me if should share text or link. thanks.. facebook validates url shared valid url not fake string in url , valid url loaded in sharing box otherwise it's not valid . example of valid url : http://google.com good luck!

Define a dictionary externally for a python program -

this question has answer here: python: create dictionary text/file that's in dictionary format 6 answers my python program reads pre-defined dictionary values processing. need able change values of dictionary. but, program converted executable file, should not defined inside program. i thinking defining in text file. don't want write code parse , populate dictionary. need know if there way define dict in text file , assigning content directly python dict. like this: in text file: {'a':1,'b':2,'c':3} nb: actual 1 bit more enrich values. example. in program: dict_variable = f.read() so if print variable dictionary object: {'a':1,'b':2,'c':3} and can accessed dict_variable['a'] . is there way this? you can use eval() : s = f.read() d = eval(s) from convert string...

swig - Freeswitch 1.6 installation for ESL python -

i'm running freeswitch 1.6 , mac 10.10.5 freeswitch server in aws , need install python esl module in local environment start development using esl. havent been able find esl module. got whole source , tried build python library. i used this instructions. git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git cd /usr/src/freeswitch ./bootstrap.sh -j ./configure cd /usr/src/freeswitch/libs/esl when go libs/esl folder , type: make pymod -v i get: gnu make 3.81 copyright (c) 2006 free software foundation, inc. free software; see source copying conditions. there no warranty; not merchantability or fitness particular purpose. program built i386-apple-darwin11.3.0 when run: make pymod i error: /applications/xcode.app/contents/developer/usr/bin/make mylib=".././.libs/libesl.a" solink="-shared -xlinker -x" cflags="-i/users/spicyramen/documents/opensource/development/freeswitch.git/libs/esl/src/include -i/users/spicyramen/d...

c - CrtIsValidHeapPointer error when trying to free an element of a linked list -

my program crashes error related invalid heap pointer. in first function allocate 5 cells , point "snake_head" first element in list, , "snake_tail" points last element. in second function try free last element list, , move snake_tail next cell in list. went wrong while freeing snake_tail. don't understand is. #include <stdio.h> #include <stdlib.h> typedef struct pos_s { unsigned int x; unsigned int y; }pos_t; typedef struct snake_cell_s { pos_t pos; struct snake_cell_s* next; // struct snake_cell_s* prev; } snake_cell_t; void init_snake(snake_cell_t** snake_head, snake_cell_t** snake_tail) { int i; const int init_snake_size = 5; unsigned int init_snake_x = 5; unsigned int init_snake_y = 5; *snake_head = (snake_cell_t*)malloc(sizeof(snake_cell_t)*init_snake_size); snake_cell_t* snake_cell[init_snake_size]; (i = 0; i<init_snake_size; ++i) { snake_cell[i] = (*snake_head) + i; ...

c# - EventTrigger based on several other controls being given focus -

i have togglebutton : <togglebutton x:name="buttonstudentpicker" content="student picker" horizontalalignment="right" margin="2,10,2,10" borderthickness="0,5,0,0" background="{x:null}"> <togglebutton.layouttransform> <rotatetransform angle="90"/> </togglebutton.layouttransform> <togglebutton.style> <style targettype="togglebutton"> <style.triggers> <datatrigger binding="{binding elementname=buttonbiblereadingmain, path=isfocused, mode=oneway}" value="true"> <setter property="ischecked" value="true"/> </datatrigger> </style.triggers> </style> </togglebutton.style> </togglebutton> i have 2 related issues. firstly, have several elements on interface cause button togg...

ios - self.window.rootViewController.presentedViewController returning nil -

self.window.rootviewcontroller.presentedviewcontroller always returning nil though there viewcontroller available. not sure doing wrong. below full code- - (uiinterfaceorientationmask)application:(uiapplication *)application supportedinterfaceorientationsforwindow:(uiwindow *)window { nslog(@"this loaded"); if ([self.window.rootviewcontroller.presentedviewcontroller iskindofclass:[secondviewcontroller class]]) { secondviewcontroller *secondcontroller = (secondviewcontroller *) self.window.rootviewcontroller.presentedviewcontroller; if (secondcontroller.ispresented) { return uiinterfaceorientationmasklandscape; } else return uiinterfaceorientationmaskportrait; } else return uiinterfaceorientationmaskportrait; } self.window.rootviewcontroller.presentedviewcontroller . think returns uinavigationcontroller type class. please check inside log or debug. uinavigationcontroller* navigationcontroller = (uinavigationcontroller*)sel...

php - Paypal Delayed Chained payment pay key "EXPIRED" error in "Pay" request -

i have been using paypal delayed chained payment. in case first payment successful save respondent pay key in db. after days pay amount second receiver have error " paykey ap-7lm30647vl197891t expired ". how pay amount second reciever. paypal response: paypal\types\ap\executepaymentresponse object ( [responseenvelope] => paypal\types\common\responseenvelope object ( [timestamp] => 2016-06-28t02:34:58.143-07:00 [ack] => failure [correlationid] => c804e78cabc5e [build] => 23046607 ) [paymentexecstatus] => [payerrorlist] => [postpaymentdisclosurelist] => [error] => array ( [0] => paypal\types\common\errordata object ( [errorid] => 580022 [domain] => platform [subdomain] => application [severity] => error [categ...

Dijkstra algorithm in graph is more similar to DFS or BFS? -

i have answer question dont know more similar. saw dijkstra algorithm similar in ways bfs dfs. may explain me answer , why? thanks! neither. dijkstra indeed dynamic programming dp[v] = min{dp[u] + w(u,v)} u has calculated , w(u, v) edge value . it can proved using greedy right. bfs , dfs methods search graph need. kind of things need? if want distance node edge value 1, ok bfs special case of dijkstra. if other algorithm or want other things bfs or dfs, there's noting dijkstra, or not similar them.

Pass array parameter from C# to Oracle for use in select where in statement -

try parse array parameter oracle use in select in statement: c# : string[] arr = new string { "aaa", "bbb" }; oracle : type str_table table of varchar2(20); procedure sp_test ( p_arr in str_table ) begin select * table field in (select column_value table(p_arr)) end; its not work. error cant access table not initialized...

Error while convertiong enhanced for loop with java to c# -

i try have enhanced loop of java code in c# code: for (float value : array) { if (float.isinfinite(value) || float.isnan(value)) { value = 0; } } i tried out: foreach (float value in array) { if (float.isinfinity(value) || float.isnan(value)) { value = 0; } } but have error told me have not right modify value because iteration variable. you need use normal loop if want update iterator variable: for(int = 0 ; < array.length; i++) { if (float.isinfinity(array[i]) || float.isnan(array[i])) { array[i] = 0; } } from c# specifications: the iteration variable corresponds read-only local variable scope extends on embedded statement. during execution of foreach statement, iteration variable represents collection element iteration being performed. compile-time error occurs if embedded statement attempts modify iteration variable (via assignment or ++ , -- operators) or pass iteration variable re...

java - Running Mongodb javascript in Mongo 3.2 -

we upgrading mongodb 3.2. earlier running mongodb javascript used eval function : https://docs.mongodb.com/manual/reference/method/db.eval/ since method deprecated in java driver 3.0, not find similar option execute javascript. used below code earlier mongodb driver , looking similar this. final dbobject command = new basicdbobject(); command.put("eval", <javascript_to_execute>); commandresult result = mongodb.command(command); thanks amandeep as mongo added depreciated warning - there no plan when switched off. as have custom function there - legit check if implemented or implemented in future avoid clash.. see this

web deployment with custom requirements using msdeploy -

i have 2 .net web projects project 1 , project 2. using msdeploy deploy both projects on iis using command line (script). want create structure below while deployment iis on iis default web site\mysite\project 1 default web site\mysite\project 2 project 1 contains 10 folders inside example folder 1 , folder 2, ....,folder 10 want convert folder 6 virtual directory having different physical path (pointing project 2) contents. i using below msdeploy command msdeploy.exe -verb:sync -source:iisapp='d:\deployment\ui',includeacls=true -dest:iisapp='default web site\mysite\project 1',computername="http://xx.xx.xx.xxx:80/msdeployagentservice",username=xxx,password=xxx using same msdeploy command project 1 , project 2 both. how can achieve above requirements. you can use createapp provider convert folder app. regarding physical path change, best option use runcommand provider call appcmd edit physical path site/app. http://www.dotnetcatch.co...

ios9 - How to configure two different APIs with the help of Cocoa pods? -

Image
i have configured afnetworking api of cocoa pods , have configure sdwebimage. tried add " platform :ios, '7.0' pod 'sdwebimage', '~>3.8' "in existing pod file not working , giving me following error shown in image. do need create separate pod file? if yes should located in project directory. this existing podfile : target ‘<myappname>’ pod 'afnetworking', '~> 2.5' pod 'sdwebimage', '~>3.8' end

php - How to handle "504 gateway timeout" in Opencart module -

i wrote module send opencart's orders crm. in case set event post.add not ok because when client refresh shopping cart, order still adding in crm , reason i've got duplicate same order. decided set post.order.history.add event in case i've got 504 gateway timeout. can in situation? note, crm , shop on same vps. this module: public function check_phone($number) { //bla bla bla $retunr $number; } public function on_order_add($order_id) { $this->load->model('checkout/order'); $value = $this->model_checkout_order->getorder($order_id); //prepare loggin $url_login = "*********/login/enter/"; $login = array(); $login["username"] = "username"; $login["password"] = "password"; $login["remember"] = "on"; $login["act"] = "act"; //login $curl = curl_init($url_login); curl_setopt($curl, curlopt_post, true); ...

java - Setting text on Button inside Selection Listener of the same button in SWT -

i have requirement on selection of button need process stuff , based on result have set text on same button. below sample snippet. buttonorganization = new button(parent, swt.push); orgselectionbtnlistener listnerbutton = new orgselectionbtnlistener( buttonorganization, session, false, false ); buttonorganization.addlistener( swt.selection, listnerbutton); and orgselectionbtnlistner class below private class orgselectionbtnlistener implements listener, propertychangelistener { public orgselectionbtnlistener( button orgbutton, session session, boolean isuser, boolean isgrp ) { } @override public void propertychange( propertychangeevent evt ) { string propname = evt.getpropertyname(); if( propname.equals( "orgchanged" ) ) { buttonorganization.settext("new group user"); } } @override public void handleevent( event arg0 ) { buttonorganization = ( button ) arg0.widget; swingutilities.invokelater(...

javascript - Polymer 1.0, How to implement Infinite nested dom-repeat -

i have following json obj, categorylist = [{ "title": "computers", "categories": [ { "title": "laptops", "categories": [ { "title": "ultrabooks", "categories": [ { "title": "lenovo", "categories": [ { "title": "i5 intel" } ] } ] }, { "title": "dell" }, { "title": "macbooks", "categories": [ { "title": "air" }, { "title": "pro" }...

matlab - Check if set values exists in Matrix -

the matrix <1x500> contains different values, trying if-statement check if there 3 different values, lets somewhere must contain 30, 40 , 50 in order evaluate true. don't have come in order. i tried: if any(val == 30) && any(val == 40) && any(val == 50) stuff but it's not working intended, seems evaluate true if 1 of values exists. you have , unnecessary all in there. can use simply if any(val == 30) && any(val == 40) && any(val == 50) alternately, use ismember simultaneously check values in input. if ismember([30 40 50], val)

angular - Multiple request in Angular2 RC1 -

i have used async pipe in angular 2 rc1, lead multiple request server. in angular2 beta 16 have used share method solve this. import {http, headers, requestoptions, urlsearchparams} '@angular/http'; in constructor requesting this._http.get(path, options) in beta version using this._http.get(path, options).share() import 'rxjs/add/operator/share';

c# - How to set time logout in MVC -

one user login in attendance user can logout in after 8 hours. how should code in mvc jquery. var usrtime = ctx.attendances.select(s => s.time && s.id == id); this way user login time. try if (logouttime > usrtime) { window.location.href = '@url.action("actionname", "controllername")'; } then in action log user out , redirect them login

c# - ComboBox SelectedValuePath Validation not working -

Image
i trying implement data validation in xaml / wpf first time. have read several tutorials , there seems variety of ways it. have settled on 1 approach , not working. first, ideally how error displayed ( above combobox , right of label ). if possible ... i created validationrule : using system; using system.globalization; using system.windows.controls; namespace oclmeditor.validationrules { class studypointvalidationrule : validationrule { public bool biblereading { get; set; } public studypointvalidationrule() { biblereading = false; } public override validationresult validate(object value, cultureinfo cultureinfo) { if(value == null) return new validationresult(false, "the study point has not been set."); int istudy = (int)value; if(biblereading) { if(istudy > 17) return new validationres...

bash - Append and replace using awk/sed -

i have file: 2016,05,p,0002 ,cjglopsd8 00,bbf,bbdftp999,051000100,gbp, , -2705248.00 00,bbf,bbdftp999,059999998,gbp, , -3479679.38 00,bbf,bbdftp999,061505141,gbp, , -0.40 00,bbf,bbdftp999,061505142,gbp, , 6207621.00 00,bbf,bbdftp999,061505405,gbp, , -0.16 00,bbf,bbdftp999,061552000,gbp, , -0.24 00,bbf,bbdftp999,061559010,gbp, , -0.44 00,bbf,bbdftp999,062108021,gbp, , -0.34 00,bbf,bbdftp999,063502007,gbp, , -0.28 i want programmatically (in unix, or informatica if possible) grab first 2 fields in top row, concatenate them, append them end of each line , remove first row. like so: 00,bbf,bbdftp999,051...

javascript - How to make regular expression of PAN to progressive regular expression -

i want make progressive regex of pan number. my pan number regular expression "/^([a-za-z]){5}([0-9]){4}([a-za-z]){1}$/" format of pan number -'aaaaadddda' a- alphabets, d- digits why want make progressive regex? i using angular directive set validations on input field. in facing problem pan regex works fine progressive regex. check here plunker referred question angularjs validate input , prevent change if invalid can 1 please suggest me how this? thank you. i think should : regexp = /^([a-za-z]([a-za-z]([a-za-z]([a-za-z]([a-za-z]([0-9]([0-9]([0-9]([0-9]([a-za-z])?)?)?)?)?)?)?)?)?)?$/; because progressively want test regex, that's why test input letter letter. ([a-za-z]){5} <- meant needs 5 letters (all @ same time) because testing every letter input that's why did not work. for example : aaaaa1111a correct according regex aaaaa1111 or aaaaa111 or aaaaa11 or aaaaa1 etc not, that's why regex did not allow input!...

Angular Js 2 not loading the jquery query builder internal script files -

my requirement need load jquery query builder inside modal using angularjs 2 typescript what have done i have created dynamic forms in angularjs 2 contains 3 select box , 1 text box, in text box on-click of have called bootstrap modal inside modal body have coded query builder , created internal java script query builder inside template_rule.html whats happening when click text box modal pop happening , inside modal body 3 buttons rendering , main query builder view in not rendering. this working demo link( http://plnkr.co/edit/d38iwjlhjztjm5t46zd7?p=preview ) demo link functionality in link there button in top left corner click keep on adding set of fields, in set of fields there text box if click text box modal pop up, in rendering query builder, buttons showing core functionality part not showing in modal pop up, query builder script in app/template_rule.html file , necessary libraries included in index.html file, please me resolve this this part of code full w...

ldpi icons not showing android -

Image
i have app has buttons background images specify in layout. mdpi , works fine , can see images. started tested on small device , saw backgrounds show black. checked screen size (small) cater , checked density, saw in case ldpi. rescaled mdpi images 36x36 , created mipmap-ldpi folder. android studio sees in design time reason not picked @ runtime. googled around , saw might have add them manually via android studio. created new resource directory specified density ldpi below : i each icon added new file same name , selected ldpi folder below : and select ldpi directory : i entered same name other densities each icon / image. after still black background thought let me try , assign background programmatically. works. can me why not work when specifying in layout file. have layout file small screens. must specify density ? apologies images. see cannot embed yet because reputation low. update 1 : moved icons drawables recommended , still doing it. read other articles...

java - How to sort or reorder MergeCursor for ListViewAdapter -

Image
i developing simple social media case study. able retrieve post people user follows. here's screenshot: as can see, problem posts not sorted according date/id. instead, sorted according people user follows. because merging cursors using mergecursor. here's part of code: listview listviewfeed = (listview) findviewbyid(r.id.listviewfeed); cursor cursorfeed = dataadapters.getfeed(dbhelper, struserid); //this code retrieving user's own posts cursor cursorfollowing = dataadapters.getfollowing(dbhelper,struserid); //this code retrieving followed users. if(cursorfollowing.getcount()>0) { (int intctr = 0; intctr < cursorfollowing.getcount(); intctr++) { int intuseridi = cursorfollowing.getcolumnindex(tables.followtable.column_userid); string struseridi = cursorfollowing.getstring(intuseridi); cursor cursorfollowingfeed = dataadapters.getfeed(dbhelper, struseridi); \\this code retrievi...

SQL Server: how to set if condition in where -

i need sql server query. have 3 tables documents, modules , folders. document table id title type data folderid module table id label moduleid folderid folder table id label if type = 1 in document table, want folderid module table otherwise should take id itself i tried below query select m.* modules m left join documents ed on cast(m.moduleid varchar) = ed.data m.folderid = 35 or ed.folderid =35 but not able write if condition in can tell me how can that? thanks in advance another option case expression. select m.* modules m left join documents ed on cast(m.moduleid varchar) = ed.data case when type = 1 m.folderid else ed.folderid end = 35

python - DataFrame in list boolean? -

i can select subset using boolean indexing such: df.loc[df['my column'] == 1] what i'd replace == 1 list, [1, 2] . something like: df.loc[df['my column'] in [1,2]] this equivalent of long or statement. how do nicely pandas? (alternative, non-boolean answers too). use isin test membership in list of values: df.loc[df['my column'].isin([1,2])] example: in [18]: df = pd.dataframe({'a':np.random.randn(5), 'b':np.arange(5)}) df out[18]: b 0 -0.118930 0 1 -0.129362 1 2 0.822227 2 3 1.781672 3 4 -0.127322 4 in [19]: df.loc[df['b'].isin([2,4])] out[19]: b 2 0.822227 2 4 -0.127322 4

jquery - jHTMLArea UI not proper -

i had added jhtmlarea specific versions of jquery , bootstrap . ui not aligned , there black background. what problem? here fiddle . the background black because background: #000; set in jhtmlarea.editor.css file. remove file. also heading buttons out of alignment due margin bootstrap css file putting on elements. can override manually: .toolbar li .h1, .toolbar li .h2, .toolbar li .h3, .toolbar li .h4, .toolbar li .h5, .toolbar li .h6, .toolbar li h1, .toolbar li h2, .toolbar li h3, .toolbar li h4, .toolbar li h5, .toolbar li h6 { margin: 0; } working example

javascript - CodeMirror - load file on editor on page load -

i'd load inside codemirror editor local file on page load, i've tried using filerreader apis without success. tried use jquery .load() function can load file in generic textarea not in editor. on page load wait data request complete before initializing codemirror since jquery mentioned use example $(function(){ $.get('path/to/codefile', function(data){ $('textarea#editorid').val(data); // init codemirror }) })

c# - Giant Bomb API Json -

i'm trying use giant bomb api. use newtonsoft.json deserialize response object. i've problem when try convert response classes. i've problem looks array. don't understand , using ref should use make work ... here syntax : public apisearchresult[] results { get; set; } here tutorial : http://social.technet.microsoft.com/wiki/contents/articles/26920.winrt-using-giant-bomb-api-to-get-games-information.aspx after looking @ documentation, appears apisearchresult supposed result . try changing public apisearchresult[] results { get; set; } public result[] results { get; set; } .

jquery plugins - Blueimp file upload resize and Chrome? -

the example client-side resizing @ here disables resizing chrome, comment: // enable image resizing, except android , opera, // support image resizing, fail // send blob objects via xhr requests: chrome increasingly important browser; there way around i've not come across? can (and do) resize on server after upload prefer client-side. actually limitation might obsolete. there 2 related bugs in android's issue tracker, marked "obsolete": https://code.google.com/p/android/issues/detail?id=22441 https://code.google.com/p/android/issues/detail?id=36524 i haven't tested it, glad if confirm it's working , on android version.

ssl - Certificate Pinning with PHP cURL -

i see there tons of post in so, error: ssl certificate problem: unable local issuer certificate and 1 getting. all of answer saying download root certificates from: https://curl.haxx.se/ca/cacert.pem and setting curlopt_cainfo or setting php.ini's curl.cainfo. but telling curl trust list of root ca , trusted ca. from understanding, certificate pinning should ignore these root ca , trust single certificate of particular provider. what correct way fix error? $ch = curl_init($url); curl_setopt($ch, curlopt_ssl_verifyhost, 2); curl_setopt($ch, curlopt_ssl_verifypeer, true); curl_setopt($ch, curlopt_cainfo, '/etc/httpd/static.gc.apple.com.pem'); curl_setopt($ch, curlopt_capath, '/etc/httpd/'); //curl_setopt($ch, curlopt_pinnedpublickey, "sha256//teyzgg/8dvpuksaescb3tsvlehby6w9q63txhoif0tg="); $sslcertificate = curl_exec($ch); i know libcurl itself, has option "curlopt_pinnedpublickey" absol...

c# - Using gulp-sass-glob in Visual Studio -

in visual studio (task runner explorer), trying use gulp-sass-glob in scss: gulpfile.js var gulp = require('gulp'), sass = require('gulp-sass'), sassglob = require('gulp-sass-glob'); gulp.task('css', function () { return gulp.src('./gulp/scss/**/*.scss') .pipe(sassglob()) .pipe(sourcemaps.init()) .pipe(sass({ outputstyle: 'compressed' })) .pipe(sourcemaps.write('.')) .pipe(gulp.dest('./css')); }); site.scss @import "modules/**/*.*"; but in task runner explorer, following error: error: file import not found or unreadable: modules/**/*.* parent style sheet: c:/users/.../scss/site.scss on line 95 of gulp/scss/site.scss >> @import "modules/**/*.*"; does know how fix error or if achievable when using scss , gulp in visual studio? gulp-sass-glob uses glob package path globbing. documentation has say ** : ** if "globstar" alone ...

android - In-App Billing for Beta Users -

my android app on open beta in google play store. do beta-testers have pay in-app billing purchases? if beta-testers install release version of app, iab carry-over? could suggest strategy trying avoid having beta testers pay can't use when update, , conversely don't want give iab free. everything stated here: https://developer.android.com/google/play/billing/billing_testing.html you have read full article can't point important things out, sorry.

c# - Content of child page doesn't show in tabbedpage (Xamarin Forms) -

Image
i'm new xamarin , xaml downloaded sample solution has 3 tabbed pages , each of them contains child page. each child page has label different text on it. managed write program supposed same thing, label doesn't show on of child pages. can change background color , title on child pages. here's code mainpage (tabpage): <?xml version="1.0" encoding="utf-8" ?> <tabbedpage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:pages="clr-namespace:mozaikmuzeum_xamarin.view;assembly=mozaikmuzeum_xamarin" x:class="mozaikmuzeum_xamarin.view.tabpage"> <tabbedpage.children> <pages:actualpage /> <pages:catalogpage /> <pages:badgespage /> </tabbedpage.children> </tabbedpage> and here's code 1 of child pages: <?xml version="1.0" encoding="...

ASP.NET WebApi Identity Facebook login access denied -

i'm building asp.net (4.6) webapi project , i'm using asp.net identity authenticate facebook, google , microsoft api. have managed authenticate google , microsoft, not facebook. i'm using visual studio 2015 the problem access denied every time authenticate. scenario goes this: i make api call localhost:2975/api/account/externallogins?returnurl=%2f&generatestate=true through browser. i receive link api every external provider api support. in facebook case got localhost:2975/api/account/externallogin?provider=facebook&response_type=token&client_id=self&redirect_uri=http%3a%2f%2flocalhost%3a2975%2f&state=99...01 i go link browser, , gets redirected facebook login page. i authenticate facebook, , dialog window appears , asks permission requested information me. i accept , gets redirected api error "access_denied". localhost:2975/api/account/externallogin gets called. i haven't figured out problem comes from, whether permission s...

filter - AngularJS filtering using <tr> tag not working -

i rather new angularjs , trying using ng-repeat display out modules available in school. moreover, trying use filter function filter out modules(both modulecode , moduletitle) through textbox. however, after hours of trying, fail :c. there out there guide me on how filter data? angular.foreach(modulelist, function(value,key){ $scope.modlist.push({ modulecode : modulelist[key].modulecode, moduletitle : modulelist[key].moduletitle, semesters : modulelist[key].semesters }); }); <rd-widget> <rd-widget-header icon="fa-search" title="module search"> <input type="text" ng-model = "searchbox" placeholder="search" class="form-control input-md" ng-keypress="test($event)"/> <p>{{searchbox}}</p> </rd-widget-header> <rd-widget-body classes="mediu...

ios - didSelectViewController behaviour when re clicking/tapping on the active tab bar item -

the documentation says didselectviewcontroller method of uitabbarcontrollerdelegate called when re-clicking on selected item. https://developer.apple.com/library/ios/documentation/uikit/reference/uitabbarcontrollerdelegate_protocol/index.html#//apple_ref/occ/intfm/uitabbarcontrollerdelegate/tabbarcontroller:didselectviewcontroller : in ios v3.0 , later, tab bar controller calls method regardless of whether selected view controller changed. in addition, called in response user taps in tab bar , not called when code changes tab bar contents programmatically. but according tests, it's not (testing on ios9), method called when active view controller changed. doing wrong ? there way detect tap on active tab bar item ? ok, reason method didselectviewcontroller not called when same selected view controller, had other delegate method implemented : - (bool)tabbarcontroller:(uitabbarcontroller *)tabbarcontroller shouldselectviewcontroller:(uiviewcontroller *)viewcon...

How to convert html file to chm format using c#? -

Image
i have thousands of html files , want convert these files chm extension. please way convert html file chm format using c#. thanks. creating files (chm) , authoring has learn curve. @bugfinder mentioned in comment - , warned again - need read lot chm write own in c#. please note, htmlhelp (hh) shipped many years ago ie4 , windows 95. html in maintenance mode, means no new features expected either runtime or compiler. mainstream development on hh has stopped. it's still running under windows10 , best file format windows based applications. you'll find many (and expensive) tools authoring. what i'd recommend rob chandler's shareware tool far html can prefered html-editor outside , put far workflow. or simple use existing html files. it's low priced tool , wizards great. try needs. one tip - don't @ options of far html when starting. put html files structured subfolders of project folder , note chm zipped web e.g. welcome.htm de...

How can I get touch input on Android Wear with OpenGL (Gles2WatchFaceService)? -

i developing watch face android wear. in order have smooth graphics, switched conventional canvas drawing opengl (i. e., canvaswatchfaceservice gles2watchfaceservice). touch input, using @override public void ontapcommand(int taptype, int x, int y, long eventtime) { ... } that doesn't seem work under gles2watchfaceservice. how can still touch input? i found it. style of face watch needs set accordingly (setacceptstapevents) in oncreate function: @override public void oncreate(surfaceholder surfaceholder) { super.oncreate(surfaceholder); setwatchfacestyle(new watchfacestyle.builder(cronosurfglwatchface.this) ... .setacceptstapevents(true) // <== here!! ... .build()); ... } it same canvaswatchfaceservice. reason, lost style setting while changed code canvas opengl.

ios - Export iPhone contacts to .vcf file programatically -

i want choose iphone contacts in contacts application, generate .vcf file, write chosen contacts in file , send server. as know in ios 9 many functions of address book depreciated, can me write code in correct way. the general pieces need are: the contacts framework accessing phone's contacts. the contactsui framework use built-in view controllers accessing contacts. use cncontactvcardserialization.datawithcontacts encode cncontact data vcard format. write data file using data.writetourl . upload data server using nsurlsession . below example answers question of saving contact vcard format. import contacts // creating mutable object add contact let contact = cnmutablecontact() contact.imagedata = nsdata() // profile picture nsdata object contact.givenname = "john" contact.familyname = "appleseed" let homeemail = cnlabeledvalue(label:cnlabelhome, value:"john@example.com") let workemail = cnlabeledvalue(label:cnlabelwor...

arrays - Filter to sort in angular js for JSON data -

i new angular js , have basic understanding of how filters work in angular js.i stuck sort json data array there various parameters on has sorted. my json array in format: [ { type:0, emp_name:"xyz", connected_on:"9876543210" }, { type:1, emp_name:"", connected_on:"9876543210" }, { type:1, emp_name:"abcd", connected_on:"9876543210" }, { type:0, emp_name:"pqr", connected_on:"9876543210" } ] other combination of same array can be: [ { type:0, emp_name:"", connected_on:"9876543210" }, { type:1, emp_name:"xyz", connected_on:"9876543210" }, { type:0, emp_name:"abcd", connected_on:"9876543210" } ] every array have 1 object type:1 , there , after sorting has first element always. after that,the sorted arra...