Posts

playframework - How to prefill a dropdown using scala template and play framework -

i using scala template , play 2.0 framework project. let's have user form fields name (textfield), age (dropdown). while creating user filled name dave , selected age 25. now on edit screen, want values prefilled, know how textfield (i.e. set value userform('name')) dropdown? how it. thanks shawn downs , biesior. well, can use @select scala helper class show pre-filled result. like. @select(userform("age"),models.age.values().tolist.map(v => (v.getdisplayname(), v.getdisplayname())),'id->"age") to show other options have used enum of possible values of age.

c++ - Try to understand std::enable_shared_from_this<T> but cause a bad_weak_ptr using it -

i try understand behavior of std::enable_shared_from_this class, cant understand it. i've write simple program test different situations. question can explain me behavior of following code, because can't explain observed result. thanks help. code #include <iostream> #include <memory> struct c : std::enable_shared_from_this<c> { }; int main () { {//test 1 std::shared_ptr<c> foo, bar; foo = std::make_shared<c>(); bar = foo->shared_from_this(); //ok std::cout<<"shared_ptr : ok"<<std::endl; } {//test 2 std::shared_ptr<c> foo = std::shared_ptr<c>(new c); std::shared_ptr<c> bar; bar = foo->shared_from_this(); //ok std::cout<<"shared_ptr + new : ok"<<std::endl; } {//test 3 c* foo = new c; std::shared_ptr<c> bar; bar = foo->shared_from_this(); //throw std::bad_weak_ptr std::cout<<"new ...

asp.net - Call server side dropdown list onchange function from javascript -

is there way call server side drowndown list on change event call javascript.. <script> // change value of asp.net dropdown list // call onchange event of dropdown list </script> you can try adding web methods in code behind can called through javascript or jquery ajax.

r - How to code a multiplicative ARIMA (non-consecutive lags) -

i'm working weekly data , based on form of typical seasonal multiplicative arima, want fit following process time series: y_t = phi* y_t-1 + phi* y_t-52 + phi* phi* y_t-53 + e_t i want obtain coefficients phi, phi, , residuals (e's). i unaware of packages or functions , have been trying use arima() while shutting off ma , differencing components keep restricted ar. isn't capturing process above. in advance!

oracle - Procedure calling gone bad - Statement Ignored -

Image
i have following procedure insert users in table: create or replace procedure elr_add_user (i_name in varchar2, i_morada in varchar2, i_birthdate in date, i_country in varchar2, o_id out number, o_error_msg out varchar2) error_null exception; begin if i_name null or i_morada null or i_birthdate null or i_country null raise error_null; end if; o_id := elr_seq_user_id.nextval; if o_id null raise error_null; end if; insert elr_users values (o_id, i_nome, i_morada, i_birthdate, i_country); exception when error_null o_error_msg := 'null fields'; when others o_error_msg := 'unexpected error: '|| sqlerrm; end; / i think procedure , it's syntax correct. when i'm trying call with: declare p_name varchar2(50); p_morada varchar2(...

Android custom keyboard popup keyboard on long press -

Image
i have custom android keyboard: public class customkeyboard extends keyboard{...} public class customkeyboardview extends keyboardview{...} public class customkeyboardime extends inputmethodservice implements keyboardview.onkeyboardactionlistener{...} on keys, have popupkeyboard , popupcharacters : <key android:codes="144" android:keylabel="0" android:popupkeyboard="@xml/key_popup" android:popupcharacters=")" android:keyedgeflags="right"/> xml/key_popup.xml: <keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:keywidth="10%p" android:horizontalgap="0px" android:verticalgap="0px" android:keyheight="@dimen/key_height" > </keyboard> but when longpress on "0" key popup ")" shows, stays there until press "x" button or ")" character. looks this: and wa...

woocommerce variation/add to cart not showing -

Image
so, have coded wordpress theme , integrated woocommerce it. has used simple products time, , using simple product test codes, works fine. added variation product , then, add cart button gone ( variation select dropdown there, values not bonded drop down. if can give me hint, showing have done wrong, big favor. i got same issue , solved when manually entered price variable products. unfortunately didn't find out yet why have enter it, same value. fixed it. hope helps !