Posts

Showing posts from April, 2012

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

python - Hovering in matplotlib -

Image
i using matplotlib graphs in html report. have graph (subplot grid 3*2) this: x-axis contain dates , y-axis measurement metric. now, want functionality whenever hovers on point corresponding date node should display box should customizable. , want add zoom in zoom out function. have read how catch embedding figures html using base64 encoding , that, functionality gets lost in matplotlib figure window. how can embed graph? please help. thanks

vb.net - How can I display a name in a different sequence using strings? -

i'm having trouble problem assigned visual basic 2012 class. instructions below. far, have displaying first name entered, , nothing else. how can make display both first name , last name in sequence requested? string problem: enter first , last name in text box. take name , display in label box showing last name, first name. text box entry: jane doe label box: doe, jane the code have far below. help! private sub btndisplay_click(sender object, e eventargs) handles btndisplay.click dim fullname string dim firstname string dim indexnum integer dim lastname string fullname = fulltextbox.text indexnum = fullname.indexof(" ") firstname = fullname.substring(0, indexnum) firstlabel.text = firstname fulltextbox.focus() end sub private sub fulltextbox_textchanged(sender object, e eventargs) firstlabel.text = string.empty fulltextbox.selectall() end sub private sub btnexit_click(sender object, e eventargs) handle

java - Struts2 Ajax CORS -

i'm trying call struts2 action call domain. struts2 on localhost:8080 while 1 make ajax call on one, localhost:3000 . i've tried put sample.json file on struts2 project folder under web folder, can ajax call on sample.json file. problem is, when i'm trying request action class, error says: xmlhttprequest cannot load http://localhost:8080/workforce/loginaction. response preflight request doesn't pass access control check: no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:3000' therefore not allowed access. my problem is, can ajax call on sample json file under same project http://localhost:8080/sample.json but not struts2 action class? struts2 action: package com.workforce.actions; import com.opensymphony.xwork2.actionsupport; import com.opensymphony.xwork2.modeldriven; import com.workforce.models.usermodel; public class loginaction extends actionsupport implements modeldriven<usermodel>

java - How to integrate angular 2 into Spring MVC project built using Maven -

i want implement angular 2 based app backend in spring mvc. able implement basic web app using maven in eclipse on spring mvc. know how basic jsp system works. need know how integrate angular 2 project. have basic idea of angular 2 having problems regarding how deal dependencies in spring mvc. give me directions?

Media player using java swing -

i beginner in java programming. going play video in java stuck. first tried vlcj, 32-bit jdk(is right?) , trying jmf using mpg file. problem hear sound of file, not see video. shows: unable handle format: mpeg, 640x360, framerate=29.9, length=345600 code using is: import java.awt.borderlayout; import java.awt.component; import java.io.file; import java.net.malformedurlexception; import java.net.url; import javax.media.manager; import javax.media.medialocator; import javax.media.player; import javax.swing.jframe; import javax.swing.jpanel; public class mediaplayer extends jpanel { public mediaplayer(url mediauurl) { setlayout(new borderlayout()); try { player mediaplayer=manager.createrealizedplayer(new medialocator(mediauurl)); component video=mediaplayer.getvisualcomponent(); component control=mediaplayer.getcontrolpanelcomponent(); if (video!=null) { add(video, borderlayout.center); // place

git - ssh_dispatch_run_fatal when trying to ssh repos to gitlab -

i'm trying access repositories official gitlab server. now, i'm getting error ssh_dispatch_run_fatal: connection 104.210.2.228: no matching cipher found fatal: not read remote repository. please make sure have correct access rights , repository exists. if try pull, clone, or ssh git@gitlab.com . i created new key , tested check if key problem same error persists. some info of system: $ lsb_release -a distributor id: ubuntu description: ubuntu 15.10 release: 15.10 codename: wily $ git --version git version 2.5.0 $ ssh -vvvt git@gitlab.com openssh_6.9p1 ubuntu-2ubuntu0.2, openssl 1.0.2d 9 jul 2015 debug1: reuserg configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: applying options * debug2: ssh_connect: needpriv 0 debug1: connecting gitlab.com [104.210.2.228] port 22. debug1: connection established. debug1: identity file /home/user/.ssh/id_rsa type 1 debug1: key_load_public: no such file or directory debug1: identity file /home

vb.net - Visual Basic - DropDown text not altered to reflect value -

i working in vb , have event supposed update number of values in dropdown , , update text accordingly: integer = 0 (prices.items.count - 1) if prices.items(i).text.contains("£") dim dconvertedvalue = gettextasdouble(prices.items(i).value) / dconversionrate prices.items(i).value = dconvertedvalue.tostring() 'should update displayable text here, no change prices.items(i).text = (math.floor(dconvertedvalue).tostring("n") & "$") end if next this works fine in theory, , have stepped-through , can see values changing expected. however, dropdown not update @ point. i'm new vb, simple syntax error. know why might be? mark try using have used exact code changed loop 'for each' for each item listitem in prices.items if item.text.contains("£") dim dconvertedvalue = (gettextasdouble(item.value) / dco

Simple Makefile doesn't clean -

i have makefile: default: mv presentacion.pdf /tmp pdflatex presentacion.tex clean: rm -f *.{aux,log,nav,out,snm,toc} the order make works when try make clean shell outputs: rm -f *.{aux,log,nav,out,snm,toc} and not remove files. what's wrong in code? try set shell bash in makefile (according docs ) shell=/bin/bash default: mv presentacion.pdf /tmp pdflatex presentacion.tex clean: rm -f *.{aux,log,nav,out,snm,toc}

r - RStudio snippet not working -

i'm utilizing macbook pro running "el capitan" , rstudio version 0.99.902. i'm writing rmd document. want utilize snippets rstudio has built in , create own also. clicking preference => code; can see "enable code snippets" checked. however, while trying utilize snippet completion not performed. if typed r should block of code, nothing hapen snippet r ```{r ${1:label}, ${2:options}} ${0} ``` i create simple snippet: snippet dthen %>% none of markdown snippet seems work. i'm doing wrong or setting has done? you can invoke code snippets in markdown in rstudio using shift+tab after typing snippet, not prompt expand snippet, either tab or waiting. thought bug, discussion in github issue says it's intended, still-to-be-documented.

How to make a VBA word code run faster? -

i found code online search , highlight multiple words. takes 10 min run on 15 page document. wondering if made run faster. sub highlightmultiplewords() dim word range dim wordcollection(2) string dim words variant 'define list. 'if add or delete, change value above in dim statement. wordcollection(0) = "word1" wordcollection(1) = "word2" wordcollection(2) = "word3" 'set highlight color. options.defaulthighlightcolorindex = wdyellow 'clear existing formatting , settings in find feature. selection.find.clearformatting selection.find.replacement.clearformatting 'set highlight replace setting. selection.find.replacement.highlight = true 'cycle through document , find words in collection. 'highlight words when found. each word in activedocument.words each words in wordcollection selection.find .text = words .replacement.text = "" .forward = true .wrap = wdfindcontinue .format = true .matchcase = false .matchwholeword

CSS cursor property isn't working -

i'm trying set cursor tags <a> when @ website property isn't showing css { color: #333333; /* color: #787878; */ text-decoration: none; cursor: pointer } on website { color: #333333; /* color: #787878; */ text-decoration: none; } if wanna give website is: backlabel.com the issue link isn't link @ all. the html is: <a data-toggle="collapse" data-target="#demo">care &amp; washing&nbsp;▾</a> if "link" doesn't have href it's not link, it's treated as, essentially, span. since using "toggle" add a[data-toggle] { cursor: pointer; }

javascript - Returning a map from setIn -- ImmutableJS -

Image
i'm trying return nested value inside setin, way i'm doing now, i'm accessing value need, need map first. immutable provides this, however, need use immutable.map().map(..) after array. returned value method, doesn't contain values, of should. know way accomplish this? you need pass iterable immutable.map() constructor, otherwise creating empty map. it's hard precise without more details, assuming 'result' array of resources , need array of resource ids, should work. let tempstateid = newstate.setin([populatekey, 'íds'], immutable.map(result).map(resource => resource.id))

d3.js - Is there any way by which I can add more than 400 entries in the DataTable or DataView while using geomaps, google charts -

is there way can add more 400 entries in datatable or dataview while using geomaps google charts? this note displayed on the geomap page - note: map can display maximum of 400 entries; if datatable or dataview holds more 400 rows, first 400 shown. thanks in advance!

Chef ERB template with Logstash Grok pattern issues -

i have logstash config file need convert chef erb template (mainly filters section). however, keep running issues due format of grok patterns. below example of grok pattern. grok { match => ["message", "<%{posint:seqnum1}>%{posint:seqnum2}: (\d*: |\.|\*)*%{syslogtimestamp:timestamp} %{word:tz}: \%%{word:facility_label}-(%{word:switch_id}-)*%{int:severity}-%{word:program}: %{greedydata:message}"] here issue. shortly after need have interpolation fill in ip address etc. wont because <% starts interpolation of own. mutate { add_field => {"[@metadata][sentry][msg]" => "%{host}" "[@metadata][sentry][severity]" => "%{severity}" "[@metadata][sentry][host]" => "<%= @sentry_host[:ipaddress] %>" "[@metadata][sentry][pid]" => "<%= @sentry_pid %>" "[@metadata][sentry][key]" => "<%= @sentry_key %>"

java - Unable to access parameters inside anonymous inner class on Android -

this question has answer here: what nullpointerexception, , how fix it? 12 answers my question deals fundamentals of java. creating android app , access method parameters inside anonymous thread create inside method. somehow, keep getting null pointer exception. here's how code looking like: public void mymethod(final float x, final float y){ new thread(new runnable(){ float xx = x; float yy = y; @override public void run(){ //inside run method create loop uses "x" , "y" parameters //as "xx" , "yy", respectively. //keep getting null pointer exception on line attempt //calculations x , y } }).start(); } if please have answer great. should make method static? perhaps, rid of final keyword? thank you if you're getting null pointer exception means didn't initialize object variable. npe thrown w

Loading data from a Google Persistent Disk into BigQuery? -

what's recommended way of loading data bigquery located in google persistent disk? there special tools or best practises particular use case? copy gcs (google cloud storage), point bigquery load gcs. there's no current direct connection between persistent disk , bigquery. send data straight bigquery bq cli, makes slower if ever need retry.

algorithm - Train feedforward neural network -

i have feedforward neural network, goal learn how play game (in exemple, connect 4). train neural network playing games against itself. my problem is, don't know how train neural network. if had algorithm determines best move given board, be, in mind, easier, don't want use way. so, don't know if move move or not, know player won (the neural network play both player, know if it's first or second player won), , moves played during game. at moment, wrote program in go initialize neural network, can check if board of connect 4 win or not, calcul output of neural network according board , can play against neural network, or let play against itself. me, need of function train neural network @ end of game ? there did : https://github.com/julien2313/connectfour to use neural network (or in fact supervised learning method) autonomous game playing, need determine numerical or categorical value algorithm can learn. one potential solution map game state acti

I can't set up a Neo4j cluster -

i have neo4j server works fine but, when tried set cluster can't figure out why not work. in order make cluster work, seems need uncoment following lines: ha.server_id = 3 ha.initial_hosts =192.168.1.93:5001,192.168.1.91:5001 dbms.mode=ha but when so, got error in logs file db load. this neo4j.conf file #***************************************************************** # neo4j configuration #***************************************************************** # name of database mount dbms.active_database=graph.db # paths of directories in installation. dbms.directories.data=/var/lib/neo4j/data dbms.directories.plugins=/var/lib/neo4j/plugins #dbms.directories.certificates=certificates # setting constrains `load csv` import files under `import` directory. remove or uncomment # allow files loaded anywhere in filesystem; introduces possible security problems. see `load csv` # section of manual details. dbms.directories.import=import # whether requests neo4j authenticated

java - OneSignal SDK: How to open MainActivity after user taps on notification -

how can open main activity if user taps on push notification sent opensignal. wanted override default behaviour causing issue when app active. added following line per doc <meta-data android:name="com.onesignal.notificationopened.default" android:value="disable" /> now if app closed, how can open mainactivity, , let execute notificationopenedhandler. thank you. if still want launcher / main activity open / resume when tapping on onesignal notification add following code activity intead. private static boolean activitystarted; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); if ( activitystarted && getintent() != null && (getintent().getflags() & intent.flag_activity_reorder_to_front) != 0) { finish(); return; } activitystarted = true; } see resume last activity when opening notification instructions more details. if need more custom

android - DynamoDB mapper save only one attribute in an item Java -

i getting item record dynamodb table adding attribute (userratings) , saving again this: songdatabasemappingadapter song = mapper.load(songdatabasemappingadapter.class, params[0]); song.getuserratings().add(userid + "-" + params[1] + "-" + sdf.format(date)); mapper.save(song); the problem in songdatabasemappingadapter have getter setters being used update gui, this: public boolean getonestarrating() { return onestarrating; } public void setonestarrating(boolean onestarrating) { this.onestarrating = onestarrating; } i need them there don't want them save attributes in database when run code save item adding attributes every element in getter/setter (mapping adapter) item end attributes (columns) below (all of star ratings below have been added shouldn't there): userratings fivestarrating fourstarrating onestarrating so want change code saving userratings attribute in song item not of attri

asp.net - Edge pinned site is not loading notifications -

im coding web application should pinnable start menu , should updating text information setup. there: msdn ie11 reference in windows 8.1 desktop , phone working well, on windows 10 desktop , phone not try (according server log file) load xml file mentoined in msapplication-notifications meta tag. problem there no such documentation edge browser, or im unable find out... is there such experience? br, jan it seems either: fixed in windows 10 version 1607 (but broken in 1511), having tested on device only problem on broken windows installations in first place either way, seems works correctly. windows 10 brings in new tile definitions (adaptive tiles) these notification files, remains able render old definitions

android - Store new position of RecyclerView items in SQLite after being dragged and dropped -

i have 2 dimensional arraylist of type string input adapter class of recyclerview . data in list taken sqlite database everytime when onresume() called. have implemented drag , drop feature , onmove() function swaps list elements successfully. however, need store modified list before onresume() called rewrite list , fill old positions. guess implement rewriting functionality within onstop() event. main activity: recyclerview recyclerview; recyclerviewadapter adapter; recyclerview.layoutmanager layoutmanager; arraylist<arraylist<string>> data; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); setsupportactionbar(toolbar); floatingactionbutton fab = (floatingactionbutton) findviewbyid(r.id.fab); assert fab != null; fab.setonclicklistener(new view.onclicklistener() { @override

javascript - Magento 1.x js and css path mismatch after migration -

correct value web/unsecure/base_url , web/secure/base_url set value 0 both dev/js/merge_files , dev/css/merge_css_files here path http://example.com/frontend/base/default/css/tinybox/style.css http://example.com/frontend/rwd/butysite/css/styles.css http://example.com/scriptaculous/effects.js but need url below http://example.com/skin/frontend/base/default/css/tinybox/style.css

javascript - limiting to 2 places, tofixed not working -

.tofixed(2). i have working fine, accurate answers. var la_95_m = document.getelementbyid("la_95_charge_m"); la_95_m.value = (((total_current_storage.value / total_current_draw_30.value) / cd5_factor) * bc_95_sd_ad) * new_old_factor; i need wrap "var la_95_m" tofixed(2) no matter how have tried keep breaking script. all of these var la_95_m.tofixed(2); var la_95_m.value.tofixed(2); var la_95_m.tofixed(2) = document.getelementbyid("la_95_charge_m"); la_95_m.value = (((total_current_storage.value / total_current_draw_30.value) / cd5_factor) * bc_95_sd_ad) * new_old_factor; break it. any tips/help appreciated you can't declare variables have type .tofixed() , variations on: var la_95_m.tofixed(2) will not work. you need call .tofixed(2) on result of calculation: var result = (((total_current_storage.value / total_current_draw_30.value) / cd5_factor) * bc_95_sd_ad) * new_old_factor; la_95_m

css - How to stretch the content in html -

i have content, however, want stretch content make fit whole. need help! .subtext10 { margin-left: 210px; margin-top: 90px; font-size: 9.2pt; line-height: 20px; } <div class="text5"> <p class="subtext10">has equipped me knowledge in modules such <br>business environment, service excellence, <br>entrepreneurship, executive lounge service, <br>housekeeping services, hospitality sales & marketing <br>and event & catering management <br>essential in field</p> </div> remove break tags ( <br> ) , margins: block-level elements, such paragraphs ( <p> ) , divs, naturally stretch full available width of containers. read more block formatting context . .subtext10 { font-size: 9.2pt; line-height: 20px; } <div class="text5"> <p class="subtext10">has equipped me knowledge in modules such

amazon web services - How to config the aws console for accessing the all instance -

i have .pem file access amazon ec2 instance running ubuntu , have 7 instances. want create new user , access instance in aws console. how can configure aws console accessing instance single user? you need install ssh public key .pem file in other 6 instances authorized_keys file (typically ~/.ssh/authorized_keys ). that, need able log them, of course.

make specific value selected in dropdown fields cakephp 3.0 -

in select drop down, make 1 particular value selected values coming in drop down list cakephp3.0. using below code: $abc = 'india'; echo $this->form->input('location_id', ['empty' =>'please select', 'required'=>'required', 'class' => 'form-control', 'label'=>false]); name of countries coming in drop down list, want make specific value selected set variable $abc (i.e india). use value option of form input helper . : $selected = 'india'; echo $this->form->input('location_id', ['empty' =>'please select', 'required'=>'required', 'class' => 'form-control', 'label'=>false, 'value'=> $selected]); suggestion - read docs once , start development. never stuck @ such simple problems. , refer docs first whenever stuck @ anything.

android - Bottom sheet above the scrollView -

Image
i want kind of bottom sheet should above scrollview. the images in scroll view should behind bottom sheet. bottom sheet should there on screen till proceed button on clicked. appreciated. !! if bottom sheet/panel there, theres no need overlap panels check simplified xml layout example: <?xml version="1.0" encoding="utf-8"?> <!-- root layout element --> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:android_width="match_parent" android:android_height="0dp" android:layout_weight="4"> <scrollview android:android_width="match_parent" android:android_height="0dp"> <!-- put inner grid layout here --> </scrollview> <!-- bottom panel layout --> <!-- can control size of bottom --> <!-- pane playing layout weights --> <linearlayout android:layout_width="match_pare

Generating Random String of Numbers and Letters Using Go's "testing/quick" Package -

i've been breaking head on few days , can't seem able figure out. perhaps it's glaringly obvious, don't seem able spot it. i've read on basics of unicode, utf-8, utf-16, normalisation, etc, no avail. somebody's able me out here... i'm using go's value function testing/quick package generate random values fields in data structs, in order implement generator interface structs in question. specifically, given metadata struct, i've defined implementation follows: func (m *metadata) generate(r *rand.rand, size int) (value reflect.value) { value = reflect.valueof(m).elem() := 0; < value.numfield(); i++ { if t, ok := quick.value(value.field(i).type(), r); ok { value.field(i).set(t) } } return } now, in doing so, i'll end both receiver , return value being set random generated values of appropriate type (strings, ints, etc. in receiver , reflect.value in returned reflect.value). now, impleme

python - Integrate AdminLTE to django project -

i want integrate adminelte django project, of readme file. https://github.com/stephenpcg/django-adminlte-templates i followed steps required in file, when i'm running app, , want login, i'm getting following error. you're using staticfiles app without having set required static_url setting. which come here django-adminlte-templates/adminlte/templatetags/adminlte.py in <module> bootstrap_url_base = _bootstrap_url_base if _bootstrap_url_base else static('bootstrap')

css - Can't center this Bootstrap div -

Image
every other div centered one. , it's been driving me nuts few hours. broke down , posted. attached pic can see it's not centered. you can see live here . image of div not centered: if understand right, want each testimonial centered in containing div? how adding margin-left: 25%; both .testimonial-section , .testimonial-description ?

javascript - $ionicScrollDelegate.scrollTop freezing the page scroll -

i have app have added functionality scroll user top if user clicks on status bar , in order achieve have used following code .run(["$ionicscrolldelegate", "$ionicplatform", "$timeout", function($ionicscrolldelegate, $ionicplatform, $timeout) { $ionicplatform.ready(function() { if (window.cordova && ionic.platform.isios()) { window.addeventlistener("statustap", function() { $ionicscrolldelegate.scrolltop([true]); }); } }); }]) when click status bar code works expected after not allow me scroll pages manually , stucks i believe using android phone test. if android i'm pretty sure there have bug using animation auto-scroll. have try remove animation delete 'true' value on function? ex: $ionicscrolldelegate.scrolltop(true); to $ionicscrolldelegate.scrolltop(); try it.. hope helps you. ios working fine anima

javascript - Unable to load data from local json file using jQuery -

<!doctype html> <html> <head> <script data-require="jquery@*" data-semver="3.0.0" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script> <link rel="stylesheet" href="style.css" /> <script type="text/javascript"> $select = $('#people'); //request json data , parse select element $.ajax({ type:'get', url: 'simple.json', datatype:'json', success:function(data){ //clear current content of select $select.html(''); //iterate on data , append select option $.each(data.person, function(key, val){ $select.append('<option >' + val.firstname+ '</option>'); }) }, error:function(){

Trying to create resource group using New-AzureRmResourceGroup cmdlet in azure webjob -

i have working azure arm powershell scripts create new virtual machine , it's working fine in cloud service when trying execute in azure webjob, getting following error : new-azurermresourcegroup -name $resourcegroup -location $location new-azurermresourcegroup : win32 internal error "the handle invalid" 0x6 occurred while setting character attributes console output buffer. contact microsoft customer support services. @ d:\local\temp\jobs\triggered\webjob\v43suxvk.lln\testdrives\windowsserver201 2\provision.ps1:17 char:1 + new-azurermresourcegroup -name $resourcegroup -location $location + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : closeerror: (:) [new-azurermresourcegroup], host exception + fullyqualifiederrorid : microsoft.azure.commands.resources.newazureresou rcegroupcommand so how can run arm powershell scripts in webjobs?

Can't upload Sandbox Accounts in Bulk in PayPal dev -

Image
i have created file upload fictious sandbox accounts in bulk. paypal throws error: i did required: the file must encoded in utf-16 little endian (however not said bom or w/o) the file must have .txt or .tsv extension separate each attribute in file tab. the first row in file must begin hash-mark ("#") the file must have @ least 1 row of sandbox test account data the file must not more 1 mb in size. file: #country-code account-type email password firstname lastname paypal-balance verified credit-card-type payment-card business test-biz@gmail.com 12345678 fname lname 0 y visa personal test-per@gmail.com 12345678 fname lname 100 n mastercard paypal i tried utf-16le bom , without. no chance. ecperienced similar? functionality work @ all? saved file in sublime text 3 following settings , made it: utf-16le bom unix line ending (lf) that paypal didn't word bom , line endings.

c# - Acr.UserDialogs problems in UWP -

i have added uwp xamarin -project, wierd behavior acr.userdialogs . when using promptasync , confirm argumentnullexception . how can fix these? the other problem is, successtoast never disappears on ios , android , , did on silverlight . there workaround this? i using these nuget packages (in uwp project) acr.userdialogs v5.2.2 acr.xamforms.userdialogs v5.0.0 microsoft.netcore.universalwindowsplatform v5.1.0 mr.gestures v1.3.4 sqlite.net-pcl v3.1.1 xam.plugins.settings v2.1.0 xamarin.forms v2.2.0.45 xamarin.insights v1.12.3 xlabs.forms v2.2.0-pre02 i hope help. update stacktrace figured out, have set placeholder string.empty , per default set null , uwp not support.

AutoHotkey - Find and Replace only some part of multiple Folders in Windows Explorer -

i have multiple folders in windows explorer have part of name same , not. example: first_hello first_how_are_you first_goodbye and change first part "first" "second" result should this: second_hello second_how_are_you second_goodbye this simple example , of course if there 3 folders wouldn't ask it, have 30 folders need change part. any appreciated. #ifwinactive ahk_class cabinetwclass f1:: window in comobjcreate("shell.application").windows try fullpath := % window.document.folder.self.path ; msgbox, %fullpath% loop, files, %fullpath%\first_*, d { ; msgbox, %a_loopfilename% stringreplace, newfilename, a_loopfilename, first_, second_ filemovedir, %fullpath%\%a_loopfilename%, %fullpath%\%newfilename%, 1 } return #ifwinactive

android - Error after install phonegap-plugin-push on Ionic 2 project -

i'm developing ionic 2/angular 2 project using amazon sns/gcm. i need send , receive push messages via gcm. i installed push plugin using command: ionic plugin add phonegap-plugin-push --variable sender_id=my_gcm_sender_id now following error when running project on android emulator: failure: build failed exception. * went wrong: execution failed task ':mergedebugresources'. > c:\users\my user\documents\projetos\my-project\app\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.2.0\res\drawable-tvdpi-v4\common_google_signin_btn_text_light_disabled.9.png: error: file path long on windows, keep below 240 characters : c:\users\my project\documents\projetos\my-project\app\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.2.0\res\drawable-tvdpi-v4\common_google_signin_btn_text_light_disabled.9.png * try: run --stacktrace option stack trace. run --info or --debug

Where can I find proper Android Source Code for preview version N? -

android n preview 4 installed on nexus 5x phone. build number npd56n. want understand of bugs. need debugging on android source code. found accessible source code of view class out of date. i trying use android-mnc source code android sdk folder. i trying find proper code on github. oldest version of needed class dated 2016-03-29. https://api.github.com/repos/android/platform_frameworks_base/commits?path=core/java/android/view/view.java is there solution find latest source code or google hide latest source code before release? probably here have latest version: https://android.googlesource.com/platform/frameworks/base/+/master and here n preview 4 code (latest update 9.06.2016)

I need to document R code/console similar to a SAS log -

i work research department tired of paying half million year sas. r/sas dual user in department, have been tasked leading transition. of our analysts have been sports it, going more smoothly i'd thought. but need way log our programs documentation purposes, similar did sas. logs need have simple metrics in them, number of observations when merging data, warnings/errors, output well. some of stuff output in console , can sink() save thing, there lot isn't output. can add code programs document these things -- nrows() before/after merging, example --, want make easier analysts. can point me in direction more output more detailed log r? package or function i've never heard of? thanks. you might want consider converting scripts rmarkdown files. compiling rmarkdown files can yield log files more potent plain text files. glimpse() dplyr() package useful quick view on content of dataframe. str() gives similar output dataframes , works on other class

Inno Setup Wizard Page onscreen placement (off-centre position) -

i specify wizard pages not open in middle of screen default i.e. position them off-centre using x,y coordinates (or similar offset). because call program opens in middle of screen, obscuring progress page. if open wizard pages offset left or top, example, mean both windows visible @ same time, without having reposition them. possible and, if so, how done? just offset wizardform.left , wizardform.top needed: procedure initializewizard(); begin wizardform.left := wizardform.left - scalex(320); wizardform.top := wizardform.top - scaley(160); end; or maybe: procedure initializewizard(); begin wizardform.left := wizardform.left div 2; wizardform.top := wizardform.top div 2; end;

unit testing - Mock an enum using Mockito in Java -

how can mock enum testing purposes using mockito? given sample enum: public enum testenum { yes, no } and 1 method using enum: public static boolean worktheenum(testenum theenum) { switch (theenum) { case yes: return true; case no: return false; default: // throws exception here } } how can mock enum reach default branch of switch loop? this answer says mockito can't mock enums answer has been provided more year ago. can mock enum meanwhile or have let branch stay untested? other mocking frameworks can't used. there 2 answers that: a) turn powermock-like mocking framework. 2 cent(entences) there: don't that. powermock opens door land of pain; not want enter. b) put interfaces on enums seriously; nowadays think there 1 use case enums; , use them singletons provide service. , then, this: public interface fooservice { void foo(); } class fooserviceimpl implements fooservice { @override void foo() ... enum fooserviceprovider