Posts

Showing posts from March, 2011

Routing in SAPUI5: How to implement passing of URL? Model data not initialy loaded -

my goal write sapui5 fiori app routing support. 1 mail goal have passable urls. example in e-mail "please approve this: link ". link url matched rounting config, e.g. index.html#/applicants/8 . i use typical sap.m.splitapp kind of application. clicking list item in masterview changes url index.html#/applicants/[id of entry in json] . can click on list, defined routes getting matched , apps loads (applicant) data expected. however, , here comes question, doeas not work when using url directly, pasting [my url]/index.html#/applicants/8 browser. app launched no detail data loaded. have click on list item again data. actually, controller called when passing url, seems model not initiated , undefined. json model bound in createcontent function of component.js // update 2015-05-14 problems seems around getdata() function. have model, has entries, getdata() returns undefined first time app loaded. read getdata() deprecated. how should improve coding below? // com

iOS Remote Notification Action Buttons not always present -

after following instructions presented here apple watch notification not consistently show action button have set in notification settings during remote notification registration. i using pushwoosh service , made sure remote notification json data sending pushwoosh have correct parameters, , 1 receiving on device apns has proper aps-alert-category structure , contents. i can find no pattern on when or not appear, i'm @ dead end. have idea why action buttons not appear time, on same device? after going through logs, discovered pushwoosh_auto setting true on plist file causing service register own categories apns, overwriting categories specified in app. upon setting false action button appears normally.

android - onPause(), different results from home and back button -

i'm creating application uses locationmanager() handle updates gps. when app closed, want updates locationmanager stop , has piece of code @ moment. @override protected void onpause() { super.onpause(); if(locationmanager != null){ locationmanager.removeupdates(locationlistener); } when exit app button, onpause() called , gps stop. nothing weird here. but, if press home button, gps marker in status bar remains visible, though onpause called same. that because when exit app button activity destroyed (receives ondestroy callback). , there no process uses gps marker hidden. if lock device screen or press home button application still run activity stopped. code won't gps updates after onpause until register them again.

mysql - Show Null if count is 0 -

i have following query: select e.employeename, date_format(`maintenancedate`, "%m %y") month,count(`maintenanceid`) total `maintenance` m join employee e on m.employeeid =e.employeeid group month,e.employeeid which generates result this employeename month total big apr-15 2 bar dec-14 1 big dec-14 1 may know how can improve query show total of 0 each employee not have count in particular month? eg: bar have total 0 in april 2015 you need generate list of employees , months , bring in data want count. complete lists uses cross join . use left join rest of data: select e.employeename, mon.month, count(m.maintenanceid) total employee e cross join (select distinct date_format(maintenancedate, '%m %y') month maintenance ) mon left join maintenance m on m.employeeid = e.employeeid , date_format(m.maintenancedate, '%m %y') = mon.month

ios - 'ProductModuleName-Swift.h' file not found -

i want use protocol method of swift class objective-c class have import 'productmodulename-swift.h' , declare protocol in interface shows error: 'productmodulename-swift.h' file not found. but when import test.m file fine when import test.h shows error. example: test.h #import "myproject-swift.h" @interface test : uiviewcontroller<myswiftdelegate> or there way use protocol method of swift in obj-c class thanks in advance. go targets -> build settings -> swift compiler - code generation , make sure "objective-c bridging header" points correct place , "objective-c generated interface header name" correct file. header name unit tests defaulted module-nametest-swift.h needed remove "test" title.

javascript - why click on div do not automatically click on tab -

i using mvc-5 , in view have number of divs arranged horizontally , below each divs have tabs. each div arranged such contains tabs below it. now have ? have click on div , upon clicking div must automatically click tab below it.(i don't want manual ) my try : i have created onclick event of div , have assigned id tab. problem tab never clicked on clicing respectivce div . my code is: <div class="panel-body"> <div class="col-md-2" id="active" onclick="activecircleclick('tab1')"> <div id="active" style="height: 125px;"> //here </div> </div> </div> <div style="width:1300px;"> <div style="width:100%;"> <ul class="nav nav-tabs nav-pills nav-justified" role="tablist" id="mytab"> <li class="active" id="activelist"&g

xml - Serving SVG as JPEG using Imagick and PHP -

i have svg string want serve jpeg using php. (and lot more things) using imagick. below code php: $svg = '<?xml version="1.0" encoding="iso-8859-1"?><!doctype svg public "-//w3c//dtd svg 1.1//en" "http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd"><svg version="1.1" id="capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28.125px" height="28.125px" viewbox="0 0 28.125 28.125" style="enable-background:new 0 0 28.125 28.125;" xml:space="preserve" background="transparent"><g><g><path d="m14.063,0l1.659,6.617v0.464c0,13.979,11.906,20.767,12.026,20.834l0.378,0.21l0.377-0.21 c0.12-0.067,12.026-6.854,12.026-20.834v6.617l14.063,0z m14.063,26.329c12.13,25.096,3.445,18.92,3.214,7.544l10.849-5.787 l10.849,5.786c24.681,18.919,15.996,25.

google app engine - How to access file present inside bucket of another application -

Image
i trying read .txt file present inside bucket of google application. below code gcsinputchannel readchannel = null; bufferedreader reader = null; gcsfilename filename = new gcsfilename("abc.appspot.com","for_prod_scripts.txt"); gcsservice gcsservice = gcsservicefactory.creategcsservice(); // can read file through api: readchannel = gcsservice.openreadchannel(filename,0); // again, different standard java ways of reading channel. reader = new bufferedreader(channels.newreader(readchannel, "utf8")); //csvreader csvreader = new csvreader(reader); string line = reader.readline(); while ((line = reader.readline()) != null) { log.warning("read:" + line); } i have added below permissions bucket permissions , object default permissions of bucket.as shown in

r - Cross-referencing data frames without using for loops -

im having issue speed of using loops cross reference 2 data frames. overall aim identify rows in data frame 2 lie between coordinates specified in data frame 1 (and meet other criteria). e.g. df1: chr start stop strand 1 chr1 179324331 179327814 + 2 chr21 45176033 45182188 + 3 chr5 126887642 126890780 + 4 chr5 148730689 148734146 + df2: chr start strand 1 chr1 179326331 + 2 chr21 45175033 + 3 chr5 126886642 + 4 chr5 148729689 + my current code is: for (index in 1:nrow(df1)) { found_mirnas <- "" curr_row = df1[index, ]; (index2 in 1:nrow(df2)){ curr_target = df2[index2, ] if (curr_row$chrm == curr_target$chrm & curr_row$start < curr_target$start & curr_row$stop > curr_target$start & curr_row$strand == curr_target$strand) { found_mirnas <- paste(found_mirnas, curr_target$start, sep=":") } } curr_row$mirna

java - Execution of empty space in calculator crashes android -

i beginner in android. made calculator. works fine when there value in boxes if they're empty crashes. have tried many things the first loop divide has problem. haven't implemented on other arithmetic operations,just divide. package com.example.bilal.aaa; import android.os.bundle; import android.support.v7.app.actionbaractivity; import android.view.menu; import android.view.menuitem; import android.view.view; import android.widget.button; import android.widget.edittext; import android.widget.textview; import android.widget.toast; public class mainactivity extends actionbaractivity { edittext t,t2; textview t3; button b1,b2,b3,b4,b6; @override protected void oncreate(bundle savedinstancestate) { // super.oncreate(savedinstancestate); // setcontentview(r.layout.home); super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); t = (edittext)findviewbyid

java - Testing a void method with Mockito -

i have method this: public void somemethod() { a = new a(); // class. a.setvar1(20); a.somemethod(); } i want test 2 things: the value of var1 member variable of 20. somemethod() called once. i have 2 questions: are test objectives correct or should testing else ? how test using mockito ? you can't test using mockito, because mockito can't access local variable code creates , let go out of scope. you test method if injected dependency of class under test, or of method under test public class myclass { private a; public myclass(a a) { this.a = a; } public void somemethod() { a.setvar1(20); a.somemethod(); } } in case, create mock a, create instance of myclass mock a, call method , verify if mock has been called. with code, is, way test code verify side effects of calling somemethod() on var1 equal 20. if a.setvar1() , a.somemethod() don't have side-effect, code useless: creates obje

c++ - CUDA, "illegal memory access was encountered" in Memcpy -

i have cuda file: #include "cuda.h" #include "../../handleerror.h" #include "sphere.hpp" #include <stdlib.h> #include <cimg.h> #define width 1280 #define height 720 #define rnd(x) (x*rand()/rand_max) #define spheres_count 5 using namespace cimg_library; __global__ void kernel(unsigned char* bitmap, sphere* s) { // map threadidx/blockidx pixel position int x = threadidx.x + blockidx.x * blockdim.x; int y = threadidx.y + blockidx.y * blockdim.y; int offset = x + y * blockdim.x * griddim.x; float ox = x - blockdim.x * griddim.x / 2; float oy = y - blockdim.y * griddim.y / 2; float r = 0.2, g = 0.2, b = 0.5; float maxz = -inf; (int = 0; < spheres_count; i++) { float n, t = s[i].hit(ox, oy, &n); if (t > maxz) { float fscale = n; r = s[i].r * fscale; g = s[i].g * fscale; b = s[i].b * fscale; maxz = t; } } bitmap[offset*3] =

Install m2e in eclipse without install maven in system -

i try use maven in eclipse project. in maven official website there several step must accomplish configure maven side side eclipse. know there m2eclipse plugins if need use maven. don't know if can use plugins maven installed in system or not. sorry, beginner question. the m2e plugin brings copy of maven 3.0.4 , installs inside of eclipse plugin can use it. enough build maven projects inside of eclipse. no external installation needed. you must start eclipse jdk, though. jre isn't enough. if you're unsure: file lib/tools.jar . when it's there: you're good. this copy isn't accessible command line. if want build command line or if need newer version of maven 3.0, need install maven , configure plugin accordingly.

AngularJS: show time from datetime -

i using angular in web application. showing placed orders users following code. , works fine: <div class="orderspresent" ng-cloak=""> <div class="roworders" style="margin-bottom:5px;" ng-controller="allorders" > <div class="col-md-3" ng-repeat= "o in orders | orderby:-o.orderid" ng-hide= "o.orderstatus=='done'" ng-hide="hidden" ng-class="{fade: startfade}"> <div class="sm-st clearfix"> <div class="sm-st-info"> <i class="fa fa-square"></i> <input type="checkbox" ng-true-value="{{o.orderid}}" ng-change="statechanged({{o.orderid}})" ng-model="status"/> </div> <span>{{o.customername}}</span> <p>{{o.orderdate | date:'h:mm'}}</p> <ul> <li ng-repeat= "details in o.details"> {{detail

web - Preventing an iframe on the same domain from triggering a page exit in Google Analytics -

i working on third party website contains web application embedded in iframe on home page. iframe hosted on same same sub/domain. currently page views being tracked _trackpageview . due requirement marketing both pages use same google account id. since iframe implemented marketing department has noticed bounce rate has dropped nothing. suspect because google interpreting pageview event on iframe visitor hitting page on website. just additional information, domain of _gaq object being set "none" both container page , iframe. does google provide mechanism can trigger pageview in such way isn't interpreted subsequent pageview in scenario? (i know trackevent has noninteraction property deal this?) am better off disabling pageview default iframe page? does google provide mechanism - apparently yes, not use case. the field documentation universal analytics describes non-interaction field thusly: specifies hit considered non-interactive. so in

ssh - docker run cannot find name flag argument -

i have setup rstudio application on google compute container engine using docker , rocker/rstudio package. want start saved container name using following ssh command line: sudo docker -d -p 8787:8787 --name samplename user/laatste which returns following error flag provided not defined: --name i have tried , without quotes, equal signs, double , single hyphens, before, between , after other flags , arguments, same error keeps returning. version information: client version: 1.5.0 client api version: 1.17 go version (client): go1.4.1 git commit (client): a8a31ef os/arch (client): linux/amd64 server version: 1.5.0 server api version: 1.17 go version (server): go1.4.1 git commit (server): a8a31ef the reason want name container want run standard (static) startup , shutdown scripts google compute instance automatically save , load changes made in r. container name used identifying container saved. other solution welcome. i guess wanted do: sudo docker run -d -p

jquery - Pass parameters to javascript functions which is bind to events -

i have function : var = this; this.context.on('focus', function(i) { var htmlelement = ele; var style = {left: 'auto', color: '#000000'}; if(i !== null) { = that.context.size()/2; style.left = + 'px'; //find htmlelement in dom , apply style } }); the htmlelement , style var me in different calls. need pass option such as var options = {style: somevaue, htmlelement: somelement} to function called multiple times different options. if pass options : var = this; this.context.on('focus', function(i, options) { //use options.style , options.htmlelement }); it doesn't work way. doing wrong since function bind focus event of this.context has i param can't accept other param. kind of help/suggestion appreciated. i think have worked out solution. help. here how options passed: var = this; this.context.on('focus', function(i) { var options = {i: i, sty

c++ - Generated 2D terrain with fixed seed across platforms -

i'm using 1d perlin noise generate 2d terrain game. i'm looking best method generate terrain fixed seed should same across different platforms/hardware. i'm using mersenne twister give me different results on windows phone 8 on android / ios ( mentioned in last post: 1d noise using mersenne twister giving different results on different devices ) what need number generator produces same values between 0.0 , 1.0 when using same seed. simple pseudo random or number generator giving me different results fine. thing matters me has produce exact same output on every hardware/platform given seed. any appreciated.

r - Problems with German Umlaut in RStudio (Windows 7) -

Image
i have problems using umlauts in rstudio. first, .csv file read in this: mydat<-read.csv("c:/mydat.csv", header=f, sep=";", na.strings= c("na","")) when open dataframe mydat, seems went fine: but when use r-console, umlauts gone: levels(mydat$v6) [1] "Öfter als fünfmal" "einmal" "zwei- bis fünfmal" i tried using read.table , encoding="windows-1252" , doesn't change anything. on mac works fine. here system. perhaps there's easy solution , i'm dumb, every other time posted question on stackoverflow. sys.getlocale() [1] "lc_collate=german_germany.1252;lc_ctype=german_germany.1252;lc_monetary=german_germany.1252;lc_numeric=c;lc_time=german_germany.1252" r.version _ platform x86_64-w64-mingw32 arch x86_64 os

PHP: How to json encode of hindi language in response -

i working translation api here issue. using json in response , when json_encode of hindi out "\u092f\u0939 \u0915\u093e\u0930 \u0939\u0948" my code given below $data = array(); $data['hindi'] = 'यह कार है'; $data['english'] = 'this car'; echo json_encode($data); die; and response {"hindi":"\u092f\u0939 \u0915\u093e\u0930 \u0939\u0948","english":"this car"} this correct json , when display in browser , / or parse it, result in object correct keys , values: var json_string = '{"hindi":"\u092f\u0939 \u0915\u093e\u0930 \u0939\u0948","english":"this car"}', json = json.parse(json_string); // or directly: var json2 = {"hindi":"\u092f\u0939 \u0915\u093e\u0930 \u0939\u0948","english":"this car"}; console.log(json_string); console.log(json); console.log(json2); document.write(json_str

jsf 2 - Arguments against a generic JSF object converter with a static WeakHashMap -

i want avoid boiler plate code creating list of selectitems map entities/dtos between view , model, used snippet of generic object converter: @facesconverter(value = "objectconverter") public class objectconverter implements converter { private static map<object, string> entities = new weakhashmap<object, string>(); @override public string getasstring(facescontext context, uicomponent component, object entity) { synchronized (entities) { if (!entities.containskey(entity)) { string uuid = uuid.randomuuid().tostring(); entities.put(entity, uuid); return uuid; } else { return entities.get(entity); } } } @override public object getasobject(facescontext context, uicomponent component, string uuid) { (entry<object, string> entry : entities.entryset()) { if (entry.getvalue().equals(uuid)) { return entry.getkey(); } } return null; } }

oop - access local variable outside javascript -

how can access name variable inside outside. function myobject(){ var name="test" } var n=new myobject(); alert(n.name); i want alert here. please guide me. since creating instance of myobject function, need add name it's property access outside. function myobject(){ this.name="test" } var n=new myobject(); alert(n.name);

web services - Error 411 on bpel -

i'm trying call service temperature , pass result service convery fahrenheit degrees celsius exception when execute service. <!-- temperatura bpel process [generated eclipse bpel designer] --> <!-- date: tue may 12 10:40:32 cest 2015 --> <bpel:process name="temperatura" targetnamespace="http://ws.temperatura.tps" suppressjoinfailure="yes" xmlns:tns="http://ws.temperatura.tps" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ns="http://ws.cdyne.com/weatherws/" xmlns:ns0="http://www.w3schools.com/webservices/"> <!-- import client wsdl --> <bpel:import namespace="http://www.w3schools.com/webservices/" location="tempconvert.wsdl" importtype="http://schemas.xmlsoap.org/wsdl/"></bpel:import> <bpel:import namespace="http://ws.cdyne.com/weatherws/" locat

android - Alpha/Beta Testing multiplayer feature -

i integrated google-play-games sdk game. decided use real-time multi-player apis. have problem: how test testers community (around 20 people) ? the game in alpha testing @ moment (not published). prefer testing before publishing it. have created testing account can use internal testing, how allow small community test it? i mean having 10-20 people , pretend connected @ same time seems unachievable considering game allow 6 people join game (using auto-match feature). have version of game capable use simulator (implemented in code) play game (without human interation) how use in context of testing? there cloud based service allow push apks simulators? what's google solution problem?

objective c - Extract only the text from PDF files with CGPDFScanner -

there number of questions (some answered , others not) extracting simple text pdf files. stackoverflow has been helpful point out pdf adobe documentation clear detect objects during parsing: i.e. 1 should use 'bt' , 'et' pdf reference operators construct callbacks when using cgpdfscanner. the apple documentation shows callback example: static void op_bt (cgpdfscannerref s, void *info) { const char *name; if (!cgpdfscannerpopname(s, &name)) return; printf("bt /%s\n", name); } and, among other cgpdfscanner commands, above call-back set-up first creating: mytable = cgpdfoperatortablecreate(); cgpdfoperatortablesetcallback (mytable, "bt", &op_bt); all far, apple documentation doesn't appear low-to-intermediate programmers me understand next step: beyond identifying text block (presumably between bt , callbacks?), few steps/lines needed during/in/outside callback capture identified text block nsstring?

c# - Available Resolutions For a specific Screen -

Image
i might have 2 monitor/screens connected machine. want know avaliable resolutions specific screen (i have instance of type system.windows.forms.screen). i've seen following: how list available video modes using c#? list of valid resolutions given screen? but give results monitors , not specific one. suggestions? thanks!!! edit 1: this info 2 screens: in first of links you're told enumdisplaysettings . take few seconds lookup function , first parameter string specifies display device graphics mode function obtain information. here's sample class fetch information displays. i've deliberately omitted devmode since you've got it. public class nativemethods { [dllimport("user32.dll")] public static extern bool enumdisplaysettings(string devicename, int modenum, ref devmode devmode); [dllimport("user32.dll")] public static extern bool enumdisplaydevices(string devicename, int modenum, ref display_de

foreach - PHP explode then double loop -

i trying split string stay under limit of 70 characters... however, when this, loop stop right when gets first 70 characters , doesn't attempt 2nd set. reason i'm going route , not use str_split keep entire words don't send out messages half of word. if 2nd split has less 70 characters, please still send out...any kind of appreciated. $message="a new powerful earthquake convulsed traumatized nation of nepal on tuesday, leveling buildings damaged devastating quake killed thousands of people less 3 weeks ago." $msg = explode(' ',$message); foreach($msg $key) { $keylen = strlen($key); $msglen = $msglen + $keylen; if($msglen<70) { $msgs .=$key." "; // $agi->verbose("$msgs"); } else { $params = array( 'src' => '18009993355', 'dst' => $callerid, 'text' => $msgs, 'type' => 'sms',

python - What is the correct way of getting a base (or short?) hostname? -

is there simpler/better or more pythonic way of getting base hostname? base_hostname = socket.gethostname().split(".")[0] as example, how localhost below: >>> socket.gethostname() 'localhost.localdomain' >>> socket.getfqdn() 'localhost.localdomain' >>> socket.gethostname().split('.')[0] 'localhost' i asking because suspect there similar os.path 's abspath , basename , join , split , splitext , etc functions manipulate hostnames, haven't found yet.

java - Font size in textfield libgdx -

how can change size of textfield font in libgdx? usernametextfield = new textfield("", globalskin); usernametextfield. ??? there various builtin methods can call set size. if want set size of textfield can call usernametextfield.setwidth(float width) or usernametextfield.setheight(float width) or usernametextfield.setmaxlength(maxlength) and if want set size of font ` textfield.textfieldstyle textfieldstyle = skin.get(textfield.textfieldstyle.class); textfieldstyle.font.scale(1.6f); ` you can check methods , need take @ api.

php - How do Recursive menu in laravel 5? -

i have passed value on variable controller view page, , show value in foreach loop. want do, when execute foreach loop, value want pass in " test " controller method.. have query defendant on value. a) there way of getting response of controller within view b) there way of getting response of controller within controller method, can push result view? code far is: first action on method : (accheadcontroller/create) public function create() { $root = db::table('chart_of_account') ->select('*') ->where('parent_id','=',0) ->get(); return view('pages.createacchead')->with('level1', $root); } and pass level1 variable on view page (pages.createacchead) : <fieldset> @foreach($level1 $item) <ul> <li> <input type="radio" name="acchead" value="{{$item->id}}"> {{$item->title}}<

ruby - NoMethodError: undefined method `get' for #<Class:0xa3b9e1c> rails rake task -

i having error when running rake task. rake used run correctly before. rake aborted! nomethoderror: undefined method `get' #<class:0xa3b9e1c> /home/munam/.rvm/gems/ruby-2.1.4/gems/activerecord- 4.1.6/lib/active_record/dynamic_matchers.rb:26:in `method_missing' /home/munam/projects/ror/tftus/api/lib/data_providers/data_provider.rb:3:in `initialize' /home/munam/projects/ror/tftus/api/lib/tasks/data_providers.rake:33:in `new' /home/munam/projects/ror/tftus/api/lib/tasks/data_providers.rake:33:in `block (2 levels) in <top (required)>' /home/munam/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval' /home/munam/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>' tasks: top => player:create (see full trace running task --trace) my rake task: require 'data_providers/providers' # affiliation rake namespace :affiliation desc "create affiliations" task :create => :environment affiliation

java - Why we need not to declare a serialVersionUID(or equivalent) in C#? -

in java recommended serializable classes explicitly declare serialversionuid since default serialversionuid computation highly sensitive class details , compiler implementation unreliable. what's special serialization in c#? in .net serialization less cranky in java. by default supports new fields defaulting them, , ignore data doesn't expect. you can still implement same kind of version control implementing iserializable interface in class , adding own custom versionid class , check there. you can read more here

c++ - Void pointer initialization? If not, what is it? -

i'm trying understand segment of code used parameter in c++ can't seem find example of elsewhere on internet. here's segment: void (*cb)(void) is way of initializing void pointer? benefit of doing versus void *cb ? in example, cb pointer function takes no arguments , has no return value for example if have void printhello( ) { cout << "hello" << endl; } then later have void (*cb)(void); cb = printhello; i can call function using: cb(); which call printhello(); the utility of can assign different functions cb , call them , pass them around other functions other pointer variable. often clarity, programmers create specific type avoid having write mouthful: typedef void (*tprttovoidfn)(void); tptrtovoidfn cb; cb = printhello; for comparison, pointer function returns int like: int (*ptrtofunctionreturningint)(void); and pointer function taking int , returning nothing like: void (*ptrtofunctionreturningnothi

javascript - Bootstrap: Stylize Border Lines in Navbar Menu -

Image
i have been customizing header website. have been having trouble twi things. 1) search icon has border lines on top , bottom when browser shrunk. want thin bottom line , remove top line. 2) wanted add more spacing between sign in/sign when browser shrunk. possible remove sign when browser switches hamburger icon? thanks in advance. document.addeventlistener("touchstart", function() {}, true); body { background-color: #e2e2e2; } .navbar { background: #00ad97; background: -moz-linear-gradient(#24c494, #00ad97); background: -o-linear-gradient(#00ad97, #00ad97); background: -webkit-linear-gradient(#4a4a4a, #414042); } /*-------------- search button top start --------------*/ .search-box { transition: width 0.6s, border-radius 0.6s, background 0.6s, box-shadow 0.6s; width: 30px; height: 30px; border-radius: 15px; border: none; cursor: pointer; background: white; } .search-box + label .icon-search { color: blac

python - Bokeh - How to Click and Drag? -

i click-and-drag scatter points points of bokeh scatter plot. ideas how this? (edit: an example of i'd do) for example of scatter, code below generates scatter plot chart found half-way through this page . from bokeh.plotting import figure, output_file, show # create figure object p = figure(width=300, height=300, tools="pan,reset,save") # add circle renderer figure p.circle([1, 2.5, 3, 2], [2, 3, 1, 1.5], radius=0.3, alpha=0.5) # specify how output plot(s) output_file("foo.html") # display figure show(p) add in lasso_select , box select tools , rid of pan tool (for now). there seems bug pan gets stuck. from bokeh.plotting import figure, output_file, show # create figure object p = figure(width=300, height=300, tools="reset, save, box_select, lasso_select") # add circle renderer figure p.circle([1, 2.5, 3, 2], [2, 3, 1, 1.5], radius=0.3, alpha=0.5) # specify how output plot(s) output_file("foo.html") # display f

java - swing, build and make GUI, empty screen -

i have swing program. first create frame , frame insert jpanel, contains graphical components. somehow, i'm not able draw bottom panel. have empty window. @override public void run() { frame.setdefaultcloseoperation(jframe.exit_on_close); frame.add(new buildgui()); frame.pack(); frame.getcontentpane(); frame.setlocationrelativeto(null); frame.setvisible(true); frame.getcontentpane().validate(); frame.getcontentpane().repaint(); } . . . public class buildgui extends jpanel { public void buildgui() { bottompanel = new jpanel(); bottompanel.setlayout(new gridbaglayout()); // build gui here, add components bottompanel frame.add(bottompanel); } @override public dimension getpreferredsize() { // works return new dimension(800, 800); }

javascript - How can I show the value above only a particular bar in highcharts? -

how can show value above particular bar (which clicked) in highcharts? series: [{ datalabels: { enabled: true, } }] the above code shows value on bars. need show count in particular bar. here's example of using points update method achieve effect: $('#container').highcharts({ series: [{ data: [ // ... ], datalabels: { enabled: false }, point: { events: { click: function () { this.update({ datalabels: { enabled: true } }); } } } }] }); see this jsfiddle basic demonstration. here's a jsfiddle label on last clicked point.

mysql - Difference between Provider value in OLEDB conncetion string MSDASQL and MSDASQL.1 -

i trying connect sql , mysql database through oledb. in case of mysql, connection string like: provider=msdasql.1;persist security info=false;data source=mysql;initial catalog=information_schema; or like: provider=msdasql;persist security info=false;data source=mysql;initial catalog=information_schema; the same suits sql connection string also. the provider information in connection string differs provider=msdasql.1 , provider=msdasql . i don't know why provider value differs. why differ? there reason behind this? and connection through microsoft ole db drivers odbc drivers .

java - How to show volume seek bar on video view in android? -

i have added video view in android.i able display video & working fine.but don't see volume control.i want show volume control.please tell me how can show volume control on video view in android? add seekbar layout , add onseekbarchangelistener it. in listeners callback implement logic, see question details.

What type of index should be used in Oracle -

i have large table of 7 column in oracle 11g. total size of table more 3gb , total row in table 1876823. query using select doc_mstr_id index_mstr page_con1 like('%sachin%') taking minute. please me optimize query proper indexing table. please let me know if partitioned required table. below column description index_mstr_id number doc_mstr_id number page_no number page_part number page_con1 varchar2(4000) file_modified_date date created_date date this query going result in full table scan. filter cannot use b-tree index, due leading wildcard: where page_con1 like('%sachin%') if want lots of queries of nature need build text index on column. datatype page_con1 appears hold text fragments rather full documents should use ctxcat index. type of index has advantage of being transactional, rather requiring background maintenance. find out more . your query this: select doc_mstr_id index_mstr cats

Using git with Wordpress and multiple people: access all files locally but only edit a subset? -

git n00b here. boss , developing wordpress workflow git. we'd have copy of files on our local machines, 95% of time want edit theme folder. our efforts far haven't yielded working solution yet. here's i've tried: i set repository include wordpress files, latest core files server. discovered files on server getting overwritten local copies if didn't edit them (eg wordpress update on server , next time push local, old files overwrite newer ones on server) so used git ignore drill way down theme folder. git still tracking them, used rm stop tracking. git deleted other files. how people here use git multiple people update wordpress? perspectives appreciated - thanks! you should keep files in git repository, should avoid doing modifications directlry on server. your wordpress update should done on of local checkout of repository , pushed on server via git. another possibility commit / push update changes once have been done on server, p

antlr4 - ANTLR v4 grammar fails to parse due to mismatched EOF -

follows simple grammar antlr v4. grammar when walked produces error message **line 1:14 mismatched input '' expecting dimensionname* for trivial input such "sdarsfd integer" (without quotation marks). so has mention f similar errors , bug perhaps filed in 4.3 timeframe. have been using antlr 4.5. any help/pointer/solution? /** simple parser dimension declaration */ grammar simple; definition : dim; dim : dimensionname datatype; dimensionname : letter (letter)*; // greedy datatype: 'integer' | 'decimal'; letter : [a-za-z]; digit : [0-9]; ws: [ \t\n\r]+ -> skip; you have switch 2 lexer rules datatype , dimensionname ... datatype: 'integer' | 'decimal'; dimensionname : letter (letter)*; // greedy ... as dimensionname matches every chars, 'integer' typed dimensionname instead of datatype . "sdarsfd integer", lexer produces 2 dimensionname token, dim rule cannot matched. switchin

ruby on rails - Wicked Gem, associated models param is missing -

i have boat model , location model. boat has_one :location , location belongs_to :boat . used wicked gem update models. having issue in boat_steps_controller 's #update action. here boat_steps_controller , class boatstepscontroller < applicationcontroller include wicked::wizard before_action :logged_in_user steps :model, :pricing, :description, :picture, :overview, :features, :location def show @boat = current_user.boats.find(params[:boat_id]) case step when :location @location = @boat.build_location when :picture @picture = @boat.pictures.new @pictures = @boat.pictures.all end render_wizard end def update @boat = current_user.boats.find(params[:boat_id]) @boat.update(boat_params) case step when :picture @picture.update(picture_params) when :location @location.update(location_params) end render_wizard @boat end priva