Posts

Showing posts from June, 2010

C# Create one Label filled with 2d string array -

Image
im doing c# maze should fill screen like x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x the x's places randomly , mouse trying find way out. having trouble finding way fill x's. tried creating 2d string array full of x's , fill label, no luck. what best way of doing this? using panel or maybe don't know about? have in wfa same example other answer windows forms :) same. public partial class form1 : form { public form1() { initializecomponent(); } private void panel1_paint(object sender, painteventargs e) { var blackpen = new pen(brushes.black); (int y = 0; y < 10; y++) { (int x = 0; x < 10; x++) { e.graphics.drawline(blackpen, new point(x*20, y*20), new point(x*20 + 10, y*20+10)); e.graphics.drawline(blackpen, new point(x*20, y*20+10), new point(x*20 + 10, y*20)); } } } } you have

io - Python: Shifted Averaging And Space Delimiting -

i'm trying figure out average set of predictions (values between 0 , 1 model has created. prediction values shifted, however, such if there 10 data values predictions made in sets of 3 so: 0.6825 0.7022 0.7023 0.6193 0.6410 0.6389 0.5934 0.6159 0.6145 0.5966 0.6191 0.6184 0.3331 0.3549 0.3500 0.1862 0.2015 0.1999 0.1165 0.1270 0.1267 0.1625 0.1761 0.1740 wherein these values correspond indexes follows: 1 2 3 2 3 4 3 4 5 4 5 6 5 6 7 6 7 8 7 8 9 8 9 10 i'm trying write script such read input line line , output average of prediction values appropriate each index (average 2 twos together, 3 threes, 3 fours, etc) such there 1 per line: 0.6825 0.7001 etc... however, i'm not sure how read in data such i'm able differentiate between 0.6825 , 0.7022 in line 1, example. how read in information such i'm able store in contiguous array? as far logic goes, figure can have special cases first, second, last, , second-to-last values,

JAXB on JAX-RS - JPA Entity with relations returns no JSON HTTP 500 no error on logs (Glassfish) -

i trying build rest endpoint using jax-rs return jpa entities in json format. found similar question though after applying similar changes in case still http 500 internal error code , glassfish produces no log or shows no error messages related request. here code: entity class: @xmlrootelement @entity @table(name = "tb_banner_image") public class bannerimage extends baseentity<integer> { private filereference filereference; private string type; private string labeltitle; private string labeltext; public bannerimage() {} @id @tablegenerator(name="genbannerimage", table="tb_id_generator", pkcolumnname="id_name", valuecolumnname="id_val", pkcolumnvalue="tb_banner_image", allocationsize=1) @generatedvalue(strategy=generationtype.table, generator="genbannerimage") @column(name = "id_banner_image", unique = true, nullable =

javascript - Debugging SVG performance on IE 10 -

i have pretty complicated svg doc i'm displaying on ie 10. it's stretched full size of viewport , uses viewbox attribute. i'm noticing transforming layers in doc extremely slow (like, 1fps slow). not happen in other desktop browsers. aside js profiling using f12, have ideas on other tools available ie10 relevant figure out what's slowing down transformations?

php - Is it possible for Apache to mod_rewrite a file to its absolute path? -

question is possible re-write symlinked document root resolved absolute path? in other words, let's assume have following directory structure: /www/current -> /www/tags/a /www/tags/a /www/tags/b so /www/current symlink points /www/tags/a. if /www/current document root, possible re-write file path /www/tags/a, file being served no longer following symlink, serving file @ full absolute path? note not asking followsymlinks . want re-write served file full absolute path. background info so may asking, why care this? well, there appears issue symlinked paths when serving php content. if use symlink part of deploy process, , flip @ exact wrong time, appears apache read previous file, , yet php instantiate magic constants such __file__ resolved new directory. so in previous example, race condition play out follows: 1) apache receives request /www/current/myfile.php 2) apache/mod_php reads file /www/tags/a/myfile.php 3) symlink gets flipped /www/current ->

if statement - Perl If-Elsif-Else always going to else -

i have block of code in larger program suppose take letter (a...d) , convert number (0...3). reason jumps down else. here code: $aa = shift @filearray; chomp($q); chomp($a1); chomp($a2); chomp($a3); chomp($a4); chomp($aa); print "1:$aa\n"; #convert answer number $ab = 0; if ($aa eq "a") { $ab = 0; } elsif ($aa eq "b") { $ab = 1; } elsif ($aa eq "c") { $ab = 2; } else { $ab = 3; } print "2:$ab\n\n"; the output along lines of 1:b 2:3 1:a 2:3 1:d 2:3 1:c 2:3 1:d 2:3 1:b 2:3 1:b 2:3 1:a 2:3 1:d 2:3 now realize @ point subtract 65 ascii value, still want know...what happening? maybe $aa contains invisible characters (whit

excel vba - Run time error 91 in vba -

private sub commandbutton1_click() dim rng range dim range dim cell range dim hvalue double dim svalue double set rng = selection hvalue = 0 svalue = 0 each cell in rng next cell if cell.value > hvalue hvalue = cell.value 'here run time error 91 each cell in rng next cell if cell.value < hvalue , cell.value > svalue cell.value = svalue msgbox "hvalue= " & hvalue & "svalue=" & svalue end sub your error because variable cell valid locally inside loop , if statement outside loop. move if statements inside loop this. private sub commandbutton1_click() dim rng range dim range dim cell range dim hvalue double dim svalue double set rng = selection hvalue = 0 svalue = 0 each cell in rng if cell.value > hvalue hvalue = cell.value next cell each cell in rng if cell.value < hvalue , cell.value > svalue cell.value = svalue next cell msgbox "hvalue=

python - PyQt4: Replace QWidget objects at runtime -

in application have replace qlineedit elements customized qlineedit. there different solutions: modify generated py file pyuic4 , replace there qlineedit objects 1 lineedit. solution not best, because every time run pyuic4 lose modification did generated output file. write new class search recursively inside window or dialog qlineedit widget types , replace them 1 lineedit. solution better. allows me same other objects or extend want without care dialog or window. so far, write module (widgetreplacer) search recursively qgridlayout items , search if there qlineedit children. if yes, replace one. the problem when try access 1 of lineedit objects following error: runtimeerror: wrapped c/c++ object of type qlineedit has been deleted and if @ output notice modified qlineedit object has sitll old id: old qt_obj <pyqt4.qtgui.qlineedit object @ 0x0543c930> replaced txt_line_1 lineedit new qt_obj <lineedit.lineedit object @ 0x0545b4b0> ---------------------------

html - Form fields render different on different devices -

i working on site has responsive design facing rendering issue forms fields on different devices & browsers. for firefox on phone , tab (android) renders form fields differently either come rounded edges or gradient style. how can make them same simple rectangle border. css had applied is input { box-sizing: border-box; -moz-user-input:none; -moz-user-select:none; border: 1px solid #ccc; font-size: 12px; height: 30px; line-height:30px; vertical-align:middle; padding-left: 5px; color:#687074; } select { border: 1px solid #ccc; font-size: 13px; height: 36px; line-height:36px; vertical-align:middle; padding-left: 5px; color:#687074; } i tried of open still come differently. i have setup example on jsfiddle frame editable version these form fields come show or gradient inside fields. how can remove , make simple with border of 1px try adding: input:focus, select:focus { outline: none; } input, select{ -webkit-appearance: none; border-r

sql - Replacing Strings in Oracle 8i Query -

i've got table in oracle 8i value | timestamp kkq | 10:00 kvkk | 11:00 kmpe | 12:00 ppkkpe | 13:00 and need replace kv v , km m , pe r , pp n , p l when querying these values. what's best way it? problem see can have combination of strings in value column... values can have there are: kk, q, kv, v, km, m, pe, r, pp, n, p, l . select replace( replace( replace( replace(<input>, 'kv', 'v'), 'km', 'm'), 'pe', 'r'), 'pp', 'n') ....

java - Ant Script importPackage does not work after upgrading to ant 1.9.2 -

just upgraded eclipse luna contains ant 1.9.2 , <script> targets stopped working in code: <script language="javascript"><![cdata[ importpackage(java.net); importpackage(java.io); ... error message: javax.script.scriptexception: referenceerror: "importpackage" not defined in <eval> @ line number 2 what version of java running? rhino has been replaced in java 8. the following bug might problem: jdk-8025132 .

R S4 .Data inheritance error -

i have 3 packages, pkga (defines class 'a'), pkgb (defines class 'b') & pkgc (defines class 'c' , class 'broken'). inheritance diagram looks this: pkga class | --------- | | pkgb class b | | | pkgc class c class broken the definition of 'broken' is: setclass('broken', representation('a', content = 'list')) when try create new one, error: > library(pkgc) > new('broken', content = list()) error in validobject(.object) : invalid class “broken” object: error in getdatapart(<s4 object of class structure("broken", package = "pkgc")>) : data part undefined general s4 object does know going on? else able reproduce problem? i noticed that: > getclass('broken') class "broken" [package "pkgc"] slots: name: .data content class: list exte

delphi - Good use for RTTI -

i have been reading new book coding in delphi nick hodges. finished chapters on rtti , attributes, , understanding of basics of rtti, wondering if has examples of using rtti , or attributes. a starting point delphi.about.com . can search on stackoverflow see questions delphi , rtti tags, see on different users here used rtti.

ruby on rails - How to identify mandrill webhook -

i have rails 4 application sends emails using mandrill. trying detect weather mail opened or bounced, using webhooks this. receive webhooks, can't tell of them identify particular email database. i've tried using this def send_message(email) mail( from: ..., to: ..., subject: ...) headers["x-mc-autohtml"] = "true" headers["x-mc-track"] = "opens" headers['x-mc-mergevars'] = { "id" => some_id }.to_json end but i'm not sure if i'm supposed receive x-mc-mergevars ( i've understand docs) unfortunately, it's not working. do have ideas or alternative solution? thanks i've figured out myself. this line needs there headers['x-mc-metadata'] = { "user_id" => user.id}.to_json here further details: http://help.mandrill.com/entries/21786413-using-custom-message-metadata hope helps since cost me several hours.

c# - MySql.Data.Entity version 6.7.4.0 schema is not valid -

i have tried build project , i'm getting error schema specified not valid. errors: models.context.storemanager.ssdl(2,92) : error 0004: not load file or assembly 'mysql.data.entity, version=6.7.4.0, culture=neutral, publickeytoken=c5687fc88969c44d' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040) any ideas anyone? i'm using c# mvc

ios - User adding rows/sections to static cells in Table View Controller -

i'd create screen similar "new contact" screen of iphone contacts app. there little green '+' signs next "add phone", "add email", etc. when user clicks on these, new rows (or in case of "add address", suppose new sections) created. how can create similar behaviour in table view controller? thanks, daniel here example how add lines tableview: // holding data nsmutablearray* data; - (nsinteger)numberofsectionsintableview:(uitableview *)tableview { return [data count]; } - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { return [[data objectatindex:section] count]; } - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { //if want add section 1 row: nsmutablearray *row = [[nsmutablearray alloc] init]; [row addobject:@"some text"]; [data addobject:row]; [tableview reloaddata]; //if want add row

database - Is this table 4NF? -

i'm trying design database. have table follows: tag post file 1 2 3 b 4 b 1 b b 1 b c 1 b d 1 each post may have more 1 tag , each file may have more 1 tag. aside tags posts , files unrelated. looking @ table there going redundancy issues example post-tag pair a-a repeated 3 times unnecessarily, same post-file pair b-1. i've looked @ definitions 1nf 4nf , seems in of them. what did miss? i thought if table had redundancies it's not normalized. seem normalized 4nf. must have gone wrong somewhere. based on description should break down table 2 tables model one-to-many relationship between "post , tag", , "file , tag" post tag b a b b b c b d b file tag 1 2 3 4 b 1 b 1 c 1 d take @ first example here: http://en.wikipedia.o

c++ - Change pixels between similar pixels on image -

i want average pixel color between 2 similar pixels. white pixels between black pixels should become black , vice versa. rule must apply in directions. complete example of should happen: horizontal: □■□ -> □□□ vertical: □ -> □ ■ -> □ □ -> □ ■□■ -> ■■■ ■ -> ■ □ -> ■ ■ -> ■ □■□ -> □□□ -> □□□ ■■■ -> ■■■ -> ■□■ ■□■ -> ■□■ -> ■□■ can opencv this? can make algorighm this? tried: while(i<image->width){ while(j<image->height){ if(pixel[i,j-1] == pixel[i,j+1]){ pixel[i,j] = pixel[i,j-1]; }else if(pixel[i-1,j] == pixel[i+1,j]){ pixel[i,j] = pixel[i-1,j]; } j++; } i++; } you didn't access image pixels correctly. for gray-scale image (in example, mat pixel ), access pixel, should use: pixel.at<uchar>(j, i) = ...;

My Android App compatibility Issue -

i have developed 1 application running till android 4.1.1 version. whenever run same application in android 4.2.2 version showing error message. this manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.autodial4" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="19" /> <supports-screens android:largescreens="true" android:normalscreens="true" android:smallscreens="true" android:xlargescreens="true" android:resizeable="true"/> <uses-permission android:name="android.permission.receive_boot_completed" /> <uses-permission android:name="

actionscript 3 - Flex & Java socket programming -

i new flex. please can 1 give flex socket programming example both sides flex , java i trying objectoutputstream in java server side , java client side work fine. but in flex fail read & write object in stream please can 1 can me? flex , java possible. i have a flex , perl multiplayer card game (for desktop , mobile) , works fine since 4 years already. for game send gzipped json data using writeutf actionscript method (i use com.brokenfunction.json.encodejson historical reasons, use native json function): try { // send length of string in bytes followed string _socket.writeutf(encodejson(obj, null, true, true)); _socket.flush(); } catch(e:error) { trace('fetch socket send: ' + e); } on server side first read 2 bytes containing data length. also have handle adobe socket policy , can use my open sourced apache module written in c (for easier start there a perl script included).

youtube - How to manage Google Developer Console registration for a multi-instance architecture? -

we have application deploy on separate instances each of our customers in multi-instance architecture. developing feature utilize youtube data v3 api on server, need server api key access public information youtube videos. example, might make call this: get https://www.googleapis.com/youtube/v3/videos?part=snippet&id=jofnr_wkoce&key={your_api_key} using google developer console, can manually generate 1 such key given have created project in dashboard: {your_api_key} my understanding key used track usage , enforce quota out of our alotted 50,000,000 reqs/day. question is, what appropriate registration practice multi-instance applications? should use separate projects each tenant? should use single project, separate applications (generating new keys) each tenant? should use single project , single application, specify userip or quotauser parameters when making api calls distinguish instances? my question motivated desire understand 1) how quota limits cha

jersey - What is the difference between starting with exec:java and starting the package created with the maven-assembly-plugin? -

i created first web application following jersey user guide artifact jersey-quickstart-grizzly2. seems work expected: starting project using maven (mvn java:exec) or starting eclipse can call rest api c++, javascript etc... now run web application on platform, used maven-assembly-plugin create jar containing whatever need run same application. create package using command: mvn clean compile assembly:single and jar compiled. if try run with: java -jar target/myjar.jar it seems start appropriately. if call rest api client, see logs indicating methods invoked expected, response 500. method invoked instance: @get @produces(mediatype.application_json) public list<mttask> gettasks() { mtlog.info("processing request."); return new linkedlist<mttask>(); } this output of curl: $ curl -x -v http://localhost:8080/myapp/tasks * adding handle: conn: 0x11d4c30 * adding handle: send: 0 * adding handle: recv: 0 * curl_addhandletopipeline: length: 1 * -

mysql - Is there any rules that which part of sql statement clause can be used in condition/case expression? -

the select clause/where clause in select statement seems can use if/case expression which have see many times. can statement used if/case expression? alter table drop foreign key xxx if not then, there rules sql statement/clause can used in if/case expression? any expression returns boolean value i.e. true / false can used in or if/else clause.

linux - mkdir system call with variable (C) -

i'm new linux system programming. task is: create system variable "my_dir" valuable "lab01" , create file inside it. i've created folder, can't create file using varialble putenv("my_dir=lab01"); mkdir_ret_code = mkdir(("/home/alexander/%s",getenv("my_dir")),0777); how solve problem? use array , use these functions http://linux.die.net/man/3/string

javascript - How to dynamically change CSS class of DIV tag? -

i using javascript. have variable (var boolval) that either evaluates true/false. on page have a div tag. <div id='div1' class="redclass"></div> based on value of var boolval , want change css class of div tag blueclass. for example: present class makes div color red, new class should make page blue @ runtime without need page refresh. can achieve in simple javascript? can use document.getelementbyid("myelement").classname = "myclass"; ? or should use addclass ? you can add css class based on id dynamically follows: document.getelementbyid('idofelement').classname = 'newclassname'; or using classlist document.getelementbyid('idofelement').classlist.add('newclassname'); alternatively can use other dom methods queryselector queryselectorall getelementsbyclassname getelementsbytagname etc find elements. last 3 return collection you'll have iterate on , apply class

javascript - highcharts, bar chart legend with verticalAlign top not working -

i made bar stacked chart using highcharts , want legend on top, used attribute verticalalign value top didn't work ! here jsfiddle http://jsfiddle.net/rchod/sbtt6/ $(function () { $('#container').highcharts({ chart: { type: 'bar' }, legend: { align: 'right', verticalalign: 'top', x: 0, y: 100 }, credits: { enabled: false }, title: { text: '' }, xaxis: { labels: { enabled: false }, categories: [''] }, yaxis: { labels: { enabled: true }, min: 0, title: { text: '' } }, legend: { backgroundcolor: '#ffffff', reversed: true }, tooltip: { enabled: false }, plotopti

delphi - IdTCPClient cannot connect through weak internet connections -

i have simple procedure uses tidtcpclient connect server. purpose try reach server , block thread until connection established. works stable internet connections. problem is, when client executed on computers (all of these computers have slow or unstable internet connection mobile 3g or in small distant towns), fails connect "connect timed out" exception. @ same time abovementioned computers run browsers, im clients, etc, , these applications work fine. server application shows no sign of new client. here procedure: procedure connecttoserver; begin entercriticalsection(cs_connect); try while not client.connected begin log('connection attempt...'); client.port := <port goes here>; client.ipversion := id_ipv4; client.host := '<ip address here>'; client.connecttimeout := 11500; try client.connect; except on e: exception log('exception: ' + e.tostring);

python - Recording with valve in my gstreamer pipeline -

i have problem valve in pipeline : self.pipeline = gst.parse_launch(' ! '.join(['autoaudiosrc', 'queue silent=false leaky=2 max-size-buffers=0 max-size-time=0 max-size-bytes=0', 'audioconvert', 'audioresample', 'audio/x-raw-int, rate=16000, width=16, depth=16, channels=1', 'tee name=t', 'queue', 'audioresample', 'audio/x-raw-int, rate=8000', 'vader name=vader auto-threshold=true', 'pocketsphinx lm=%s dict=%s name=listener' % (dir_path

css - Bootstrap horizontal scrollable tab bar -

i creating app in bootstrap 3 tab bar. dynamically adding , removing tabs. works great, though have tab bar horizontally scrollable through tabs if there many tabs fit in width of app instead of creating multiple rows or tabs. has done or have idea how implement this? here example: (not working in snippet reason, here link bootply : http://www.bootply.com/orouamwsg1 ) .nav-tabs { overflow-x: auto; overflow-y: hidden; display: -webkit-box; display: -moz-box; } .nav-tabs>li { float: none; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" /> <div class="container"> <div class="col-md-4"> <div class

sorting - How do I sort a string in alphabetical order in Python? -

i know there sort function: >>> = 'bags' >>> ''.join(sorted(a)) 'abgs' however, need write mine scratch. think use mergesort i'm not sure how work string in python. e.g., can compare characters? can find middle of string somehow? i'm using python 3.4. yes compare characters. b > evaluates true in python, , forth. you first convert string list, , it's middle via length, sequential comparison , join sorted list sorted string.

java - multiply a 2d array by a 1d array -

i've initialized 1d , 2d array , want able perform matrix multiplication on them. however, i'm not quite getting proper answer. think i've mixed loop try ensure multiply correct values, can't quite hang of it. edit: i've fixed it, misunderstanding length method of 2d array returned (thought returned columns , not rows). below code corrected code. everyone. public static double[] getoutputarray(double[] array1d, double[][] array2d) { int onedlength = array1d.length; int twodlength = array2d[0].length; double[] newarray = new double[array2d[0].length]; // create array contain result of array multiplication (int = 0; < twodlength; i++) { // use nested loops multiply 2 arrays double c = 0; (int j = 0; j < onedlength; j++) { double l = array1d[j]; double m = array2d[j][i]; c += l * m; // sum products of each set of elements } newarray[i] = c; } return newarray; //

c++ - When to use mutexes? -

i've been playing around gtkmm , multi-threaded guis , stumbled concept of mutex . i've been able gather, serves purpose of locking access variable single thread in order avoid concurrency issues. understand, seems rather natural, still don't how , when 1 should use mutex . i've seen several uses mutex locked access particular variables (e.g. like tutorial ). type of variables/data should mutex used? ps: of answers i've found on subject rather technical, , since far expert on looking more conceptual answer. if have data accessed more single thread, need mutex. see like themutex.lock() do_something_with_data() themutex.unlock() or better idiom in c++ be: { mutexguard m(themutex) do_something_with_data() } where mutexguard c'tor lock() , d'tor unlock() this general rule has few exceptions if data using can accessed in atomic manner, don't need lock. in visual studio have functions interlockedincrement() this. gcc has

javascript - Laravel/Angularjs: Insert into pivot table with less queries -

i succeeded @ creating simple "add topic" form test laravel's pivot operations. consists of title, body , tag checkboxes. models post , tag , pivot posttag . after reading laravel documentation on updating pivot tables, seems me i'm making way many queries create new topic , update pivot's table. also, way pass on checkbox values (tags) seems kind of sloppy me. here angular controller: app.controller('newpostcontroller', function($scope, $http) { $scope.selection = []; $http.get('/new_post').success(function(tags) { $scope.tags = tags; }); $scope.toggleselection = function toggleselection(tag) { var idx = $scope.selection.indexof(tag); // selected if (idx > -1) { $scope.selection.splice(idx, 1); } // newly selected else { $scope.selection.push(tag); } }; $scope.addpost = function() { $scope.post.selection = $scope.selection; $http.post('new_post

How to return success sending an email laravel -

i trying give mail success response in laravel. here route: route::get('/contatti/','itemcontroller@contatti'); route::post('/contatti/mail','itemcontroller@mail'); here method public function mail() { $data = input::all(); $rules = array( 'nome' => 'required', 'email' => 'required', ); $validator = validator::make($data, $rules); if($validator->fails()) return redirect::to('contatti')->witherrors($validator)->withinput(); $emailcontent = array ( 'nome' => $data['nome'], 'email' => $data['email'], ); mail::send('emails.contactmail', $emailcontent, function($message){ $message->to('xxxx @mail.com','')->subject('contatti'); }); $success='ok'; return redirect::back()->with('success',$success); } html @if(isset($success)) <div> email invi

objective c - In app purchase - how to make "Yes" button be "Buy" -

Image
i want rename "yes" button in uialertview "buy". here codes. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:@"cell" forindexpath:indexpath]; skproduct * product = (skproduct *) _products[indexpath.row]; cell.textlabel.text = product.localizedtitle; [_priceformatter setlocale:product.pricelocale]; cell.detailtextlabel.text = [_priceformatter stringfromnumber:product.price]; if ([[rageiaphelper sharedinstance] productpurchased:product.productidentifier]) { cell.accessorytype = uitableviewcellaccessorycheckmark; cell.accessoryview = nil; } else { uibutton * buybutton = [uibutton buttonwithtype:uibuttontyperoundedrect]; buybutton.frame = cgrectmake(0, 0, 72, 37); [buybutton settitle:@"buy" forstate:uicontrolstatenormal]; buybutton.tag = indexpath.row; [buybutton addtarget:self action:@

c# - Make the popup modal window Scrollable in JQuery -

i need make popup window using jquery scrollable. tell me please did miss in following code $("#dvenglish").dialog({ modal: true, width: '1300px', draggable: true, autoopen: false }); the html is: <div title="search english" id="dvenglish"> <uc1:englishpopup id="englishpopup1" runat="server" /> </div> the question has been updated. in advance from documentation : if content length exceeds maximum height, scrollbar automatically appear. so pass in maxheight , make sure have enough content cause need scroll bars. $("#dvenglish").dialog({ modal: true, maxheight: 500px, width: '1300px', draggable: true, autoopen: false }); by way, idea check documentation before coming stack overflow.