Posts

java - Calling MainApplication methods from BroadcastReceiver -

i have android application activity, service , broadcast receiver. service call broadcast intent works. broadcast receiver receives intent correctly. but how can access methods of class mainapplication class mybroadcastreceiver ? ((mainapplication)getapplication()).mymethod(); gives error-message "cannot resolve method" //call service-class private void sendbroadcast() { log.d(tag, "sending broadcast intent"); intent intent = new intent(); intent.setaction("com.package.name.mybroadcastreceiver"); intent.addflags(intent.flag_include_stopped_packages); sendbroadcast(intent); } //receiver class public class mybroadcastreceiver extends broadcastreceiver { @override public void onreceive(context context, intent intent) { //doesn't work - "cannot resolve method" ((mainapplication)getapplication()).mymethod(); //doesn't work either ((mainapplication)context.getapplication...

qt - How to flip RadioButton? -

is possible flip radiobutton ? default circle aligned left , text aligned right. i'd position text left , circle right. layoutmirroring.childreninherit: true position text left, circle still on left. column { id: column1 x: -265 y: 219 width: 104 height: 45 spacing: 5 layoutmirroring.enabled: true layoutmirroring.childreninherit: true exclusivegroup { id: diamtypes } radiobutton { text: "one"; exclusivegroup: diamtypes } radiobutton { text: "two"; exclusivegroup: diamtypes } } add text item (with desired name) within radiobutton item , give relative x , y position it. leave text property of radiobutton blank. radiobutton { id: radiobuttonid x: 319 // button position y: 46 text { x: -60 // relative text position radio button y: 3 text: "radio button" font.pointsize: 8 color: "black" } }

angularjs - How to handle strings containing HTML using Angular Translate? -

i've seen lot of topics problem, hasn't resolved problem. when try use <p ng-html-bind-unsafe="{{tasksdetails[task.id].description | translate:{task:task, taskdetails:tasksdetails[task.id]} }}"></p> nothing appears @ website. primary way display was: <label data-translate>task_details</label> <label class="value-label">{{tasksdetails[task.id].description | translate:{task:task, taskdetails:tasksdetails[task.id]} }}</label> but doesn't recognize html tags.

MS CRM 2013 Process Update Account - multiple values to one field -

i'm trying implement update procedure 1 in blog post (via entity , workflow updating account, triggered when new entity being created) http://www.powerobjects.com/2013/08/01/updating-records-in-microsoft-dynamics-crm/ in list , new entity "account update" have 3 fields full name of company (name, name_2, name_3). in workflow want put these 3 , combine values in account field "company" (the company's name). in process tried insert them via "form assistant" , in field "company" have following entry: {name(account update);name_2(account update);name_3(account update)} but doesn't seem work. after import , update of account (which ends successful) value in "company" value of first name field. is possible combine values? do, when choose more 1 field in form assistant , ok? so @ last figured out how archive it. with "form assistant" can combine or add multiple field values 1 new field bit tri...

java - How do I make a HK2 ServiceLocator use the Singleton service instances from the ServiceLocator that it's bridged from? -

we using using extrasutilities.bridgeservicelocator() inject existing singleton application services created in 1 servicelocator jersey restful web services bridging app servicelocator jersey servicelocator. however singletons exist in 'outer' locator aren't being used - each of services being created once again when injected jersey services. seems singleton visible within scope of servicelocator, if it's bridged. is intended behaviour? , if there way change behaviour , have true singleton across bridged servicelocators? i have extracted issue out set of test classes illustrate point below: public class bridgedservicetest { private servicelocator _outerservicelocator; private servicelocator _innerservicelocator; @test public void testbridgedinnerserviceok() throws exception { servicelocatorfactory servicelocatorfactory = servicelocatorfactory.getinstance(); _outerservicelocator = servicelocatorfactory.create("outer"); servi...

java - Create in a simple way a copy of an object -

consider code below: project project1 = new project("string1","string2","string3","string4","string5", ...); project project2 = project1; here, project2 not copy of project1 , because points same object. significate if edit project2 , edit project1 . i want project2 independent of project1 . suppose can make constructor project param like: public project(project project) { this.string1 = project.getstring1(); this.string2 = project.getstring2(); ... } i case, have 15 attributes in project class, doing require me write big constructor. is there better way ? :) thanks ! no, there not better way that. use clone , but... don't. don't use clone .

php - Not able to login into joomla for users who has Jombri Freelance component enabled -

i faced strange problem today. logins joomla website has stopped working. found further investigations not working user has posted project or service using jombri freelance component of joomla. is there can me this? thanks, ankit