Posts

asp.net - how to rectreate this dynamic controls -

try make simple application in have dropdown list tems - numbers 1 4. depending on number user choose - create dynamically number of checkboxes binded checkedchanged event. when user checks of checkboxes checkedchanged event raised , store text of checked checkbox in session , when click button want see text checked checkboxes. but seems in checkedchanged event handler should recreate dynamic cotrol haven't found solution. thank in advance. public partial class proba : system.web.ui.page { protected void page_load(object sender, eventargs e) { dd1.items.add("1"); dd1.items.add("2"); dd1.items.add("3"); dd1.items.add("4"); } protected void dd1_selectedindexchanged1(object sender, eventargs e) { int numtourists = convert.toint32(dd1.selecteditem.text); (int = 0; < numtourists; i++) { checkbox chk = new checkbox(); chk.id = "chk" + i; chk.text = ...

android - TextView below ImageView -

Image
i can't place label want. show picture. i have following code: <relativelayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:layout_weight="1" android:orientation="vertical" > <textview android:id="@+id/textviewnombrevideo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/imageviewlogo" android:layout_alignparentbottom="true" android:layout_alignright="@+id/imageviewlogo" android:lines="2" android:scrollhorizontally="false" android:singleline="false" android:text="medium text" android:textappearance="?android:attr/textappearance" android:textcolor="@android:color...

drupal 7 - How do you assign certain permissions to a single user without using the roles? -

adding permissions role enables given permission users in role default; want avoid. want able set permissions "booking: view own bookings" @ user level , not role level. is there module this, or can give me possible approaches or pseudo code of kind? yes, there's user permissions module. user permissions provides interface giving additional permissions individual users without need assign them special role. when module enabled, users 'administer permissions' permission can access 'user permissions' tab on each user's account.

Cakephp 2.3 baking with mongodb datasource -

i try use "./cake bake" configure db (mongo) , models. when digit command on shell, output is: welcome cakephp v2.3.2 console app : app path: /var/www/cakephp/app/ interactive bake shell [d]atabase configuration [m]odel [v]iew [c]ontroller [p]roject [f]ixture [t]est case [q]uit bake? (d/m/v/c/p/f/t/q) d database configuration: name: [default] > datasource: (mysql/postgres/sqlite/sqlserver) where mongodb's drivers? try taking @ this github repo . it allow use mongodb datastore cake

java - openCV: reading submat while sliding over bigger Mat -

i want read fixed-size-submat bigger mat while sliding on bigger 1 pixel pixel (or maybe 5 pixel 5 pixel or somtheing that, hope idea). is there predefined function in opencv, if 1 it? (besides using java opencv 2.4.5..) have idea how write myself in java using mat.submat(a,b,c,d) , thought underlying c++ dll implementation lot faster. is want? cv::mat i; // large mat cv::rect win; // sub mat win.width = 5; win.height = 5; for(size_t i=0;i<i.rows-5;++i) for(size_t j=0;j<i.cols-5;++j) { win.x = i; win.y = j; i(win) //<- submat } `

vba - How to break long string to multiple lines -

i'm using insert statement in code in vba excel i'm not able break more 1 line sqlquerystring = "insert employee values(" & txtemployeeno.value & " _ ,'" & txtcontractstartdate.value & "' _ ,'" & txtseatno.value & "' _ ,'" & txtfloor.value & "','" & txtleaves.value & "')" it giving error "expected end of statement". plz help. you cannot use vb line-continuation character inside of string. sqlquerystring = "insert employee values(" & txtemployeeno.value & _ "','" & txtcontractstartdate.value & _ "','" & txtseatno.value & _ "','" & txtfloor.value & "','" & txtleaves.value & "')"

javascript - How to validate multiple fields at the same time using JQuery -

i have created form validates using jquery , javascript. problem is, validates 1 field @ time. user has correct first field first , press submit again see if next field valid. what to do, have jquery validate whole form after pressing submit , show applicable error messages. here js: function validateusername() { var u = document.forms["newuser"]["user"].value var ulength = u.length; var illegalchars = /\w/; // allow letters, numbers, , underscores if (u == null || u == "") { $("#erroruser").text("you left username field emptyyy"); return false; } else if (ulength < 4 || ulength > 11) { $("#erroruser").text("the username must between 4 , 11 characters"); return false; } else if (illegalchars.test(u)) { $("#erroruser").text("the username contains illegal charectors men!"); return false; ...