Posts

Showing posts from February, 2014

jsp - Read XML data using specified DTD -

Image
i working on web project need read xml file data using dtd file. as in core java can using defaulttreemodel task simpler. so there api provided in jsp/servlet read xml data using dtd file. here screen shot of interpro.xml file intepro.dtd tree this, i searched not getting clear solution read xml data using dtd create tree.

assign a function to a variable in R -

the question in title. i'd : myfunc<- pexp plot(function(x) myfunc(x, 0.5)) i'd call several functions given parameters in script. i'd use foreach instead of bunch of if-then-else statement : suppose call script way : r --slave -f script.r --args plnorm pnorm i'd : #only parameters after --args args<-commandargs(trailingonly=true) in args { plot(function(x) i(x,param1,param2)) } use get retrieve object given character string containing name. in case, can use getfunction , specific version retrieve functions. for f in args { f <- getfunction(f) plot(function(x) f(x, param1, param2)) }

java - Peeking deep into Queue -

i'm using blockingqueue , , want able peek next elements in queue. queue.peek() gives me first next element, need go deeper. is there standard way, or should implement myself (which includes dealing thread safety issues)? understand data structure using , purpose of it. you can same job different data structures [list,set,array,vector,stack,queue , on]. of them have own features. queue used fifo, access elements in same way, to access next element, first element should moved out of it .

c# - app crash while loading large amount of items to listbox -

i developing windows phone8 app have listbox shows large number of items, have image control inside data template of listbox. when load first 100 items working well, when load next 100 items(totally 200) app crash happens. can me solve issue. here code list box <listbox scrollviewer.verticalscrollbarvisibility="disabled" visibility="visible" x:name="commentslistbox" verticalalignment="top" > <listbox.itemtemplate> <datatemplate> <border borderbrush="#ffb9b9b9" borderthickness="0,0,0,2" width="462" margin="14,0,0,0"> <grid verticalalignment="top" width="470" > <image horizontalalignment="left" height="100" width="100" verticalalignment="top" margin="10,20,0,0&qu

Android communication with asp.net web service -

i'm trying post data asp.net web service seems not know how that. need post data eg. http://yoors.somee.com/default.aspx?type=emailinsert&username=myusername&password=mypass&name=myname&email=myemail@provider.com&emailenabled=false after json response {"valid":"success"} for i'm using function, seems not working purpose. / / create new httpclient , post header httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://yoors.somee.com/default.aspx?type=emailinsert"); // http://yoors.somee.com/default.aspx?type=email // insert&username=ben&password=pass&name=alv //&email=ben@yahoo.com&emailenabled=false try { // add data list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(2); namevaluepai

php - Get Data ArrayObject inside array -

monthly_payment: "9.7", maintainance_fee: "20000", areapoints: [ { station: "大塚", bus: null, walking_distance: null }, { station: null, bus: null, walking_distance: null }, { station: null, bus: null, walking_distance: null } ] getting monthly payment , maintenance fee easy, use $room->monthly_payment . but there arrayobject inside of array getting error when use $room->areapoints[0]->bus this error: undefined property: arrayobject::$bus what doing wrong here change $room->areapoints[0]->bus $room->areapoints[0]['bus']

python - Passing and returning numpy arrays to C++ methods via Cython -

there lots of questions using numpy in cython on site, particularly useful 1 being simple wrapping of c code cython . however, cython/numpy interface api seems have changed bit , in particular ensuring passing of memory-contiguous arrays. what best way write wrapper function in cython that: takes numpy array not contiguous calls c++ class method signature double* data_in, double* data_out returns numpy array of double* method wrote to? my try below: cimport numpy np import numpy np # suggested jorgeca cdef extern "myclass.h": cdef cppclass myclass: myclass() except + void run(double* x, int n, int d, double* y) def run(np.ndarray[np.double_t, ndim=2] x): cdef int n, d n = x.shape[0] d = x.shape[1] cdef np.ndarray[np.double_t, ndim=1, mode="c"] x_c x_c = np.ascontiguousarray(x, dtype=np.double) cdef np.ndarray[np.double_t, ndim=1, mode="c"] y_c y_c = np.ascontiguousarray(np.zeros((n*d,))

ruby on rails - How can I change the header info of "from"? when using ActionMailer? -

i'm using actionmailer. it's working fine. but, i've noticed owner stated in header of email sent. just this received: (from ftpuser@localhost) what reffered to? indeed, of rails files's ftpuser , rest root. how should be? this example , hope help, in app/mailers/notifications_mailer.rb can set default email address. class notificationsmailer < actionmailer::base default :from => "noreply@yourdomain.net" default :to => "info@yourdomain.net" def new_message(message) @message = message mail(:subject => "[message confirmation] #{message.subject}") end end also check config/environments directory. mailers can configured there.

symfony - Symfony2 CRUD Listview of Users Not Working -

i created entity users using reverse engineering , tried create controller , view entity using following command:- $ php app/console generate:doctrine:crud --entity=acmedemobundle:user --format=annotation it did ask me contain "write" action, configuration format , prefix. went , 2 scripts generated under controller , views. when call below url view list page of users error:- http://localhost/symfony/web/users error no route found "get /users" does mean once generate crud, not add route entity in routing.yml or missing something? you need import annoted route in routing.yml : user: resource: "@acmedemobundle/controller/usercontroller.php" type: annotation then php app/console router:debug check routes available.

matlab - Error using eval, Undefined function or variable 'largeArrayDims'. -

i'm want install enceval toolkit on matlab2012a: enceval toolkit file install on matlab i installed support compiler visual studio 10 , sdk 7.1. had written code in file.m install : archstr = computer('arch'); if(strcmp(archstr,'win64')) lapacklib = fullfile(matlabroot, ... 'extern', 'lib', 'win64', 'microsoft', 'libmwlapack.lib'); blaslib = fullfile(matlabroot, ... 'extern', 'lib', 'win64', 'microsoft', 'libmwblas.lib'); command = 'mex (''llcencodehelper.cpp'', lapacklib, blaslib, largearraydims)'; elseif(strcmp(archstr,'win32')) lapacklib = fullfile(matlabroot, ... 'extern', 'lib', 'win32', 'microsoft', 'libmwlapack.lib'); blaslib = fullfile(matlabroot, ... 'extern', 'lib', 'win32', 'microsoft', 'libmwblas.lib'); command = 'mex(''l

asp.net mvc 4 - Generic Repository EF 5 - Update Entity And It's Complex/Scalar/Navigation Properties -

i'm trying find easy solution updating entity + included properties in solution. i've created generic repository dbcontext (database). update parent entity, not handling changes on child properties. there way handle or track changes? example code updating child propery: (look @ comment - example code) [httpput] public httpresponsemessage putbrand(brand brand) { if (!modelstate.isvalid) { return request.createerrorresponse(httpstatuscode.badrequest, modelstate); } try { // example code brand.brandsizes.firstordefault().name = "i'm test"; // add values brand.state = state.changed; brand.datechanged = datetime.now; // update brand = _brandservice.updatebrand(brand); // save _brandservice.savebrandchanges(); // signalr hub.clients.all.updatebrand(brand);

asp.net - Redirect from www to non-www with using subdomain -

i need redirect url www non-www when user enters url subdomain. example: www.abc.xyz.com abc.xyz.com string url = request["http_request_url"]; // not sure exact constant name of header uri uri = new uri(url); if(uri.host.startswith("www.") && uri.host.count(c => (c == '.'))>2) { response.redirect(url.replace("www.", "")); } thought said before, think redundant because browsers checks you... , should avoid being "too smart own good".

windows phone 7 - LongListSelector: Dynamic GridCellSize -

i have longlistselector , have following viewmodel viewmodel: list<listdata> listdata: text image i need cell size dynamic depending on listdata. if text absent, i'll hide image , make gridcellsize = 50. if image present, gridcellsize should 250,250; it'll this: +---------+ +---------+ | text | | text | +---------+ +---------+ +---------+ +---------+ | text | | text | +---------+ +---------+ +---------+ +---------+ | | | | | | | | | image | | image | | | | | | | | | +---------+ +---------+ +---------+ +---------+ | | | | | | | | | image | | image | | | | | | | | | +---------+ +---------+ i tried changing gridcellsize using convertor seems gridcellsize needs constant longlistselector , applies elements. is there way achieve this?

android - How to force sound to play when adjusting notification volume -

i have activity uses this.setvolumecontrolstream(audiomanager.stream_notification); so volume control rocker adjusts notification volume instead of ringer volume. this works fine, when rocker used adjust notification volume i'd sound played @ new volume - happens when adjusting ringer volume. , isn't happening me. what's best way make happen? btw, if it's relevant, i's work in android 2.3.6. thanks, martin

Xml pull parsing not working after a period of time in android -

im facing different problem im unable solve...... problem is... i have xml , parsed using xml pullparser. the requirement @ should complete data xml , store in database.and display in listview. but problem if open application after time not parsing data.

ios - how to send proof of paypal transaction to server for confirmation and fulfillment of transaction in iPhone -

i displaying nsdictionary via nslog resulting here proof of payment: { client = { environment = sandbox; "paypal_sdk_version" = "1.0.5"; platform = ios; "product_name" = "paypal ios sdk"; }; payment = { amount = "190.50"; "currency_code" = usd; "short_description" = vegetables; }; "proof_of_payment" = { "adaptive_payment" = { "app_id" = "app-80w284485p519543t"; "pay_key" = "ap-0w362760mw159460w"; "payment_exec_status" = completed; timestamp = "2013-07-25t04:12:46.646-07:00"; }; }; i have read documentations https://developer.paypal.com/webapps/developer/docs/integration/direct/make-your-first-call/ link got paypal rest api uses oauth 2.0 framework authorization. result view real flowing transactions in paypal account (sandbox) ? next? have

html - Float left elements do not stack -

i have problem floating elements. want when resize browser window box 3 right under box 1 html: <div class="box"> <p>box 1</p> <p>box 1</p> <p>box 1</p> </div> <div class="box"> <p>box 2</p> <p>box 2</p> <p>box 2</p> <p>box 2</p> <p>box 2</p> </div> <div class="box"> <p>box 3</p> <p>box 3</p> <p>box 3</p> </div> css: .box { width:80px; float:left; border:1px solid slategrey; margin:0 0 0 10px; padding:10px; } see fiddle: fiddle i tried clear property nothing helps. you can dynamic layout js. example masonry plugin.

synchronization - When is useful to use SpinLock sync primitive in .NET? -

i learning basics of parallel programming in .net , wondering why need use spinlock sync primitive. read using of mechanism avoids rescheduling when waiting sync primitive release (and worth when waiting time short), there way measure 'effectivity'? don't want make decision whether use spinlock or not because said 'you shouldn't in cases'. by using spinlock telling thread busy waiting - thread not going in blocked state, spinning wastes cpu cycles , prevents cpu doing more useful work. if know in advance run on multi core machine( spin lock on single core machine not idea) , know going spin relative short time( moving thread block state cpu intensive) might ok

plsql - which exception will return? -

view exhibit examine pl/sql code. set serveroutput on declare past_due exception; acct_num number; begin declare past_due exception; acct_num number; due_date date := sysdate -1; todays_date date := sysdate; begin if due_date < todays_date raise past_due; end if; end; exception when past_due dbms_output.put_line('handling past_due exeption.'); when others dbms_output.put_line('could not recognize rxception.'); end; which statement true execution of code? a. exception raised in code handled exception handler past_due exception. b. not execute because cannot declare exception similar name in subblock. c. past_due exception raised in subblock causes program terminate abruptly because there no exception handler in subblock. d. past_due exception raised enclosing block not propagated outer block , handled when others exception handler. in dumps answer c think d (d) closest being correct, it's no

spring - getting org.hibernate.exception.SQLGrammarException:Table not found -

my code working basicdatasource configuration. when have changed jndi-lookup (jndi data source jboss 7). getting below error. 17:28:39,865 info [org.jboss.as.server.controller] (deploymentscanner-threads - 2) deployed "documentmanager-0.0.1-snapshot.war" 17:28:50,616 warn [org.hibernate.engine.jdbc.spi.sqlexceptionhelper] (http--127.0.0.1-8080-1) sql error: 42102, sqlstate: 42s02 17:28:50,616 error [org.hibernate.engine.jdbc.spi.sqlexceptionhelper] (http--127.0.0.1-8080-1) table "documents" not found; sql statement: select document0_.id id0_, document0_.created created0_, document0_.description descript3_0_, document0_.filename filename0_, document0_.name name0_ documents document0_ [42102-145] 17:28:50,618 error [stderr] (http--127.0.0.1-8080-1) org.hibernate.exception.sqlgrammarexception: table "documents" not found; sql statement: 17:28:50,619 error [stderr] (http--127.0.0.1-8080-1) select document0_.id id0_, document0_.created created0_, do

Amazon SES -> SNS SQS notifications not working -

i have customer has own aws/ses account send emails using ses. we have our own aws account host our servers , use sns/sqs. we setup his ses verified sender email send sns notifications bounces , complaints our sns topic, , subscribed our sqs queue our sns topic. we thought working fine, received message in our queues (one bounces, complaints) ses setup subscription. the problem is, haven't received notifications. receive notification email, no notification arriving in our sqs queue @ all. if send test bounce console panel bounce@simulator.amazonses.com or complaint@simulator.amazonses.com client account console panel, receive new sqs notification in (account) queue bounced message, still won't receive real bounces/complaints. ideas? just found out. we sending emails email address "a" , setting reply-to email address "b". all bounce notifications sent reply-to address... once setup sns/sqs notifications reply-to address, noti

SAS: Calculate Standard Deviation on-the-fly in datastep -

i have following sample data: data have; input username $ stake betdate : datetime.; dateonly = datepart(betdate) ; format betdate datetime.; format dateonly ddmmyy8.; datalines; player1 90 12nov2008:12:04:01 player1 -100 04nov2008:09:03:44 player2 120 07nov2008:14:03:33 player1 -50 05nov2008:09:00:00 player1 -30 05nov2008:09:05:00 player1 20 05nov2008:09:00:05 player2 10 09nov2008:10:05:10 player2 -35 15nov2008:15:05:33 run; proc print; run; proc sort data=have; username betdate; run; data want; set have; username dateonly betdate; retain calendartime eventtime cumulativedailyprofit standarddeviationstake; if first.username calendartime = 0; if first.dateonly calendartime + 1; if first.username eventtime = 0; if first.betdate eventtime + 1; if first.username cumulativedailyprofit = 0; if first.dateonly cumulativedailyprofit = 0; if first.betdate cumulativedailyprofit + stake; run; proc print; run; i need way of comparing players different stake sizes , normalize betti

Image in HTML title tag but not a favicon -

i know how use favicon mean else: there must way use images in html title tags see page example: http://helios.io/ how little rockets right of title text added? you cannot use images in title, not in traditional sense of jpg, png, gif, etc. the little rocket ship see text character can 'typed'. there numerous little characters can type way. however, believe rocket ship see mac / ios character... it's emoji rocket ship.

javascript - Raphael Js toggle content when click -

my english trash, want try. that version modified me, these vectors colorful buttons are. i'm trying display text when click each of buttons.but when click other buttons, texts overlap, shown in picture: http://i.stack.imgur.com/s39dx.png this code handles event: $('.get').find('.arc').each(function(i){ var t = $(this), color = t.find('.color').val(), value = t.find('.percent').val(), text = t.find('.text').text(); conteudo = t.find('.conteudo').text(); alet = ( 11.25 * ); /*title.rotate(20.25 * i);*/ rad = arco_espaco; var z = r.path().attr({ arc: [value, color, rad], 'stroke-width': arco_width,}); var zm = r.path().attr({ arc: [value, color, rad], 'stroke-width': arco_width, opacity: 0}).tofront();/*mask*/ var title = r.text(220, 0, defaulttext).attr({ font: '20px arial

django - What are the dangers of not handling 404 in a view? -

the docs teach must provide django either httpresponse or have exception raised. i'm coding relatively small project, choosing ignore proper 404 handling when writing view, instead making sure data exists beforehand don't run 404 s. of course, rather haphazard writing, , provide context how should making these decisions - how not handling 404 s in writing views affect things? instance, website explode? [edit] so, instance, use my_stuff = thing.objects_all() instead of my_stuff = get_object_or_404(thing, pk=thing_id) . here, know thing has objects in because created them earlier in admin, , won't removed. so, need worry 404 ?

multithreading - Java concurrency - is monitor blocked? -

is there way tell 1 thread (say 1 locks monitor object) if thread blocked / waiting on same monitor? example scenario - a "collector" thread reads data shared object, while "updater" thread might blocked , waiting collection end. collector know when finishes collecting, possible data update pending yield collected data might invalid. in case collecting might time consuming operation, , in next stage "collector" thread analyzes data more time, might redundant operation in many cases data invalid. is there way tell 1 thread (say 1 locks monitor object) if thread block/waiting on same monitor? no, not object itself. can, @evgeniy mentioned, use other of java.util.concurrent.locks.* classes allow view queued members, not synchronized (lock) type of object monitor. i collector know when finishes collecting, possible data update pending yield collected data might invalid. how having blockingqueue of updates coll

jquery - show loading div for dialog -

here below code, have loading div named dvloading , can tell me or how show loading div in open attribute , hide when opened? $("#dialog-edit").dialog({ title: 'add', autoopen: false, resizable: false, height: height, width: width, /*show: { effect: 'drop', direction: "up" },*/ modal: true, draggable: true, open: function (event, ui) { $(this).load(url); }, close: function (event, ui) { $(this).dialog('close'); } }); thanks this may work. (not tested) according .load() documentation. $("#dialog-edit").dialog({ title: 'add', autoopen: false, resizable: false, height: height, width: width, /*show:

SOAP 1.1 encodingStyle attribute validation error -

looking @ soap 1.1 specification ( http://www.w3.org/tr/2000/note-soap-20000508/ ) , corresponding xsd ( http://schemas.xmlsoap.org/soap/envelope/ ), can see mismatch regarding encodingstyle attribute. there many examples in w3c note, showing usage of encodingstyle attribute, e.g.: <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" soap-env:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"> <soap-env:body> <m:getlasttradeprice xmlns:m="some-uri"> <symbol>dis</symbol> </m:getlasttradeprice> </soap-env:body> </soap-env:envelope> furthermore, section 4.1.1 says: the soap encodingstyle global attribute can used indicate serialization rules used in soap message. attribute may appear on element, , scoped element's contents , child elements not containing such attribute, xml namespace declaration scoped. however, xsd does no

ios - Confused with Apple Map Vs Google Map -

this might stupid question people want make sure this. in ios6 apple has updated map application , added own map. if develop native application , include map(mkmapview) changes should aware of them? previously, using google web service fetch latitude , longitude between 2 locations , draw direction. apple provide own web services same? are changes should aware of them? mkmapview still work fine, map displays little different. also, if limit app ios versions use apple's maps, might not subject google's terms , conditions. read agreements. does apple provide own web services same? there's clgeocoder . it's class, not web service, makes easier use.

c# - Unable to add a Service Reference using a WSDL in Visual Studio -

i have url web service wsdl: http://www.webservicex.net/weatherforecast.asmx?wsdl i trying consume service in wpf application (.net 4.5) in visual studio 2012. i right click on project -> add service reference , when try add above service reference, following error: the html document not contain web service discovery information. metadata contains reference cannot resolved: ' http://www.webservicex.net/weatherforecast.asmx?wsdl '. metadata contains reference cannot resolved: ' http://www.webservicex.net/weatherforecast.asmx?wsdl '. if service defined in current solution, try building solution , adding service reference again. on "add service reference" window, click on "advanced" button -> "add web reference" button on bottom -> copy url url textbox , click "->" button. see wsdl in viewer. now click on "cancel" , again "cancel" on "service reference settings"

.NET registering a DLL through RegAsm without populating Windows event log -

well, have looked for, haven't found similar wish, , dont know if that's possible. what happens that, customers still use windows xp, , windows version limits size of windows event log 512 kb, default. so when log has reached limit, , installer tries regster .dll, i'm getting exception saying "the event log full", becasue each time try register .dll, regasm tries create 5 new lines of warnings in event log, saying registration succesful. obs.: don't want installer clean event log. i know can change manually , increase size limit, still, i'd know if there's way register .dll through regasm, without generating new line in windows event log. (so wouldn't have problem exception anymore) i have looked regasm parameters , couldn't find any. is there way can it? no windows version places limit size of event log. 512 kb default value of (default) "limit ..." option. just have customers change value higher one, or t

php - AJAX file upload with secret query vars -

we're creating form allows users upload large files. on mobile devices , slow connections, might take while upload, seems important handled ajax call shows users progress bar (or let them know it's still working). here's problem: endpoint upload 3rd party api expects our secret api key 1 of parameters. here's link directly the section in documentation . api key cannot exposed users on client side. my first instinct submit form intermediate php script on our site, has api key, , uploads file api. i'm pretty sure mean uploading file twice: once our server. again our server api endpoint. if form submitted ajax, it's not great result user wait twice long complete. so: what's smoothest way let users upload files while keeping our api key safe? some details may or may not important: our site php web app built on cakephp framework (v2.x). files being uploaded video files of different formats between 1 , 5 minutes long. api company called wistia (see

coding style - What is the name/term for structuring JavaScript in this way? -

i've been writing javascript particular style last year or in work (example below) , wondering if tell me style or pattern called. assume has name it's 1 of things if don't know call it's tough find on it. var page = { dostuff: function () { // stuff gets done here }, save: function () { // save logic } }; the above js can called this: page.save(); we've been using means can kind of namespace functions if every page has save function can called same name never conflict. apologies if has been asked before said it's hard find answer when i'm not sure keyword using. update speedy response everyone. have 1 more question on if can help. had tried sort of function overload in past have this: var page = { dostuff: function () { // stuff }, dostuff: function (name, type) { // stuff name , type params } }; but functions end overriding each other last 1 read in rep

jquery - Getting uidialog full contents -

i have uidialog , full content of it, reason getting old html contents if use .html(), current live contents if use serialize. so, inside dialog have: alert($(this).find('form').serialize()); //this serializes current live contents, appear in uidialog form. alert($(this).html()); //this shows html before modifications on dialog why html() shows html before modifications, while serialize() shows me serialization current values inputted? you cannot obtain html(). created function takes serialized array , populates container save dialog html. how called dialog: //set current vals html before saving setinputvals('#' + $(this).attr('id'), $(this).find('input, select, textarea').serializearray()); and function: /* * sets input vals container * * @param container_id id of container * @param inputvals serialized array used set values * * @return boolean. modifies container */ function setinputvals(container_id, inputvals) {

api - How does getcwd work in Linux? -

i make directory in urxvt: $ mkdir /tmp/mydir then $ cd /tmp/mydir then run second copy of urxvt , do: $ rm -r /tmp/mydir/ i close second copy of urxvt , switch first copy of urxvt , do: $ pwd /tmp/mydir pwd coreutils v 2.21-2 uses getcwd working directory. how getcwd working directory deleted?

delphi - How to ignore some parameters in TQuery -

if have sql statement below select * mytable cid = :vcid , datatype = :vdatatype and use tquery data below aquery.parambyname('vcid').value := '0025'; aquery.parambyname('vdatatype').asinteger := 1; but how can ignore "cid" key sql like select * mytable datatype = :vdatatype i've try below synctax, failed aquery.parambyname('vcid').value := '%'; aquery.parambyname('vdatatype').asinteger := 1; please me out, thank you. the best option use separate queries: aqueryboth.sql.text := 'select * mytable cid = :vcid , datatype = :vdatatype'; ... aqueryboth.parambyname('vcid').value := '0025'; aqueryboth.parambyname('vdatatype').asinteger := 1; aquerydatatype.sql.text := 'select * mytable datatype = :vdatatype'; ... aquerydatatype.parambyname('vdatatype').asinteger := 1;

javascript - Open a fancybox when the hyperlinkfield of gridview is clicked -

i have gridview has hyperlinkfield.when field clicked,i want fancy box open , in fancy box want iframe display page hyperlinkfield has open. my gridview is: <asp:gridview id="gridview" runat="server" autogeneratecolumns="false"datakeynames="srnumber" onrowdatabound="gridview2_rowdatabound" width="100%" showfooter="false" enableviewstate="false" autopostback="true"> <columns> <asp:hyperlinkfield datanavigateurlfields="srnumber" datanavigateurlformatstring="newpage.aspx?srnumber={0}" datatextfield="note" headertext=""/> <asp:templatefield headertext="note" sortexpression="note"> <itemtemplate> <a id="ahrefclic

javascript - Mozilla and IE modifies how my drop down list look, but chrome doesn't -

when view drop down list in chrome looks perfect, when view in mozilla or ie adds drop down arrow don't want. have tried -moz-appearance:none; and opacity:0; which none of them solved problem correctly. how ride of drop down arrow? here 1 of drop down lists: <asp:dropdownlist id="dropdownlist3" runat="server" autopostback="true" datasourceid="sqldatasource1" datatextfield="plant" datavaluefield="plant" width="156px" font-bold="true" font-size="x-large" style="margin-left: 250px; margin-top:-44.5px; margin-bottom:-20px; background-color: #ffffff; box-shadow:none; outline-color: #ffffff; border: none; text-align: right;" enabled="false">

button - MS-Access Missing Event When Leaving Text Box -

i have textbox used filter listbox. there command button next text box. enter filter data in text box , move mouse command button , click. of appropriate events in text box fire command button's click event not. i running access 2013 on windows 8 virtual machine (parallels on mac). is normal activity? below event trace following activity: enter characters "farm" in text box click on search command button. notice - no events fire command button. mindustryfind==> tbxsearchtext_enter mindustryfind==> tbxsearchtext_gotfocus mindustryfind==> tbxsearchtext_keydown mindustryfind==> tbxsearchtext_keypress mindustryfind==> tbxsearchtext_change mindustryfind==> tbxsearchtext_keyup mindustryfind==> tbxsearchtext_keydown mindustryfind==> tbxsearchtext_keypress mindustryfind==> tbxsearchtext_change mindustryfind==> tbxsearchtext_keyup mindustryfind==> tbxsearchtext_keydown mindustryfind==> tbxsearchtext_keypress mindustryfind==> tbxse

java - How to change table name of from clause in PreparedStatement -

hi have small problem, how switch tables results from?? code below not working.however should give idea of trying do. help string typelogin=null; if(xx){ typelogin="users_table"; }else{ typelogin="admin_table"; } string sqlstr = "select * "+typelogin+" username=? , userpassword=?"; preparedstatement stmt = conn.preparestatement(sqlstr); the full code: statement stmt = conn.createstatement(); string sqlstr = "select * "+typelogin+" username=? , userpassword=?"; preparedstatement pstmt=conn.preparestatement(sqlstr); pstmt.setstring(1,user); pstmt.setstring(2,password); //step 6 process result resultset rs = pstmt.executequery(); the error getting: com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: have error in sql syntax; check manual corresponds mysql server version right syntax use near 'fromspmovy_admin username='ab

java - Safety of subclass data when returned as superclass -

i'm having trouble finding specifics on happens when return subclass in method of superclass type in java. example: public class superclass { int a; } public class subclass extends superclass { int b; } superclass superobj; subclass subobj; private superclass getobject () { return subobj; } public static void main (...) { superobj = getobject(); } what happens subobj when it's returned superclass? realise while typing example test myself, i'm still curious process when happens, , whether it's considered (if works, is) or bad practice. i'm asking because i'm working on project in have 2 abstract base classes, , several subclasses each of them. i'm trying find out good/bad ways handle having change 1 subclass while still using convenience polymorphism adds when using abstract base classes. edit: fixed main , class declarations, sorry that. there od

asp.net - Oracle - ASP sql command not properly ended -

i new oracle , asp. trying run small mysql query. getting error ora-00933 sql command not ended my query is select * name_tbl username = 'admin'; i googled , tried options. query running when executed in oracle sql developer please me in advance

javascript - Calling a function in JS doesn't work with arguments -

in js file i'm calling 1 function other, @ first called no arguments using it's name handleresponse tried adding arguments (of course changing function signature) , didn't anything, tried calling function handleresponse() , didn't work. why can't call function using brackets or using arguments ? here functions : main : function sendrequest() { var username = ""; var game_id = -1; username = document.getelementbyid("username").value; game_id = document.getelementbyid("game_id").value; req.open('get', 'check_for_opponent.php?username='+username+'&game_id='+game_id); req.onreadystatechange = handleresponse(username, game_id); <--- call req.send(null); } calling : (i changed body, it's irrelevant). function handleresponse(username, game_id) { if(req.readystate == 4) { // something... } } } you need wrap call in anonymous function: req.onr

iphone - unit test cellForRowAtIndexPath when using storyBoards -

if i'm dequeuing cell identifier in storyboard, how in unit testing way can call cellforrowatindexpath , not have cell nil? - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { mycustomtableviewcell *cell = [tableview dequeuereusablecellwithidentifier:kcustomcell]; cell.guestnametext.text = self.details.guestname; return cell; } not working, put break point above after dequereusablecell called , cell nil: eta: updated working code pass test: - (void)setup { [super setup]; _detailvc_sut = [[uistoryboard storyboardwithname:@"mainstoryboard" bundle:nil] instantiateviewcontrollerwithidentifier:kdetailsvc]; _myservice = [ocmockobject nicemockforclass:[myservice class]]; _detailvc_sut.service = _myservice; } - (void)test_queryfordetailssucceeded_should_set_cell_text_fields { [_detailvc_sut view]; // <--- need load view work details *details = [detailsbuilder builds

orbeon - How can I access the XML captured by a form I create in From Builder from JavaScript? -

with orbeon forms, created form in form builder. since orbeon forms uses xforms, data in form captured in xml document. document sent persistence api when saved, how can access before that, on browser, through javascript? in form builder, edit source, , add following line inside <fr:body> element, before first <fr:section> : <xf:output value="saxon:serialize(/*, 'xml')" id="my-xml" style="display: none"/> in javascript, can access value of my-xml control added with: orbeon.xforms.document.getvalue('my-xml')

c# - Should I use a base class for a method that adds user control to master page -

i have method in content page 2 things: adds user control placeholder on page's master page, , sets properties of user control. make functionality available of pages without repeating code on individual pages. would base class appropriate here? have no experience base classes. base class master page? content page? guidance appreciated.