Posts

Showing posts from February, 2010

jmeter - How to change the date format of the correlated date? -

i'm capturing date in 1 request can send captured date parameter next request. in next request date should sent different format. in order send date need modify date format how can that? for example, if have ${date} variable value of 27/01/16 , need convert january 27, 2016 add beanshell preprocessor child of 2nd request put following code preprocessor's "script" area: import java.text.simpledateformat; simpledateformat source = new simpledateformat("dd/mm/yy"); simpledateformat target = new simpledateformat("mmmm dd, yyyy"); date date = source.parse(vars.get("date")); string newdate = target.format(date); vars.put("date", newdate); after above code execution ${date} variable hold new value date in different format see: simpledateformat class javadoc patterns explained how use beanshell: jmeter's favorite built-in component information on beanshell scripting in jmeter

php - Unit test persistence layer - Symfony -

i want test persistence in symfony2. wonder whether better mock entities , provide entity manager or whether better mock entity menager , pass entity manager ? i first option entity manager throw exception object not entity doctrine. how test persistence symfony in phpunit? rather writing unit tests should write integration tests persistence layer. there's rule in unit testing " don't mock don't own ". you don't own doctrine classes nor interfaces, , can never sure assumptions made interfaces mocked true. if they're true @ time write test, cannot sure doctrine's behaviour didn't change on time. whenever use 3rd party code should write integration test whatever uses it. integration test call database , make sure doctrine works way think works. that's why it's decouple 3rd party stuff. in case of doctrine it's easy. 1 of things introduce interface each of repositories. interface articlerepository { /** ...

javascript - Using :contains to found a text jquery -

in past questions, asked how can hide element's depending text specific tag use span, 1 answer says can use html <div class="container-a"> <div class="container-b"> <div class="container-c"> <table border="1"style="width:98%"> <tr> <td width="220" height="100"> 1 </td> <td width="200"> 2 </td> <td width="300"> <div id="step_form_1" class="order-steps"> <span>25/01/2016 13:30</span> <div> ...

c# - How to validate textbox based on checkbox value -

iam trying validate textbox based on checkbox value. please view model class , isvalid override method. public class product { //below property value(haveexperiance) [mustbeproductentered(haveexperiance)] public string productname { get; set; } public bool haveexperiance { get; set; } } public class mustbetrueattribute : validationattribute { //here need value of haveexperiance property //i passed [mustbeproductentered(haveexperiance)] in product class above. public override bool isvalid(object value) { return value bool && (bool)value; } } you can see above in productname property in product class iam trying pass haveexperiance class property value, if checked user must have fill productname textbox. so orignal question how can validate productname textbox based on haveexperiance value, in advance. edit: using system; using system.collections.generic; using system.componentmodel.dataannotations; using system...

hanami - Form Help In Hanamirb (Lotusrb) -

does hanami support below code? <%= form_for :question, routes.question_path. method: 'post' %> <div class="box-body"> <div class="row"> <div class="box-body pad"> <textarea id="content"></textarea> </div>`enter code here` </div> </div> <% end %> and how can can in template? though possible, official hanami guide discourages has resort monkey patching in order work various template engines. you can read more here . an alternative approach define single form rendering method in view, this: def form form_for :question, routes.questions_path, method: 'post' div(class: 'box-body') div(class: 'row') div(class: 'box-body pad') text_area :content, id: 'content' end end end end end then, somewhere in template, can call render form: <%= form %> ...

Logstash Grok Pattern for Rails 4? -

anyone have logstash pattern ruby on rails 4 multiline logs? i have pattern rails 3, has different log structure: ruuid \h{32} # rails controller action rcontroller (?<controller>[^#]+)#(?<action>\w+) # line: rails4head (?m)started %{word:verb} "%{uripathparam:request}" % {iporhost:clientip} @ (?<timestamp>%{year}-%{monthnum}-%{monthday} %{hour}:%{minute}$ # strange reason, params stripped of {} - not sure that's idea. rprocessing \w*processing %{rcontroller} (?<format>\s+)(?:\w*parameters: {%{data:params}}\w*)? rails4foot completed %{number:response}%{data} in %{number:totalms}ms %{greedydata} rails4profile (?:\(views: %{number:viewms}ms \| activerecord: %{number:activerecordms}ms|\(activerecord: %{number:activerecordms}ms)? # putting rails4 %{rails4head}(?:%{rprocessing})?(?<context>(?:%{data}\n)*)(?:%{rails4foot})? rails 4 logs in format, includes timestamp , looks id (#). i, [2016-01-26t23:21:44.581108 #27447] info -- : start...

xcode - Audio Code docent work in Swift 2 -

can me correcting code. know has changed because of swift 2. import uikit import avfoundation class viewcontroller: uiviewcontroller { @iboutlet var pauseplay: uibutton! var buttonaudioplayer = avaudioplayer(contentsofurl: nsurl(fileurlwithpath: nsbundle.mainbundle().pathforresource("buttonaudio", oftype: "mp3")!), filetypehint: nil) } what you're looking shown below. need declare instance of avaudioplayer , nsurl @ instance level class viewcontroller: uiviewcontroller { var buttonaudiourl = nsurl(fileurlwithpath: nsbundle.mainbundle().pathforresource("songname", oftype: "mp3")!) var buttonaudioplayer = avaudioplayer() override func viewdidload() { { try buttonaudioplayer = avaudioplayer(contentsofurl: buttonaudiourl, filetypehint: nil) } catch { print("errorin do-try-catch") } } @ibaction func() { buttonaudioplayer.play() } }

jquery code works fine on jsfiddle but only partially (toggle doesnt work) on my website even though same version of jquery -

i've been coding element website on jsfiddle , when tried transfer website (wordpress based), partially works. doesn't seem jquery not working because expand/ collapse mechanics working fine. seems wrong class toggling , i'd appreciate if you'd me out cuz couldn't find working solution searching. this code, jsfiddle tells me valid - http://jsfiddle.net/gszc4/ but on website doesn't work/ toggle doesnt work, rest - http://www.roxopolis.de/media/albums/what-would-you-give jquery(document).ready(function () { jquery(".content").hide(); jquery(".content_album").hide(); jquery(".heading").click(function () { jquery(this).next(".content").slidetoggle(200); }); jquery("#heading_album").click(function () { jquery(this).next(".content_album").slidetoggle(400); }); $('#heading_album').click(function () { $(this).toggleclass('album_cl...

file - What's perfect counterpart in Python for "while not eof" -

to read text file, in c or pascal, use following snippets read data until eof: while not eof begin readline(a); do_something; end; thus, wonder how can simple , fast in python? loop on file read lines: with open('somefile') openfileobject: line in openfileobject: do_something() file objects iterable , yield lines until eof. using file object iterable uses buffer ensure performant reads. you can same stdin (no need use raw_input() : import sys line in sys.stdin: do_something() to complete picture, binary reads can done with: from functools import partial open('somefile', 'rb') openfileobject: chunk in iter(partial(openfileobject.read, 1024), ''): do_something() where chunk contain 1024 bytes @ time file.

php - Wordpress Post not getting updated in editor -

i building custom plugin 1 of project , facing issue custom fields have created, once trying save fields. not getting data displayed in admin editor. screenshot of issue page i adding code below please find it. <?php function apt_add_fields_metabox() { add_meta_box( 'apt_college_fields', __('college fields'), 'apt_college_fields_callback', 'college', 'normal', 'default' ); } add_action('add_meta_boxes','apt_add_fields_metabox'); //display fields metabox content function apt_college_fields_callback($post) { wp_nonce_field(basename(__file__),'wp_college_nonce'); $apt_college_stored_meta = get_post_meta($post->id); ?> <div class="wrap college-form"> <div class="form-group"> <label for="issue_check"><?php esc_html_e('issue date available','ap...

Is it possible to check whether hadoop cluster is yarn enabled using java? -

i know how enable yarn in cluster providing value of mapreduce.framework.name yarn in mapred.xml file. want know via java api whether possible know yarn enabled or not when know fs.defaultfs. try contacting yarn web services , decide based on whether receive response or not , if information provides application,either error message or success.

algorithm - Longest increasing subsequence in a 2D matrix. -

Image
i solving programming challenge find length of longest increasing subsequence in 2d nxn matrix. both row , columns must increase in each element of sequence (no need consecutive) . solved dynamic programming approach o(n^4) , inefficient. however, there many solutions in o(n^3). 1 such solution is: scanf("%d", &n); for(i = 1; <= n; i++) { for(j = 1; j <= n; j++) { scanf("%d", &l[i][j]); } } answer = 0; memset(maxlength,0,sizeof(maxlength)); (i=1;i<=n;i++) { maxlength[1][i] = 1; maxlength[i][1] = 1; } // (i=2;i<=n;i++) { memset(minvalue,0,sizeof(minvalue)); curlen = 1; minvalue[1] = l[i-1][1]; (j=2;j<=n;j++) { (p=1;p<i;p++) { tmplen = maxlength[p][j-1]; if (minvalue[tmplen] == 0) { minvalue[tmplen] = l[p][j-1]; ...

Can I run multiple control but same method in C# -

for example txtunittotalqty.text = ""; txtprice.text = ""; txtunitprice.text = ""; lbltotalvalue.text = ""; to like (txtunittotalqty, txtprice, txtunitprice, lbltotalvalue).text = ""; you can this: txtunittotalqty.text = txtprice.text = txtunitprice.text = lbltotalvalue.text = string.empty; or write method it: public void settext(params textbox[] controls, string text) { foreach(var ctrl in controls) { ctrl.text = text; } } usage of be: settext(txtunittotalqty, txtprice, txtunitprice, lbltotalvalue, string.empty);

php - Symfony how to converte object of class to double and check variables -

i have next code @ symfony2 . when try check variables in public function subtractcredits i'm getting error: notice: object of class dorent\rentalbundle\entity\credit not converted double my code: $credit->setamount($creditstotal - $credit->getamount()); if ($credit <= $creditstotal) { if ($this->savecredit($credit)) { //send credit subtracted notification email. if (array_key_exists('emailcreditssubtracted', $credit->getserviceprovider()->getsettings())) { <?php namespace dorent\rentalbundle\credit; use dorent\rentalbundle\entity\credit; use doctrine\orm\entitymanager; use dorent\basebundle\email\email; use symfony\bridge\monolog\logger; class creditmanager { /** * * @var entitymanager */ protected $em; protected $email; protected $logger; public function __construct(entitymanager $entitymanager, email $email, logger $logger) { $this-...

matlab - The best way to connect Hybrid stepper motor Simpower model to Simmechanics v2 in Simulink -

i need connect hybrid stepper motor model rotative joint in 2nd generation simmechanics model build myself. connected output angle of stepper model actuation - motion input, letting joit module calculate load torque. give load torque load torque input of stepper model. think can accurate or not? best way this?

continuous integration - Travis, how to deploy with ssh? -

i'm using travis ci pointing master branch on github repository. travis working fine far running tests still need manually deploy code after code has finished. automate process using travis again , deploy _build folder server's /var/www/project_folder using ssh. good? if yes, how can tell travis deploy after tests?

html - meta property image not working in linkedin -

meta property image working fine in facebook not in linkedin i'm using <meta property="og:image" content='image url' /> i tried <meta property="og:image:width" content="180" /> <meta property="og:image:height" content="110" /> but still not working in linkedin try following: <meta prefix="og: http://ogp.me/ns#" property="og:title" content="{your content}" /> <meta prefix="og: http://ogp.me/ns#" property="og:type" content="{your content}" /> <meta prefix="og: http://ogp.me/ns#" property="og:image" content="{your content}" /> <meta prefix="og: http://ogp.me/ns#" property="og:url" content="{your content}" /> forexample: <meta prefix="og: http://ogp.me/ns#" property="og:image" content="http://ima...

python 2.7 - Making a Tkinter calculator that gives back percent at a given point in a interval -

hi i'm getting 'float' object not callable error while running code. i'm using python 2.7. from __future__ import division import sys import math sys.argv=["main"] import tkinter tkinter import * def calcrpmratio(): rpmmax = rpmmaxset.get rpmmin = rpmminset.get rpmpoint = rpmpointset.get newrpmmax = rpmmax() - rpmmin() result = rpmpoint() / newrpmmax() showresult = label (mgui, text=str(resultcount)+". "+str(result)).pack() global resultcount resultcount +=1 return resultcount = 1 mgui = tk() mgui.geometry('400x150+200+200') mgui.title('rpm percent calc') rpmmaxset = doublevar() rpmminset = doublevar() rpmpointset = doublevar() rpmmaxsetlabel = label(mgui, text='max rpm').pack() rpmmaxsetentry = entry(textvariable=rpmmaxset) .pack() rpmminsetlabel = label(mgui, text='min rpm').pack() rpmminsetentry = entry(textvariable=rpmminset) .pack() rpmminpointlabel = label(mgui, text=...

python 2.7 - in pyqt how to print "Ctrl+key" in QLineEdit when pressed Ctrl + anyKey -

here kode genereted event qlineedit put pressed key combination in textline ok shift key , alt key not ctrl key why ? #!/usr/bin/python import sys pyqt4.qtcore import * pyqt4.qtgui import * def main(): app = qapplication(sys.argv) w = mywindow() w.show() sys.exit(app.exec_()) class mywindow(qwidget): def __init__(self, *args): qwidget.__init__(self, *args) self.la = qlabel("press tab in box:") self.le = mylineedit() layout = qvboxlayout() layout.addwidget(self.la) layout.addwidget(self.le) self.setlayout(layout) self.connect(self.le, signal("press"), self.update) def update(self): oldtext = str(self.le.text()) self.le.settext(self.le.mytext) class mylineedit(qlineedit): def __init__(self, *args): qlineedit.__init__(self, *args) self.mytext = "" def event(self, event): if event.type() == qev...

make message not found in codeigniter -

i have problem, want make message in view page "no data found" in codeigniter: this in controller: function search_keyword() { $this->output->set_header('expires: sat, 26 jul 1997 05:00:00 gmt'); $this->output->set_header('cache-control: no-cache, no-store, must-revalidate, max-age=0'); $this->output->set_header('cache-control: post-check=0, pre-check=0', false); $this->output->set_header('pragma: no-cache'); $session_data = $this->session->userdata('logged_in'); $data['username'] = $session_data['username']; $keyword = $this->input->post('keyword'); $data['results'] = $this->model_adminlogin->search($keyword); $this->load->view('result_view',$data); } try function search_keyword() { $this->output->set_hea...

arrays - How to get the last line of output from the loop for duplicate wordcount program in java? -

Image
almost got output touchups needed.in code can total repeated words count text files through folder directory.now problem want output lines highlighted in images(attached ones). example had 2 text files in folder directory, 1st text file repeated word count 4 , 2nd text file repeated word count 31. present output shows count addition word word. but want lastline (final count) output(you can see image attachment present output).the highlighted lines final line of each text files.i want omit remaining lines. so, output should total words counted: 4 (text file 1) total words counted: 31(text file 2) so can run 2000+text files folder output once. i beginner java. :) code below: package ramki; import java.io.bufferedreader; import java.io.file; import java.io.fileinputstream; import java.io.filenotfoundexception; import java.io.filenamefilter; import java.io.ioexception; import java.io.inputstreamreader; import org.apache.commons.io.fileutils; import org.apache.commons.io.io...

java - Maven offline: Plugin not found error -

i got below compile error in pom.xml. want work pom.xml in offline mode. have dependencies in repositry. need install jar or pom.xml in org.apache.maven.plugins:maven-javadoc-plugin?. tried insert jar of maven-javadoc-plugin, failed. please me error or give me information, don't know how solve it. below pom.xml. know have in .m2 directory. please find below error: error resolving version plugin 'org.apache.maven.plugins:maven-javadoc-plugin' repositories [local (c:\users \myname\.m2\repository), nexus-chrono (http://192.168.241.125:8081/nexus/content/groups/public/)]: plugin not found in plugin repository <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupid>es.chx</gr...

regex - php preg_match_all href inner texts with upper and lower case sensitivity -

i can count number of matching links preg_match_all() function below, checked if inner text of link equal specified keyword. // text contains 2 different links, whereby inner // text of first link capitalized , second link starts small letter. $string = "<p><a href=\"www.link1.com\" class=\"someclass\" title=\"lorem\">lorem</a> dolor sit amet, consectetur adipiscing elit. in iaculis, libero aliquam lacinia feugiat, <a href=\"www.link2.com\" class=\"someclass\" title=\"lorem\">lorem</a> elit congue risus, sed sagittis turpis tortor eget orci. integer lacinia quis nisi ac aliquet. sed et convallis diam.</p>"; // count al matches upper , lowercase sensitivity preg_match_all('/<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>lorem<\/a>/siu', $string, $match); now question how can make regex it's works matches capital let...

ruby on rails - Forcing ssl on devise controller redirects to GET instead of DELETE on sign_out -

i've placed config.to_prepare { devise::sessionscontroller.force_ssl } in production.rb in order require logging in/out via https. unfortunately, force_ssl seems forget original request method. logs: started delete "/users/sign_out" (...) processing users::sessionscontroller#destroy html parameters: {"authenticity_token"=>"foo"} user load (0.8ms) select "users".* "users" "users"."id" = id order "users"."id" asc limit 1 redirected https://my.domain/users/sign_out filter chain halted #<proc:some-ruby-path/gems/actionpack-4.1.5/lib/action_controller/metal/force_ssl.rb:65> rendered or redirected completed 301 moved permanently in 6ms (activerecord: 0.8ms) started "/users/sign_out" (...) actioncontroller::routingerror (no route matches [get] "/users/sign_out") any ideas how tackle this? seems common problem. class applicationcontroller ...

javascript - Keep div (when expanded) in browser window view -

i have added script make sure #mydiv in view when expanded: document.getelementbyid('mydiv').scrollintoview(); however, sets top of #mydiv top of browser window. there way modify this, make bottom of #mydiv set amount of pixels bottom of browser window? element.scrollintoview cannot want. calculate offset on own document's scrollheight (check compatibility) , absolute offset of element on document (usually recursive function using offsettop on element itself, parentnode , on) i once read articles: http://www.quirksmode.org/mobile/viewports.html http://www.quirksmode.org/js/findpos.html

objective c - Get 12 noon timestamp of current date in iOS? -

i want timestamp of current date reference 12 noon. can current timestamp [[nsdate date] timeintervalsince1970]; but want timestamp 12 noon today.thanks in advance i used . give 12 noon timestamp. because it's calculated per [nsdate date] , give on base of device's timezone. nscalendar *calendar = [[nscalendar alloc] initwithcalendaridentifier:nscalendaridentifiergregorian]; nsdate *today12noon = [calendar datebysettinghour:12 minute:0 second:0 ofdate:[nsdate date] options:0]; double dif = [[nsdate date] timeintervalsince1970] - [today12noon timeintervalsince1970]; double timestampwithreference12noon = [[nsdate date] timeintervalsince1970] - dif ;

xcode - iOS Simulator not connecting to web service -

i developing cordova project on xcode. am using cordova v5.4.1, xcode v7.2 , ios simulator v9.2. the app building , deploying on emulator rest web services not being consumed. able view json response web service in emulator's safari browser, app not show same. i have enabled "allow http services" in developer settings , tried restarting emulator , xcode, nothing helps. have added these lines config.xml. <plugin name="cordova-plugin-whitelist" spec="1" /> <access origin="*" /> how can issue fixed? maybe you're getting blocked ios 9 ats (app transport security)? to test if case, try on mac, using terminal.app: nscurl --ats-diagnostics https://api.your-server.com if ats allow connecting https://api.your-server.com , should see this, in first block of response: default ats secure connection --- ats default connection result : pass --- anything else means ats block http(s) requests going through. ...

php - How to force specific pages in wordpress to be non SSL (http) -

currently have ssl forced on pages needed , works great. problem on other pages user can click in address bar , add "https" causing pages load error mixed content etc. same happens if visits page https link. how can use either worpress functions.php or htaccess file force specific page url use non-ssl version of website? edit: don't see how suggested duplicate duplicate. there no example of htaccess code , post author seems mention managed create solution without code not me. what need seem simple redirect like https://domain.com/page1 -> http://domain.com/page1 shouldn't possible either htaccess or wordpress functions.php? rewritecond %{https} on rewritecond %{request_uri} ^/someurl rewriterule ^(.*)$ http://%{http_host}/$1 [r=301,l] above seemed work me. redirects https http /someurl

Copying data from S3 to AWS redshift using python and psycopg2 -

i'm having issues executing copy command load data s3 amazon's redshift python. have following copy command: copy moves 's3://<my_bucket_name>/moves_data/2013-03-24/18/moves' credentials 'aws_access_key_id=<key_id>;aws_secret_access_key=<key_secret>' removequotes delimiter ','; when execute command using sql workbench/j works expected, when try execute python , psycopg2 command pass ok no data loaded , no error thrown. tried following 2 options (assume psycopg2 connection ok because is): cursor.execute(copy_command) cursor.copy_expert(copy_command, sys.stdout) both pass no warning yet data isn't loaded ideas? thanks i have used exact setup (psycopg2 + redshift + copy) successfully. did commit afterwards? sql workbench defaults auto-commit while psycopg2 defaults opening transaction, data won't visible until call commit() on connection. the full workflow is: conn = psycopg2.connect(...) cur = con...

php - Yii2 how to change default aliaes @vendor ==@app/vendor to @webroot/vendor -

now default aliaes @vender defaults @app/vendor. how change defaults @webroot/vendor. ignore below info when using assetsbundle in namespace repo. namespace repo\assets; use yii\web\assetbundle; class repoasset extends assetbundle { public $sourcepath = '@repo/media'; public $css = [ 'css/site.css', ]; public $depends = [ 'yii\web\yiiasset', 'yii\bootstrap\bootstrapasset', ]; } i can't publish depends asset. the file or directory published not exist: /users/tyan/code/php/myii/repo/vendor/bower/jquery/dist but real location of jquery /users/tyan/code/php/myii/vendor/bower/jquery/dist it happends bootstrapasset too.i try echo @app //seems it's location /users/tyan/code/php/myii/repo @vendor //it's /users/tyan/code/php/myii/repo/vendor seems @app , @vendor add own namespace in automatically not make sence. btw. define @repo aliases in web.php config file. 'aliases' => [ ...

rest - HTTP OPTIONS error in Phil Sturgeon's Codeigniter Restserver and Backbone.js -

my backbone.js application throwing http options not found error when try save model restful web service that's located on host/url. based on research, gathered post : a request send options http request header, , not trigger post request @ all. apparently cors requests "cause side-effects on user data" make browser "preflight" request options request header check approval, before sending intended http request method. i tried around by: settting emulatehttp in backbone true. backbone.emulatehttp = true; i allowed allowed cors , csrf options in header. header('access-control-allow-origin: *'); header("access-control-allow-headers: origin, x-requested-with, content-type, accept"); header("access-control-allow-methods: get, post, options"); the application crashed when backbone.emulatehttp line of code introduced. is there way respond options request in codeigniter restserver , there other alte...

Pentaho Spoon IBM DB2' driver (jar file) -

i'm using pentaho's spoon. when try , connect ibm db2 database below error `driver class 'com.ibm.db2.jcc.db2driver' not found, make sure 'ibm db2' driver (jar file) installed. com.ibm.db2.jcc.db2driver ive had google , cannot seem find way driver. had issue before ? the ibm data server drivers can downloaded related support page or overall download page . links can found google or in db2 knowledge center .

How to measure time with Matlab while led diodes is on using Arduino? -

i need measure time while led diodes on each 1 matlab guide. in arduino code sending data matlab if diodes on: if(digitalread(ledc1)==high) { serial.println("a"); } if(digitalread(ledc2)==high) { serial.println("b"); } with matlab code, works if 1 diode on, not working if 2 diodes on in same time , not measure each one. how measure both diodes? matlab code: function pushbutton1_callback(hobject, eventdata, handles) s=serial('com7','baudrate',9600); fopen(s); try while true pause(1); a = fscanf(s,'%s'); b = fscanf(s,'%s'); if strcmp(a,'a')==0 % frist led dioda tic; end seconds1=toc; elapsedtime1 = fix(mod(seconds1, [0, 3600, 60]) ./ [3600, 60, 1]); set(handles.text8,'string',elapsedtime1); if strcmp(b,'b')==0 % second led dioda tic; end seconds2=toc; elapsedtime2 = fix(mod(seconds2, [0, 3600, 60]) ./ [3600, 60, 1]); set(han...

r - Show "Loading" custom message while function is running -

i trying find way display message "loading..." after actionbutton pressed. function takes several minutes execute, need inform user somehow button triggered event. part of server.r code looks this: output$plot <- renderplot({ function(donneestot(),unit="years",colors=c("black","gray30","gray50","gray70","blue3","dodgerblue3","steelblue1","lightskyblue1","red4","indianred3","orange","seagreen4"),main=title(),tpsmax=input$months) }) my action button called: plot1 . while graph being made want output message "loading" on place of plot. do have idea how work?

javascript - Why google map api and google map lat long differ -

i'm using google map api in project , code calling google api google.maps.event.adddomlistener(window, 'load', intilize); function intilize() { var autocomplete = new google.maps.places.autocomplete(document.getelementbyid("txtautocomplete")); google.maps.event.addlistener(autocomplete, 'place_changed', function () { var place = autocomplete.getplace(); var location = "address: " + place.formatted_address + "<br/>"; location += "latitude: " + place.geometry.location.lat() + "<br/>"; location += "longitude: " + place.geometry.location.lng(); document.getelementbyid('lblresult').innerhtml = autocomplete.getplace(); }); } that code return me lat long address "basic english school, old city rampuriya, bikaner, rajasthan 334001, india" 28.0142902 73.2970368 but when checked address...