Posts

php - Display checkmark &#x2713 in tcpdf -

i'm using tcpdfs writehtml convert html-code pdf . works fine far except checkmark (&#x2713) converted questionmark instead of... well, checkmark ;-) pdf created utf-8, neither feeding checkmark nor hex-representation resulted in showing correct checkmark. tried used fonts helvetica , times , shipped tcpdf, both display ?. idea how checkmark pdf? try one html_entity_decode('✓', ent_xhtml,"iso-8859-1");

neo4j - How do I create multiple weighted edges between nodes -

Image
i want keep browse history, to calculate behaviour among browsing pages. so designed following graph show idea, as can see, there 4 edges between page a , page b , so how create kind of relationships , nodes ? how average browsing time ( 20min ) min browsing time max browsing time any suggestion , ideas? thanks i'm bit confused. relationship mean? represent amount of time spent on page before user browses page b? just going model , goals, maybe work? match (a:page)-[r:browsed_to]->(b:page) return avg(r.time_spent) for min , max time replace avg min , max

Display Image in android Imageview using Asynctask -

i have image being sent me through json string. want convert string image in android app , display image in imageview.i have problem, using asynctask , code in doinbackground method: protected boolean doinbackground(final string... args){ jsonparser jsonparser = new jsonparser(); jsonarray json = jsonparser.getjsonfromurl(url); if(json!=null){ (int = 0; < json.length(); i++){ try{ jsonobject c = json.getjsonobject(i); string displayimagefromurl = c.getstring(imageurl); string clearurl = displayimagefromurl.substring(displayimagefromurl.indexof(",")+1); byte[] decodingstring = base64.decode(clearurl, base64.default); bitmap = bitmapfactory.decodebytearray(decodingstring, 0 , decodingstring.length); string showcreateddate = c.getstring(createddate); string showarticletitle = c.g...

php - Google Admin SDK: You are not authorized to access this API -

Image
since google login auth disabled since last week i'm trying oauth 2.0 working service account. want give users on our internal web application oppurtunity set there out of office. i downloaded lastest google apis client library php . in google developer console , have created new project application , created service account credentials. have enabled api service: admin sdk in developer console. i have granted account user id access correct scopes (i think): when use service-account.php example , change details, recieve json access token, when curl request (same before) e-mail settings user, error "you not authorized access api." occur. my code: <?php include_once "templates/base.php"; require_once realpath(dirname(__file__) . '/../src/google/autoload.php'); $client_id = '124331845-deletedpart-hbh89pbgl20citf6ko.apps.googleusercontent.com'; //client id $service_account_name = '124331845-deletedpart-89pbgl20citf6ko@devel...

python - Installing eggs theme in django-oscar -

i found theme django-oscar here : https://github.com/eggforsale/oscar-eggs-theme there no documentation available install it. tried replacing appropriate files in oscar/templates directory doesn't work.

Display a scrollable image from a url in android studio -

i'm trying create activity display image obtained url. want width of image adapt screen height of image can longer screen image becomes scrollable (vertically). first of all, displayed image drawable folder , worked following code : <scrollview android:layout_width="fill_parent" android:id="@+id/scrollview1" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:scrollbaralwaysdrawverticaltrack="true"> <linearlayout android:id="@+id/linearlayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal"> <imageview android:src="@drawable/programme" android:layout_height="wrap_content...

scala - Using locks on Akka Actors -

i have actor goes (assume receive method overridden somewhere else): class myclass extends actor { def method1() = { ... } def method2() = { ... } def method3() = { this.synchronized { .... .... } } } what happens if have final field defined in actor as: private val locktype = new anyref i can use lock synchronize method3? difference? understanding using reference lock on method make reference unavailable until lock released. in above case, use lock can function independently of reference , lock when action on method3 made, while reference still available other threads? there's no need synchronization inside of actor. actor ever process single message @ time.