Posts

Showing posts from June, 2015

Grails Spring Events Plugin not found -

after upgrading grails 2.2 3.1 can no longer compile spring-events plugin. in 2.2 project had plugin set in build-config.groovy plugins{ compile ':spring-events:1.2' } but there build.gradle file , when add plugin, cannot found. has had issues this? the spring events plugin not compatible grails 3.x. can find list of supported plugins in repository on @ bintray .

opencv - Aruco scales coordinates wrong -

i using (newly released) aruco 2.0.7 track markers. camera using mounted ceiling facing down, need x , y coordinates. can view area of 2.6m 1.5m. if understand documentation correctly, supply sidelength of markers i'm using in arbitrary unit, output of pose in same unit. markers have sidelength of 19.5cm. want result in meters, have value set 0.195. however, results obtain not correct. if place markers right in corners of field of view of camera, not @ corresponding expected x , y coordinates. i placing global origin on 1 of corners of field of view, e.g. (0,0) bottom left corner. done transforming incoming positions markers coordinate system using matrix transforms obtained getrtmatrix(). seems working, except x , y coordinates in wrong unit or scaled. rotation works perfectly. am missing something? or can not expect accuracy? error significant, e.g. when should (2.6,1.5), displayed (1.8, 1), error of 33%. after more thought figured out camera calibrated using s...

How to start Machine Learning with python programming? -

i know concepts of python programming. , heard python machine learning more compatible. so, want start machine learning using python. novice in machine learning.(just want start scratch) how start towards this?? you need learn theoretical sutff including maths/stats/data mining etc... the best way - depending on ur current background - famous andrew ng coursera course on machine learning . honnestly don't think there's faster/easier way. youtube may found tons on ml/stats related videos.

php - how to add slashes to only double quotes -

i want add slashes double quotes html elements how doing , not working me : $str =" <table class="body-wrap" style="font-family: 'helvetica neue', 'helvetica', helvetica, arial, sans-serif; width: 100%; margin: 0; padding: 0;"> <tr style="font-family: 'helvetica neue', 'helvetica', helvetica, arial, sans-serif; margin: 0; padding: 0;"> <td style="font-family: 'helvetica neue', 'helvetica', helvetica, arial, sans-serif; margin: 0; padding: 0;">this test</td></tr></table>&#13;"; this php function : $str2 = addcslashes($str, '"'); i think have problems @ beginning of string , dont know how declare : $str =" or $str = ' both me didnt work delete string $str =" or $str = ' entirely wrong. 1) use css style sheet store css outside html , avoid repetition. 2) use single quotes i...

razor - Self-closing TagHelper merges html markup of sibling element -

i'm litle confused behaviour of taghelper intoduced in asp.net core mvc. following tutorial a working email tag helper have opportunity write self-closing tags. according article purpose should use attbute htmltargetelement . class below demostrated example: [htmltargetelement("email", tagstructure = tagstructure.withoutendtag)] public class emailtaghelper : taghelper { private const string emaildomain = "contoso.com"; public string mailto { get; set; } public override void process(taghelpercontext context, taghelperoutput output) { output.tagname = "a"; var address = mailto + "@" + emaildomain; output.attributes.setattribute("href", "mailto:" + address); output.content.setcontent(address); } } the markup in razor view like: <strong>support:</strong> <email mail-to="support"/><br /> <strong>marketing:</strong>...

Can we write Azure Webjobs with Queue Triggered with JAVA -

can write azure webjobs queue triggered jobs on java, tried search lot , found .net related code example ( https://azure.microsoft.com/en-in/documentation/articles/websites-dotnet-webjobs-sdk-storage-queues-how-to/ ) if yes can 1 direct me resources. note: able run webjob in java triggered schedule, had create executable jar , create batch file runs jar , zip 2 files (bat , jar). while don't have plans add java support directly core webjobs sdk, have tracking item here java support in azure functions . feel free chime in on issue. all work we're doing cross language being done in azure functions, builds on webjobs sdk foundation. azure functions supports queuetrigger (and other triggers) c#, node.js, powershell, php, python, bat, bash.

How to move an element from one div to another using angularjs -

i want move element 1 div div. lets example there button in div-a , want move in div-b. it can done in jquery like $("div-b").append('button'); $("div-a button").remove(); but not able think start in angularjs 1x. there series of 10-20 divs in row , want move button 1 div sequentially. in angular data represented objects <div ng-repeat="a in ctrl.a"></div> <div ng-repeat="b in ctrl.b"></div> vm.a = ['a1', 'a2']; vm.b = []; function move(obj) { // find obj in vm.a , remove // push obj in vm.b } then view should updated automatically.

winapi - C Win32: Window Automatically closes -

i wanted create word 'corrupter' justs replaces letters ascii alphabet. however, when 'generate' button pressed, window automatically closes static handle ghinstance; hwnd hwndedit; int index[10]; static int_ptr callback maindlgproc(hwnd hwnddlg, uint umsg, wparam wparam, lparam lparam) { switch (umsg) { case wm_initdialog: { hwndedit = getwindow(hwnddlg, idc_edit); return true; } case wm_size: /* * todo: add code process resizing, when needed. */ return true; case wm_command: switch (get_wm_command_id(wparam, lparam)) { case idc_generate: { char input[1000]; char output[1000][10]; int i, strlength, m, map; int rnmb; int chance; getwindowtext(hwndedit, input, 1000)...

oop - C# Generic Type Inheritence -

is possible create generic class<t> generic type t base class of it? i.e: myclass<base1> b1 = new myclass<base1>(); myclass<base2> b2 = new myclass<base2>(); b1.name="test"; b2.id=1; base classes: class base1 { protected string name{ get; set;} } class base2 { protected int id{ get; set;} } inherited class: class myclass<t>:t //here question possible dynamic inheritence { } you mean this? public class generic<t> : t { }

In cordova add platform then get mess "Adding android project..." but that is not added the platform -

Image
in cordova when add platform , message in cmd adding android project... but not added platform android . how can add platform. you can add platform inside project. cordova create hello com.example.hello helloworld cd hello cordova platform add android check platform cordova platform ls

c# - InternalsVisibleTo for an entire set of assemblies possible? -

is there way specify wildcards give internals access entire set of assemblies? example: [assembly: internalsvisibleto("*, publickey="7a3c8e2f...7b3d5a62")] this allow access assemblies signed key, without having specify each of assembly names. is there trick achieve kind of behavior? internalsvisibleto not meant used way. if think allowing "everyone" accessing internals, why not set public internals ? maybe question not clear enough.

r - Apply - return results binded by rows not by columns -

i have function applied on vector of lenght 5 returns matrix 4 rows , 5 columns. want use apply() in order call function again on each row of results matrix , obtain matrix 16 (4*4) rows , 5 columns. unfortuneately apply() combines results 4x20 matrix. how possible change without using lists? matrixfromvector = function(x){ return(rbind(x*rnorm(1,1,.01),x*rnorm(1,1,.01),x*rnorm(1,1,.1),x*rnorm(1,1,.01))) } = matrixfromvector(1:5) t(a) [,1] [,2] [,3] [,4] [1,] 1.008391 1.005974 1.077223 0.9865611 [2,] 2.016782 2.011947 2.154445 1.9731222 [3,] 3.025173 3.017921 3.231668 2.9596833 [4,] 4.033565 4.023894 4.308890 3.9462444 [5,] 5.041956 5.029868 5.386113 4.9328055 after applying function each row of have [1,] [2,] [3,] [4,] [5,] [1,] 1.0242459 2.0484917 3.0727376 4.0969835 5.1212293 [2,] 0.9999314 1.9998629 2.9997943 3.9997257 4.9996572 [3,] 1.0836573 2.1673146 3.2509719 4.3346292 5....

android - How to close the notification dialog after click the dismiss button ,without calling any activity -

image have code. working fine , close notification. when click on "dismiss" button, open application , close dialog. not required me. want, notification dialog close after click on "dismiss" button without opening activity. mainactivity.java public class mainactivity extends activity{ static int nummessages = 0; context context; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.notificationmain); context = getapplicationcontext(); button bcustomnotifyaction = (button) findviewbyid(r.id.customnotificationaction); bcustomnotifyaction.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { customnotificationaction(); } }); } @targetapi(build.version_codes.honeycomb) private void customnotificationaction() { // set n...

java - Only Half of the new Jpanel is showing after logging in -

i have log in system , logs in fine shows half of new jpanel when user signs in using java , netbeans this code: if(loggedin){ main_menu panel= new main_menu(); controlpanel.setvisible(false); mainframe.remove(controlpanel); mainframe.add(controlpanel2); controlpanel2.add(panel); controlpanel2.setvisible(true); } }catch(sqlexception ex){ joptionpane.showmessagedialog(null, "problem executing sql query."); the old panel removed , new panel added when log in half of jpanel visible, why be? only half of jpanel visible, why be? the size of second panel larger need pack() frame components displayed @ preferred size. or option use card layout , let layout manager handle swapping of panels. manage size properly. read section swing tutorial on how use cardlayout more information , working examples.

Why aren't the outlines of the preview device not shown in Android Studio 2.1.2 -

Image
this looks like: please me out. tried updating plugins , other things rebilding code,etc this how looks when using scrollview root element. if use relativelayout example, you'll see it'll work expected.

ios - Jump from controller C to controller A but not show mid page -

in rootviewcontroller, check condition show "a page" or not, and can enter "c page" form main page. when user disconnect in c page, dismiss c page then enter main page main page check condition show page but, don't want show main page, want show page, how should modify code? page struct : rootpage ----------- c page | | -------------- page root.controller - (void) viewdidappear { if (condition a) { [self persentviewcontroller:"a page"]; } } c page.controller - (void) userdisconnect { [self dismissvc]; } in c page, dismiss function, app show main, present page! how can show page, without show root page! thanks, do follow might you. (uiviewcontroller* viewcontroller in self.navigationcontroller.viewcontrollers) { if ([viewcontroller iskindofclass:[your_class_name class]] ) { your_class_name *ync = (your_class_name*)viewcontroller; [se...

angular - Angular2 rc3: Error when injecting services in constructor (Cannot resolve parameters' types) -

i have constructor in authguard class: @injectable() export class authguard implements canactivate { constructor( private ribbonservice: ribbonservice, private checksessionservice: checksessionservice, private router: router) { } // etc } when build fine following error when accessing through browser: reflective_provider.js:233 uncaught cannot resolve parameters 'authguard'(undefined, checksessionservice, router). make sure parameters decorated inject or have valid type annotations , 'authguard' decorated injectable. i don't understand why happens first service , not second. thought problem inheritance cause first service extending baseservice made second service extend baseservice , works, problematic 1 first one.... note i've tried adding @inject decorator each param result it's same. thanks before hand!! ribbonservice (or 1 of dependencies) not imported or provided correctly.

javascript - Change a function dynamically in C -

i know if there equivalent in c (for void function) javascript code: var myfunction; myfunction = function(){ //some code } not equivalent (because c static language without support anonymous or nested functions) can have variable pointer function, , make point different compiled functions matching type of variable. very simple , basic example: #include <stdio.h> void function1(void) { printf("function1\n"); } void function2(void) { printf("function2\n"); } int main(void) { // declare variable pointer function taking no arguments // , returning nothing void (*ptr_to_fun)(void); ptr_to_fun = &function2; ptr_to_fun(); ptr_to_fun = &function1; ptr_to_fun(); return 0; } the above program print out function2 function1

android studio add markers to google maps from sqlite database -

in android app i'm trying add several markers sqlite mapsactivity. created do-while cycle getting cities in sqlite table , convert cities in coordinates (lat, long), there's in error. can me? ---mapsactivity.java--- public class mapsactivity extends fragmentactivity implements onmapreadycallback { private googlemap mmap; databasehelper mydb; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_maps); // obtain supportmapfragment , notified when map ready used. supportmapfragment mapfragment = (supportmapfragment) getsupportfragmentmanager() .findfragmentbyid(r.id.map); mapfragment.getmapasync(this); } @override public void onmapready(googlemap googlemap) { mmap = googlemap; // add marker in sydney , move camera latlng sydney = new latlng(-34, 151); latlng ruvo = new latlng(-45, 123); mmap.addmarker(new markeroptions().position(sydney).ti...

angularjs - CORS problems with Spring-security -

i building app spring-boot (on http://localhost:8080 ) , angular (on http://localhost:80 ). the frontend , backend code served 2 different servers. in order avoid cors problems, used put in place intermediate nginx server not satisfied solution anymore. hence, have allow cors. i allowed cors globally lines : @configuration public class webmvcconfiguration extends webmvcconfigureradapter { @override public void addcorsmappings(corsregistry registry) { registry.addmapping("/**") .allowedorigins("http://localhost") .allowcredentials(true) ; } } this works every routes except authentication route handled spring security : public class securityconfiguration extends websecurityconfigureradapter { @override public void configure(httpsecurity http) throws exception { http .formlogin() .successhandler(successhandler()) .failurehandler(failurehandler()) //[...] } private authenticationsucces...

android - Change spinner's selected item color from xml -

Image
how can spinner's text , bottom arrow icon in white ? i want change "+47" text color. popuptheme xml property @style/themeoverlay.appcompat.dark change text color in pop up. used theme set main application theme <style name="apptheme" parent="theme.appcompat.light.noactionbar"> <!-- customize theme here. --> <item name="colorprimary">@color/colorprimary</item> <item name="colorprimarydark">@color/colorprimarydark</item> <item name="coloraccent">@color/coloraccent</item> <item name="android:popupmenustyle">@style/popupmenu</item> </style> popupmenu <style name="popupmenu" parent="android:theme.holo.light"> <item name="android:popupbackground">@android:color/white</item> <item name="android:textcolor">@color/yourcolor</i...

android - Fragment to Activity to Fragment Communication -

i have 2 frame layouts(containers) in main.xml contains 2 fragments. want pass video url fragmentone activity , activity fragmenttwo . unable url in second fragment. below code,please me correct solution. activity_main.xml <relativelayout android:layout_width="match_parent" android:layout_height="match_parent"> <framelayout android:layout_width="match_parent" android:id="@+id/top" android:layout_height="350dp"> </framelayout> <framelayout android:layout_width="340dp" android:layout_margintop="20dp" android:id="@+id/frgten" android:layout_below="@+id/top" android:layout_marginleft="20dp" android:layout_marginright="32dp" android:layout_height="130dp"/> </relativelayout> fragment_one.xml <relativelayout android:lay...

javascript - How to make appear only boxes which contain the searched word - jQuery -

i shared screenshot, when write keyword, example "user", boxes containing "user" appears, , other disappear. i need whole explanation. static html 1 page website, without php or server side. know if "filtering" feasible done , how. enter image description here i thing should start search this: $( "containerclass" ).each(function() { var txt =$( ).text(); if( txt.includes(searchterm)) {$( ).show();} else{$( ).hide();} }); just remember includes case sensitive.

android - Firebase Query an Array of Keywords -

Image
my code firebasedatabase database = firebasedatabase.getinstance(); databasereference myref = database.getreference("stock"); query = myref.orderbychild("keywords").equalto("hammer"); i.addvalueeventlistener(new valueeventlistener(){ @override public void ondatachange(datasnapshot datasnapshot) { system.out.println(datasnapshot.getvalue()); } @override public void oncancelled(databaseerror databaseerror) { } }); my problem: wanna query 1 item keyword eg. "hammer", getting null value. if query "orderbychild("keyword").equalto("hammer")" i'm getting same null value. please me. orderbychild next level childs branch refering in /stocks . code work if had child keywords/0/keyword right bellow /stocks . since under /stocks/inserate/0 wont work. query = myref.child("inserate/0/keywords").orderbychild("keyword").equalto("hammer");...

python - Remove SNPs with wrong alleles -

i have 2 files this: the reference panel ( referencepanel.csv ) "id","position","allele0","allele1","allele1_frequency" "seq-rs1010355",55102179,"t","c",0.098 "seq-rs272408",55103603,"c","t",0.787 "seq-rs11669899",55104559,"a","t",0.029 "imm_19_59798585",55106773,"a","g",0.499 a bim file ( myfile.bim ) 19 19:55102179 0 55102179 c t 19 19:55103603 0 55103603 c t 19 19:55104559 0 55104559 g c 19 19:55106773 0 55106773 t i delete in bim file rows 2 alleles different reference panel. in other words, keep rows have same alleles reference panel - order not matter. example : reference allele: "seq-rs1010355",55102179,"t","c",0.098 "seq-rs272408",55103603,"c","t",0.787 "seq-rs1...

javascript - AngularJS search filter weird behavior -

Image
i'm building simple angularjs application. have array of objects, e.g. this.properties = [{ "name": "jumbo", ... }, { "name": "denegin keskikankaantie 9 koy" ... }, ...] less 100 objects in total. i've build simple search input: <input type="text" ng-model="vm.searchquery" /> and used inside ng-repeat directive: <p ng-repeat="property in vm.properties | filter:vm.searchquery"> {{::property.name}} </p> i did before , worked in other applications. tried filter:{name: vm.searchquery} . it has strange behavior, doesn't show properties searchquery, e.g. if type jumbo , isn't shown, but... of them shown, e.g. denegin keskikankaantie 9 koy shown if vm.searchquery === "jumbo" . it's absolutely random time. does know might reason this? update: i've updated plunker comments data ( plunker ). works perfectly. works on local server well. wo...

angular - How to set focus on element with binding? -

in angular2 how can set binding on element focus. don't want set elementref. think in angularjs there ngfocus directive in angular2 there no such directive a simple 'focus' directive import {directive, input, elementref} 'angular2/core'; @directive({ selector: '[focus]' }) class focusdirective { @input() focus:boolean; constructor(@inject(elementref) private element: elementref) {} protected ngonchanges() { this.element.nativeelement.focus(); } } // usage @component({ selector : 'app', template : ` <input [focus]="inputfocused" type="text"> <button (click)="movefocus()">move focus</button> `, directives: [focusdirective] }) export class app { private inputfocused = false; movefocus() { this.inputfocused = true; // need because nothing // happens on next method call, // ngonchanges in...

c# - $.connection.Hub undefine -

using signal r in frame work 4.0. when calling hub class(testhub) display undefine. jquery code bellow <head runat="server"> <title></title> <script src='<%: resolveclienturl("scripts/jquery-1.6.4.js") %>'></script> <script src='<%: resolveclienturl("scripts/jquery-1.6.4.min.js") %>'></script> <script src='<%: resolveclienturl("scripts/jquery.signalr-1.0.0-rc1.js") %>'></script> <script src='<%: resolveclienturl("scripts/jquery.signalr-1.0.0-rc1.min.js") %>'></script> <script src='<%: resolveclienturl("signalr/hubs") %>'></script> </head> <body> <form id="form1" runat="server"> var data = $.connection.tenanthub; $.connection.h...

java - Difference between Spring-JPA and Spring-Data-JPA -

this question has answer here: spring data-jpa versus jpa: what's difference? 3 answers difference between spring-jpa , spring-data-jpa , don't mean jpa specification . new jpa , spring. while integrating hibernate spring jpa provider came across 2 spring project. please clarify difference relationship between https://mvnrepository.com/artifact/org.springframework/spring-jpa https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa found out spring-data-jpa contains jparepository interface intend use use of spring-jpa . if @ artifcat dates old - 2008. should not worry it.

Can I change Mysql current time CURTIME() in query for testing purposes? -

i have unit test, , want curtime() return same time, can somehow ? i can set timezone: set time_zone = 'america/new_york'; select curtime(); but there way set time ? part of query is: (curtime() between time(convert_tz(opening_time, timezone, "utc")) , time(convert_tz(closing_time, timezone, "utc"))) i want test more timezones , different times curtime() based on server timezone, way make change directly changing server timezone: set time_zone = 'france/paris'; in debugging purposes, use @juergend idea use static time string make tests. edit: didn't read well, knew part. still, don't understand why don't use static time string in query, no matter how many times have in query ('12:34:56' between time(convert_tz(opening_time, timezone, "utc")) , time(convert_tz(closing_time, timezone, "utc")))

java - jsoup parse from website redirect -

Image
i parsing url , have problem ajax load. when parse website show me body without response need body of elememt ticket_lists . dont know how redirect on website working. tried debug js in debugger without success. using jsoup. possible? thank you connection.response response = jsoup.connect("https://jizdenky.studentagency.cz/booking/from/1763018002/to/10202038/tarif/regular/departure/20160711/retdep/20160711/return/false/ropen/false/credit/false/class/2") .method(connection.method.get) .execute(); map<string,string> cookies = response.cookies(); document doc = jsoup.connect("https://jizdenky.studentagency.cz/booking/from/1763018002/to/10202038/tarif/regular/departure/20160711/retdep/20160711/return/false/ropen/false/credit/false/class/2?1") .useragent("mozilla/5.0 (macintosh; intel mac os x 10_11_5) applewebkit/537.36 (khtml, gecko) chrome/51.0.2704.103 safari/537.36") .cookies(co...

ios - Core data saving on child context not working -

for concurrency in coredata using parent-child moc concept parent context of nsmainqueueconcurrencytype , child context of nsprivatequeueconcurrencytype , below code - (nsmanagedobjectcontext *)managedobjectcontext { if (managedobjectcontext != nil) { return managedobjectcontext; } nspersistentstorecoordinator *coordinator = [self persistentstorecoordinator]; if (coordinator != nil) { managedobjectcontext = [[nsmanagedobjectcontext alloc] initwithconcurrencytype:nsmainqueueconcurrencytype];// done avoid crash when app auto logs out managedobjectcontext.persistentstorecoordinator = coordinator; } return managedobjectcontext; } -(nsmanagedobjectcontext *)getprivatemoc { nsmanagedobjectcontext *private = [[nsmanagedobjectcontext alloc] initwithconcurrencytype:nsprivatequeueconcurrencytype]; [private setparentcontext:[self managedobjectcontext]]; return pri...

webview - Android - can't change RelativeLayout width/height dynamically -

i'm using mediaplayer xml <webview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/webview"> </webview> <relativelayout android:id="@+id/relativel" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignparenttop="true" android:layout_alignparentstart="true"> <surfaceview android:id="@+id/surfview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </relativelayout> what i'm trying change width/height of relativel (and player inside it) when press key i'm calling function on keypress doesn't have affect, no errors, nothing happening. function working fine before added webview in...

javascript - Select the color of row based on end point JSON value using AngularJS -

i have program written in angularjs, lists values coming end point in rows. want give color of rows based on json value. angularjs plnkr link :- http://plnkr.co/edit/x8l5wwbivwnzjolxohtg?p=preview json structure :- { "1": { "venture": "xyz informatics", "member": [ { "name": "abcd", "email": "abcd@gmail.com" } ], "message": "this day", "isclicked": true }, "2": { "venture": "bbc informatics", "member": [ { "name": "xyz", "email": "xyz@gmail.com" } ], "message": "this bad day", "isclicked": false } } output show :- xyz informatics bbc informatics i want give green color of row if "isclicked": true , red color when "isclicked": fals...

java - int cannot be converted to Node -

i'm getting error: incompatible types: int cannot converted node why getting kind of error? public void insertitem(int e) { if(e<head.getitem()) { addfirst(e); } else if(count==1) { addlast(e); } else { node newnode = new node(e); node prev = head; node p = prev.getitem(); while(p!=null) { if(e<p.getitem()) { newnode.setlink(p); prev.setlink(newnode); p = p.getlink(); prev = prev.getlink(); } } } } public class node { private node link; private int item; public node(int item, node link) { setlink(link); setitem(item); } public node(int item) { this(item, null); } public node() { this(0, null); } //empty node public void setlink(node link) { if (link != null) this.link = link; } public void setitem(int item) { this.item = item; } public node getlink() { return link; } public int getitem() { return ite...

javascript - angularjs firebase app: can't display data -

i starting firebase , angular want display data firebase in browser here code <!doctype html> <html> <head> <!-- firebase --> <script src="//cdn.firebase.com/js/client/2.2.1/firebase.js"></script> </head> <body> title :<title></title><br> content :<content></content><br> <script type="text/javascript" > var t=document.queryselector('title'); var c=document.queryselector('content'); var ref= new firebase('https://fir-app-4394a.firebaseio.com'); ref.on('child_changed',function(snapshot){ var data=snapshot.val(); console.log("title: " + data.title); console.log("content: " + data.content); t.innerhtml=data.title; c.innerhtml=data.content; }); </script> </body></html> this data in firebase want display content: ...

xamarin.forms - Xamarin: Launch youtube channel in youtube app -

i trying open youtube channel in youtube app in xamarin forms. able open specific facebook page , twitter page writing these lines of code: device.openuri(new uri("fb://page/page_id")); device.openuri(new uri("twitter://user?user_id=userid")); i found this android , tried this: device.openuri(new uri("vnd.youtube://channel_id")); but getting 400 network error after being launched in youtube application. there way open youtube profile/channel. answering question: device.openuri(new uri("vnd.youtube://user/xamarinvideos")); this directly launch youtube channel in youtube app if installed in device.

How to run a certain activity in Android Studio? -

for instance, have few activities within 1 app, , in order see activity's ui or whatever, need run activity not launcher of app. one stupid way build "door" activity in launcher , go inside activity door. however, there better way run activity alone? very easy. start exporting activity need run: add android:exported="true" in activity declaration in manifest. because am external application, , need export activities allow external application start them. go "edit configurations..." in "run" menu. in left pane, select application. in right pane, in "general" tab, in "launch options" section, there "launch:" dropdown. select "specified activity", , enter name of activity appears in manifest. you can create many configurations like, , name them according like, example indicate activity being started.

html - How to add the background-color for data in table using bootstrap-classes and angularjs? -

i want small e-commerce application. after done order user, admin got orders , order item consist of order id , itemname , price , status , btnclass . default status of order pending , value of btnclass label-warning, after editing order pending delivered value of btnclass change label-success. don't know how this btnclass storing bootstrap class. <table> <th>order id</th> <th>item name</th> <th>price</th> <th>status</th> <th>total</th> <tr ng-repeat="item in orders"> <td>{{item.orderid}}</td> <td>{{item.itemname}}</td> <td>{{item.price}}</td> <td><p class="label {{list.btnclass}}">{{item.status}}</p></td> <td>{{item.total}}</td> </tr> </table> my array this: [ { "orderid":1, "itemname...

geojson - Adding custom markers to the mapbox gl -

i add custom marker map. using mapbox gl script. the documentation found related topic 1 https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/ . i tried customize given example , managed add marker , modify little changing size, since don't understand parameters, don't know how add own marker. there documentation more detailed? here code: <script> mapboxgl.accesstoken = 'pk.eyj1ijoiywl3yxrrbyisimeioijjaxbncni5ejgwmde0dmjucta5adrrb2wzin0.b2zm8wb9m_qis1tneswslg'; var map = new mapboxgl.map({ container: 'map', // container id style: 'mapbox://styles/aiwatko/cipo0wkip002ddfm1tp395va4', //stylesheet location center: [7.449932,46.948856], // starting position zoom: 14.3, // starting zoom interactive: true }); map.on('load', function () { map.addsource("markers", { "type": "geojson", "data": { ...

ios - Swift WKWebView and Javascript Interaction -

i've been having trouble getting wkwebview in swift trigger javascript in loaded web page. im trying use javascript change background color on website if user swipes left, swipes right, or clicks button. appreciated. import uikit import webkit class myviewcontroller: uiviewcontroller, wknavigationdelegate { @iboutlet var container: uiview! var webview: wkwebview? override func viewdidload() { super.viewdidload() self.webview = wkwebview() container.addsubview(webview!) webview?.allowsbackforwardnavigationgestures = true webview?.navigationdelegate = self let leftswipe = uiswipegesturerecognizer(target: self, action: #selector(myviewcontroller.handleswipes(_:))) let rightswipe = uiswipegesturerecognizer(target: self, action: #selector(myviewcontroller.handleswipes(_:))) leftswipe.direction = .left rightswipe.direction = .right view.addgesturerecognizer(leftswipe) view.addgesturerecognizer(rightswipe) } override func viewdidap...