Posts

Showing posts from January, 2015

php - How to detect if ssl is enabled by entering url? -

i developing system can check if remote server has or not ssl enabled input simple url, example http://www.stackoverflow.com how can ? using curl invoke given url get header curl read header info returned curl response for curl library , curl function, go through http://php.net/manual/en/book.curl.php

object member assignment in python -

this question has answer here: list of lists changes reflected across sublists unexpectedly 13 answers class func: def __init__(self): self.weight = 0 class skill: def __init__(self, bson): self.f = [func()]*5 in range(0,5): self.f[i].weight = bson['w'+str(i+1)] d = {"w1":20,"w2":0,"w3":0,"w4":0,"w5":0} s = skill(d) print s.f[0].weight the output 0 rather 20. hard figure out difference of class member , object member in python. you should not create list of func in way self.f = [func()]*5 you should use list comprehension or other method self.f = [func() _ in range(5)] in first method, creating list of length 5, elements pointing same instance of func . don't want this, want create list of 5 different instances of func .

flash - Broken Adobe Air Installers, Do I Need a Certificate -

this multi-part question, resolve same issue. i'm trying publish project i've been working on intermittent problems .air files generated. i following warning when publishing project: "there error connecting timestamp server. may not have connection network, or server may have problem. if choose disable timestamping, air application fail install when digital signature expires." so have had no choice disable timestamping. i have working internet connection, i'm working company network, issue, , if so, there work around (opening specific port or something)? also, how long above-mentioned digital signatures have before expiring? also, creating own certificate. need purchase kind of certificate/license install application on computer? i've done research, information hard find, , find kind of cryptic @ best. currently, need deploy machines within company. sometimes installer works fine , without issue (on computer generated @ least), other times

noise in dac output in fft filter -

i designed fft filter (taking forward , inverse fft) in keil uvision using stm32f429 discovery board. on taking output dac oscilloscope, between 2 consecutive dac outputs lot of noise occurs. any in coding or other related knowledge of great help. link oscilloscope pics displaying output dac(yellow) , input signal(pink) , fft filter code posted below: link1: https://drive.google.com/open?id=0b9ng28trmeefvlbstdnizg1euwm&authuser=0 link2: https://drive.google.com/open?id=0b9ng28trmeefzglfdwc1n2q5znm&authuser=0 since mentioned decreasing number of samples in fft reduces issue sounds processing speed issue. an fft has o(n log2(n)) increasing number of samples increases amount of processing power required. how coming number of samples need? frequency resolution need application? if intend sample rate stay now, way change time , frequency resolution changing number of samples. i recommend coming minimum frequency resolution required. round number of sampl

php - Facebook - Fan page Tab & registration -

i have site require social registration , login have set facebook app , integrated laravel , socialite. now need allow users visit site , vote images ( allowed registered user) in facebook fun page tab. is possibile? can use same app id have created social login or should create tab app , include facebook js sdk? which best workflow situation? it sure possible. 1 way check if user logged in before visiting route can done this. example laravel 5.0 route::get('facebook-fun-page-tab', ['middleware' => 'auth', function() { // authenticated users may enter... }]); //or if use controller route::get('facebook-fun-page-tab', ['middleware' => 'auth', 'uses' => 'profilecontroller@show']); and yes use same facebook id. more on laravel authentucation , protecting routes. more on middleware. one workflow this: 1. login in user/register facebook 2. after login, redirect user vote-image page

node.js - Debugging protractor tests from the console -

i have protractor test run via gulp-protractor. how can debug test using command line (for example via node debugger)? is there configuration option this? recently (as of protractor 5.0.0) recommended way has become browser.enterrepl() .

java - jax-rs Download file from server -

i trying download file server rest request. request sent, seems fine get: org.jboss.resteasy.spi.writerexception: java.io.ioexception: stream closed. i think might because jsf processing response afterwards. use: facescontext.responsecomplete(); rest request not have access facescontext (it null). here java code: response.setcontenttype(piecejointe.getcontenttype()); response.addheader("content-disposition", "attachment; filename=\"" + piecejointe.getnom() +"\""); if (file.exists()) { fileinputstream fi; try { fi = new fileinputstream(file); servletoutputstream os = response.getoutputstream(); int b = fi.read(); while (b != -1) { os.write(b); b = fi.read(); } os.flush(); os.close(); fi.close(); } catch (filenotfoundexceptio

javascript - How to send form data in node.js -

i able server unable post form data. how should post form data https request? using form-data library form-data, , https request post call. when run following code, able reach service, service gives response saying form data not submitted. var https = require('https'); var formdata = require('form-data'); //var querystring = require('querystring'); var fs = require('fs'); var form = new formdata(); connect(); function connect() { username = "wr"; password = "45!" var auth = 'basic ' + new buffer(username + ':' + password).tostring('base64'); var options = { hostname: 'trans/sun.com', port: 443, path: '/transfer/upload-v1/file', method: 'post', rejectunauthorized: false, headers: { 'authorization': auth, 'content-type': 'application/json', //'content-len

C# Secure Video Encryption -

i have set of videos want wpf application access , play it. user should not have access file directly or copy it. i tried few ideas such - password protecting folder http://www.codeproject.com/articles/20880/folder-protection-for-windows-using-c-concepts-on folder permissions. not working well. any ideas appreciated. thanks. if have server create api , send stream, setup permissions , add them in code if have network share use permission , use windowsidentity.impersonate if must local need store encrypted , decrypt it. be aware streams can captured , saved

php - jQuery View Uploaded File -

i trying upload file view file on iframe not working. here have tried jquery('.file_upload1').change(function(){ jquery('iframe').attr('src', jquery(this).val()); $('iframe').attr('src', $('iframe').attr('src')); }); <label><input class="file_upload1" name="file_cover" type="file"></label> <div> <iframe src=""></iframe> </div> if not work, can move uploaded file server directory path becomes valid? how this? apart other problems , limitations of such solution, , answering "why not work?" question: the change event needs nested in ready function: jquery("document").ready(function() { jquery('.file_upload1').change(function() { jquery('iframe').attr('src', jquery(this).val()); }); }); the src attribute of iframe must a valid non-empty url potentially surrounded

c# - List<dynamic> elements have fields but I cannot access them. Why? -

Image
i need loop on list<dynamic> objects. the list's objects have values, reason, not able access of dynamic object fields. below screenshot of debug window: there can see object contains fields (such alias , id , name , etc). i tried both casting idictionary<string, object> , expandoobject , no avail. did not face such thing before: failing access existing fields in dynamic object when exist . what wrong here? the code throwing microsoft.csharp.runtimebinder.runtimebinderexception message stating {"'object' not contain definition 'name'"}. the list created adding anonymously-typed objects, this: return new list<dynamic>(fields.select(field => new { id = field.id, alias = field.alias, name = field.name, type = field.type, value = field.value,

templates - C++ - recursive type or function dependency too complex -

i try compile same code, succeed using g++ , failed when using msvc12. here code: template <typename t> struct kernel_type { typedef t ret; }; template <typename tag, typename a, typename b, unsigned offset = 0> struct binary_op_ { typedef typename kernel_type<a>::ret a1; enum { offset_a1 = 16 - ((16 - 1 + offset) % 16) - 1, offset_a2 = 16 - ((16 - 1 + (offset + offset_a1 + sizeof(a1))) % 16) - 1 }; }; the error caused offset_a1 in offset_a2 expression, somehow msvc12 compiler unable derive offset_a1 expression. if replace offset_a1 full expression, error fixed. knows happens here or missed change settings in msvc12?

javascript - org.thymeleaf.exceptions.TemplateInputException : Exception parsing document: template="result", line 28 - column 23 -

i using spring boot, thymeleaf , javascript controller package demo; import java.sql.connection; import java.sql.statement; import org.springframework.boot.autoconfigure.web.errorcontroller; import org.springframework.stereotype.controller; import org.springframework.ui.model; import org.springframework.web.bind.annotation.modelattribute; import org.springframework.web.bind.annotation.requestmapping; import org.springframework.web.bind.annotation.requestmethod; @controller class testcontroller implements errorcontroller{ protected connection conn; private static final string path = "/error"; public testcontroller() { super(); } // en cas d'érreur @requestmapping(value = path) public string error() { system.err.println("test1"); return "error"; } @override

debugging - How do I build, deploy and debug standalone java app on remote machine? -

Image
how build, deploy , debug standalone java app on remote machine idea ? i have remote machine hardware device connected it. want develop standalone java app on pc, build locally app should deployed , running on remote machine accessible via ssh. i'll using java remote debug. i've googled extensively couldn't understand if it's possible achieve in idea (even though idea allows java servlet containers). tried "remote ssh external tools" plugin. i'm not sure specify in following dialog (which seems have bug ) what options have ? if machine reachable via ssh need 2 things: configure java application remote debugging connect application via ssh this tutorial should going: remote debug of java app using ssh tunneling

Refinement in Ruby -

is there way limit effect of refinement in single ruby program apart using within module? for example, let's name of refinement stringrefinement , type using stringrefinement comes effect , in effect till end of program file. is there way limit boundary later part of program doesn't have effects of refinement? just wrap application in module uses refinement: module myapp using stringrefinement def self.run! # job end end

javascript - Hidden form field but to still show required validation if no set value -

i have form fields populated javascript based on how user interacts webpage. <input type="hidden" class="evaluation_answer" required name="evaluation_1"/> <div class="options"> <div class="option"> <i class="fa fa-star-o fa-2x"></i> </div> <div class="option"> <i class="fa fa-star-o fa-2x"></i> </div> <div class="option"> <i class="fa fa-star-o fa-2x"></i> </div> <div class="option"> <i class="fa fa-star-o fa-2x"></i> </div> </div> the value field gets populated javascript. var stars = document.getelementsbyclassname("fa-star-o"); for(var = 0; < stars.length; i++) { stars[i].addeventlistener("click", function(){ console.log("empty star clicked.

c# - Return XML document with REST API -

i return xml document rest api request: [httppost] public string getclassxml(httprequestmessage req) { var response = request.createresponse(httpstatuscode.ok); var serializer = new system.web.script.serialization.javascriptserializer(); classxml classid = new classxml(); xmldocument doc = new xmldocument(); try { var data = req.content.readasstringasync().result; classid = serializer.deserialize<classxml>(data.tostring().trim()); } catch (exception ex) { throw new exception(ex.message); } string path = asdb.readvalue("select definitionxml alclass classid='" + classid.classid + "'").tostring(); xmltextreader reader = new xmltextreader(appdomain.currentdomain.basedirectory + "resource\\" + percorso); reader.read(); doc.load(reader); return doc.innerxml; } but in way string, have xmldocument not string. tried return xmldocument doc

php - copy of sugarcrm (or in general: copy of project) not working -

i'm working on sugarcrm project (it's free crm system). i've developed on own machine xampp , netbeans. local copy works fine, if try copy second machine, of customizations don't work more. what tried: - sqldump of used database. executed on second machine. quick inspection, seems copied. - copied project folder of installdir/xampp/htdocs/myproject installdir/xampp/htdocs/myproject on second machine obviously, have overseen something. compared php.ini of both machines. login credentials db same ( root@localhost ). and ideas i've missed? thank you!

c# - Change value of an index in an array, shift indexes starting at old index to the right, while leaving all indexes to the left intact -

i have array , have new value want insert array @ index less left of it, , greater right of it. care 10 indexes, old values pushed beyond index [9] shall destroyed. i tried accomplishing way: private double[] scores = {1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1}; public void newscore(double score){ (int = 0; < scores.length; i++){ if (score > this.scores[i]){ array.copy(this.scores, i, this.scores, + 1, this.scores.length - i); this.scores[i] = score; break; } } } newscore(0.75); //desired result: {1.0, 0.9, 0.8, 0.75, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2}; my goal 0.75 inserted between 0.8 , 0.7 while values less 0.75 shift right , old value @ score[9] disappear. i having issues array.copy(); method. there better way accomplish trying do, or have made simple mistake cannot find? i have searched other solutions ones have found shift indexes either right or left instead of values less value inserted.

c++ - Why can I pass a string parameter like this? Is this style safe? -

i passing 2 strings 1 parameter in xcode , using c++. tried in xcode , works. safe on platforms? #include <iostream> void log_person(const char* name_and_number){ printf("name , number : %s.\n", name_and_number); } int main(int argc, const char * argv[]) { log_person("jim" "123456789"); return 0; } you passing single string. this "foo" "bar" is equivalent to "foobar" so call same as log_person("jim123456789"); this standard c++ , "safe" on conforming implementation. see 2.14.5/13 in c++11 standard: 2.14.5 string literals ... 13 in translation phase 6 (2.2), adjacent string literals concatenated....

c++ - qmake set platform toolset -

i'm using scripts build projects , open them visual studio 2013 got project has build platformtoolset v100 (visual studio 2010). question is: there define or i've add *.pro file or there parameter i've use qmake create right toolset? if not, there other way?

html5 - Outlook does not work with HTML -

my outlook 2010 not work html5 code. works fine gmail , hotmail . the problem outlook spreads whole code on whole page. , not align code correctly. can me solve problem , or @ least tell me doing wrong? code is: <!--row 1--> <tr style="position:fixed; width:794px;height:200px; margin-left:1050px;"> <td class=uni style="margin-top: 18px;margin-left:1000px;height:17px;width:41px;">l</td> </tr> <!--row 2--> <tr style="position: fixed; margin-left: 750px;"> <td class=uni style="top:32px;left:655px;height:34px;width:96px;font-size:22pt; " >lossen</td> </tr> <!--row 3--> <tr style="position: fixed; margin-top: 100px "> <br> <td class=uni style="top:128px;left:56px;height:17px;width:20px;">bonnummer</td> <td class=uni style="top:127px;left:130px;height:17px;width:85px;">

iso prolog - WARNING: The predicate =/2 is unknown -

i'm trying transfer file written sicstus prolog tuprolog. i error message: warning: predicate =/2 unknown. (the code works in sicstus, not in tuprolog). what should use instead of =/2 tuprolog? difference in syntax?

css - Guides not properly display when moving jquery-ui-draggable boxes inside element has position relative and margin auto -

i've tried sample @ here https://stackoverflow.com/a/10246981/3892316 if put element inside parent div position relative , center div margin auto -> not working properly. html: <div class="well grid-guide" style="height: 1123px; width: 794px;" id="droptarget" data-role="droptarget"> <div class="canvas" id="6182df68-a629-4258-9329-571ea313379b_ui-id-1" style="position: absolute; top: 86px; left: 329px;"> <div style="padding:5px;border-radius:7px;" class="elementcontainer"> <label class="canvas-span" id="label_6182df68-a629-4258-9329-571ea313379b_ui-id-1">click here change </label> <div class="ui-wrapper" style="overflow: hidden; width: 200px; height: 30px; padding-right: 0px; padding-bottom: 0px;"> <input style="width: 200px; height: 30p

swift - How to hide the back button from the status bar on the Apple Watch? -

i want hide button apple watch app status bar. i used programmable segue navigate. want to hide/disable button. possible? this how it: wkinterfacecontroller.reloadrootcontrollerswithnames( ["myinterfacecontroller"], contexts: [] ) notes: "myinterfacecontroller" identifier of interface controller destiny. thanks harvant pointer.

java - Hibernate - how to use cascade in relations correctly -

i'm using hibernate in spring mvc application , have question cascade. see many similar questions it, none of them can answer question. suppose have user , userposition objects. user has collection of userposition , has 1 userposition default position. structure this: user: @onetomany(mappedby = "user", fetch = fetchtype.lazy) private collection<userposition> userpositioncollection; public collection<userposition> getuserpositioncollection() { return userpositioncollection; } public void setuserpositioncollection(collection<userposition> collection) { this.userpositioncollection = collection; } @onetoone(fetch = fetchtype.lazy, cascade = cascadetype.all) @joincolumn(name = "default_user_position_id", referencedcolumnname = "id") private userposition defaultuserposition; public userposition getdefaultuserposition() { return defaultuserposition; } public void setdefaultuserposition(userposition defaultuse

Unrecognized commands in bash are captured by the python interpreter -

every time try invoke command not exist ( $ a , example) in console (/bin/bash) interpreter waits long time. , when interrupt (^c), error message python interpreter. instead of that, expect tell me command unrecognized. why happening? $ ^c traceback (most recent call last): file "/usr/lib/python2.7/encodings/__init__.py", line 32, in <module> root@dell:/home/antonio/workspace/biz_index# encodings import aliases file "/usr/lib/python2.7/encodings/aliases.py", line 17, in <module> """ keyboardinterrupt ^c if setting path="" fixes it, something, somewhere shadowing python package getting called command-not-found package. did myself writing script called struct.py . need go through every directory in path, i.e. /home/antonio/.local/bin /home/antonio/.local/bin /usr/local/sbin /usr/local/bin‌​ /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games and .py files there. 1 of them shares name 1 of bui

c - invalid operands of type 'int' to 'int*' to binary 'operator*' -

i working on program swaps 2 integer variables. when compile error invalid operands of type 'int' 'int*' binary 'operator*' on line 30 (second last line). #include <stdio.h> #include <stdlib.h> void swap_2(int *x, int *y); int main(void) { int i1, i2; printf("enter 2 integers\n"); scanf("%d %d", &i1, &i2); printf("i1 = %d\n", i1); printf("i2 = %d\n", i2); printf("swap integers\n"); swap_2(&i1, &i2); printf("i1 = %d\n", i1); printf("i2 = %d\n", i2); system("pause"); return 0; } void swap_2(int *x, int *y) { int temp; temp = *x; *x = *y *y = temp; **//line 30** } you're missing semicolon on line 29. void swap_2(int *x, int *y) { int temp; temp = *x; *x = *y <----------- missing semicolon *y = temp; **//line 30** }

regex - Perl statement to change a value in file not working fine -

i need change statement 1 statement 2 in perl not working,. statement 1 = label ='answerone' statement 2 = suspense using below statement not works : perl -pi -e 's/<label ='answerone'> /suspense/' /home/apanikar/public_html/tests/sub1/chp1/l1/q2.php you don't need include < , > symbols. perl -i -pe "s/\blabel ='answerone'/suspense/g" file i think be, perl -i -pe "s/\\blabel ='answerone'/suspense/g" file or perl -i -pe 's/\blabel ='"'answerone'/suspense/g" file

Accessing repository pattern through one more layer called service in Laravel -

i have created 1 repository layer in project accessible through controller method using interface. want add, service layer. means want controller method operations done through service. created 1 file inside service folder , tried access of repository functions through service. there have crated 1 constructor repository access .. getting error public function __construct(ifamilyrepository $familyrepository){ $this->$familyrepository = $familyrepository; // getting error on line } public function testrepository(){ $this->$familyrepository->getallgrandfather(); return "null"; } i getting error : errorexception in familyservice.php line 19: object of class app\repositories\eloquent\familyrepository not converted string in familyservice.php line 19 @ handleexceptions->handleerror('4096', 'object of class app\repositories\eloquent\familyrepository not converted string', 'd:\files\xampp\htdocs

c# - How do you read the serial port with windows 10 core -

using python on raspberry pi use similar code shown below read data serial port: baud = 9600 # baud rate port = '/dev/ttyacm0' # serial urf port on computer ser = serial.serial(port, baud) ser.timeout = 0 var message = ser.read(9); essentially want able read message off serial port , perform action based on message. how can achieved using windows 10 core , c#, can point me in right direction or provide code sample? thanks in advance received. it turns out serial port on pi not supported yet, frustrating: https://www.raspberrypi.org/forums/viewtopic.php?t=109047&p=751638 here supported way: serialport = await serialdevice.fromidasync(comportid); serialport.writetimeout = timespan.frommilliseconds(1000); serialport.readtimeout = timespan.frommilliseconds(1000); serialport.baudrate = 115200; serialport.parity = serialparity.none; serialport.stopbits = serialstopbitcount.one; serialport.databits = 7; serialport.handsh

python - I return a dict from the views.py to the templates as a value of a radio, but it looks like the "value" would cut down the text -

this templates,test_words.html <form action="" method="get"> <input type="radio" name ="option" value={{pre_ques.option1}}> {{pre_ques.option1}}</label> <input type="radio" name ="option" value={{pre_ques.option2 }}> {{pre_ques.option2}}</label> <input type="radio" name ="option" value={{pre_ques.option3 }}>{{pre_ques.option3 }}</label> <input type="radio" name ="option" value={{pre_ques.option4 }}>{{pre_ques.option4 }}</label> <input type="submit" class="btn btn-primary btn-lg btn-block" name="next" value="show next"> </form> and show in <label> {{pre_ques.option4 }}</label> bu, if try option_value = request.get.get('option') return httpresponse (option_value) it show part of {{pre_ques.option4}}, show "a.&quo

ios - base64 encoded image and add it to UIImage -

i creating captcha image client needs. getting json image 2 key values. key: captchatext, value: ueu3vnwh0lndy8uyl+jwsq== key: captchaimage, value: /9j/4aaqskzjrgabaqeayabgaad/2wbdaaggbgcgbqghbwcjcqgkdbqndasldbksew8uhrofhh0ahbwgjc4nicisixwckdcpldaxndq0hyc5ptgypc4zndl/2wbdaqkjcqwldbgndrgyirwhmjiymjiymjiymjiymjiymjiymjiymjiymjiymjiymjiymjiymjiymjiymjiymjiymjl/waarcabgajydasiaahebaxeb/8qahwaaaqubaqebaqeaaaaaaaaaaaecawqfbgcicqol/8qatraaagedawieawufbaqaaaf9aqidaaqrbrihmuege1fhbyjxfdkbkaeii0kxwrvs0fakm2jyggkkfhcygroljicokso0nty3odk6q0rfrkdisuptvfvwv1hzwmnkzwznaglqc3r1dnd4exqdhiwgh4ijipktljwwl5izmqkjpkwmp6ipqrkztlw2t7i5usldxmxgx8jjytlt1nxw19jz2uhi4+tl5ufo6erx8vp09fb3+pn6/8qahweaawebaqebaqebaqaaaaaaaaecawqfbgcicqol/8qatreaagecbaqdbacfbaqaaqj3aaecaxeebsexbhjbuqdhcrmimoeifekrobhbcsmzuvavynlrchyknoel8rcygromjygpkju2nzg5okneruzhselku1rvvldywvpjzgvmz2hpann0dxz3ehl6gooehyahiimkkpoulzaxmjmaoqokpaanqkmqsro0tba3ulm6wspexcbhymnk0tpu1dbx2nna4upk5ebn6onq8vp09fb3+pn6/9oadambaairaxeapwd1oiiigaooooakk

ios - UIButton won't generate randomly when score is added? -

i having problem coding on xcode. making app in target appears, have tap it, time allowed between each tap shortens gradually. my problem: whenever try , make uilabel update after tap, target goes it's original position on view controller. have relevant code here: -(ibaction)startbuttonpressed:(id)sender { startbutton.hidden = yes; text.hidden = yes; targx = arc4random() %769; targy = arc4random() % 925; target.center = cgpointmake(targx, targy); target.hidden = no; } -(ibaction)targettapped:(id)sender { [time invalidate]; targx = arc4random() %769; targy = arc4random() % 925; [self scoreadd:(id)sender]; target.center = cgpointmake(targx, targy); timemax = 5 - (score * 0.05); if (score >= 90) { timemax = 0.5; } time = [nstimer scheduledtimerwithtimeinterval:timemax target:self selector:@selector(lose:) userinfo:nil repeats:no]; } -(void)lose:(id)sender { target.hidden = yes; text.hi

Refer database tables in R -

i have database name team has 40 tables . how can connect database , refer particular table without using sqlquerry. use of r data structures. i not sure mean " how can connect database , refer particular table without using sqlquerry ". i not aware of way "see" db tables r dataframes or arrays or whatever without importing tuples first through sort of query (in sql) - seems practical way use r db data (without going hassle of exporting these .csv files first, , re-read them in r). there couple ways import data db r, result of query becomes r data structure (including proper type conversion, ideally). here short guide on how sql-r a similar brief introduction dbi family

javascript - Android counterpart for 'stringByEvaluatingJavaScriptFromString' -

supposedly have nsstring *html = [webview stringbyevaluatingjavascriptfromstring:@"document.getelementbyid('infopageid').innerhtml"]; in ios. returns string value. now, can body me how can use function in android able value of html load webview. per research, looks way in android, don't know if right. webview.loadurl("javascript:document.getelementbyid('infopageid').innerhtml"); i want know how able set value of in string.

How to install Google Play Service 7.3.0 or above in Android Emulator? -

i integrating google plus sign in app. thing have updated in android sdk still when run app in android emulator, error in android studio saying "google play services out of date. requires 7327000 found 6774480" . android studio doesn't allow me use older version of play services. i searched different ways install latest google play service offline (.apk) gives incompatibility error when run using "adb install gps.apk". how latest android os image has old version of google play service installed , not update indicator in android sdk these services? use apk mirror , contains version of google play services. p.s. remember uninstall installed version of google playservice device before installing new one.

c++ - ifstream no conversion from char to char exists error -

int main() { char buffer[1024]; ifstream datafile ("./data.dat"); while(buffer) { localhouse->location = datafile.getline(buffer, 1024); } } this throws error: no suitable converion function "std::basic_istream<char, std::char_traits<char>>" "char" exists. it continues throw error if use pointer buffer instead. far can tell i'm using seen in example here . there's example on stackoverflow here that shows similar usage can't work, , it's causing me tear hair out on error seems can't convert char char. >.< getline's return value istream object guess it's not want assign localhouse->location. getline reads line of file buffer variable have provided first parameter.