Posts

Showing posts from February, 2013

python - Creating legend in matplotlib after plotting two Pandas Series -

Image
i plotted 2 pandas series same dataframe same x axis , worked out fine. however, when tried manually create legend, appears title , not content. i've tried other solutions without luck. here's code: fig = plt.figure() ax1 = fig.add_subplot(111) ax2 = ax1.twinx() width = .3 df.tally.plot(kind='bar', color='red', ax=ax1, width=width, position=1, grid=false) df.costs.plot(kind='bar', color='blue', ax=ax2, width=width, position=0, grid=true) ax1.set_ylabel('tally') ax2.set_ylabel('total cost') handles1, labels1 = ax1.get_legend_handles_labels() handles2, labels2 = ax2.get_legend_handles_labels() plt.legend([handles1, handles2], [labels1, labels2], loc='upper left', title='legend') plt.show() plt.clf() maybe have reason way, if not, easier: in [1]: import pandas pd import numpy np import matplotlib.pyplot plt # optional, better looking import seab

html - Making smoothly animated striped div -

i'm having trouble making smoothly animated striped div, progress bar. css: .animationstripes{ width: 300px; height: 50px; background-image: repeating-linear-gradient(-45deg, rgb(0, 0, 0), rgb(0, 0, 0) 25px, blue 25px, blue 50px); -webkit-animation:progress 2s linear infinite; -moz-animation:progress 2s linear infinite; -ms-animation:progress 2s linear infinite; animation:progress 2s linear infinite; } @keyframes progress{ 0% { background-position: 0 0; } 100% { background-position: -70px 0px; } } http://plnkr.co/edit/4wpv1ogknmfj6rqphzdj?p=preview the problem there weird misalignment on right side of background image gradient. how fix misalignment? have seen this tutorial on css tricks? @import url(https://fonts.googleapis.com/css?family=ropa+sans); body { padding: 20px; font-family: 'ropa sans', sans-serif; } .product { width: 376px; padding: 15px; position: relative; float: left; margin:

Swapping a header image on scroll with JQuery -

i have simple question (i hope). have site sticky navigation bar @ top. i'm trying swap header image when you're on top of page it's full image, when start scrolling switches image bit of fade transition. it feels should work, doesn't. i'm not programmer i'm sorry if dumb , appreciate assistance: <script language="javascript" type="text/javascript"> $(function(){ $(window).scroll(function(){ if($(this).scrolltop() > 100) { $('.headerimg').fadeout('slow'); $('.headerimg') .css({'background-image: url(path small logo)'}) } if($(this).scrolltop() < 100) { $('.headerimg') .css({'background-image: url(path full logo)'}) } }); }); </script> then in main html have image being pulled in via plain div <div class="headerimg"></div> ok, first of all, have errors in code, won&

python - How should I allocate a numpy array inside theano function? -

let's have theano function: def my_fun(x, y): # create output array example sake z = np.asarray( shape=(x.shape[0], y.shape[1]), dtype=theano.config.floatx ) z = x + y # wrong, how should convert theano # tensor? return z x = theano.tensor.dmatrix("x") y = theano.tensor.dmatrix("y") f = function( inputs=[x, y], outputs=[my_fun] ) = numpy.asarray([[1,2],[3,4]]) b = numpy.asarray([[1,2],[3,4]]) c = my_fun(a,b) how should allocate tensors/ arrays or memory within actual theano optimized when compiled theano. how should convert allocated tensor/ array whatever theano variable returned? i've tried converting shared variable in function didn't work. i'm sorry don't understand specific questions can comment on code sample provided. firstly, comment above return z incorrect. if x , y theano variables z theano variable after z = x + y . secondly, there no need pre-allocate memory, using numpy, re

dotnetnuke - Authentication issue in CSS in dnn -

i working on dnn site , facing issue related authentication. when i'm going browse url ../admin/controlpanel/module.css, it's showing 401 - unauthorized: access denied due invalid credentials. i have verified settings in iis, still not able understand why error coming. thanks, is file/path having problem? i start checking see if have basic authentication enabled in iis. make sure there isn't virtual directory or application configured on admin folder odd reason.

How make android edittext hint center and left cursor -

Image
how set hint text in center of edittext , set cursor in left part of edittext? , when start input text start center edittext? now have <linearlayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="match_parent" android:background="@drawable/line_white" android:layout_marginbottom="25dp" android:paddingbottom="16dp" android:gravity="center_horizontal"> <edittext android:id="@+id/loginemailfield" android:layout_width="match_parent" android:layout_height="wrap_content" android:autotext="false" android:ems="10" android:hint="choose email adress"

pull all non-zero elements in an array to the left - c# -

if have following array { 1, 0, 0, 1, 2, 0, 1 } and want method take array , change to { 1, 1, 2, 1, 0, 0, 0 } what best algorithm this? possible in o(n) time? this question exact question except in python not c#, in case not clear: (only difference move zeros right, not left) how move non-zero elements in python list or numpy array 1 side? thanks edit: i've ran problem didn't consider @ first. i'm trying run algorithm on 2d array, on 1 particular dimension. how change account this? updated 2d array int[,] array = { { 1, 0, 0, 1, 2, 0, 1 }, // row 0 { 1, 0, 0, 1, 2, 0, 1 }, // row 1 { 1, 0, 0, 1, 2, 0, 1 } // row 2 }; pullnonzerostoleft(array, 1); (int row = 0; row <= array.getupperbound(0); row++) { (int col = 0; col <= array.getupperbound(1); col++) { console.write("{0} ", array[row,col]); } console.writeline(); } pullnonzerostoleft() public static void pullnonzerostoleft(int[,] array

apache - PHP echo $config inside array -

alright i've got config file looks this: <?php # epicmc cms config file return array( 'sitename' => 'epicmc', 'color' => '00aa00', 'url' => 'stats.epicmc.us', 'protocol' => 'https://', ); and here's webpage. <head> <link rel="icon" type="image/png" href="avatar/<?php $statsjson = file_get_contents($configs['url']/api.php?task=stats&player='.$_get['player'].''); $stats = json_decode($statsjson); if(empty($stats)){ echo $_get['player']; echo '/16'; } else { echo strtoupper($stats->skin); echo '/16'; } ?>"> <link rel="apple-touch-icon"

jquery - AJAX PHP file upload and parse example -

i looking take simple ajax form parses list of emails (via paste in textarea or csv file upload) , imports them mysql after validating them. here's html form: <form id="form_parser" class="stylized"> <div style="margin-bottom: 12px;"> <h4>select software id:</h4> <select id="selectsoftid" name="selectsoftunlock"> <option value="190">putty</option><option value="356">filezilla</option> </select> </div> <div style="margin-bottom: 12px;"> <h4>upload text/csv file:</h4> <input name="fileemails" type="file" id="inputfileemails"> <input type="submit" class="button submit" value="&

How to get most popular Facebook page posts using graph API Insights (JavaScript) -

i'm trying list of top performing facebook posts belong page using javascript insights api. however, can't seem find way 1 api call. i've poured through documentation here: https://developers.facebook.com/docs/graph-api/reference/v2.4/insights unless missing something, there doesn't seem way retrieve list of popular posts , include engagement/likes/shares/comments/etc in results. can generic stats total engagement posts on page, nothing breaks down post. the thing can think of using graph api list of page's posts. /[page-id]/posts and use post-id results retrieve insights particular post. /[post-id]/insights this potentially result in me making ton of api calls i'm looking for. i'm hoping there better way. suggestions? i figured out solution issue using batched graph api calls documented here: https://developers.facebook.com/docs/graph-api/making-multiple-requests in case needed impressions, engagement, likes, comments, , shares

javascript - Gmail API query to retrieve unread messages sent after given time -

i using gmail api programatically retrieve email messages (using javascript) are: 1. unread 2. sent after given time i know query retrieving unread messages : 'is:unread' , query retrieving messages sent after particular date 'in:sent after : yyyy/mm/dd' but how combine above 2 queries single query? also, if there documentation queries searching messages supported gmail api, please share same - don't seem find it. query = is:unread or (is:sent , after:<time_in_seconds_since_epoch>) let's wanted unread or sent messages after fri, 04 jan 2013 07:00:00 gmt, write: query = is:unread or (is:sent , after:1357282800) https://www.googleapis.com/gmail/v1/users/me/messages?q=is%3aunread+or+(is%3asent+and+after%3a1357282800)&key={your_api_key} the query identical search bar in gmail client, can find in advanced search documentation works, though things (like seconds since epoch-query above) undocumented.

ios - How can I call a function from an existing View Controller class? -

i'm still stage swift developer. i'm trying create feature click button on screen, prompted iphone allow location, , when click allow, automatically navigated screen. so far i've done following things: created seperate class ("user") location functions handled setup button on first view controller , appropiate ibaction calls location prompt function "user" added storyboard ids first , second view controller created function ("changescreen") in first view controller class performs navigation view setup listener in "user" class when user has clicked allow location, calls "changescreen" function i think there's way (call sort of completion handler) , toyed around 1-2 hours , nothing worked. far solution has worked following error: warning: attempt present ____ on _____ view not in window hierarchy! here's code in "user" class class user: nsobject, cllocationmanagerdelegate { func get

Get last day of the next three months with Crystal Report -

Image
i heading find out formula date last day of next 3 months crystal report. i've tried code below shows message when out of array of month (1-12). please give me advice address problem. totext(date(year({rptiexsaleinvoicesummary.etd}),month({rptiexsaleinvoicesummary.etd})+4,1)-1, "dd-mmm-yyyy") it works fine if etd's month less 8. however, might cause problem when more 9, 10 image below. i've found solution. please let me know if have idea solve problem. if (month({rptiexsaleinvoicesummary.etd})+4) > 12 totext(date(year({rptiexsaleinvoicesummary.etd})+1,month({rptiexsaleinvoicesummary.etd})-8,1)-1, "dd-mmm-yyyy") else totext(date(year({rptiexsaleinvoicesummary.etd}),month({rptiexsaleinvoicesummary.etd})+4,1)-1, "dd-mmm-yyyy")

string - How to match files end not with regex -

i trying filter files not ending with, instance mp3 or wv . have tried use ^.*(?<![mp3|wv])$ expression doesn't work. please create valid expression. you can use negative lookahead instead. ^(?!.*(?:mp3|wv)$).*

java - Android HTML to docx Docx4j issues -

i trying convert html string docx using below code per github code recommended on previous stackoverflow questions. i added following libraries other ones used android docx html docx4j: 1. docx4j-importxhtml-3.2.2.jar 2. itext-2.1.7.jar 3. xml-renderer-3.0.0.jar 4. xalan-2.7.0.jar the following android version of code in xhtmltodocxandback.java : try { string html = "<html><head><title>import me</title></head><body><p>hello world!</p></body></html>"; wordprocessingmlpackage wordmlpackage = wordprocessingmlpackage.createpackage(); xhtmlimporterimpl xhtmlimporter = new xhtmlimporterimpl(wordmlpackage); xhtmlimporter.setdivhandler(new divtosdt()); wordmlpackage.getmaindocumentpart().getcontent().addall(xhtmlimporter.convert(html, null)); system.out.println(xmlutils.marshaltostring(wordmlpackage

dicom - DicomImage's writeBMP function produces unclear gray image -

i using dcmtk read , modify dicom images. have following code: #include <iostream> #include <opencv\cv.h> #include <dcmtk\dcmimgle\dcmimage.h> int main() { try { dicomimage* dicomimage = new dicomimage("c:/users/kriselle/documents/000004.dcm"); if ((dicomimage != null) && (dicomimage->ismonochrome())) { dicomimage->writebmp("c:/users/kriselle/documents/z.bmp", 8); std::cout << "z.bmp created" << std::endl; } else { std::cout << "dicomimage null or not monochrome" << std::endl; } } catch (cv::exception e) { std::cerr << e.what() << std::endl; } return 0; } all did create dicomimage , write pixel data bmp file filename specified image returns gray image outline of original image barely recognized. this should like: https://www.dropbox.com/s/6dw8nlae8hfvqf6/000004.jpg?d

java - Server not responding for some request -

i having problem in request access, in web application. not able figure out issue. in application servlet mapping configuration this.. <servlet> <servlet-name>default</servlet-name> <servlet-class>org.eclipse.jetty.servlet.defaultservlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> and spring configuration dispatcher servlet this. in webapplicationinitializerconfig annotationconfigwebapplicationcontext dispatchercontext = new annotationconfigwebapplicationcontext(); dispatchercontext.register(dispatcherconfig.class); dispatcherservlet dispatcherservlet = new dispatcherservlet(dispatchercontext); servletregistration.dynamic dispatcher; dispatcher = servletcontext.addservlet("api/", dispatcherservl

javascript - Explain Object.create(), new -

i know type of question has been asked , answered million times, still don't understand this. everything in javascript object. there exists prototype chain javascript runtime searches methods , properties. these 2 things clear. (think i) understand new statement does . maybe problem don't understand object.create does. have been using following javascript design pattern: superclass = function(){ this.superprop = 'some super property'; }; subclass = function(){ this.subprop = 'some (not so) super property'; }; superclass.prototype.somesupermethod = function(){console.log("i'm super.")}; subclass.prototype = object.create(superclass.prototype); subclass.prototype.constructor = subclass; var instance = new subclass(); instance.somesupermethod(); // great! that's super! but, have know clue why can't write: subclass = object.create(superclass); subclass = superclass; subclass = new superclass; subclass.prototype = s

How to group by using 2 columns in mysql -

Image
i have query in mysql database select tbl_lab_reservations.full_desc, serial_number, rsvn_owner, reservation_id, sum((select datediff(reservation_date_end, reservation_date_start)+1)) totalnumberofdaysreserve tbl_lab_reservations join tbl_lab_assets on tbl_lab_assets.id = tbl_lab_reservations.lab_id tbl_lab_reservations.full_desc = 'wmhd (masthead amplifier)' , tbl_lab_reservations.asset_status = 'idle' group rsvn_owner order `tbl_lab_reservations`.`rsvn_owner` asc and result the result correct base on query not want. base on data save on database, there should rsvn_owner named payak problem payak uses serial_numbers used because grouped serial number totalnumberofdaysreserve of payak , added makes wrong. want query grouped serial_number if belong different rsvn_owner should create row. hope undestands , can me this. in advance so try group serial number , after owner? :) group serial_number, rsvn_owner like this select tbl_lab_

STM32 libraries for eclipse -

can use cmsis, hal, tm libraries stm32f407 discovery board eclipse, without stm32cube? according link http://www.carminenoviello.com/en/2015/06/04/stm32-applications-eclipse-gcc-stcube/ can eclipse & stm32cube. wonder if can same thing without stm32cube. since i'm using os x, impossible install stm32cube, in order use gpio library need use cmsis, hal, tm libraries. you might able used older "standard peripheral driver" model - distributed set of driver files specific chip. these libraries no longer supported , replaced stm32cube generates equivalent code - better support hardware abstraction still useable. search "stm32f4xx_stdperiph_driver" locate libraries (which include standard peripheral drivers , cmsis).

working with two projects in android eclipse -

i new android. doing 1 project let projecta in when button clicked, project b has run.i made project b library project , called launcher activity of project b in project button click.the app working fine until button click whenever button clicked 'unfortunately project has stopped'. coming noclassdeffounderror. searched in google tried solutions still not working. project b alone working fine , project without project b working fine.is there way directly run library project without calling launcher activity? please body me.

visual c++ - C++ Cross Platform Library (iOS and Android) using math.h -

i using vs2015 rc , cross platform c++ shared library template. under .shared code added simple point class. when created class, in .cpp included pch.h or pre-compiled header available in .android , not .ios. threw error, removed didn't errors , figured include stl items needed. correct route that. anyway main issue in point.cpp file need use sqrt need include math.h: #include <math.h> i have tried including several different ways (cmath...), no matter error myprojectname.ios: error: cannot open source file "math.h". according setting sin project properties .ios use stl llvm c== standard library c++11 support (libc++). i not sure how add correct include directory ios first time i've written cross platform library , done ios development. from i've read stl classes available on both platforms. any of great. bad there isn't full tutorial on making simple math library use in android , ios app.

static linking - Haskell binary compatibility -

let's write haskell code , compile in ubuntu 64-bit installation, statically linking haskell packages , c libraries. result binary compatible other 64-bit linux distribution? yes, because of static linking - in binary. , yes, can quite big, example yesod output can alot 70mb. yet, has http server within 70 mb. so, static linking can portability, has it's drawbacks in terms of executable file size.

html - display two divs side-by-side with inline-block -

i'm trying display 2 divs side-by-side inline-block (can't use floats). css fails this. realize might duplicate, having tried suggestions related posts still can't work. #wrapper { display: inline-block; width: 300px; } #images { display: inline-block; width: 100px; } #specs { display: inline-block; width: 100px; } <div id="wrapper"> <div id="images"> test data </div> <div id="specs"> test data </div> </div> #wrapper must have +200px of width

javascript - How to decode base64 encoded image with JS/PHP? (previously encoded with Actionscript) -

i have image encoded base64, made actionscript function: private static const base64_chars:string = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/="; public static function encodebytearray(_arg1:bytearray):string { var _local3:array; var _local5:uint; var _local6:uint; var _local7:uint; var _local2 = ""; var _local4:array = new array(4); _arg1.position = 0; while (_arg1.bytesavailable > 0) { _local3 = new array(); _local5 = 0; while ((((_local5 < 3)) && ((_arg1.bytesavailable > 0)))) { _local3[_local5] = _arg1.readunsignedbyte(); _local5++; }; _local4[0] = ((_local3[0] & 252) >> 2); _local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4)); _local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6)); _local4[3] = (_local3[2] & 63); _local6 = _local3.length;

node.js - Node JS Mysql PROTOCOL ENQUEUE AFTER FATAL ERROR -

what dose error means? this code works in test file. function handledisconnect() { objconn = mysql.createconnection(db_config); // recreate connection, since // old 1 cannot reused. objconn.connect(function(err) { // server either down if(err) { // or restarting (takes while sometimes). console.log('error when connecting db:', err.code); settimeout(handledisconnect, 2000); // introduce delay before attempting reconnect, }else{ console.log('connected db!'); } // avoid hot loop, , allow our node script }); // process asynchronous requests in meantime. // if you're serving http, display 503 error. objconn.on('error', function(err) {

bash - Git branches automate with source code -

i automating git brnach project using shell script. code description i going source directory i doing remote update i asking user enter branch, if user entered wrong branch name if branch doest not exist catch error , show user otherwise git checkout , pull code branch * #!/bin/bash cd application/src/ git remote update echo "please check available branch in git" git branch echo "please enter branch name: " read branch_name echo "you entered: $branch_name" branch=$(git branch) files=(branch*) select sel in "${files[@]}" if [[ "$sel" ] !== '(no branch)'] echo "choose 1 of available branch." break else git checkout $branch_name git pull origin $branch_name done git checkout $branch_name git branch

java - Disable hostname verifier in servlet with CAS -

i have cas deployed on virtual machine (in jboss) , i'm trying use cas login in servlet, using saml protocol in filters authentication , validation, javax.net.ssl.sslhandshakeexception: java.security.cert.certificateexception: no subject alternative names present in future i'll receive proper certificate, until want disable hostname verifier, testing. know should @override code, don't know how , in servlet connects cas through filters in web.xml. servlet overrides doget method print should receive cas. can me, please? thank in advance. update: exact error see in logs error [org.apache.catalina.core.containerbase.[jboss.web].[default-host].[/casuser].[cas]] (http-localhost-127.0.0.1-8080-1) servlet.service() servlet cas threw exception: java.lang.runtimeexception: javax.net.ssl.sslhandshakeexception: java.security.cert.certificateexception: no subject alternative names present @ org.jasig.cas.client.validation.saml11ticketvalidator.retrieveresponsefromserver(

Android custom action bar occasionaly displays a visual glitch -

Image
i'm using custom [support] action bar, displays visual glitch: final actionbar actionbar = getsupportactionbar(); actionbar.setnavigationmode(actionbar.navigation_mode_tabs); (int = 0; < msectionspageradapter.getcount(); i++) { // create tab text corresponding page title defined // adapter. specify activity object, implements // tablistener interface, callback (listener) when // tab selected. actionbar.addtab( actionbar.newtab() .settext(msectionspageradapter.getpagetitle(i)) .settablistener(this)); } actionbar.setdisplayoptions(actionbar.display_show_custom); actionbar.setcustomview(r.layout.action_bar_main); actionbar.setbackgrounddrawable(actionbar.getcustomview().getbackground()); and in action_bar_main.xml : <framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:lay

javascript - Give a stroke to svg objects -

good day everyone, i trying give svg object in fabric stroke around bounding box. unfortunately obj.set({ 'stroke': 'red', 'strokewidth': 2 }); won't work, after updating with. obj.setcoords(); canvas.renderall(); all other attributes in fill or angle seem work. did has come across problem , know how solve it? thank sebastian edit: how loading svg: var group = []; var loadedobjects; fabric.loadsvgfromurl( 'bla.svg', function(objects, options) { loadedobjects = new fabric.group(group); }, function(item, object) { object.set('id', item.getattribute('id')); group.push(object); } ); fabricjs not support border drawing group or pathgroup. can load svg pathgroup. once loaded create rect same width , height, give him same top , left. stroke rect , group them togheter: fabric.loadsvgfromurl(

ios - selector for multiple uibuttons in uitableviewcell -

i'm adding same selector multiple uibuttons part of uitableviewcell , works first one. missing something? here's code: - (void)tableview:(uitableview *)tableview willdisplaycell:(uitableviewcell *)cell forrowatindexpath:(nsindexpath *)indexpath{ nsdictionary *d = [tabledata objectatindex:indexpath.row]; nsarray *answers = [d objectforkey:@"answers"];//array of { id = 35; text = "\u03c4\u03a\u03c0\u03bf\u03c4\u03b1"; } uilabel *startdate = (uilabel *)[cell viewwithtag:100]; long long startdateepoch = [[d objectforkey:@"startdate"] longlongvalue]; nsdate *sdate = [nsdate datewithtimeintervalsince1970:startdateepoch/1000]; nsdateformatter *startdateformatter = [[nsdateformatter alloc] init]; [startdateformatter setdateformat:@"dd/mm/yyyy"]; startdate.text = [startdateformatter stringfromdate:sdate]; ((uilabel *)[cell viewwithtag:101]).text = [d objectforkey:@"subject"]; nsarray

getting the visible item in an horizontal listview android -

i have horizontal scrollable list view. need find index of first visible position in it...in cas eof vertical listviews there method onscroll( abslistview view, int firstvisibleitem , int visibleitemcount , int totalitemcount ) this...can guide me horizontal list view you can use listview.getfirstvisibleposition(); method this. return index (= position) of item. index can find item using listview.get(index);

java - How to use onRouteRequest in play 2.4? -

how write this scala implementation of "onrouterequest"(from - https://jazzy.id.au/2013/05/08/advanced_routing_in_play_framework.html ) override def onrouterequest(req: requestheader): option[handler] = { (req.method, req.path) match { case ("get", "/") => some(controllers.application.index) case ("post", "/submit") => some(controllers.application.submit) case _ => none } } in java in play 2.4 ? how create handler object return in java ? (i not want owerride onrequest, or use {} in routing , not want redirecting, triing dynamic router seo url controller can change in administration, stuck @ scala implementation mentioned everywhere no java implementation)

php - Git branch overwrites master when merging without offering conflicts -

i have master project , 1 branch made it. when merge master branch, code in branch overwrites 1 in master, , insert different code branch in master, or @ least asked code want keep. here 1 simple example of how set everything: mkdir project cd project git init inside project directory have 1 file called index.php code: <?php /** * master code. */ class classname extends anotherclass { function __construct(argument) { // master } } then make branch: git checkout -b my_branch and put code inside index.php: <?php /** * branch code. */ class classname extends anotherclass { function __construct(argument) { // branch } } then checkout master , try merge: git checkout master git merge my_branch and branch code override 1 master. in master have same code in branch. shouldn't git offer me chose code keep, or there way force ? if not, doing wrong ? if make change in branch code: class classname e

android - Auto-moving image on drag listener -

i set drag listener imageview in app, when click it, don't want center image based on pressed. this: https://gfycat.com/constantdisguisedkudu basically, if press on bottom right of image, takes press central point , moves image's center point on exact location. don't want that. if press on bottom right , shouldn't auto move , can drag image point. don't think code necessary in case: @override public boolean ondrag(view v, dragevent event) { switch (event.getaction()) { // signal start of drag , drop operation case dragevent.action_drag_started: { // nothing break; } // drag point has entered bounding box of view case dragevent.action_drag_entered: { // nothing break; } // user has moved drag shadow outside bounding box of view case dragevent.action_drag_exited: { // nothing break; } // drag shadow

php - How to add star rating in google map api infowindow? -

Image
i working on wordpress site use google map api, encounter problem adding rating widget in google map infowindow. rating criteria showing not star. here screenshot and here code <script type="text/javascript"> jquery(function($) { // asynchronously load map api var script = document.createelement('script'); script.src = "http://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize"; document.body.appendchild(script); }); function initialize() { var map, casino_name, lat, longt ; var bounds = new google.maps.latlngbounds(); var mapoptions = { maptypeid: 'roadmap' }; // display map on page map = new google.maps.map(document.getelementbyid("map_canvas"), mapoptions); map.settilt(45); // multiple markers var markers = [ //[casino_name, lat, longt], <?php $tooltip = ''; $args = array( 'post