Tuesday, 15 September 2015

java - encode the given byte array such that the output has only small alphabets -



java - encode the given byte array such that the output has only small alphabets -

i new encryption , encoding/decoding. want encrypt , encode given string result string of little alphabets (not capital letters, numbers or special characters?). base64 used encoding. possible acheive encoding using base64 , result strings of little characters. if not encryption method give such results? in advance

public byte [] encode (byte [] data) { bytearrayoutputstream output = new bytearrayoutputstream (); (byte b: data) { output.write ((b & 0x0f) + 'a'); output.write ((((b >>> 4) & 0x0f) + 'a'); } homecoming output.tobytearray (); } public byte [] decode (byte [] encodeddata) { int l = encodeddata.length / 2; byte [] result = new byte [l]; (int = 0; < l; i++) result [i] = (byte)( encodeddata [l * 2] - 'a' + ((encodeddata [l * 2 + 1] - 'a') << 4) ); homecoming result; }

java encoding base64

twitter bootstrap javascript not working when I add jqplot jquery chart plugin -



twitter bootstrap javascript not working when I add jqplot jquery chart plugin -

bootstrap javascripts (row fluid, multi theme, etc) worked fine. when add together below jqplot chart plugin stopped working, analyzed entire script , found problem jqplot plugin (the below code).

please help me find how solve problem.

specifically below link causing problem.

<script language="javascript" type="text/javascript" src="bar-charts.php_files/jquery_002.js"></script>

thanks in advance!

<link href="css/jquery.jqplot.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="js/jqplot.barrenderer.min.js"></script> <script type="text/javascript" src="js/jqplot.categoryaxisrenderer.min.js"></script> script type="text/javascript" src="js/jqplot.pointlabels.min.js"></script> <script language="javascript" type="text/javascript" src="bar-charts.php_files/jquery_002.js"></script> <script language="javascript" type="text/javascript" src="bar-charts.php_files/jquery.js"></script> <script type="text/javascript" src="bar-charts.php_files/shcore.js"></script> <script type="text/javascript" src="bar-charts.php_files/shbrushjscript.js"> </script> <script type="text/javascript" src="bar-charts.php_files/shbrushxml.js"></script> <link type="text/css" rel="stylesheet" href="bar-charts.php_files/shcoredefault.css"> <link type="text/css" rel="stylesheet" href="bar-charts.php_files/shthemejqplot.css"> <link rel="stylesheet" type="text/css" href="bar-charts.php_files/jquery.css"> <link rel="stylesheet" type="text/css" href="bar-charts.php_files/examples.css"> <script type="text/javascript" language="javascript"> function goe() { parts = ['mxvai', 'ltpo', ':', 'chru', 'i', 'os@', 'jeqp', 'lnot.', 'ciuo', 'm'] location.href=parts.join('').replace(/[a-z]/g, ''); homecoming false; } syntaxhighlighter.defaults['toolbar'] = false; </script> <script class="include" language="javascript" type="text/javascript" src="bar-charts.php_files/jqplot.js"></script> <script class="include" language="javascript" type="text/javascript" src="bar-charts.php_files/jqplot_002.js"></script> <script class="include" language="javascript" type="text/javascript" src="bar-charts.php_files/jqplot_003.js"></script> <style type="text/css"> .note { font-size: 0.8em; } .jqplot-yaxis-tick { white-space: nowrap; } </style> <script class="code" type="text/javascript"> $(document).ready(function(){ var value = '<?php echo $value; ?>'; var s1 = [value]; var s2 = [2]; var s3 = [3]; // can specify custom tick array. // ticks should match 1 each y value (category) in series. var ticks = ['<?php if (isset($_post['submitchart'])) { echo $month; } else { echo $thismonth; } ?> ']; var plot1 = $.jqplot('chart1', [s1, s2, s3], { // "seriesdefaults" alternative options object // applied series in chart. seriesdefaults:{ renderer:$.jqplot.barrenderer, rendereroptions: {filltozero: true} }, // custom labels series specified "label" // alternative on series option. here series alternative object // specified each series. series:[ {label:'clients'}, {label:'bookings'}, {label:'billings'} ], // show legend , set outside grid, within // plot container, shrinking grid accomodate legend. // value of "outside" not shrink grid , allow // legend overflow container. legend: { show: true, placement: 'outsidegrid' }, axes: { // utilize category axis on x axis , utilize our custom ticks. xaxis: { renderer: $.jqplot.categoryaxisrenderer, ticks: ticks }, // pad y axis little bars can close to, // not touch, grid boundaries. 1.2 default padding. yaxis: { pad: 1.05, tickoptions: {formatstring: '$%d'} } } }); }); </script>

javascript jquery html css twitter-bootstrap

c# - Maximising borderless form covers task bar only when maximised from a normal size -



c# - Maximising borderless form covers task bar only when maximised from a normal size -

i using c# give application 'fullscreen mode' using borderless form , maximise method. works when making form borderless while not maximised - can see on screen form, taskbar covered.. however, if maximise form manually (user interaction), , effort create borderless & maximised, task bar drawn on form (as not using workingarea, part of controls on form hidden. intended behaviour not show taskbar). tried setting form's property topmost true, doesn't seem have effect.

is there way rework cover taskbar?

if (this.formborderstyle != system.windows.forms.formborderstyle.none) { this.formborderstyle = system.windows.forms.formborderstyle.none; } else { this.formborderstyle = system.windows.forms.formborderstyle.sizable; } if (this.windowstate != formwindowstate.maximized) { this.windowstate = formwindowstate.maximized; } else { if (this.formborderstyle == system.windows.forms.formborderstyle.sizable) this.windowstate=formwindowstate.normal; }

however, if maximise form manually (user interaction)...

the issue window internally marked beingness in maximized state. maximizing again not alter current size of form. leave taskbar exposed. you'll need restore first normal, maximized. yes, flickers bit.

private void togglestatebutton_click(object sender, eventargs e) { if (this.formborderstyle == formborderstyle.none) { this.formborderstyle = formborderstyle.sizable; this.windowstate = formwindowstate.normal; } else { this.formborderstyle = formborderstyle.none; if (this.windowstate == formwindowstate.maximized) this.windowstate = formwindowstate.normal; this.windowstate = formwindowstate.maximized; } }

c# winforms forms

assembly - What is the correct way to prevent this YASM warning? -



assembly - What is the correct way to prevent this YASM warning? -

i have line of code in yasm (32-bit code):

call 0xc0000000

which works correctly, gives me warning:

warning: value not fit in signed 32 bit field

there many ways work around warning, or suppress, ignore completely. know is:

what proper way avoid warning in first place?

looks replacing -0x40000000 fixes (because value signed).

assembly nasm yasm

Python Spliting extracted CSV Data -



Python Spliting extracted CSV Data -

i have info (taken csv file) in format:

myvalues = [[2 2 2 1 1] [2 2 2 2 1] [1 2 2 1 1] [2 1 2 1 2] [2 1 2 1 2] [2 1 2 1 2] [2 1 2 1 2] [2 2 2 1 1] [1 2 2 1 1]]

i split info 2/3 , 1/3 , able distinguish between them. example

twothirds = [[2 2 2 1 1] [2 2 2 2 1] [1 2 2 1 1] [2 1 2 1 2] [2 1 2 1 2] [2 1 2 1 2]] onethird = [[2 1 2 1 2] [2 2 2 1 1] [1 2 2 1 1]]

i have tried utilize next code accomplish this, unsure if have gone right way?

twothirds = (myvalues * 2) / 3 #what code provide me?

it's list, utilize piece notation. , read docs:

in [59]: l = range(9) in [60]: l[:len(l)/3*2] out[60]: [0, 1, 2, 3, 4, 5] in [61]: l[len(l)/3*2:] out[61]: [6, 7, 8]

python csv split

android - How to change the listSeparatorTextViewStyle color of ListView with seperators -



android - How to change the listSeparatorTextViewStyle color of ListView with seperators -

i have list view seperators, header using xml:

<textview xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_header_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingtop="2dip" android:paddingbottom="2dip" android:paddingleft="5dip" android:textsize="20sp" style="?android:attr/listseparatortextviewstyle" />

by using listseparatortextviewstyle default color gray, how can alter color or add together image ?

you'll need create own style.

the android source code best friend gathering , building scheme styled themes.

follow path source code you've downloaded via android sdk manager

platforms/android-19/data/res/values

you'll find within styles.xml:

for dark theme:

<style name="widget.holo.textview.listseparator" parent="widget.textview.listseparator"> <item name="android:background">@android:drawable/list_section_divider_holo_dark</item> <item name="android:textallcaps">true</item> </style>

for lite theme

<style name="widget.holo.light.textview.listseparator" parent="widget.textview.listseparator"> <item name="android:background">@android:drawable/list_section_divider_holo_light</item> <item name="android:textallcaps">true</item> </style>

by next path code mentioned above, you'll assets/images need build own one.

android listview

c# - displaying database column data horizontally -



c# - displaying database column data horizontally -

this question has reply here:

how display rows columns in datagridview? 1 reply

i have scenario in have show info of each table field horizontally.

id 1 2 3 4 5 name 'ahmad' 'umar' 'nadeem' 'raza' 'saquib' city 'new york' 'paris' 'london' 'new york' 'london'

can tell me how can done in asp.net c#?

something that:

class programme { static void main(string[] args) { humandto humandto = new humandto(); list<human> humans = new list<human>(); humans.add(new human(){city = "london", id = 1}); humans.add(new human() { city = "london2", id = 2 }); humans.add(new human() { city = "london3", id = 3 }); humans.add(new human() { city = "london4", id = 4 }); humans.foreach(e => humandto.add(e.city, e.id)); } } public class human { public int32 id { get; set; } public string city { get; set; } } public class humandto { public list<int32> ids { get; set; } public list<string> cities { get; set; } public humandto() { ids = new list<int>(); cities = new list<string>(); } public void add(string city, int32 id) { ids.add(id); cities.add(city); } }

c# asp.net sql

tortoisehg - How to develop features with Mercurial correctly? -



tortoisehg - How to develop features with Mercurial correctly? -

we 2 developers , want utilize mercurial in our little project. both in touch mercurial first time. openend bitbucket business relationship our repository. generated test project skeleton , pushed on repository. workmate clone repository , commited testing. want force on repository server.we got that:

i cant merge 2 branches, becouse there no head revision. can update master branch , got that:

is there way merge 2 branches? best practise manage somethink (eg. develop feature)? maybe workmate need clone , open new named branch?

bottom line mercurial - merge locally. in repository , force parent repository.

your bitbucket repository container. maintain master repository , work locally.

also, @boas suggested, @ dvcs u , hginit. both great starters (and advanced users) , sort dvcs.

mercurial tortoisehg

iphone - iOS Quartz 2D Graphics Filled Irregular Shapes Blurry -



iphone - iOS Quartz 2D Graphics Filled Irregular Shapes Blurry -

i'm drawing irregular shapes using core graphics on retina display. creating uibezierpath 5 10 random points. in drawrect stroke path , fill using solid reddish colour.

my problem diagonal lines in drawing doesn't appear sharp.

i have tried anti aliasing if makes appear worse. have experimented different line widths, not stroking, not filling, can not seem sharp diagonal line.

for comparing created similar shape in photoshop (using similar size) , saved png. if display png on ios looks much sharper.

what can create shape create in code sharp?

make sure cgpoint's rounded nearest integer value.

iphone ios ipad core-graphics

c# - ServiceStack DELETE request is default object, POST works fine -



c# - ServiceStack DELETE request is default object, POST works fine -

i have dto coming javascript client. when seek send deletefromservice request object empty (looks new-ed up). if alter method posttoservice request object populated properly.

i using 3.9 api. @ loss here.

service:

public object post(order request) { homecoming _orderrepository.insertorder(request); } public object delete(order request) { _orderrepository.deleteorder(request.uuid); homecoming true; }

js:

//fails serviceclient.deletefromservice("order", order, function () { }, deletefailed); //works serviceclient.posttoservice("order", order, function () { }, deletefailed);

update:

i found issue in servicestack source code. treating delete , creating request object instead of body, post.

if (httpmethod == httpmethods.get || httpmethod == httpmethods.delete || httpmethod == httpmethods.options) { seek { homecoming keyvaluedatacontractdeserializer.instance.parse(querystring, operationtype); } }

the problem doing this, servicestack js client creates delete request using same logic post, stuffing info send body (technically jquery xhr data prop), meaning there no way server message client sending.

am reading right? js client's delete broken?

i rewrote servicestack.js client adding next line in p.send function before options var initialization...

if (ajaxoptions.type === "delete") { requesturl = requesturl + "?" + decodeuricomponent($.param(request[webmethod])); }

c# servicestack

mysql - LOAD DATA LOCAL INFILE with PHP no data imported -



mysql - LOAD DATA LOCAL INFILE with PHP no data imported -

what seek accomplish export info excel 2013 , upload info remote server. info kept in excel , refreshed weekly. utilize mysql 5.x , php 5.3.x , work on windows 7 scheme development environment using wamp. did lot of research in net not solve problem.

this table:

$query = "create table if not exists `t0` ( `id` int not null auto_increment , `fromport` char(10) not null , `kabatas` int null , `eminonu` int null , `bostanci` int null , `maltepe` int null , `kartal` int null , `buyukada` int null , `heybeliada` int null , `burgazada` int null , `kinaliada` int null , `sedefadasi` int null , `fromtime` char(10) null , `fromtype` varchar(50) null , `company` varchar(50) null , `duration` char(10) null , `price` float null , primary key (`id`) ) ;";

this php part load data:

$query = 'load info local infile "c:/transportation/' . $filename . '.txt" table ' . $filename . ' lines terminated "\r\n" ignore 1 lines;'; $result = mysqli_query($db, $query);

the test info is:

no fromport kabatas eminonu bostanci maltepe kartal buyukada heybeliada burgazada kinaliada sedefadasi fromtime fromtype company duration

price kabataŞ 1 08:30 vapur İdo 01:30 5.00 tl kabataŞ 1 09:30 vapur İdo 01:30 5.00 tl kabataŞ 1 13:00 vapur İdo 01:30 5.00 tl kabataŞ 1 15:00 vapur İdo 01:30 5.00 tl kabataŞ 1 19:00 vapur İdo 01:30 5.00 tl

now:

there no errors there no info in table result (checking mysql workbench) lines , cr+lf, info delimited tab (checked notepad++)

any thoughts? give thanks in advance

php mysql

GWT 2.5 Application Deployment in Tomcat? -



GWT 2.5 Application Deployment in Tomcat? -

i using gwt 2.5. have application using gwt-rpc. have compiled project , create war file using ant-script. when deploy project on tomcat loads doesn't show control. simple blank html page. here files. module

class="lang-xml prettyprint-override"><?xml version="1.0" encoding="utf-8"?> <!-- when updating version of gwt, should update dtd reference, app can take advantage of latest gwt module capabilities. --> <!doctype module public "-//google inc.//dtd google web toolkit 2.5.0//en" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd"> <module rename-to='interviewscheduler'> <!-- inherit core web toolkit stuff. --> <inherits name='com.google.gwt.user.user'/> <!-- inherit default gwt style sheet. can alter --> <!-- theme of gwt application uncommenting --> <!-- 1 of next lines. --> <inherits name='com.google.gwt.user.theme.clean.clean'/> <!-- <inherits name='com.google.gwt.user.theme.standard.standard'/> --> <!-- <inherits name='com.google.gwt.user.theme.chrome.chrome'/> --> <!-- <inherits name='com.google.gwt.user.theme.dark.dark'/> --> <!-- other module inherits --> <inherits name="com.smartgwt.smartgwt"/> <!-- specify app entry point class. --> <entry-point class='interviewscheduler.client.interviewscheduler'/> <!-- specify paths translatable code --> <source path='client'/> <source path='shared'/> </module>

remote service

class="lang-java prettyprint-override">package interviewscheduler.client; import interviewscheduler.shared.interview; import interviewscheduler.shared.teacher; import java.util.linkedhashmap; import java.util.list; import com.google.gwt.user.client.rpc.remoteservice; import com.google.gwt.user.client.rpc.remoteservicerelativepath; @remoteservicerelativepath("interviewscheduler") public interface interviewschedulerservice extends remoteservice{ boolean loadstudentdata() throws illegalargumentexception; boolean loadparentdata() throws illegalargumentexception; boolean loadteacherdata() throws illegalargumentexception; boolean loadclassdata() throws illegalargumentexception; boolean loadclassmembershipdata() throws illegalargumentexception; boolean loadroomdata() throws illegalargumentexception; boolean loadsessiondata() throws illegalargumentexception; boolean loadinterviewdata() throws illegalargumentexception; linkedhashmap<string, string> getstudentnames() throws illegalargumentexception; string getparentname(string studentkey) throws illegalargumentexception; list<teacher> getavailableteachers(string studentkey) throws illegalargumentexception; list<teacher> getrequestedteachers(string studentkey) throws illegalargumentexception; list<interview> getinterviewbystudent(string studentkey) throws illegalargumentexception; list<interview> getinterviewbyteacher(string teachercode) throws illegalargumentexception; list<object> getinterviewsforgrid(list<interview> list) throws illegalargumentexception; string addinterview(interview obj) throws illegalargumentexception; string removeinterview(string studentid, string teacherid) throws illegalargumentexception; }

web.xml

class="lang-xml prettyprint-override"><?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"> <!-- servlets --> <servlet> <servlet-name>interviewschedulerservlet</servlet-name> <servlet-class>interviewscheduler.server.interviewschedulerserviceimpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>interviewschedulerservlet</servlet-name> <url-pattern>/interviewscheduler/interviewscheduler</url-pattern> </servlet-mapping> <!-- default page serve --> <welcome-file-list> <welcome-file>interviewscheduler.html</welcome-file> </welcome-file-list> </web-app>

any ideas doing wrong.? urgent.

class="lang-java prettyprint-override">package interviewscheduler.client; import com.google.gwt.core.client.entrypoint; import com.google.gwt.core.client.gwt; import com.google.gwt.user.client.window; import com.google.gwt.user.client.rpc.asynccallback; import com.google.gwt.user.client.ui.rootlayoutpanel; import com.smartgwt.client.widgets.layout.vlayout; /** * entry point classes define <code>onmoduleload()</code>. */ public class interviewscheduler implements entrypoint { /** * entry point method. */ private interviewschedulerserviceasync remoteobject=gwt.create(interviewschedulerservice.class); private vlayout wrapper=new vlayout(); private vlayout headerarea=new header(); private vlayout contentarea=new contentarea(); public void onmoduleload() { window.enablescrolling(true); window.setmargin("0px"); remoteobject.loadstudentdata(new asynccallback<boolean>() { @override public void onsuccess(boolean result) { rootlayoutpanel.get().add(drawwrapper()); } @override public void onfailure(throwable caught) { system.out.println("failed*****************"); } }); } /** * initialize wrapper of web site holds other content------main container */ public vlayout drawwrapper(){ wrapper.setwidth100(); wrapper.setheight100(); wrapper.setmargin(0); wrapper.addmember(drawheaderarea()); wrapper.addmember(drawcontentarea()); homecoming wrapper; } /** * initialize header area of web site contains logo title , logout button */ public vlayout drawheaderarea(){ headerarea.redraw(); homecoming headerarea; } /** * initialize content area of web site holds main tabset */ public vlayout drawcontentarea(){ contentarea.redraw(); homecoming contentarea; } }

you have show info somehow in application. you're doing right calling bunch of services. it's quite confusing. should of in 1 phone call server. save lot of round trips , save having failed calls.

gwt tomcat deployment gwt-rpc

pointers - inout-parameter - replace one const-handle with another -



pointers - inout-parameter - replace one const-handle with another -

in object, have array of const-handles object of specific class. in method, may want homecoming 1 of handles inout-parameter. here simplified example:

class {} class b { const(a) a[]; this() { = [new a(), new a(), new a()]; } void assign_const(const(a)* value) const { // *value = a[0]; // fails with: error: cannot modify const look *value } } void main() { const(a) a; b b = new b(); b.assign_const(&a); assert(a == b.a[0]); // fails .. }

i not want remove const in original array. class b meant kind of view onto collection constant a-items. i'm new d coming c++. have messed const-correctness in d-way? i've tried several ways work have no clue how right.

how right way perform lookup without "evil" casting?

casting away const , modifying element undefined behavior in d. don't it. 1 time const, it's const. if element of array const, can't changed. so, if have const(a)[], can append elements array (since it's elements const, not array itself), can't alter of elements in array. it's same immutable. instance, string alias immutable(char)[], why can append string, can't alter of elements.

if want array of const objects can alter elements in array, need level of indirection. in case of structs, utilize pointer:

const(s)*[] arr;

but won't work classes, because if c class, c* points reference class object, not object itself. classes, need do

rebindable!(const c) arr;

rebindable in std.typecons.

pointers casting d const-correctness const-cast

css - Tooltip arrow disappears when span has overflow-y : auto -



css - Tooltip arrow disappears when span has overflow-y : auto -

i have tooltip that's based on span load content. content may have varying size have set max-height , max-width span , want able scroll when content exceeds dimensions.

the problem arrow disappears whenever set overflow:scroll;. there workaraound issue?

here's code:

#tooltip { position: absolute; max-height: 300px; max-width:300px; line-height: 20px; overflow: scroll; /*adding makes arrow disappear*/ padding: 10px; font-size: 14px; text-align: left; color: #fff; background: #2e31b1; border: 4px solid #2e31b1; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.0980392) 1px 1px 1px; box-shadow: rgba(0, 0, 0, 0.0980392) 1px 1px 2px 0px; } #tooltip:after { content: ''; position: absolute; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: transparent #2e31b1 transparent transparent; top: 10px; left: -24px; }

and tooltip contain this:

<span id="tooltip"> <div> info</div> <div> info</div> <div> info</div> <div> longer max-width info</div> //more max-height pixels worth of divs <div> info</div> </span>

i'm not sure cleanest solution, wrap content div so: html

<div id="tooltip"> <div id="content"> <div> info</div> <div> info</div> <div> info</div> <div> longer max-width info</div> <div> info</div> <div> info</div> <div> info</div> </div> </div>

css 

#tooltip { position: absolute; } #content { font-size: 14px; color: #fff; max-height: 100px; max-width:300px; line-height: 20px; overflow: scroll; background: #2e31b1; padding: 10px; border: 4px solid #2e31b1; border-radius: 5px; text-shadow: rgba(0, 0, 0, 0.0980392) 1px 1px 1px; box-shadow: rgba(0, 0, 0, 0.0980392) 1px 1px 2px } #tooltip:after { content: ''; position: absolute; width: 5px; height: 0; border-width: 10px; border-style: solid; border-color: transparent #2e31b1 transparent transparent; z-index:999; top: 10px; left: -24px; }

jsbin: http://jsbin.com/ukaxof/1/edit

css tooltip

javascript - Markers do not show up in googlemap - strange error -



javascript - Markers do not show up in googlemap - strange error -

i trying allow markers show in styled googlemap, using google api.

if seek way:

function initialize() { var mapoptions = { zoom: 8, center: new google.maps.latlng(51.49079, -0.10746), maptypeid: google.maps.maptypeid.roadmap }; var map = new gmaps({ div: "#map1", lat: 41.895465, lng: 12.482324, zoom: 1, zoomcontrol : true, zoomcontrolopt: { style : "small", position: "top_left" }, pancontrol : true, streetviewcontrol : false, maptypecontrol: false, overviewmapcontrol: false }); var styles = [ { featuretype: "road", stylers: [ { "hue": "#ff0000" }, { "lightness": -11 }, { "saturation": -5 } ] }, { featuretype: "road", stylers: [ { "saturation": -26 } ] } ]; map.addstyle({ styledmapname:"styled map", styles: styles, maptypeid: "map_style" }); map.setstyle("map_style"); // add together 5 markers map @ random locations var southwest = new google.maps.latlng(-31.203405, 125.244141); var northeast = new google.maps.latlng(-25.363882, 131.044922); //var bounds = new google.maps.latlngbounds(southwest, northeast); //map.fitbounds(bounds); var cities = [ { name: 'london', position: new google.maps.latlng(51.49079,-0.10746), info: 'bewohner: 7,556,900' }, { name: 'paris', position: new google.maps.latlng(48.856667,2.350987), info: 'bewohner: 2,193,031' }, { name: 'berlin', position: new google.maps.latlng(52.523405,13.4114), info: 'bewohner: 3,439,100' } ]; cities.foreach(function(element, index, array) { var marker = new google.maps.marker({ position: element.position, map: map[0], title: element.name }); var infowindow = new google.maps.infowindow({ content: element.info }); google.maps.event.addlistener(marker, 'click', function() { infowindow.open(map, marker); }); }); } google.maps.event.adddomlistener(window, 'load', initialize);

i no errors in firebug, no markers show up.

if alter this:

var marker = new google.maps.marker({ position: element.position, map: map[0],

to

map: map,

i error message, there invalid value property map.

where error in code?

thank you!

instead of gmaps utilize google.maps.map creating maps seek link. may help you.

https://developers.google.com/maps/documentation/javascript/overlays?hl=en#markers

edited code

var marker; var map; function initialize() { var mapoptions = { zoom: 4, center: new google.maps.latlng(51.49079, -0.10746), maptypeid: google.maps.maptypeid.roadmap }; map = new google.maps.map(document.getelementbyid('map_canvas'), mapoptions); var styles = [ { featuretype: "road", stylers: [ { "hue": "#ff0000" }, { "lightness": -11 }, { "saturation": -5 } ] }, { featuretype: "road", stylers: [ { "saturation": -26 } ] } ]; map.setoptions({styles: styles}); var cities = [ { name: 'london', position: new google.maps.latlng(51.49079,-0.10746), info: 'bewohner: 7,556,900' }, { name: 'paris', position: new google.maps.latlng(48.856667,2.350987), info: 'bewohner: 2,193,031' }, { name: 'berlin', position: new google.maps.latlng(52.523405,13.4114), info: 'bewohner: 3,439,100' } ]; for(var i=0;i<cities.length;i++) { var element=cities[i]; var marker = new google.maps.marker({ position: element.position, map: map, title: element.name }); var infowindow = new google.maps.infowindow({ content: element.info }); google.maps.event.addlistener(marker, 'click', function() { infowindow.open(map, marker); }); } }

javascript google-maps maps google-api

assembly - MC68k assembler address syntax -



assembly - MC68k assembler address syntax -

i'm trying write programme take 8-bit value , write d0. masked 4-bit value. number supposed access number in a0 , write d1.

this number sent output.

this how i'm going @ it:

in_port equ $fffff011 out_port equ $fffff019 mask equ $0f org $4000 start: move.b in_port,d0 andi.b #mask,d0 move.b (0,a0,d0),d1 * problem area move.b d1,out_port jmp start org $5000 segcodes: dc.b $77,$22,$5b,$6b dc.b $2e,$6d,$7d,$23 dc.b $7f,$2f,$dd

my problem seems syntax around comment. nil written d1 , nil sent output.

i had forgotten add together address next command:

movea.l #$5000,a0

this writes destination of address can accessed correctly, think. please right me if i'm wrong.

assembly 68000

spring - Mule 3.3 ignore-resource-not-found -



spring - Mule 3.3 ignore-resource-not-found -

i'm using mule studio 1.3.2, corresponds mule 3.3 believe.

i'm using property-placeholder element. wanted utilize technique described here of having optional override file. however, ignore-resource-not-found attribute beingness flagged error in mule studio: attribute ignore-resource-not-found not defined valid property of property-placeholder

<context:property-placeholder location="classpath:config.properties" ignore-resource-not-found="true" />

is broken or doing silly?

mule 3.3 uses spring context 3.1 schema

which supports ignore-resource-not-found attribute

<xsd:complextype name="propertyplaceholder"> <xsd:attribute name="location" type="xsd:string">...</xsd:attribute> <xsd:attribute name="properties-ref" type="xsd:string">...</xsd:attribute> <xsd:attribute name="file-encoding" type="xsd:string">...</xsd:attribute> <xsd:attribute name="order" type="xsd:integer">...</xsd:attribute> <xsd:attribute name="ignore-resource-not-found" type="xsd:boolean" default="false"> <xsd:annotation> <xsd:documentation><![cdata[specifies if failure find property resource location should ignored. default "false", meaning if there no file in location specified exception raised @ runtime.]]> </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="ignore-unresolvable" type="xsd:boolean" default="false">... </xsd:attribute> <xsd:attribute name="local-override" type="xsd:boolean" default="false">...</xsd:attribute> </xsd:complextype>

so, you're doing right thing

spring properties mule

jqplot - icefaces barchart shows bar stretched till end of x axis horizontally if only 1 bar is there -



jqplot - icefaces barchart shows bar stretched till end of x axis horizontally if only 1 bar is there -

i using icefaces 3.2. have ace:chart barchart . in simple words if have 1 bar shown in bar chart , bar @ runtime gets stretched till end of x axis.

if have 1 bar shown should show 1 slim bar , not thick bar stretches till end of x axis - how can accomplish this.

jqplot icefaces-3

passwords - How to get title of cuurently active window(parent and child) in java -



passwords - How to get title of cuurently active window(parent and child) in java -

i developing passpro application in want need title of active window adobe reader, ms word,excel,access etc. application having password protection when have clicked on particular application "enter password" kid window gets opened. want kid window title. developing appliaction automatically detects passwords access db when opened password protected file application(like access,word,pdf or ppt).

java passwords window

A Way To Simplify this JavaScript File? jQuery show/hide? -



A Way To Simplify this JavaScript File? jQuery show/hide? -

i have 4 divs, , 4 corresponding buttons. when click button1, shows div 1 , hides others. , and forth. instead of having list of divs hide, can have 'hide other divs' sort of string? not hide every div on page, hide every #div(number).

$(document).ready(function() { var h1 = $("#div56").height(); var h2 = $("#div54").height(); var h3 = $("#div47").height(); var h4 = $("#div45").height(); $("#div56,#div54,#div47,#div45").height(… h2, h3, h4)); $("#div54,#div47,#div45").hide(); }); $("#lnk56").live('click', function() { $("#div56").show(); $("#div54,#div47,#div45").hide(); }); $("#lnk54").live('click', function() { $("#div54").show(); $("#div56,#div47,#div45").hide(); }); $("#lnk47").live('click', function() { $("#div47").show(); $("#div56,#div54,#div45").hide(); }); $("#lnk45").live('click', function() { $("#div45").show(); $("#div56,#div54,#div47").hide(); });

this corresponding html/php:

<div class="grid_5"> <?php query_posts( 'post_type=credits&showposts=99999'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <div class="buttons"> <a id="lnk<?php the_id(); ?>" href="#"><h5><?php the_title(); ?></h5></a> </div><!--/buttons--> <?php wp_link_pages(array('before' => 'pages: ', 'next_or_number' => 'number')); ?> </div> <?php endwhile; endif; ?> </div><!--/grid_5--> <div class="grid_7"> <div class="scrollbox"> <div id="divparent"> <?php query_posts( 'post_type=credits'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="info" id="<?php the_id(); ?>"> <?php the_content(); ?> </div> <?php endwhile; endif; ?> </div><!--/divparent--> </div> </div><!--/grid_7-->

you can hide using class , create dynamic, can utilize data-* attributes retrieve right id button , show corresponding div. see jsfiddle: http://jsfiddle.net/v9zzy/

$(document).on("click", "button", function(){ var id = $(this).attr('data-btn-id'); $(".mydivs").hide(); $("#div" + id).show(); }); <div id="div1" class="mydivs">hello 1</div> <button id="btn1" data-btn-id="1">btn 1</button> <div id="div2" class="mydivs">hello 2</div> <button id="btn2" data-btn-id="2">btn 2</button> <div id="div3" class="mydivs">hello 3</div> <button id="btn3" data-btn-id="3">btn 3</button> ...

jquery hide show