Posts

iphone - Is there any tool that converts Objective C code to java for Android -

possible duplicate: objective-c java cross compiler i have working iphone app , want convert android app minimal effort. can suggest ? i don't think so. you're best bet have been develop application scratch using platform appcelerator or phone gap . the commenter makes excellent point: platforms fundamentally different. straight conversion of code won't work. have convert framework/api calls , restructure of ui. not framework different, assumptions made platform totally different well. possibly best way reuse code (this isn't easiest, keep in mind) convert objective c code c or c++ , make use of android ndk. won't able reuse of ui code, might able reuse significant amount of application logic depending on application does.

recursion - SML currying question -

i have midterm coming next week , going on sml notes provided in class. came across currying example , not sure how worked. it simple function computes power of number. here function definition: fun pow 0 n = 1 | pow k n = n*pow(k-1)n i'm not sure how function works when pass following arguments: val x = pow 2 2 this way see it: =2*pow(1)2 =2*(2*pow(0)2)2 =2*(2*(1)2)2) the result should getting 4 don't see how result steps have carried out above. help please. thank-you. ah, standard ml of new jersey, how miss thee... anyway, let me go through step step. remember currying, unlike dinner in front of me (which incidentally curry dish), way of dealing 1 argument @ time return new function. in mind, apply first 2 given function. since 1 pattern matches, have new function -- let's call "curry": curry n = n * pow 1 n note have "inner" version of pow function address. doing so, again, 1 pattern matches. let's call inn...

encoding - Is there a PHP function to fix this? -

"“excuse me, hope isn’t weird or anything," how can fix encoding on this? what you're running result of data being written in 1 encoding, , interpreted being another. need make sure you're requesting input in same format you're expecting in. recommend sticking utf-8 whole way through unless need avoid multibyte characters, in case might want @ forcing ascii. make sure you're telling php use utf-8 internally: ini_set('default_charset', 'utf-8'); and make sure telling browser expect utf-8 encoded text, both in headers… header("content-type:text/html; charset=utf-8"); …and in meta tags (html5 below)… <meta charset="utf-8"> setting tell browser sent utf-8 encoded content when form submitted, , it'll interpret results send utf-8 well. you should make sure both database storage , connection encoding in utf-8 well. long dumb data store (i.e. won't manipulating or interpreting data in...

How to get calendar event updates on Android device? -

i want calendar event updates (when new event added or existing event deleted ) on android 2.2 devices ? in other words, program wants notifications calendar event changes anyone has thoughts regarding how this? whenever calendar update made,u can notification using content observer,u have register first observer using this.getcontentresolver().registercontentobserver(uri, true, observer); where uri the calendar uri "content://com.android.calendar/events" , observer object of class extending content observer overrides on change method,invoked when change occurs you have notify observer using this.getcontentresolver().notifychange(eventsuri, null) wherever u r performing changes in read or delete operation of calendar

javascript - Remove text from a p tag and add a class with jquery -

what i'm triying accomplish there's p tag word "border" on it remove text inside (the word border) , add class p. far works finding p , adding class. how can remove text? $('#main-body-content').find('p').filter(':contains(border)').addclass("border"); try this...... $('#main-body-content').find('p').filter(':contains(border)').text("").addclass("border"); demo

javascript - Why do Chrome & Firefox slowly render my home page using MathJax? -

this experimental site using mathjax . browse using chrome, firefox, , ie. notice ie renders slowly. chrome , firefox more slowly. :-) is there secret tip speed rendering? edit 1 i still uploading mathjax using filezilla remote server. needs time complete. even use development machine server mathjax libraries installed, result same did above in remote server. your site returning 404 requests these files: http://www.begolu.com/mathjax/fonts/html-css/tex/otf/mathjax_size4-regular.otf http://www.begolu.com/mathjax/fonts/html-css/tex/otf/mathjax_main-regular.otf- http://www.begolu.com/mathjax/fonts/html-css/tex/otf/mathjax_math-italic.otf http://www.begolu.com/mathjax/fonts/html-css/tex/otf/mathjax_size1-regular.otf http://www.begolu.com/mathjax/fonts/html-css/tex/otf/mathjax_main-bold.otf look @ net tab firebug

how to load .so file that are not in System/lib folder in android? -

i have file named libjsa.so in memory card in android , wanna load in application. how can load file using system.loadlibrary("libname"); ? things have tried:- try copy /system/lib . ---- not worked system.loadlibrary("/mnt/sdcard/folder/libjsa.so"); -------- not worked afaik, unless it's system library or on rooted device, can't load libraries outside signed apk bundle, meaning want can't done.