Posts

javascript - Regular expression Spanish and Arabic words -

how can write regular expression matches valid spanish , arabic words. in english know, a-za-z , in hebrew א-ת , in russian А-Яа-яёЁ . use javascript. the range a-za-z english words unacceptably simple , naïve. leaves out manner of letters accents , other special marks used in loan words, etc. instance, won't match word "naïve", first sentence. use \p{latin} script, instead. the range א-ת hebrew words wrong. leaves out hebrew presentation forms, cantillation marks, yiddish digraphs, , more. use \p{hebrew} script, instead. the range А-Яа-яёЁ russian again incomplete , wrong. use \p{cyrillic} script, instead. the spanish alphabet uses same 26 letters english, plus ñÑ. again, don't hardcode these range. many spanish words use accented vowels. use \p{latin} script match spanish words. regexes won't distinguish spanish english. for arabic, use \p{arabic} script. javascript, regex, , unicode you said you're using javascript. unfor...

C# - What is the Select Source dialog as it applies to the GetDevice method? -

i trying use method described this: public device getdevice(string productname) the productname name of device appears in select source dialog. what select source dialog that's being referred to? as this link mentions (look " showing “select source” dialog " heading), dialog allows users select isis device. it's part of dotimage framework, called showselectsource , used this: isisdevice dev = null; if (this.acquisition.showselectsource(this)) dev = this.acquisition.devices.default; i guess works folderbrowserdialog . user selects device of choosing , can use selection retrieve device getdevice .

javascript - Flowplayer on IE8 Loading issues -

hay guys im trying use flowplayer load videos on flyout on ie 8. think not compatability issue since have page videos load , player displayed. occures when try load video using java script onto flyout. of bliack space player should be. <!-- internet explorer flyout --> <div id="videoflyoutie<?=$itemz['newsid']?>" class="popupwrapper" style="display:none;position:absolute;top:10px;left:auto;"> <div class="firstpopupdiv" style="left:center;height:auto;width:620px;"> <div class="popupdivinner" style="display:block;" class="hidesteps"> <h1 style="color:#333333;" ><?=$itemz['title']?><div id="title"></div></h1> <hr/> <div id="tst<?=$itemz['newsid']?>"> <ce...

c# - Conver radiobutton to a char -

Image
i have 3 radio buttons. please see image. i define variable char temp; what want if "male" selected temp = "m"; if "female" selected then temp = "f"; if "both" selected then temp = "b". my unfinished code: temp = convert.tochar(this.controls.oftype<radiobutton>().firstordefault(r => r.checked)); thanks advice. edit: controls in groupbox. in debug mode. got error. ?groupbox4.controls.oftype() {system.linq.enumerable.oftypeiterator} source: null , ?groupbox4.controls.oftype().firstordefault(r=>r.checked).text expression cannot contain lambda expressions edit 2: see image. run code exception. if understood correctly, based on (not-so-recommended) assumption each radiobutton's name starts different letter. temp = convert.tochar(this.controls.oftype<radiobutton>().firstordefault(r => r.checked).name.substring(0, 1)); edit: same assumptio...

php - Find most favored area on an image -

what mean-stat-equation should use when have image n-number sample-size of selections? i have unique problem hoping advice, don't miss out on anything. problem: find favored/liked/important area on image based on user selection of areas in different selection ratios. scenario: consider image of dog , , hundreds of users selecting area on image in various resolutions, obvious area of focus in selections area containing dog. can record x1,x2,y1,y2 co-ordinates , put them db, if want automatically generate versions of image in set of resolutions should able recognize area max attraction of users. methods think work are: find average center point of selections , base selection in that. - simple not accurate. use algorithm k means or em clustering don't know 1 best suited. looking forward brilliant solution problem more info on problem: actual image 1024x768 image, , selections made on of common mobile phone resolutions. objective automatically generate mobile phone...

javascript - echo text from input -

i trying make basic border radius generator. have input field user type in number of choice shown below: <label>border radius:</label> <input name="border-radius" class="jj_input" type="text" size="2" /> i have output area want number have typed in appear before "px" <div class="yourcode"> border-radius: *number_appears_here*px; </div> im not sure how go this, please point me in right direction. please let me know if has been answered already. in advance. the input element has onchange (or onkeyup) event can use. can execute javascript inside event sets innertext of target div. onchange fires after validation (mostly means when user leaves box). if want change directly after input, , keyboard input permitted, can use keydown/up event. in example below onkeyup used <label>border radius:</label> <input name="border-radius" class="jj_input...

html - Blackberry Scroll issue -

i have created html page blackberry. have done right not able scroll divisions using trackpad. i testing in blackberry bold. here code: <!doctype html> <html> <head> <meta name="handheldfriendly" content="true" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta name="viewport" content="width=device-width,height=device-height,target- densitydpi=device-dpi,user-scalable=no,initial-scale=1.0"> <title>xxxx</title> </head> <body class="claimtype"> <div class="mainwrapper"> <header> <h1>claim type<span></span></h1> </header> <article> <div class="claimtype_content"> <div class="claim_summary"> <h3> <label>plan no:<...