Posts

Using Google Chrome as bundled runtime for HTML app? -

i have html application run offline, , want end way open app exe file on windows. have tried visual studio, app not run in webbrowser component. i pretty sure have read can use chrome (or kind of chrome version of chrome) "bundled runtime", have hard time finding it. exist? using chrome engine (instead of "web views" based on internet explorer) make sure application run nice on computers has not updated windows or browsers while. you must thinking of cef: chromium embedded framework .

iOS framework/bundle with replaceable assets -

i trying make ios framework basic ui-controls. want users re-skin theme of controls therefore loading assets, storyboards , xibb files asset bundle. i using image.xcassets assets. bundle generation changes assets.car i want assets replaceable within bundle users re-skin. proper way achieve that? resources / images assets added app bundle. cannot add in bundle framework @ runtime ( user cannot change skin bundle ) you can achieve 2 ways at launch, check whether image files exist in documents directory. if not, copy bundle images document folder. check name of images why loading bundle after check local / documents folder same copy of image , use new skin of user wish .

php - Admin that create simple users using FOSUserBundle -

i'm trying learn symfony creating simple project. began creatin dashboard admin. this administrator have right create type of users called "proprietaire", once "proprieraire" connected can create type of users "simple user". i tried manage login admin using fosuserbundle , done. the problem how create "proprietaire" type user using form admin page? , how same creating "simple" type user "proprietaire" page ? i have 3 roles : role_admin, role_prop , role_simple my security.yml file : # app/config/security.yml security: encoders: fos\userbundle\model\userinterface: bcrypt role_hierarchy: role_prop: role_user role_admin: role_prop providers: fos_userbundle: id: fos_user.user_provider.username firewalls: main: pattern: ^/ form_login: provider: fos_userbundle csrf_token_generator: security.csrf.token_manager # if ...

How to unserialise the PHP SESSION serialised value? -

i stored php session values dynamodb, following serialized structure getting on_session_write() function using session_set_save_handler(), id|s:26:"rj4n98n6371vpgj8h5s10lmoh2";matt|n;smartyvalidate|a:1:{s:7:"default";a:4:{s:16:"registered_funcs";a:2:{s:8:"criteria";a:0:{}s:9:"transform";a:0:{}}s:10:"validators";a:0:{}s:8:"is_error";b:0;s:7:"is_init";b:1;}}language_id|i:1;language|s:3:"eng"; i tried php serialize() , unserialize() functions it's not working. so, how can un-serialize value? i need output format per $_session printed value. the documentation says session_set_save_handler : while data looks similar serialize() please note different format speficied in session.serialize_handler ini setting. the setting session.serialize_handler defaults php , means php using internal session_encode() , session_decode() functions. session_decode() decodes serial...

javascript - jQuery.each on div in partial view always returning 1 -

in mvc index page, each element in viewmodel, renders via partial view. i need run small script on each of these partial views , trying use jquery.each() however, cannot seem iterate $get returning 1, not actual number of elements in $get . index.cshtml @model ienumerable<viewmodels.dummyvm> @{ viewbag.title = "index"; } <h2>index</h2> <div> @for (int = 1; <= 10; i++) { @html.partial("pv", i); } </div> @section scripts { <script type="text/javascript"> $(function () { alert($("#logentry").length); }) </script> } pv.cshtml @model int <div id="logentry"> log entry : @(model) </div> for simplified test above, once page has .ready() iterates through , dumps console i'm getting log entry : 0 id should unique in same document use classes instead : @model int <div class="lo...

bluetooth - get eaaccessory macaddress in swift -

i have bt 2.0 device certified. i can send/recv data bt device eaaccessory input/output stream. but went device's mac address there ios9 eaaccessory header https://github.com/javisoto/ios9-runtime-headers/blob/master/frameworks/externalaccessory.framework/eaaccessory.h (id)macaddress; how can call method ?? this app not need submit apple store. try value with: let mac = myaccessory.valueforkey("macaddress") print("mac address is: \(mac)")

jquery - ajax response a django form using HttpResponse -

my ajax function has response django form. in views.py code, .. .. dictionary={'userform':userform,'info_form':info_form} return httpresponse(dictionary) but when alert on console.log response like.. userforminfo_form . can not parse in json type @ both client n sever side. how httpresponse form object. when trying json.dump, gives me error that, json object not serializable. thanx! you can use from django.core import serializers , can parse data coming database , create dict , and pass dict httpresponse `userform = serializers.serialize('json', userform)` `dictionary={'userform':userform}` `httpresponse(json.dumps(dictionary),content_type="application/json"`) if it's doesn't work have parse data , create list follows array=[] in data; array.append(a) dictionary={'userform':array} httpresponse(json.dumps(dictionary),content_type="application/json")