Posts

javascript - Is it possible to add an horizontal scroll bar to an html select box? -

Image
this question has answer here: how horizontal scroll bar in select box in ie? 2 answers i have below html code. <!doctype html> <html> <body> <select> <option value="volvo">volvoooooooooooooooootooooooolargeeeeeeeeeeee</option> <option value="saab">saab</option> <option value="opel">opel</option> <option value="audi">audi</option> <option value="volvo">volvo</option> <option value="saab">saab</option> <option value="opel">opel</option> <option value="audi">audi</option> <option value="volvo">volvo</option> <option value="saab">saab</option> ...

html - jQuery get the form select value -

i working jquery code. code listen event "change" radio button. want use select instead. how can make work?. see code below $("#filters input:radio").on("change", function () { i think should $("#filters select").on("change", function () { as select not input tag?

image processing - writing coeffcients to a wavelet packet tree in MATLAB -

i trying create empty wavelet packet tree , filling terminal nodes coefficients. in short following simple code :- clc,close all,clear all; img = imread('barbara.png'); t = wpdec2(img,2,'db4'); t2 = cfs2wpt('db4',size(img),tnodes(t),4); u = tnodes(t); = 1:length(u) x = read(t,'cfs',u(i)); write(t2,'cfs',u(i),x); end however when display t2, find terminal nodes contain no information except 0 matrics of appripriate sizes .. reason , how correct problem ?

android - Replaced Fragments are still active -

i writing android app using support version of fragments (android.support.v4.app.fragment). i have strange bug in code , dont know how fix it. when replace fragment other one, replaced 1 still active , receiving touch events. tap on location of button replaced fragment still fire onclick event. i dont know how fix this. can me? java code fragment newfragment = new loginactivityregisterfragment(); ... fragmenttransaction ft = getsupportfragmentmanager().begintransaction(); ft.settransition(fragmenttransaction.transit_fragment_fade); ft.replace(r.id.login_fragment, newfragment); ft.commit(); ... xml layout ... <fragment class="de.myapp.fragments.loginactivitymainfragment" android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/login_fragment" /> ... you can replace fragments in container view only. means need container (not fragment itself). <framelayout ...

ruby on rails - calculate payments in different currencies -

i have table items wich have string "usd" or "eur". create in controller variable def index ... @currencydebt = currencyrate.find( :all, :conditions => ["created_at < ? , currency_id = ?", date.today, 2], :order => ["created_at desc"], :limit => 1 ) ... end witch find last currency usd ** in view** <% res in @items %> <% loc in @currencydebt %> <%= number_with_precision(((loc.rate.round(2) * res.payment)), 2) %> <% end %> <% end %> Аnd result showing paymant in currency usd. how can show result if have string usd in items payment result in usd, if have eur in items payment result in eur? my activerecord create_table "items", :force => true |t| t.string "name" t.string "currency" t.decimal "payment" ... end create_table "currency_rates", :force => true |t| t.integer...

C++ non-type template parameters: Is typedef of an integral type an integral type? -

i know can function template template<int n> void f () {} . but template<std::size_t n> void f() {} ? a typedef alias given type. typedef of integral type integral type. , types don't more integral std::size_t .

java - null URL in testing with spring -

i testing method in spring controller , getting null pointer url when hits sendrequest method. test method follows: @test public void testshowform() { map<string, object> params = new hashmap<string, object>(); params.put("email", "testemail"); params.put("accesscode", keygenerator.getkey64()); string result = sendrequest("/userinfo.htm", get, usercontroller, params); assertnotnull(result); } my helper class: public class junitcontrollerhelper extends junithelper { @autowired protected junitdatahelper junitdatahelper; @autowired protected junitservicehelper junitservicehelper; @autowired protected applicationcontext applicationcontext; protected final string = "get"; protected final string post = "post"; protected mockhttpservletrequest request; protected mockhttpservletresponse response; protected handleradapter handleradapter; @before public void setup() { request = new mock...