Posts

Showing posts from June, 2012

javascript - JQuery Swiper Plugin content disappears when in loop -

i using swiper jquery plugin highcharts chart content. reason found when in loop mode, when slide, chart, reached, after circle has been completed not render/show. a similar problem found ( images - image disappears in carousel mode (jquery swiper plugin) ) think fix not apply. i created example on jsfiddle based on swiper demo. http://jsfiddle.net/gondias/gja1j2jh/ when reach slide 1 slide 4 not show unless drag little. var appendnumber = 4; var prependnumber = 1; var swiper = new swiper('.swiper-container', { slidesperview: 1, paginationclickable: false, spacebetween: 0, loop: true }); $(function () { $(document).ready(function () { // build chart $('#container').highcharts({ chart: { plotbackgroundcolor: null, plotborderwidth: null, plotshadow: false, type: 'pie' }, title: { text: 'browser market shares january, 2015 may, 2015' },

Providing default value to Input In SAP Hana procedure -

i trying create stored procedure in hana studio. in stored procedure ,i trying give default value input. code is, create procedure defaultschemaname.procedurename (in input nvarchar(10) default 'test') this runs fine when trying create .hdbprocedure fails when want create .procedure . there way use default procedure in design time? this not possible in sap hana .procedure artifact depricated , there no support artifact. 1 way of solving problem convert .procedure .hdbprocedure(simply change design-time artifact template , changes type of artifact .hdbprocedure). in .hdbprocedure can assign default value input variable.

c# - Solved - Date Time FormatException was unhandled by user code -

this c# web service trying right. arg1 drop down menu user can select, yearly monthly quarterly. arg2 date input. arg3 date chose plus either year, month or 3 months added date. so far have put together: public serviceresult callservice(string arg1, string arg2 = "", string arg3 = "") { system.threading.thread.currentthread.currentculture = new cultureinfo("en-gb"); //write code here if (arg1 == "1 - annually") { datetime thisdate1 = convert.todatetime(arg2); thisdate1.addyears(1); arg3 = convert.tostring(thisdate1); } return new echoinputhandler().echoinput(arg1, arg2, arg3); } i getting error: formatexception unhandled user code exception of type 'system.formatexception' occurred in mscor.lib not handled in user code additional information: string not recognized valid datetime. could educate me on why happening? update i have solved it! code looks now:

.net - Webclient results with default parameter value -

i trying parse webpage through web client using following code. private sub button1_click(sender object, e eventargs) handles button1.click dim lnk string = "http://www.therapy-directory.org.uk/search.php?search=central+london&distance=100&uqs=717425" dim wb new webclient() wb.headers.add("content-type", "application/json") addhandler wb.downloadstringcompleted, addressof gettotal wb.downloadstringasync(new uri(lnk)) end sub private sub gettotal(sender object, e downloadstringcompletedeventargs) if e.error nothing dim str string = e.result dim doc htmlagilitypack.htmldocument = new htmlagilitypack.htmldocument() doc.loadhtml(str) on error resume next dim tot htmlagilitypack.htmlnode = doc.documentnode.selectnodes("//div[contains(@id,'search-results')]//h3[contains(@class,'search-title')]")(0) '("//div[contains(@id,'search-results')]//s

ios - How does the app 'Battery Doctor' show a list of installed apps on my iPhone? -

Image
i've been trying find since last couple of days, cannot figure out, how ios application find out applications installed on iphone? here screenshot reference : i read ihasapp able this, using canopenurl: , apple banned app saying ' specifically, found app misuses "canopenurl:" extrapolate apps installed on device. ' being said that, there still way exists can programmatically retrieve installed apps on iphone without jailbreaking??

angularjs - conditionally apply angualrjs custom filter in ng-repeat -

i want call custom filter based on input in template ng-repeat. if mycondition true want apply custom filter slice otherwise don't want apply slice filter. <div ng-repeat = "job in userjobs.matched_jobs | slice:'5' && mycondition"> <div ng-include="'applydiv.html'"></div> </div> above code not working slice filter getting true in input(5&&mycondition) i can hack here that <div ng-if="!mycondition"> <div ng-repeat = "job in userjobs.matched_jobs"> <div ng-include="'applydiv.html'"></div> </div> </div> <div ng-else> <div ng-repeat = "job in userjobs.matched_jobs | slice:'5'"> <div ng-include="'applydiv.html'"></div> </div> </div> but not follow dry princ

ios - tableview execute before web service call resulting in a blank tableview -

i want populate data tableview web service call. tableview numberofrowsinsection executes before results web service call(which brings data immediately) here code: - (void)viewdidload { [super viewdidload]; routes = [[nsmutablearray alloc] init]; [self loaddatawithstopname:@""]; [self.tblview reloaddata]; } .h: @interface viewcontroller : uiviewcontroller<uitableviewdelegate, uitableviewdatasource> as can see, tried reloaddata on tableview property, did not work. i guess call web service asynchronous in loaddatawithstopname . means reloaddata called if web service call not finished yet. have make sure call reloaddata after data loaded. in callback method of web service call.

asp.net mvc routing - Route attributes overriding route -

here's route: routes.maproute("login", "", new { action = "login", controller = "authentication"}) .datatokens = new routevaluedictionary(new { area = "authentication" }); routes.mapmvcattributeroutes(); here controller action: [routearea("authentication", areaprefix = "auth")] [route("{action=login}")] public class authenticationcontroller : basecontroller { [httpget] [allowanonymous] public actionresult login() { ... if comment out routes.mapmvcattributeroutes(); can request login action using '/'. if left in route doesn't work , 404. how make default route website login page form area? the area being registered independently of attributes. i removed convention route , added following <system.web> in web.config: <urlmappings enabled="true"> <clear /> <add url="~/"

android - Xamarin. WebView progres -

want implement custom webview progress bar both adnroid , ios versions. using xamarin.forms this. but can't find information how can done. any ideas? just use stacklayout activityiindicator , webview children , set it's visibility based on isworking property value set in webview.navigating , webview.navigated events. viewmodel has implement ionpropertychanged .

javascript - update.js in Rails needs second submit -

i having small (really small) issue rails. a remote:true update form (calling update.js.erb) needs 2 submissions instead of 1 correctly refresh view. def update @user = user.find(params[:id]) if @user.update_attributes(update_user_params) respond_to |format| format.html { flash[:success] = "votre profil été mis à jour." redirect_to @user } format.js end else render 'edit' end end and here view code (i using method: 'put' because calling homepage, , not edit.html, without it, problem persists): <%= form_for @user, html: { multipart: true }, remote: true, method: 'put' |f| %> <%= f.label :location, 'ville', class: 'popover-title' %> <%= f.select :location, cities_options %> <%= f.submit "valider", class: 'btn-addon' %> <% end %> here's see on submit: started put "/users/101" 127.0.0.1 @ 2015-08-19 15:25:05 +0200 processing u

python - PyQt, QFileSystemWatcher doesn't capture the file added -

i need monitor folder , find out whether new file added folder, after ask user whether want print file out or not. problem lies qfilesystemwatcher, can't figure out how name of file has been added. tried code (see later), file_changed function doesn't react folder changes. directory_changed function works. how can name of file has been added , how can capture signal/boolean, when file added can trigger messagebox , system tray message (see in code). lot , sorry poor code, new qt. , please don't point me c++ examples, don't understand them. import sys pyqt4.qtgui import * pyqt4 import qtcore # create system tray message class systemtrayicon(qsystemtrayicon): def __init__(self, parent=none): qsystemtrayicon.__init__(self, parent) #self.seticon(qicon.fromtheme("document-save")) self.seticon(qicon("c:\icon2.ico")) def welcome(self): self.showmessage("new payfile found!", "we found new pa

c# - Can protobuf-net handle auto read-only properties? -

can protobuf-net handle new auto read-only properties, i.e. auto properties defined single get , no private set ? public class withreadonlyproperty { public int readonlyproperty { get; } public withreadonlyproperty(int val) { readonlyproperty = val; } } when this runtimetypemodel .default .add(typeof (withreadonlyproperty), false) .add(nameof(withreadonlyproperty.readonlyproperty)); var test = new withreadonlyproperty(12345); using (var output = file.create(@"c:\temp\_readonly.bin")) { try { serializer.serialize(output, test); } catch (exception e) { console.writeline(e); } } i exception: system.invalidoperationexception: cannot apply changes property withreadonlyproperty.readonlyproperty @ protobuf.serializers.propertydecorator.sanitycheck(typemodel model, propertyinfo property, iprotoserializer tail, boolean& writevalue, boolean nonpublic, boolean allowinternal) in c:\dev\protobuf-net\prot

php - The usage of .htaccess to re-write the url -

i have written .htaccess rewrite following urls : confirmreg.php to http://keralapsctuts.com/confirm-registration.html and confirmreg.php?code=nsfoh98fkjsdf90 to http://keralapsctuts.com/code/62fdd2ac2709877a81ecfd7dde9d2810/confirm-registration.html .htaccess rule is rewriterule confirm-registration\.html$ confirmreg.php [qsa,l] rewriterule code/(.*)/confirm-registration\.html$ confirmreg.php?code=$1 [qsa,l] echo not returning value of code echo "code: ". $_get['code']; improved code: rewriterule ^confirm-registration\.html$ confirmreg.php [qsa,l] rewriterule ^code/([0-9a-z]+)/confirm-registration\.html$ confirmreg.php?code=$1 [qsa,l] give rewriterule starting ^ rewriterule ^ optionally, more specific in characters want except. code/([0-9a-z]+)/

javascript - Protractor - How to handle site that is heavily animated? -

i have write tests website angular application , has ton of animations. has "mini" window slides in top , goes in center , contents sldie in right till go in , on. this breaks tests, lot. protractor sees elements since shown cant click on them because moving , throws error saying other element receive click. happens , not know how handle (except using browser.sleep(xxxx)). is there solution except using sleep function? if have no other option have use every on 2nd row... **i have tried browser.manage().timeouts().implicitlywait(30000); , did not help. p.s. have cases protractor tries click on element before visible. i can make short video show animations if needed. test.describe('profile tests: ', function(){ this.timeout(0); test.before(function(){ browser.get('......'); }); test.it('change username', function() { var newusername = 'sumuser'; welcome.continuelink.click(); bonus.takebonus.isdisplayed().then

html - background images outside of a container css -

Image
im trying build web layout has fixed width container. design calls background images go outside of container though, meanwhile still keeping text of divs within container. below image show mean: the black container, red sidebar. content on sidebar should stay within container, different sections of sidebar have different background colors. any suggestions? you can manage pseudo-elements extract of relevant code demo. aside .block:before { position: absolute; content: ''; left: 0; top:0; height: 100%; width: 100vw; background: rgba(0,255,0,0.5); z-index:-1; } codepen demo note: layout method here i've used not relevant. use flexbox fun works other, older layout methods well.

web services - From WDSL to java -

i've been tasked querying soap client in java , i'm bit confused how move forward. the first thing did use wizdler chrome plugin prototype soap request. soap "envelop" must of format believe work. <envelope xmlns="http://www.w3.org/2003/05/soap-envelope"> <body> <getmyprojectcharges xmlns="http://company.iwweb.data.service.projectcharges"> <employee>[string?]</employee> <fiscalyear>[string?]</fiscalyear> <apikey>[string?]</apikey> <appname>[string?]</appname> </getmyprojectcharges> </body> </envelope> next i've gone through various tutorial how build soap envelop in java keep getting strange situation i'm getting <soap-env: prefixes on , when take generated envelop , try paste chrome plugin doesn't work. so i'm wondering go here? realize soap pretty heavy protocol , maybe confusing me i'm

java - 1 error wont let my code compile -

i new android programming , trying make app splits bill between people. integers wrong. know because in logcat says "caused by: java.lang.numberformatexception: invalid int: "" here mainactivity.java public class mainactivity extends activity { public double x; public double y; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); //button button btn = (button) findviewbyid(r.id.button); //edittext edittext nop = (edittext) findviewbyid(r.id.edittext); edittext cob = (edittext) findviewbyid(r.id.edittext2); //getting strings try{ x = double.valueof(nop.gettext().tostring()); } catch (numberformatexception) { x = 0; } try{ y = double.valueof(cob.gettext().tostring()); } catch (numberformatexception) { y = 0; } string textx = nop.gettext().tostring(); // if variable contains valid number:

java - H2 server suspends while debugging -

i have spring application starts following in memory h2 database junit tests: db.jdbc.driver=org.h2.driver db.jdbc.url=jdbc:h2:mem:sampledb db.jdbc.username= db.jdbc.password= hibernate.dialect=org.hibernate.dialect.h2dialect i debug when junit tests running , meantime browse database state, before test suite start h2 server: org.h2.tools.server.createtcpserver("-tcpport", "9092", "-tcpallowothers").start(); unfortunately when put breakpoint suspends threads suspends h2 server thread, not able connect. cannot start h2 server in different process because in memory database not accessible outside vm. i understand can use other type of breakpoint (that suspends current thread) it's kind of limitation. have found other solutions such problem? starting tcp server not here, you're creating memory database. i suggest starting console instead in thread , , in same piece of code (using jdbc example) open connection database not clos

php - make a if statement run only when submit button is clicked -

here have form , php code run when submit button clicked.but "if" block run page reloads.as if $_post array not empty.i can try single element,like !empty($_post['name']) .but want test on universal $_post array.how can it? <?php require_once 'input.php'; if(input::exists()){ print_r($_post); $arr=array('ball'); echo $arr[0]; } ?> <form action='' method='post'> name:<input type='text' name='name' ></br> <input type='submit' value='submit'> </form> input.php file: class input{ public static function exists($type='post'){ switch($type){ case 'post': return (!empty($_post))?true:false; break; default: return (!empty($_get))?true:false; brek; } } } why need input class? this: if ($_post['name']) {

Android - Adding tabs to a Fragment -

i making fragment tabs having problem cannot resolve. when adding tabs must set content setcontent() can set activity or layout , want make transaction between 2 fragments. have exception: java.lang.illegalargumentexception: must specify way create tab content @ android.widget.tabhost.addtab(tabhost.java:225) @ com.rpstudios.pokecooker.customfragment.oncreateview(customfragment.java:27) @ android.support.v4.app.fragment.performcreateview(fragment.java:1504) @ android.support.v4.app.fragmentmanagerimpl.movetostate(fragmentmanager.java:942) @ android.support.v4.app.fragmentmanagerimpl.movetostate(fragmentmanager.java:1121) @ android.support.v4.app.backstackrecord.run(backstackrecord.java:682) @ android.support.v4.app.fragmentmanagerimpl.execpendingactions(fragmentmanager.java:1484) @ android.support.v4.app.fragmentmanagerimpl$1.run(fragmentmanager.java:450) @ android.os.handler.handlecallback(handler.java:733)

MySQL dynamic pivot table -

this question has answer here: mysql dynamic pivot table 2 answers i have simplified data following: +---------+-----+--------+ | item | type | color | +-------+-------+--------+ | 1 | | red | | 1 | b | blue | | 2 | | orange | | 2 | b | pink | | 2 | c | blue | | 3 | b | yellow | +---------+-----+--------+ the number of 'type' per item variable, therefore, need mysql pivot solution dynamic , can handle number of types. following kind of result set need return mysql query. can see, not need summary calculation. +---------+------+--------+--------+ | item | | b | c | +-------+--------+--------+--------+ | 1 | red | blue | | | 2 | orange | pink | blue | | 3 | | yellow | | +-------+--------+--------+--------+ i suspect solution may invol

visual studio 2013 - How to add existing project to VS2013 from Github -

i have 1 project in github. know how attach project local vs2013 can work , commit , other team member too. search google lot know how attach existing project vs2013 github no luck. if knows please share idea. thanks here can find step step post how configure github repository in visual studio 2013.

Using 3D in Google Maps -

i create webapp can display own geotiffs, ndvi , other data layers, 3d geometries, providing seamless rendering of both 2d tiles , textured 3d shapes, maps.google.com achieves in switching "map" "earth" views. after research, closest came viable solution build infrastructure ground based on http://cesiumjs.org/ , , while seems doable, extremely low level, , require exotic cocktail of libraries , buttload of man-hours. before going down road, want make sure there isn't cost effective alternative takes heavy lifting out of app's shoulders , gives me friendly set of apis base app on. mapbox comes close perfection in regard, unfortunately, handles 2d. on other hand, on google side, amid earth api , maps engine deprecation, it's hard tell possible , remain available long term. bottom line, future-proof google-centric solution built today, there google apis in place allow building webapp displays custom 2d , 3d data seamless rendering experience?

r - Search Operators in RedditExtractoR -

i'm trying set process pull down reddit posts , comments relating group of keywords. get_reddit() function in redditextractor package makes extremely straightforward, i'm not sure i'm using search terms properly, , haven't been able find useful detail in package documentation or online. i've tested search functions work on reddit site, below, no luck. using below code, i've tested handful of terms, , results bit confusing. (note: in testing, actual number of results may differ based on times when queries passed.) library(redditextractor) term <- "bank" # or "bank loan" or "bank, loan" etc. test <- get_reddit(search_terms = term, page_threshold = 10, sort_by = "new") "bank" returns 196 records; "loan" gives 157. "bank, loan" , "bank loan" each give 2700, however; "bank or loan" gives 31. expect "bank, loan&quo

php - Set an array from class and get him outside a class -

i create array id posts inside function, , him outside class. code: <?php class cat_widget extends wp_widget { private $newhomepost = array(); function widget($args, $instance){ //... foreach($img_ids $img_id) { if (is_numeric($img_id)) { $this->setnewhomepost($newscounter,$post->id); $newscounter++; //... } } } function setnewhomepost($num, $value){ $newhomepost[$num] = $value; } function getnewhomepost(){ return "id: ".$this->newhomepost[0]; } } $testa = new cat_widget(); echo $testa->getnewhomepost(); ?> i receive on screen resuld: id: (without id) but if insert inside setnewhomepost() echo array, i'll obtain correctly array inside , not outside class. function setnewhomepost($num, $value){ $newhomepost[$num] = $valore; echo $newhomepost[0]; } seem array works fine inside "

sql - add calcfield to TQuery -

i found code create calc field tadotable in delphi somewhere ... ..... procedure tfrmmain.abstable1calcfields(dataset: tdataset); begin abstable1 fieldbyname('cost').asfloat := fieldbyname('price').asfloat * fieldbyname('quantity').asinteger; // add new field cost price * quantity !!!! end; end. inside app create tadoquery @ rum time try fquery.sql.clear; fquery.sql.addstrings(amemo.lines); fquery.open; ..... end; how add more calc fields query derived first code fragment ? i think way can creating set of persistent tfields in ide (or equivalent creation of them in code before open dataset). otherwise, when call open on dataset, iirc call bindfields , - unless dataset has set of tfields - create set of dynamic tfields last long dataset open, not include calculated fields. by time bindfields has been called, it's late add mo

wordpress - Custom post Types slug and permalinks issue - SEO and Structure -

i see issue has been brought before don't seem address specific issue. feel specific issue broad 1 though. may seem paradoxical hear me out. for site i'm working on in wordpress, created pages counties serve. far have 1 bucks, montgomery, , delaware counties, there plenty more. there want people able navigate "recent jobs" based on county client can add themselves. can 1 many jobs client wants add. these pages talk specific job in specific town, link "related jobs" job type, not county. these go 3 levels deep, county hub page > specific job in specific town > specific job type (ie: bucks county, pa > window replacement job in newtown, pa > window replacement job in wherever). hope makes sense. did create page each county. created custom post type: county jobs. created custom taxonomies each county group them county. need taxonomies group them job type i'm not there yet. set template "single-county-job.php" , custom fields di

How to create diagonal and unequal matrix in R? -

i need create diagonal (6,6) matrix in r using valuse 1.2, 12.1, 6.5, 9.4, 4.9, 2.4. how should r code? use diag : diag(c(1.2, 12.1, 6.5, 9.4, 4.9, 2.4))

Sort files by number at end in bash/perl -

i'm trying sort huge list of files following format: file-55_357-0.csv file-55_357-1.csv file-55_357-2.csv file-55_357-3.csv ... is there simple way in bash or perl? in other words, there way write perl script such goes through of them in numerical order? instance, when create my @files , can make sure script goes through them in sorting -- how create my @sorted array? ask because want append these files vertically, , need in sorted order. much! you can use sort command, neither part of bash nor part of perl. with input data in input.txt : file-55_357-123.csv file-55_357-0.csv file-55_357-21.csv file-55_357-3.csv from shell, (any shell, not bash) can following: $ sort -t- -nk3 input.txt file-55_357-0.csv file-55_357-3.csv file-55_357-21.csv file-55_357-123.csv the -t option specifies delimiter, -n says compare numeric values (so 21 comes after 3 rather before) , -k 3 says sort on third field (per delimiter).

html type="submit" doesn't work -

i following tutorial, , have simple code <form> <input name=“q”> <input type=“submit”> </form> , should show button, appears text box. weird thing is, copy paste same text textedit(cover original ), , works fine button. however, when try delete letter( such t in sumbit) , retype it, won't work again. don't use smart quotes when writing html. won't interpreted correctly goes default input type of of text. change <input name=“q”> <input type=“submit”> to <input name="q"> <input type="submit">

sql - GORM Domain Mapping Issue -

i've got bit of complicated domain model i'm trying implement , i'm having trouble. (on top of that, i'm quite new this!) i have user domain has multiple roles , multiple tests. role domain works great. test domain bit more compilciated though because requires 2 foreign keys instead of 1 in role domain. first foreign key user_id , second uni_id (university id). the user domain model contains following class user { static hasmany = [roles:role, tests:test] integer userid ... static mapping = { table 'user_data' id generator: 'assigned', name: 'userid', type: 'long' userid column: 'user_id' version false roles jointable:[name:'user_role', key:'user_id'] tests jointable:[name:'user_test', key:'user_id'] // here run trouble } static constraints = { } } the test domain contains class test { static belongs

Need javascript path -

i'm looking reference variable (in case, zipcode) i'm having trouble defining javascript path. appreciated. thanks. <script type="text/javascript"> var uopurchase = { product:"ticket;110144206100;1;214.99;adult", purchasepricebeforetax: "214.99", orderid: "150819uo62768693", zipcode: "32109", creditcardtype: "visa", deliverytype: "87", quantity: "1", adults: "1", children: "0", allages: "0", dates: "1/1/0001 12:00:00 am" }; </script>

Using Lynx Cron Job to allow for PHP redirect -

i have php script ends header redirect, want schedule via cron job. reading around took me 'lynx' library thought browser-lite way of doing cron job act in same way browser , able execute redirect. a simplified version of script looks like: <?php // connect db require_once($_server['document_root']."/admin/inc/dbconnect.php"); // check db quotes have not been sent client $query_quotes = "select * quotes sent_client = 0 limit 1"; $view_request = mysqli_query($globals['db_connect'], $query_quotes); // send external system , email customer quote while ($quotes = mysqli_fetch_array($view_request)){ $body = "email content"; // send email via swift mailer // send quote information third party system via url redirect header('location: http://exampleurl/?firstname='.rawurlencode($quotes['name']).'&businessname='.rawurlencode($quotes['company_name']).'.'); } ?&

Cassandra list<blob> read data incorrectly -

reading list , got wrong data. create table tt (k text primary key, msg list<blob>); static byte[] msg = new byte[] { 6, 6 }; static byte[] msg1 = new byte[] { 7, 7 }; preparedstatement upsert = session.prepare("update tt set msg = msg + ? k = ?"); session.execute(upsert.bind(collections.singletonlist(bytebuffer.wrap(msg)), key)); upsert = session.prepare("update tt set msg = msg + ? k = ?"); session.execute(upsert.bind(collections.singletonlist(bytebuffer.wrap(msg1)), key)); preparedstatement statement = session.prepare("select msg tt k = ?"); resultset rs = session.execute(statement.bind(key)); (bytebuffer bs : rs.one().getlist("msg", bytebuffer.class)) { (byte b : bs.array()) system.out.print(b + ", "); system.out.println(); } data stored correctly: cqlsh:bellrock> select msg tt; msg ------------------ [0x0606, 0x0707] but outputs as: 0, 0, 0,

CUDA Warp Divergence -

i' m developing cuda , have arithmetic problem, implement or without warp diverengence. warp divergence like: float v1; float v2; //calculate values of v1 , v2 if(v2 != 0) v1 += v2*complicated_math(); //store v1 without warp divergence version looks like: float v1; float v2; //calculate values of v1 , v2 v1 += v2*complicated_math(); //store v1 the question is, version faster? in other words how expensive warp disable compared calculation , addition of 0? your question has no single answer. heavily depends on amount of calculations, divergence frequency, type of hardware, dimensions , many more aspects. best way program both , use profiling determine best solution in particular case , situation.

storyboard - Tableau to click on datapoint, populate another panel -

Image
i'm using trial version of tableau desktop 9.0.4 so far, have datapoints on geographic map. when hover on them, information appears in tool tip. here abstract of map now, trying find out how display other data on separate panel, i.e. click on datapoint, , data appears on panel below. this abstract of like. tableau tools use? thanks! @inox reason, use filter greyed out. tried remove quickfilters. screenshot below. as said in comments, should use action filters use data 1 worksheet other, if both displayed in same dashboard. (in fact, can filter worksheets in other dashboards, don't believe it's case right now). in tableau desktop, select worksheet → actions , click in add action button. selecting filter action, prompted window lets select source sheet, target sheet , how filter should behave.

java - How to return TIFF image from remote api using multiple header parameters -

i'm creating spring application access remote api returns tiff image. api expecting few parameters send in header. i'm attempting following code examples i've found.. when return responseentity respond, it's of 0 length , byte[] respond null. {content-length=[0], content-type=[application/octet-stream], server=[microsoft-iis/7.5], x-powered-by=[asp.net], date=[wed, 19 aug 2015 15:14:17 gmt]} list<httpmessageconverter<?>> messageconverters = new arraylist<httpmessageconverter<?>>(); messageconverters.add(new bytearrayhttpmessageconverter()); resttemplate resttemplate = new resttemplate(messageconverters); httpheaders headers = new httpheaders(); headers.set("accept", "application/octet-stream"); uricomponentsbuilder builder = uricomponentsbuilder.fromhttpurl("http://webservices.imagestorehouse.com/getdata.svc/getdocs") .queryparam("token", "a80d4978c12

html5 - Problems to reproduce Weight Video buffering php on Chrome -

i have problems reproduce weight video (400mb or more) in chrome. in opera , mozilla firefox works. during "streaming", cant navigatintg site, "charging". my script is: http://codesamplez.com/programming/php-html5-video-streaming-tutorial i tried increment buffering, not works. the videos root folder , have access header. i have problems script download videos too, cant navigatintg site, "charging" : $local_file = $url; $download_file = $url; // set download rate limit (=> 20,5 kb/s) $download_rate = 140; if(file_exists($local_file) && is_file($local_file)) { header('cache-control: private'); header('content-type: application/force-download'); header('content-length: '.filesize($local_file)); header('content-disposition: filename='.basename($download_file)); flush(); $file = fopen($local_file, "r"); while(!feof($file)) { // send current file part

html - PHP Codeigniter wont load CSS-File -

good evening, i started using codeigniter framework newest projekt... , got problems on first page. i want link css file site. looks in code. nothing happens. <html> <head> <title>tec.net</title> <?php $this->load->helper('html'); echo link_tag($data['css']); ?> </head> <body> <h1><?php echo $title ?></h1> this code of header.php body { background-image: url("application/views/images/console background.png"); color: white; } the standard.css <html> <head> <title>tec.net</title> <link href="localhost/tecnet/standard.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>home</h1> <h2>this home site</h2> <em>&copy; 2015</em> </body> </html> and @ last. code receive firefox. link fine. if try access directly

excel vba - VBA run shell command with admin privileges -

i need run "powercfg -hibernate off" admin privileges in order able put computer sleep (instead of hibernate). feasible? if so, how can it? function dosleep() shell "powercfg -hibernate off" #this needs admin privileges shell "c:\windows\system32\rundll32.exe powrprof.dll,setsuspendstate 0,1,0" shell "powercfg -hibernate on" #this needs admin privileges end function

ruby on rails - Update an existing model (User) in a nested form for a new model (Project) -

using rails 4.2.3 i want create form update model (user) , create new ones (project, rewards, bankaccount) my models: class user < activerecord::base has_many :projects def self.permitted_params [:id, :last_name, ... , bank_account_attributes: bankaccount.permitted_params] end ... end class project < activerecord::base belongs_to :user accepts_nested_attributes_for :user def self.permitted_params [:name, :description, ...] end ... end form: <%= simple_form_for @project, html: { class: 'saveable-form' } |f| %> <%= f.input :name %> ... <%= f.simple_fields_for :user |user| %> <%= render 'user_fields', f: user %> <% end %> <% end %> controller class projectscontroller < applicationcontroller def new @project = project.new @project.user = current_user @project.user.build_bank_account end ... def project_params params.require(:project).permit(

python - Error while connecting to a region under a profile -

as per document region parameter of boto.emr.emrconnection class however, follwoing error while making connection: conn = boto.emr.emrconnection(profile_name='profile_name', region='us-west-2') file "c:\python27\lib\site-packages\boto-2.38.0-py2.7.egg\boto\emr\connection.py", line 68, in init self.region.endpoint, debug, attributeerror: 'str' object has no attribute 'endpoint' any idea? the method expecting regioninfo type region, not string. so pass boto.ec2.get_region('us-west-2') instead of 'us-west-2' import boto.ec2 boto.emr.emrconnection(profile_name='profile_name', region=boto.ec2.get_region('us-west-2'))

java - Drag Multiple Objects Simultaneously -

how drag multiple selected objects , move around within frame? the current implementation whenever user click on object, pressing shift key, each new object added multishape however,i able move single selected object instead. my code here: public void mouseclicked(mouseevent clickevent) { clickshape = null; int x = clickevent.getx(); // x-coordinate of point mouse // clicked int y = clickevent.gety(); // y-coordinate of point if (clickevent.isshiftdown()) { int top = shapes.size(); (int = 0; < top; i++) { shape s = (shape) shapes.get(i); if (s.containspoint(x, y)) { s.setcolor(color.red); multishape.add(s); } } repaint(); } } } my moving object defined under abstract shape cla

php - Why is the error callback function getting called? -

i'm trying figure out why i'm getting 500 (internal server error) , error function called. there glaring error in code // $namemap map of input names table cells in email // e.g. <input name="email" value="somedude@gmail.com"/> gets made row <tr><td><b>email address:<b></td><td>somedude@gmail.com</td></tr> // mapping 'email' => 'email address' in array $namemap = array( 'name' => 'name', 'email' => 'email address', 'phone' => 'phone number', 'comments' => 'comments'); // https://css-tricks.com/sending-nice-html-email-with-php/ $headers = "mime-version: 1.0\r\ncontent-type: text/html; charset=iso-8859-1\r\n"; function contact ( ) { global $namemap, $headers; $info = array('validname' => (strlen(trim($_post['name'])) > 0 ? true : false), // name long not empty

javascript - FileReader memory leak -

i'm using filereader upload image files client data fetching , thumbnails display. what i've noticed is, on page process, in task manager, memory keeps going higher , higher. , when process stops, , memory stay high , never goes down. can please tell me doing wrong here? to check, please upload more 200 pictures, 30mg. , see memory keeps on leaking thank in advanced. -- here link code example on web and here code: <input class="fu" type="file" multiple="multiple" /> <div class="fin"></div> <div class="list"></div> <script type="text/javascript"> $(document).ready(function () { var input = $("body input.fu"); input[0].addeventlistener('change', fu.select, false); }); var fu = { list: [], index: 0, select: function (evt) { evt.stoppropagation(); evt.preventdefault();

limiting regression lines to data extent in a multi plot using visreg R -

Image
i having issues limiting regression lines in "visreg" plots range of data each plot. plot extent of overall data frame , when change individual limits, still plots overall data frame visually not correct data points. sample codes below: codrysub humid wet.sub.himid dry.sub.himid semi.arid arid hyper.arid nov 2004 2.20 2.22 2.16 2.03 1.79 1.68 dec 2004 2.75 2.72 2.52 2.32 2.08 1.93 jan 2005 2.98 2.92 2.68 2.43 2.18 2.03 feb 2005 2.81 2.80 2.62 2.37 2.14 2.04 mar 2005 2.43 2.44 2.33 2.16 1.99 1.96 apr 2005 2.30 2.25 2.08 2.00 1.90 1.91 smdrysub humid wet.sub.himid dry.sub.himid semi.arid arid hyper.arid nov 2004 0.26 0.21 0.15 0.08 0.05 0.07 dec 2004 0.22 0.16 0.10 0.07 0.06 0.08 jan 2005 0.19 0.12