Posts

Showing posts from July, 2013

How to select from solr use java? -

i save data in solr: string solrurl = "http://localhost:8984/solr"; solrserver solrserver = new httpsolrserver( solrurl ); solrinputdocument doc = new solrinputdocument(); doc.addfield("id", "1"); doc.addfield("first_name", "ann"); doc.addfield("last_name", "smit"); doc.addfield("email", "test@test.com"); try { solrserver.add(doc); solrserver.commit(); } catch (solrserverexception e) {/* */} and select data solr: solrquery query = new solrquery(); query.setquery("*:*"); query.addfilterquery("first_name:ann*"); query.addfilterquery("last_name:ann*"); query.setfields("id","first_name","last_name","email"); queryresponse response = null; try { response = solrserver.query(query); } catch (solrserverexception e) {/* */ } solrdocumentlist list = response.getresults(); i have search criteria: first name or last n

How to delete excel sheet using jxl & java -

i trying delete excel sheet jxl jar file using java . not able understand how it. not getting delete or remove method in jxl ne need jxl delete excel file can java it. quite easy

java - project compiles in eclipse but maven instal gives errors -

welcome, have 2 projects, project library (maven project) main project. eclipse able compile , run main project maven complains when try clean install. have tried everything: clean install on , clean install in combinations, changing default maven compiler eclipse compiler, still have compile errors on main project. pom project: <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/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>self.project</groupid> <artifactid>a</artifactid> <version>7.3.002.001</version> <properties> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <!-- <vaadin.version>7.1.8</vaadin.version> --> <vaadin.version>7.3.0</vaadin.version> </properties> &

excel vba - Sharing VBA modules across MS Office Applications -

i have substantial bank of vba modules written in excel 2010 add-in. of these specific excel, many more general. example 1 takes part number , re-formats it; contains case select function find file in network drive. i want use common functions in word , outlook. copy , paste excel word add-ins, makes difficult keep code date - when make edit in 1 application, must remember copy others. my question is, there means of writing common code in 1 place (e.g. in excel add-in, or other common location) ms office applications can access if it's module? the way used done take code , compile com (or activex) dll using visual basic 6. add dll, using vba editor's "tools...references" dialog, office (or other) product supported vba, same way might use, say, microsoft scripting runtime, super-handy things dictionary , filesystemobject , textstream . problem is, vb6 released sometime in 1998 , has not been available or supported microsoft years now. there seem q

Correct way to reimplement OpenMPs min/max reduction with flush -

some days ago came mind, piece of code implement min/max reduction in openmp, used quite often, might not correct: in cases, when openmp min-max reduction clause not available (old openmp version) or needed index maximum value used code this: #pragma omp parallel private(mymax,mymax_idx) shared(globalmax,globalmax_idx) { #pragma omp (...) { } if (mymax >= globalmax) { #pragma omp critical { if ((mymax > globalmax)||(mymax == globalmax && globalmax_idx < mymax_idx) { globalmax = mymax; globalmax_idx = mymax_idx; } } } } now came mind, code might produce wrong results because shared variable not mean threads access same portion of memory, might use private copy might not date other threads. need use #pragma omp flush synchronize variable. [...] #pragma omp flush(globalmax) if (mymax > globalmax) { #pragma omp critical {

linux - Find filenames with number in name lower than 1950 -

i have following problem: have list of files this file256name.txt file307list.cvs file2014text.xls i use command "find" find files number in name lower 1950 previous list have these files listed file256name.txt file307list.cvs i tried command find . -type f \( -iname '*[1-9][0-9][0-9]*' \) but display files containing number in name >1950 as additional indication files can have different filenames , extensions , position of number unpredictable...i'm looking simple command use find (for me mandatory use find) including formula select files contains numbers lower 1950 also consider limitation of linux version busybox v1.16.1 thanks help you'll need use regex differenciate decade in respect century: .*(19[5-9][0-9]|[2-9][0-9]{3}).* (this find 4-digit numbers greater or equal 1950). using regex may use negate option of find files no number >= 1950. eliminate files without number, use second criteria. i've not tes

Rebus cannot subscribe to multiple endpoints with same 'messages' value -

is there reason rebus cannot used in pub/sub protocol, subscribing multiple endpoints publishing messages shared assembly? when try configure rebus subscriber this: <rebus inputqueue="ocs.subscriber.input" errorqueue="ocs.subscriber.error" workers="1" maxretries="5"> <endpoints> <add messages="d3a.messages" endpoint="ocs.publisher.input" /> <add messages="d3a.messages" endpoint="ocs.publisher.input@osi2552" /> </endpoints> </rebus> an exception thrown @ .transport(t => t.usemsmqandgetinputqueuenamefromappconfig()) the exception thrown this: an unhandled exception of type 'rebus.configuration.configurationexception' occurred in rebus.dll additional information: error occurred when trying parse out configuration of rebusconfigurationsection: system.configuration.configurationerrorsexception: entry 'd3a.messages' has been a

inheritance - Passing namespace in C# -

we have exercise inheritance in c#. problem put in question mark , in if statement know program passed person class or animal class or class under inventoryapplication namespace. :) private void addbutton_click(object sender, eventargs e) { logic_layer.logic logic = new logic(); //logic.add<person>(); } namespace logic_layer { public class logic { public void add<inventoryapplication>() inventoryapplication : ? { //if { } } public void delete() { } public void edit() { } public void search() { } public void searchall() { } } } you can't use such statement in constraint. however, later in method can this: if (typeof(myobject).namespace == "inventoryapplication") { ... } what better if classes want test (animal, person etc.) implement interface (say, imyinterface ). for example: void add<t>(<t> param) t : imyinterface {/*...*/}

What is wrong with this delphi code for Bing translator API? -

i using follow delphi code: clhttp1.request.header.contenttype := 'application/x-www-form-urlencoded'; try accountkey:=account; clhttp1.request.addformfield('client_id',clientvalue); clhttp1.request.addformfield('client_secret',accountkey); clhttp1.request.header.authorization:='basic ' + encode64(accountkey + ':' + accountkey); clhttp1.post('https://api.datamarket.azure.com/bing/microsofttranslator/v1/translate?text=%27developer%27&to=%27es%27&from=%27en%27', value); except on e: exception showmessage(e.message); end; and receive error "the authorization type provided not supported. basic , oauth supported" response http/1.1 401 authorization type provided not supported. basic , oauth supported server: microsoft-iis/8.0 x-content-type-options: nosniff www-authenticate: basic realm="" x-powered-by: asp.net access-control-allow-origin: * access-control-allow-credent

How to download an image using Java Socket from a remote Http server? -

i have been trying implement simple http client using java socket. in program requesting image server , trying copy requested jpeg image on local machine. have managed construct request , received desired content. have separated response header , content. problem when write bytes using fileoutputstream .jpeg file , after writing when open file in image viewer (like picasa) image seems invalid. here entire code. can plz tell me what's wrong code? why image invalid? import java.io.bufferedinputstream; import java.io.bufferedreader; import java.io.fileoutputstream; import java.io.ioexception; import java.io.inputstream; import java.io.inputstreamreader; import java.io.printwriter; import java.net.socket; import sun.misc.ioutils; public class imagecopy { public static void main(string args[]) throws ioexception{ string host = "www.uni-koblenz-landau.de"; //declare host name string resourceloc = "/images/starts-c-ko.jpg";

sql - Pass id to inner SELECT of nested query with ORDER BY and ROWNUM -

i facing similar problem, i had couple of months ago : need return single value subquery may or may not return list of values. thus, apply order by first , select topmost entry where rownum=1 ( yep, i'm on oracle ). the problem is, required id in inner query unknown due nesting. last time, adviced use oracles analytic functions , apply min() / max() . time, however, i'm selecting currency symbol ( varchar ) , cannot utilize these functions. any appreciated. relevant part of query: select myothercolumn, (select currencysymbol ( select distinct p2.id, p2.validfromdate, curr.currencysymbol currencysymbol my_order_tablepos op2 join my_order_table o2 on op2.fk_order=o2.id join my_price_table p2 on op2.fk_concretarticle=p2.fk_article join my_currency_table curr on p2.fk_currency=curr.id op2.fk_order=o.id , p2.id=( -- fails, since o.id unknown in inner query! -- determine current price article select max(p3.id) keep (dense_rank

http - Gitlab .deb base url -

i know sound similar other questions, not. cause installed .deb package not compiled myself. instruction says change /etc/gitlab/gitlab.rb there external_url = "your url" changed domain name found gitlab_url="your url" added also. i did halway succes - works under wanted url, repos still got url "server-name" instead of domain name. how can fix it? :(

osx - Click checkbox that changes name -

Image
i'd click checkbox changes name (it's called either "checkbox 3" or "checkbox 4", can't rely on name). i've tried this: tell application "system events" tell process "aycons" set thecheckbox checkbox "checkbox 3" of window 1 tell thecheckbox if not (its value boolean) click thecheckbox end tell end tell unfortunately doesn't fit needs. this attributes of checkbox, thoughts on how can click it? reference index instead, should not change may not in obvious linear order. eg, set thecheckbox checkbox 2 of window 1

java - Pass and receive parameter into Eclipse plugin -

i develop plugin based on eclipse. want define , pass parameter eclipse , plugin can receive for example /soft/eclipse-3.7.2/eclipse -data /user/nquan/workspace -var1 value1 -var2 value2 in eclipse plugin, how can value of var1 , var2? regards use org.eclipse.core.runtime.platform application arguments: string [] args = platform.getapplicationargs();

java - tomcat 7.0.56 windows (eclipse) trailing slash appended; tomcat 7.0.28 linux (deployed war) trailing slash not appended -

i new configuring tomcat server, mapping java web application paths. i got apache cxf web service using following web.xml file. <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <display-name>kiiktatservices webszolgáltatás (apache cxf)</display-name> <servlet> <description>apache cxf endpoint</description> <display-name>cxf</display-name> <servlet-name>cxf</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.cxfservlet</servlet-class> <init-param> <param-name>static-welcome-file</param-name> <param-value>/services.html</param-value>

javascript - Update data in simple D3.js doughnut chart with animation -

i playing around simple d3.js chart. updated removing svg group , create new chart. want change update paths after new data come without removing svg. however, not updating , have no idea doing wrong. fiddle js var update_counter = 0; function drawchart() { var pie_d = 185, r = pie_d / 2, piedata = [1, math.random() * 10], pie = d3.layout.pie(), arc = d3.svg.arc().innerradius(60).outerradius(r); update_counter++; if (!document.queryselectorall('.svg svg').length) { d3.select('.svg').append('svg:svg') .data([piedata]) .attr('width', pie_d) .attr('height', pie_d); } else { d3.select('.svg svg') .data([piedata]); } var arcs = d3.select('.svg svg').selectall('g') .data(pie) .enter().append('svg:g') .attr('transform', 'translate(' + r + ',' + r +

MVVMCross gridview column width -

i want display 5 columns through mvxgridview, have following code setup gridview , template not able desired result. getting 1 column i.e. first column displayed in single row <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff"> <mvx.mvxgridview android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/gridview1" local:mvxbind="itemssource outages" local:mvxitemtemplate="@layout/item_outage" android:verticalspacing="0dp" android:horizontalspacing="0dp" android:stretchmode="columnwidth" android:numcolumns="auto_fit" android:columnwidth="50dp&qu

c# - SetValue on Propertyinfo Target Exception object doesn't match target type error -

i'm trying set value property i'm getting "target exception object doesn't match target type error time". the properties class class wizardproperties { public int incincidenttype { get; set; } } code snippet try set property value public void _wizardcontrol_nextbuttonclick(object sender, wizardcommandbuttonclickeventargs e) { foreach (control c in e.page.controls) { wizardproperties props = new wizardproperties(); searchlookupedit slue = new searchlookupedit(); foreach (var property in props.gettype().getproperties()) { if (!(c label)) { if (property.name == c.name) { messagebox.show("matchhh!!"); if (c searchlookupedit) { slue = (searchlookupedit)c;

php - validation errors not showing individually in magento -

Image
i new magneto , got shucked on create account page validation changed in image below it earlier how can previous style. just replace file default file.. think have removed varient form validation script page

android - fastboot and adb not working with sudo -

i have weird issue on ubuntu machine when trying run fastboot command. when run: fastboot devices i get no permissions fastboot so run command adminidtrator permissions: sudo fastboot devices and result sudo: fastboot: command not found how can be? have directory in path , works correctly without sudo. instead of forcing permissions via sudo each time need run fastboot , can permanently fix issue: use lsusb identify device usb vendorid configure udev set proper permissions when device plugged in profit! as bonus - fixed adb too. for example, in case (for 'megafon sp-a20i') : $ fastboot devices no permissions fastboot $ sudo fastboot devices [sudo] password kaa: medfielda9055f28 fastboot $ let's fix: first, need identify device: a) usb bus number (hack: know device intel-based one) $ fastboot -l devices no permissions fastboot usb:1-1.2 $ lsusb |grep 001 |grep -i intel bus 001 device 044: id 8087:09ef in

csv - Column separation python -

i working on bachelor thesis , working python analyze data. unfortunately not programming expert nor know working python. i have code seperates columns in csv files comma. want code seperate columns |. i have tried replace comma in line 58 | not work, surprise surprise. because such noob in programming field, google search did not make sense me @ all. largely appreciated! from sklearn.feature_extraction.text import countvectorizer sklearn import linear_model import csv import cpickle sklearn.metrics import accuracy_score def main(): train_file = "train.csv" test_file = "test.csv" # read documents train_docs, y = read_docs(train_file) # define features extract (character bigrams in case) extract = countvectorizer(lowercase=false, ngram_range=(2,2), analyzer="char") extract.fit(train_docs) # create vocabulary training data # extract features train data x = extract.transform(tra

Dynamic elasticsearch index_type using logstash -

i working on storing data on elasticsearch using logstash rabbitmq server. my logstash command looks like logstash -e 'input{ rabbitmq { exchange => "redwine_log" key => "info.redwine" host => "localhost" durable => true user => "guest" password => "guest" } } output { elasticsearch { host => "localhost" index => "redwine" } } filter { json { source => "message" remove_field => [ "message" ] } }' but needed logstash put data different types in elasticsearch cluster. meant type is: "hits": { "total": 3, "max_score": 1, "hits": [ { "_index": "logstash-2014.11.19", "_type": "logs", "_id": "zeea8hboss-qwh67q1kcaw", "_score"

visibility - wpf Change TextBox width on mouseover -

i have listboxitem textbox inside. on mouseover draggable block behind textbox appears. textbox autosizes content, that's ok, when drag apperas, listboxitem becomes wider , moves other items, it's not ok. need textbox little wider content when drag collapsed: onmouseover +---------+ +----+----+ |text | |drag|text| +---------+ +----+----+ i guess: show drag little, collapse, , bind textbox.width border.actualwidth: <grid> <grid.columndefinitions> <columndefinition width="auto"/> <columndefinition /> </grid.columndefinitions> <dockpanel x:name="drag" width="15" > <dockpanel.style> <style targettype="dockpanel"> <!--<setter property="visibility" value="collapsed" />--> <!--<style.triggers> <datatrigger binding="{binding

javascript - Fault with appending item to drop down (local storage) -

i have following code, works well. <div style="padding:2px;"> <form action='test.php' name ='gen' method='post'> <input type='text' name='pass' placeholder="insert website" size="10">&nbsp;<input type='submit' value='open'> </form> </div> <?php $random = 'specificsaltcode'; // specific salt $pass2 = $_post['pass'] . $random; // add user input $pass = md5($pass2); // md5() both $url = 'http://www.website'.$_post['pass'].'random'.$pass.'randomurlcontinued'; // url need echo '<iframe id="iframe1" name="iframe1" scrolling="yes" src="' . $url . '" style="position: absolute; left: 0px; top: 26px;" width="99%" height="88%" border="0"></iframe>'; ?> this hashes user input string

sql server - CakePHP 2.5 Debug MSSQL -

i have code working in cake 1.3 on same server, on new version of cake 2.5, when debug query blank ouput app/model/appmodel class appmodel extends model { public function connect_to_mssql() { $server = 'sqlserver'; // connect mssql $link = mssql_connect($server, 'user', 'password'); mssql_query("set ansi_nulls, ansi_warnings, ansi_padding, concat_null_yields_null, quoted_identifier on;"); if (!$link) { die('something went wrong while connecting mssql'); } $conn = mssql_select_db('database',$link); $client = mssql_query('select top 10 * clients'); $row = mssql_fetch_array($client); debug($row); die(); } } output: /app/model/appmodel.php (line 54) edit 1 just found problem it's debug() function, if use print_r array, know why? debug work if "debug" config variable set number greater 0. from cakephp debugging manual page :

javascript - How server should respond to the CORS request in case if origin is not in the allowed origins list? -

this question has answer here: what expected response invalid cors request? 2 answers in case client requests not simple html page or javascript server, calls server-side methods. these method perform activity on server - print documents, store db, etc. server should perform these actions if origin request in list of allowed origins. otherwise server should response client origin not in allowed origins list. how correctly? set response header access-control-allow-origin 'null'? or not set access-control-allow-origin header in response @ all? response code should set in case? 200, 401, ...? cross origin resource sharing "opt-in", means put cors headers in responses if willing enable it. browsers make little harder attacks if not set cors headers, still need protect backend server against cross-site request forgery (csrf) . you can pro

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

i need in configuring java on machine because, when try loading forms, loader goes in circles , gives error: java.lang.classnotfoundexception: oracle.apps.fnd.formsclient.formslauncher.class @ sun.plugin2.applet.applet2classloader.findclass(unknown source) @ sun.plugin2.applet.plugin2classloader.loadclass0(unknown source) @ sun.plugin2.applet.plugin2classloader.loadclass(unknown source) @ sun.plugin2.applet.plugin2classloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.plugin2.applet.plugin2classloader.loadcode(unknown source) @ sun.plugin2.applet.plugin2manager.createapplet(unknown source) @ sun.plugin2.applet.plugin2manager$appletexecutionrunnable.run (unknown source) @ java.lang.thread.run(unknown source) i have tried re-installing firefox, older versions of java runtime environments, disabling proxy. what missing? application working on other machines. i spent around 100 hours finding s

c# - Add hyphen or underscore between two int -

i trying id's database. if 1 value works expected want method return more 1 value. example if, id1 = 1 , id2 = 2 want display 1-2 or 1_2 . can't seem figure out how put hyphen - or underscore _ between 2 int . code below public int getid() { using (sqlconnection connection = new sqlconnection(connectionstring)) { string username = httpcontext.current.user.identity.name; userinfo info = new userinfo(); using (sqlcommand cmd = new sqlcommand("select firstid, secondid mytable username=@username")) { cmd.parameters.addwithvalue("username", username); cmd.connection = connection; connection.open(); using (sqldatareader reader = cmd.executereader()) { while (reader.read()) { info.firstid = reader.getint32(0); info.secondid = reader.getint32(1); } }

c# - Unity3D change MeshRender form a GameObject -

im trying replace entire mesh or gameobject ( not instantiate or disable , enable other ), because mesh different other gameobject, position , script same, so, thats why need change only mesh ( guess right way ). so, code in c# public gameobject mymaingameobject; public gameobject[] othermeshmaterials; int maxmaterials; int arraypos = 0; void start () { maxmaterials = othermeshmaterials.length-1; debug.log ( "total = "+ maxmaterials ); } void updatematerials() { //cycle forward if (input.getkeydown (keycode.u)) { if (arraypos == maxmaterials) arraypos = 0; else arraypos++; mymaingameobject.getcomponent<meshrenderer>().material = othermeshmaterials[arraypos].getcomponent<meshrenderer>().material; mymaingameobject.getcomponent<meshfilter>().mesh = othermeshmaterials[arraypos].getcomponent<meshfilter>().mesh; debug.log ( "name = "+ mymaingameobje

Convert a double (or string) into a Unix epoch timestamp in MySQL? -

i've seen instructions converting , forth between unix epoch , datetime in mysql -- it's not hard (from_unixtime convert epoch datetime, unix_timestamp current epoch time). unfortunately, have saved of timestamps server doubles -- , upon attempting cast doubles timestamps, fail. select from_unixtime(cast('1416355920908' datetime)), from_unixtime(cast(1416355920908 datetime)), from_unixtime(unix_timestamp()); this returns null, null, '2014-11-19 10:18:34' on mysql. is there way convert number or string epoch or datetime? it turns out made epochs big exploded mysql... it's mistake initiated in nodejs, when used functions gather epochs instead of relying on mysql. simple fix is: select from_unixtime(1416355920908 / 1000);

node.js - MongoDB find by date in Array -

schema: var users = mongoose.schema({name: string, usersearchcontractors: [usersearchcontractors]} var usersearchcontractors = new mongoose.schema({ type:{ type:string,index: true }, area: { type:string,index: true }, createdate: { type: date, default: date.now() } }); query: db.users.find( { usersearchcontractors: { $elemmatch: { createdate: { "$lt": new date()} } } } ) what i'm doing wrong users usersearchcontractors.createdate ? no results thank, ron no need use $elemmatch query. db.users.find( { 'usersearchcontractors.createdate': { "$lt": new date() } } )

javascript - Getting a elements position in a grid divided by 4 -

i have grid of let's 12 cards, 4 columns , 3 rows. every column has different class. column 1: has class a. column 2: has class b , on c , d. if loop through cards class of a, can know row position because jquery's each has index. my problem when clicks card let's column b row 2 how can index then, know it's in column 2 because has class of b, how know row is? what need math function can pass in let's 7 (if 7th card pressed) , return 2 (because it's in second row) , , 10 return 3. i used example 12 cards math function should return amount of cards. so lets assume cards have class .card if not should add 1 here's you'd , can either jquery or javascript //now first want create variable of how many cards per row //in example set manually 4. var cardsinrow = 4; //function calculates row position function getcardrow () { //this card clicked on //to use if jquery enabled var index = $('.card').index(this); //

android - FLAG_KEEP_SCREEN_ON not undimming the screen -

i'm using following line of code on oncreate() methods of 2 activities: getwindow().addflags(windowmanager.layoutparams.flag_keep_screen_on); the point of course, keep screen turned on , undimmed. the point if screen dimmed -not turned off- before 1 of activities launched, screen maintain it's dimming until user touchs activity. after user interacts in way (touchevent or that, i'm assuming) activity device undimm screen , maintain way until user leaves activity. does knows why happening , how can undimm screen of device before setting flag_keep_screen_on flag?

performance - Theoretical speedup not achieved - kernel separability -

i seeing how improve time takes convolution using kernel separability. below piece of code demonstrating this: test = randn(3000); kx = [1 2 3 4 5 6 7 8 9]; ky = kx'; kernel = ky*kx; tic; b = conv2(test,kernel,'same'); toc; tic; bx=conv2(test,kx, 'same'); by=conv2(bx,ky, 'same'); toc; running above code yields these results: elapsed time 0.564579 seconds. elapsed time 0.333260 seconds. as can seen, not theoretical speedup expecting, supposed 81/18 = 4.5. can explain why? your kernel not big enough see gains. improvement should become more apparent make kernel larger: test = randn(3000); kx = 1:100; ky = kx'; kernel = ky*kx; tic; b = conv2(test,kernel,'same'); toc; tic; bx=conv2(test,kx, 'same'); by=conv2(bx,ky, 'same'); toc; when run 100x100 kernel size, see: elapsed time 6.961222 seconds. elapsed time 0.252186 seconds. with 200x200 kernel get: elapsed time 28.894932 seconds. elapsed time 0.6391

javascript - External onClick function trigger on link page -

i have function opening anchor within multiple elements on click on toggle directory page using onclick. the problem link works on page, , external link pointing page operate function. simply put: page 1. <a href="#windsorcorporate">link windsor corporate>/a> page 2. <a href="#windsorcorporate" onclick="elm = document.getelementbyid('box5.1'); elm.style.display = 'block'; elm = document.getelementbyid('box5.1.5'); elm.style.display = 'block'; elm = document.getelementbyid('box5.1.5.1'); elm.style.display = 'block'; openclose('a5');">windsor, ontario</a><br /> thanks!

user controls - WPF Set usercontrol property from outside -

my user control has slider. use control in view , want assign value property of outside. this: <uc:myusercontrol verticalalignment="bottom" margin="8,8,8,0" slider.value="{binding...}"/> what syntax ? thank :) there no syntax externally reference control within usercontrol ; usercontrol black box, , nobody on outside should need know structure. if need provide property when instantiating usercontrol , declare new dependencyproperty on usercontrol , , bind slider's value property.

keyevent - C# Key Down stops firing after right arrow key pressed -

my team , made game version of snake, , works except after push right arrow key, key events stop firing. have tried setting keyboard.focus , other focus methods, doesn't work. our project on github at: csis2530, bbarke. i don't know why key down event stops working after right arrow key has been pressed. i hope us. i fixed gui ensuring gamewindow has focus , gamewindow has focus. do: click on new game button, go property , search "focusable". uncheck focusable checkbox. combobox (the 1 has levels), high score button, , apples eaten label, , else except game window. make sure gamewindow has focus , make sure focusable checked. i noticed when push on arrow keys, combo box change. due focus gamewindow being taken away combo box. so make sure gamewindow has focusable property checked.

android - Activity and Fragment Transitions in Lollipop -

i'm trying wrap head around new activity transition framework in lollipop . activity transition works pretty straighforward , there basic info here , fragment transition undocumented , can't work. i've tried use case (very common in android): case 1: acta+fraga -> actb+fragb with sharedelement being image in fraga , fragb . didn't come working code, went step , tried case 2: acta+fraga -> actb with sharedelement on fraga , actb . animation won't work, can see when click image on fraga, image disappear , after animation's duration pops in actb. shared views outside fraga inside acta (the toolbar example) animate correctly. in case sharedimage imageview in recyclerview, xml tag android:transitionname="shared_icon" in item's layout xml doesn't work? this theme: <!-- window transactions --> <item name="android:windowcontenttransitions">true</item> <item name="an

java - Overriding the default widget class names in gwt -

gwt uses standardized css class names such .gwt-image .gwt-button and on. prevents me using these classes popular css frameworks such bootstrap. is there way can override these default style names , use bootstrap or foundation compliant class names ? if using less css preprocessor, extend bootstrap mixins gwt classes ex : .gwt-button { .btn(); //this bootstrap mixin buttons } renders : .gwt-button{ display: inline-block; margin-bottom: 0; font-weight: normal; text-align: center; vertical-align: middle; touch-action: manipulation; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } it's little time consu