Posts

angularjs - Getting 403 error while accessing facebook user profile pic -

facebook api returns me facebook profile picture url. save url in db , fetch there when view profile page. i'm trying show facebook profile picture in profile page of angularjs application i'm building. this url getting response. https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/14100401_286861985019877_63722353171428782_n.jpg?oh=b2bfb6e86553aef6f37989d965e5375e&amp;oe=58584dc1 i'm trying show this. <img src="https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/14100401_286861985019877_63722353171428782_n.jpg?oh=b2bfb6e86553aef6f37989d965e5375e&amp;oe=58584dc1" ng-src="https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/14100401_286861985019877_63722353171428782_n.jpg?oh=b2bfb6e86553aef6f37989d965e5375e&amp;oe=58584dc1" class="img-circle"> i fetch db , save in variable , pass variable src, i'm getting network error: 403 forbidden. but when edit html console , hard code url, shows. why facing such issue? my faceboo...

javascript - How to prevent Axios from encoding my request parameters? -

i'm trying pass in api key through url parameters in request. however, notice axios encodes characters in api key when sending request. causes api reject request couldn't recognise key. how can prevent axios encoding parameters? you can use custom param serializer follows: axios.get('https://foobar.com/api', { paramsserializer: function(params) { var result = ''; // build query string return result; } }); paramsserializer can set @ instance level: var instance = axios.create({ paramsserializer: function(params) { /* ... */ } }) or @ global level: axios.defaults.paramsserializer = function(params) { /* ... */ }; another option directly add api key url: axios.get('https://foobar.com/api?api_key=' + key); you can add additional parameters using `params' config option: axios.get('https://foobar.com/api?api_key=' + key, { params: { foo: 'bar' } });

android - Resize height of Infowindow -

i have google map showing current location , place name in infowindow. it's working well, problem when place name long, @ time, whole text not showing in infowindow this . how can resize infowindow? code below: private class custominfowindowadapter implements googlemap.infowindowadapter { private view view; public custominfowindowadapter() { view = getlayoutinflater().inflate(r.layout.info_window, null); view.setlayoutparams(new relativelayout.layoutparams(500, relativelayout.layoutparams.wrap_content)); } @override public view getinfocontents(marker marker) { if (checkin.this.marker != null && checkin.this.marker.isinfowindowshown()) { checkin.this.marker.hideinfowindow(); checkin.this.marker.showinfowindow(); } return null; } @override public view getinfowindow(final marker marker) { checkin.t...

ios - Why must I define variables twice in the Header file? -

why must define variables twice in header file? differences there between these variables? the first definition here: @interface mycontroller: uiviewcontroller { nsinteger selectedindex; } the second definition here: @property (nonatomic) nsinteger selectedindex; what you're seeing required in earlier versions of objective-c, isn't more. in first versions of objective-c used next until new runtime introduced (with objective-c 2.0 on mac os x), instance variables had declared part of class's structure in @interface . reason if subclassed class, compiler needed know instance variable layout of class see @ offset put subclass's instance variables. when properties introduced, synthesized properties had "backed" instance variable in class's structure. therefore had declare both instance variable , property. all of above no longer true. newer objective-c less fragile in way looks instance variable...

c++ - SFML & OpenGL(glew) Why does my program fail when drawing to new window? -

i have problem regarding sfml windows, contexts , opengl drawing follows: when create new window draw (because need fullscreen or changed delicate context settings @ runtime) use sf::window::create(args...) create new window, old 1 vanishes. understanding not affect opengl calls, because "active" states of contexts windows hold set automatically (so new window active). so why opengl fail draw new window or stops working ? i use wrappers sfmlcontents(sfmlhandler) , hide opengl calls in class(graphics). here's code: constructor of mainapp: mainapp::mainapp() { imediahandle::contextsettings settings; settings.depth = 24; settings.stencil = 8; settings.antialiasing = 0; settings.openglmajor = 3; settings.openglminor = 3; sfmlhandle.createwindow("test", 800, 600, settings); graphics.init(); //i want able following line sfmlhandle.createwindow("test", 200, 400, settings); } this code works fine old wind...

Android : How to set ClickListener for Pop-Menu in Card View? -

Image
i'm developing android music streaming application. have card views , each card view has pop menus (as shown in image) . want id of card clicked. albumadapter class extends recyclerview , can't set id of card clicked. showing error red lines. the code have set having error inside lines.. albumsadapter.java.. public class albumsadapter extends recyclerview.adapter<albumsadapter.myviewholder> { private context mcontext; private list<album> albumlist; public class myviewholder extends recyclerview.viewholder { public textview title, count; public imageview thumbnail, overflow; public myviewholder(view view) { super(view); title = (textview) view.findviewbyid(r.id.title); count = (textview) view.findviewbyid(r.id.count); thumbnail = (imageview) view.findviewbyid(r.id.thumbnail); overflow = (imageview) view.findviewbyid(r.id.overflow); } ...

php - How to open port in Ubuntu 14.04 for Sendgrid -

i have problem send email through sendgrid host. https://sendgrid.com/docs/classroom/basics/email_infrastructure/smtp_ports.html how open port 25, 2525, 465 , 587 respectfully send mail sendgrid? thanks sendgrid provides rest api , dont need open ports that. article refers setting own smtp server not want. have @ this example better explain how can send mail using sendgrid.