Posts

tomcat7 - Grails 3 Error loading CSS when deploying to apache -

amigos when deploying grails 3.1.4 app server apache , tomcat (apache root / redirecting grails app in tomcat 8080), ´asset:stylesheet' still generating link deployed app (´ http://....com/og/assets/application-519a.css ´), not root (´ http://....com/assets/application-519a.css ´). of course, ´serverurl´ has valid value the httpd.conf hast below chunk of code <virtualhost *:80> servername ....com serveralias *.....com proxyrequests off proxypass / http://localhost:8080/og/ proxypassreverse / http://localhost:8080/og/ </virtualhost> don't know i'm doing wrong, welcome, , in advance ! juan fixed ! in configuration.yml , propper assets url configuration is: . . . production: grails: assets: url: "http://....com/assets/" datasource: dbcreate: update . . . more information !

python - tensorflow gather across multiple dimentions -

gather(params, indices) following output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :] so if have 4-dimensional params , 2-dimensional indices, end having 5-dimensional array result the question how do output[i, ..., j, :, ... :] = params[indices[i, :], ..., indices[j, :], :, ..., :] so acts numpy's output = params[indices[0], indices[1], .. , :] (the #206 ticket on github regarding different issue: numpy-like api, not gathering in general) one possible way use gather_nd , (as far understand) if want gather_nd on not dimensions, still have create indices them, e.g. if have 10-dimensional array , want index first 2 dimensions 2-dimensional array b, a[b[0], b[1], :] our indices matrix have have 11 columns (with 8 redundant). --- old indices ---- new index 0 0 <all rows of length 8> 0 1 1 <all rows of length 8> 1 ... there's update on #206 @ebrevdo working on generalizing slicing. meanwhile, flatten array, constr...

How to implement MongoDB query in Laravel 5? -

i created mongodb query have use in laravel controller. my query db.pms.aggregate([ { $match: { "panelid": "a00898" } }, { $project: { eventts: 1, mainspower: 1, } }, { $unwind: { path: "$mainspower", includearrayindex: "arrayindex", preservenullandemptyarrays: true } }, { $project: { mainspower: 1, timestamp: { "$add": [ "$eventts", { "$multiply": [ 60000, "$arrayindex" ] } ] } } } ]); i tried use query in laravel function little confused. please me how implement query in laravel. perform raw expressions on internal mongocollection object run aggregation: $result = db => collection('pms')->raw(function ($collection){ return $collection->aggregate(array( ...

javascript - Binding to arbitrarily deep properties on an object based on rules -

(i'm sorry if question title isn't good, couldn't think of better one. feel free suggest better options.) i'm trying create reusable "property grid" in angular, 1 can bind object grid, in such way presentation of object can customized somewhat. this directive template looks (the form-element isn't important question, i'll leave out): <div ng-repeat="prop in propertydata({object: propertyobject})"> <div ng-switch on="prop.type"> <div ng-switch-when="text"> <form-element type="text" label-translation-key="{{prop.key}}" label="{{prop.key}}" name="{{prop.key}}" model="propertyobject[prop.key]" focus-events-enabled="false"> </form-element> </div> ...

How to set selection to single for all sections in the tableview in ios, objective c -

i have table view 5 sections , have set tableview selection multiple.each section has different rows.what want set , user can select 1 cell each section(in table user can select number of cells). ex: 5 cells 5 sections. should impossible select more 1 cell each section.if user select cell same cell, selected cell should deselect.how can this.this sample implementation of didselectrowatindexpath. - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { hoteldetalcellonetableviewcell *cellone = (hoteldetalcellonetableviewcell *)[self.detailtableview cellforrowatindexpath:indexpath]; hoteldetailcelltwotableviewcell *celltwo = (hoteldetailcelltwotableviewcell *)[self.detailtableview cellforrowatindexpath:indexpath]; //i have implement 2 sections test. if(indexpath.section == 0) { hoteldetailsone *secone = [roomonearray objectatindex:indexpath.row]; hoteldetailsforbooking *book = [hoteldetailsforbooking new];...

android - Center vector with animation -

i have vector i'm trying scale bigger after click on it, position in top left corner of viewport area want have in center, , animation should make bigger center of bottom. i'm using pivot doesn't help. code: activity: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_baloon); androidimageview = (imageview) findviewbyid(r.id.animated); if (androidimageview != null) { androidimageview.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { if (isbig) { animatedown(); isbig = false; } else { animateup(); isbig = true; } } }); } } private void animateup() { objectanimator scaledownx = objectanimator.offloat(androidimageview, "scalex", 1.5f); objectanimator scaledowny = objectanimator.offloat(androidimageview, "scaley", 1.5f); scaled...

SQL Server Select With Loop on second table -

i struggling sql logic , wondered if can help? i need list of id's table "roles" emailenabled true , need use these ids against table "users" on roleid column grab email addresses , return these comma separated list . i know need use loop in here it's not strong point. let me know if need further info. i not recommend generating comma seperated list in sql. grab data need record-wise , handle rest in program logic. you can data need this select users.email users join roles on roles.id = users.roleid roles.emailenabled = 1