Posts

jquery - Pass additional information back through postback -

jquery - Pass additional information back through postback - i having problem using jquery asp.net. have html img , asp:button , asp:fileupload . <img src="images/12345.png" data-id="12345" /> <asp:fileupload id="fup" runat="server" /> <asp:button id="btn" runat="server" /> i trying pass image id html img . thought of how force info element commandargument or something? i can't have html image runat="server", because setting dynamically client-side. plugins i tried using plugins, nil working out way had planned: this 1 takes multiple files, need limited one. don't need back upwards dragging or fancy. http://valums.com/ajax-upload/ uploadify uses flash, trying shy away that. http://www.uploadify.com/ this 1 uses ugly iframes , stuff, not looking nice. also, spelling mistakes on site little off-putting. http://www.phpletter.com/demo/ajaxfileupload-demo/ i...

Java - how to make an image represent which tile to draw in a game? -

Java - how to make an image represent which tile to draw in a game? - i trying figure out how create game draw tile in specific spot using image represent each spot. if pixel of image color reddish specified picture(tile) draw in game, , each pixel greenish stood different specified image. have seen people create games dont know how , dont know name it. if need more info can seek explain want more. please help? that may slower in long run. recommend utilize byte array represent tiles, i.e. byte[width][height]. faster, easier manage , easier extend spritedata[width][height] if single byte not supply plenty info anymore. however, if insist on using image store game data, can utilize following: file file = new file("mygamedata.jpg"); bufferedimage image = imageio.read(file); // getting pixel color @ position x, y (width, height) int colour = image.getrgb(x ,y); int reddish = (colour & 0x00ff0000) >> 16; int greenish = (colour ...

iphone - check if pinch is released in UIPinchGestureRecognizer -

iphone - check if pinch is released in UIPinchGestureRecognizer - how check if pinch has been released? tried - (ibaction)resizeimage:(uipinchgesturerecognizer *)sender { if (sender.delaystouchesended) //here } and didn't work out you need check sender.state == uigesturerecognizerstateended , perchance sender.state == uigesturerecognizerstatecancelled iphone objective-c ios ipad

java - How to show images in motion on browser other than applet -

java - How to show images in motion on browser other than applet - i have been working on project on video surveillance in java through rmi , struts hibernate. in have image frames stored in server database. want show them in motion give video on web browser. since applets run on client can't achive applets.. how can this? you can utilize javascript that. depending on size of images , resolution performance may issue. java image video

flex - Get The Items Under An Expanded Node in AdvancedDataGrid -

flex - Get The Items Under An Expanded Node in AdvancedDataGrid - is there way items under expanded adg tree node? given sample tree node: - atlantic celtics nets knicks sixers raptors + central + southeast + southwest + northwest + pacific i planning capture info in adg's itemopen event. private function myadg_itemopen(event:advanceddatagridevent) :void { // codes set here next teams: // celtics, nets, knicks, sixers, raptors } update: managed pull off codes somehow provides me object containing teams: var ihd:ihierarchicaldata = ihierarchicalcollectionview(myadg.dataprovider).source; if(ihd.haschildren(evt.item)) { var objgetchildren:object = ihd.getchildren(evt.item); var datastring:string = objectutil.tostring(objgetchildren); // here, able parse datastring array, able team name. } you can adg advanceddatagridevent , can seek cast dataprovider ihierarchicalcollectionview . if worked can...

how to include a php function in a class? -

how to include a php function in a class? - i have class: class connect { public function auth() { ... } } and have function: getfile.php <?php require_once($globals['path']."connect.php"); ?> the have the: connect.php <?php function connect( $host, $database ) { database connection here } ?> how can utilize functions within class this: class connect { require_once("getfile.php"); public function auth() { connect( $host, $database ) ... query } } is possible? thanks functions declared in global scope available globally. don't have include need it, include file function in origin of script. secondly, class connect { require_once("getfile.php"); public function auth() { connect( $host, $database ) ... query } } this jibberish; can't execute within class outside of methods. if want included when s...

ios - multiple "content views" on the same xib -

ios - multiple "content views" on the same xib - i have viewcontroller (with navigation) needs show 7 different content layouts. want maintain same background , nav, thing needs change central uiview . if have 7 different uiviews on same xib/storyboard, can hide ones i'm not using or ding performance? using segues won't work either because create mess out of custom navigation , animations. is there improve way accomplish trying do? thanks suggestions solution my design custom using view controller containment decided mimic thought custom uiviewcontroller , 2 uiview s. it's not bad , works rather quickly. you should using view controller containment, can load views separate nib files , still provide custom navigation , animations container view controller. note: supported ios 5. ios