Posts

facebook - PHP FB Login not working -

i trying create fb login page in php not working. on chrome, blank page, on ie error 500 (page cannot displayed). have curl extension on php installation, have enabled on php.ini file. have created app on facebook. url have put http://localhost/appname testing purposes. code ripped off developers.facebook.com. can please walk me through on going wrong? thanks. <?php require_once('facebook.php'); $config = array( 'appid' => 'xxxx', 'secret' => 'xxxxx', 'allowsignedrequest' => false // optional should set false non-canvas apps ); $facebook = new facebook($config); $user_id = $facebook->getuser(); ?> <html> <head></head> <body> <?php if($user_id){ try{ $user_profile = $facebook->api('/me','get'); echo "name: " . $user_profile['name']; } catch(facebookapiexception $e){ $login_url = $face...

JavaScript vs php amazon api -

so amazon product advertising api in php don't want slow down servers there way use amazon api client side instead of sever side? or php script not effect severs performance on large scale? thank answers. we update 600,000 listings in 1 feed , 400,000 in another.the speed of each little under 30 seconds. the key plausible figure out flat file feeds(while way harder)first because speed of call based more on number of queries rather file size. this because amazon runs query system. means accept feed, tell received it, , undisclosed time later process is. to answer question, way know if fits system build , see.

jasper reports - How to remove unnecessary wrapping in PDF, generated using JasperReports (jrxml)? -

Image
i using jasper report generating pdf report. use following textfield configuration in jrxml file. <textfield isstretchwithoverflow="true" isblankwhennull="true"> <reportelement uuid="ec0e2f1f-82d6-46fd-ba68-394be7f6b015" positiontype="float" stretchtype="relativetotallestobject" isprintrepeatedvalues="false" mode="transparent" x="0" y="0" width="100" height="16" isprintinfirstwholeband="true" isprintwhendetailoverflows="true"/> <box toppadding="2" leftpadding="5" bottompadding="0" rightpadding="0"> <pen linecolor="#757575"/> <toppen linewidth="0.0"/> <leftpen linewidth="1.0"/> <bottompen linewidth="1.0...

Shared objects in Python -

i have few objects, should have shared fields. of them may strings or other immutables. how can share them in best way? variant write container manually. class shared(object): def __init__(self, what_to_share): self.inner_value = what_to_share @property def value(self): return self.inner_value @value.setter def value(self, new_value): self.inner_value = new_value

c# - Using custom type resolver -

i'm trying deserialize yaml document standard .net objects, such string scalar values , dictionary<string, object> mappings, using yamldotnet library. i guess deserializer class best option, output object , dictionary<object> . tried implementing custom inodetyperesolver this: class mynodetypereslover : inodetyperesolver { bool inodetyperesolver.resolve(nodeevent nodeevent, ref type currenttype) { if (currenttype == typeof(object)) { if (nodeevent sequencestart) currenttype = typeof(list<object>); else if (nodeevent mappingstart) currenttype = typeof(dictionary<string, object>); else if (nodeevent scalar) currenttype = typeof(string); return true; } return false; } } and using this: deserializer deserializer = new deserializer(); deserializer.typeresolvers.add(new mynodetypereslover()); var res = deser...

java - How to display table from the database using json response in Android? (I'm getting JsonArray Fail error in this code) -

this attendance.java file package com.glbwebsim; import java.io.bufferedreader; import java.io.inputstream; import java.io.inputstreamreader; import org.apache.http.httpentity; import org.apache.http.httpresponse; import org.apache.http.client.httpclient; import org.apache.http.client.methods.httppost; import org.apache.http.impl.client.defaulthttpclient; import org.json.jsonarray; import org.json.jsonexception; import org.json.jsonobject; import android.app.activity; import android.graphics.color; import android.os.bundle; import android.util.log; import android.view.view; import android.widget.button; import android.widget.tablelayout; import android.widget.tablerow;` import android.widget.textview; import android.widget.toast; import android.widget.tablerow.layoutparams; public class attendance extends activity { static inputstream istream = null; static jsonarray jarray = null; static string json = ""; public void oncreate(bundle savedinstan...

java - For loop inside of for loop not executing -

the second loop executing first number(999) in first loop. trying have second loop execute each number 999-101 in second. int num1 = 999; int num2 = 999; int test1 = 0; string test = ""; for(; num1!=110; num1--){ system.out.println("--------"+num1); for(; num2!=100; num2--){ system.out.println("++++++++"+num2); test1 = num1*num2; test = string.valueof(test1); //system.out.println("checkpoint 2"+"--------------"+test1); if(test.length()==5){ if(test.charat(0)==test.charat(5) && test.charat(1)==test.charat(4) && test.charat(2)==test.charat(3)){ system.out.println("checkpoint 1"+"----------"+test); break; } else{ //system.out.println("fail 1"); } } } } after first run of second loop num2 has value 100 statement num2!=100 ...