Posts

Showing posts from March, 2013

Weird Java runtime error -

i keep getting error during runtime , have no idea causing it. believes there file missing? caused by: java.io.filenotfoundexception: c:\program files\java\jdk1.7.0_07\lib\currency.data what currency.data , can suggest why happening, jdk isn't old since we're in 7u17 now. exception in thread "awt-eventqueue-0" java.lang.internalerror @ java.util.currency$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.util.currency.<clinit>(unknown source) @ java.text.decimalformatsymbols.initialize(unknown source) @ java.text.decimalformatsymbols.<init>(unknown source) @ java.text.decimalformatsymbols.getinstance(unknown source) @ java.text.numberformat.getinstance(unknown source) @ java.text.numberformat.getnumberinstance(unknown source) @ java.util.scanner.uselocale(unknown source) @ java.util.scanner.<init>(unknown source) @ java.util.scanner.<init>(unknown sour

How to get number of rows in a SQL Server 2008 query -

how number of rows sql query? i tried : set @records = count(*) select * [inventory].[tbl_receipts] field_tag = '1234' but giving 1. wrong above code? actually there no row, should give output 0 when execute select * [inventory].[tbl_receipts] field_tag = '1234' it giving result 0 use set @records = (select count(*) [inventory].[tbl_receipts] field_tag = '1234')

php - How to merge the output of two associative arrays with no unique keys? -

i've got feeling stuck seemed trivial task. please take @ $data array. data skeleton multilevel menue. $data['name'] contains names given menue points/buttons , $data['url'] corresponding links. array dimensions $data['name'] , $data['url'] in sync - exact same nodes, same element count , on. having started write simple output function - names first. know code isn't pretty works. beat me mind aches when mentioning recursion ;) nevertheless primitive way leads proper output. in second step needed add url information corresponding names/buttons fail , begun feel dumb. while iterating through $data['name'] need pointer current element , use corresponding url $data['url'] nope - associative array way leads dead end. keys aren't unique way ... easy sigh array shortened version of original 1 generated 150 pages long word document still growing , changing. any ideas how output button-names + corresponding url

database - Mass insert data at end of MySQL field -

how go mass inserting ending </div> tag defined field name in mysql? thanks heaps. consider using concat command: update jos_content set fulltext = concat( fulltext, '</div>' ) id = 7; if wanted update records in single query, remove clause above. please note, depending on server side language you're using, you'll want setup parameterized query prevent sql injection or other hacks.

java - wait( ) function not running properly -

i new using wait( ); feature. thought had right, not run. cannot figure out went wrong looking @ examples. can me out, please? in advance! public class mainactivity extends activity { private imageview splash; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.splash); initialize(); } private void initialize() { splash.setvisibility(view.visible); try { wait(5000); } catch (interruptedexception e) { e.printstacktrace(); } mainmenu(); } private void mainmenu() { setcontentview(r.layout.mainmenu); } logcat: 04-04 23:08:40.075: e/trace(2555): error opening trace file: no such file or directory (2) 04-04 23:08:48.345: e/androidruntime(2555): fatal exception: main 04-04 23:08:48.345: e/androidruntime(2555): java.lang.runtimeexception

php - AJAX Query for Multiple Dynamic Forms with varying ID's -

this in header, jquery.min.js included: <script type="text/javascript"> //<![cdata[ $(function() { $("form.ajax").submit(function(e) { var $this = $(this); e.preventdefault(); $.ajax({ url: 'index.php', type: 'post', data: $this.serialize(), success: function() { //alert(response); } }) return false; }); }); //]]> </script> this example form dynamically generated: <form id="dash_73" method="post" class="ajax"> <fieldset> <input type="hidden" name="action" value="ajax_purchase_ticket" /> <input type="hidden" name="lottery_id" value="73" /> <div class="left1"> <button type="submit" name="dash" form="dash_73" id="button_73-1" v

php - Mysql get column names then results -

say have query information in particular database have different schemas. for example, may have: db1 [id] [blah] [shibby] & db2 [id] [yadda] [etc] [andsoforth] then run query needs return: a) field names table header b) results table cell the query generated form via post in order set variables determine database information from. the below me column names, need populate remainder actual results. echo "<table>"; echo "<tr>"; $qcolumnnames = mysql_query("show columns ".$db) or die("mysql error"); $numcolumns = mysql_num_rows($qcolumnnames); $x = 0; while ($x < $numcolumns) { $colname = mysql_fetch_row($qcolumnnames); $col[$colname[0]] = $colname[0]; $x++; } foreach($col $key){ echo "<th>$key</th>"; } echo "</tr>"; echo "</table>"; you database, mean fields table? have first part - get column names - , implode string array

javascript - Drawing with request animation framemaximum callstack exceeded? -

i making own little canvas library because have time kill , trying animate canvas objects, method looks so; proto.update = function () { (var = 0; < this.objects.length; ++i) { this.objects[i].draw(this.context); } var self = this; requestanimationframe(self.update()); }; i have not use requestanimationframe before , error saying maximum callstack exceeded . i followed tutorial http://creativejs.com/resources/requestanimationframe/ , quite sure have made no mistakes. what did wrong? the callback parameter passed requestanimationframe should reference function call when it's time next repaint (see documentation here ). error have included parenthesis after function name means executes causing recursive loop. try updating code follows: proto.update = function () { (var = 0; < this.objects.length; ++i) { this.objects[i].draw(this.context); } var self = this; // pass function reference don't

c# - Velocity at an angle -

i'm trying find velocity @ angle. to i'm trying use triangle, i'm running road blocks. this code moves object velocity = new vector3((float)math.cos(mathc.angletopoint(enemyobject.transform.position, playerposition)), (float)math.sin(mathc.angletopoint(enemyobject.transform.position, playerposition)), 0); this angletopoint method public static double angletopoint(vector3 startingpoint, vector3 endpoint) { double hypotenuse = linelength(startingpoint, endpoint); double adjacent = linelength(startingpoint, new vector3(endpoint.x, startingpoint.y, 0)); double opposite = linelength(endpoint, new vector3(endpoint.x, startingpoint.y, 0)); double angle = adjacent / hypotenuse; return math.acos(degreetoradian(angle)); } and linelength method public static float linelength(vector2 point1, vector2 point2) { return math.abs((float)math.sqrt(math.pow((point2.x - point1.x), 2)+math.pow((point2.y - point1.y),2))); } i gettin

asp.net - How do I put hint in a asp:textbox -

how put hint/placeholder inside asp:textbox? when hint mean text disappears when user clicks on it. there way achieve same using html / css? the placeholder attribute you're looking placeholder attribute. use other attribute inside asp.net control: <asp:textbox id="txtwithhint" placeholder="hint" runat="server"/> don't bother ide (i.e. visual studio) maybe not knowing attribute. attributes not registered asp.net passed through , rendered is. above code (basically) renders to: <input type="text" placeholder="hint"/> using placeholder in resources a fine way of applying hint control using resources . way may have localized hints. let's have index.aspx file, app_localresources/index.aspx.resx file contains <data name="withhint.placeholder"> <value>hint</value> </data> and control looks like <asp:textbox id="txtwithhint" meta:res

entity framework 5 - DatePicker.Value.Set Error binding to datasource -

i have bindingsource control called binding, on form in vs2012, , datetimepicker control bound it. for binding properties have mindate = 1/01/1753 , maxdate = 31/12/9998 value has been set picking today calender 5/04/2013 11:27 am i set bindingsource using var dset = base.context.contactevents; var qry = dset.where(p => p.id > 0).orderby(x => x.id); qry.load(); this.bindingsource.datasource = dset.local.tobindinglist(); the bindingsource used in following manner; public void refreshbindingdatasourceandposition(bindingsource binding) { binding.datasource = this.bindingsource.datasource; // error raised here binding.position = this.bindingsource.position; } the error information system.argumentoutofrangeexception crossed native/managed boundary hresult=-2146233086 message=value of '1/01/0001 12:00:00 am' not valid 'value'. 'value' should between 'mindate' , 'maxdate'. parameter name: value

sql - Building interactive WHERE clause for Postgresql queries from PHP -

i'm using postgresql 9.2 , php 5.5 on linux. have database "patient" records in it, , i'm displaying records on web page. works fine, need add interactive filters display types of records depending on filters user engages, having 10 checkboxes build ad-hoc clause based off of information , rerun query in realtime. i'm bit unclear how that. how 1 approach using php? all need recieve data of user's selected filters $_post or $_get , make small function loop concatenate way query needs it. something this... in case have 1 field in db match with. it's simple scenario , more fields you'll need make add field need in each case, nothing complex. <?php //recieve filters , save them in array $keys[] = isset($_post['filter1'])?'$_post['filter1']':''; //this sends empty if filter not set. $keys[] = isset($_post['filter2'])?'$_post['filter2']':''; $keys[] = isset($_post['

node.js - which javascript template engine is nest suited to generate JSON -

both mustache , handlebars awesome. them both individual simplicity , excellence. mustache because it's 1 template works in lots of places , handlebars because provides few more features. the challenge have seem have been implemented output html or other document structure tags in pairs , there no separators. to further clarify, if have array of items output in list works well: <ul> {{#each items}} <li>{{name}}</li> {{/each}} </ul> this works great. if want output json-like: [ {{#each items}} { name:{{name}} } {{/each}} ] this not work because json requires there commas separating items in list. , cannot put comma after innermost '}' because cause error too. there several posts/recommendations people have requested optional separator attribute added #each or adding #join. 1 committer said should implemented plug-in because core needs simple. the politics aside. being able format javascript object json string

java - ListView not working? -

working in group make android app, need create activity consisting of listview displays several selectables (adapted string array) -- listview take array of objects we're making, , depending on objects available on our server @ time, array of objects going change (and thus, entries of listview change). now, need working array of strings. so, here's activity's xml, , java main. <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center"> <listview android:id="@+id/gameslistview" android:layout_width="match_parent" android:layout_height="320dp" android:entries="@+id/gameslist" > </listview> <button android:layout_width="fill_parent&qu

javascript Change page background color with button -

i trying figure out how code changing background color of page button so have code button written out , function im having trouble figuring out code use make button change color of entire page <script> function changecolor() { }; function changetext() { alert ("change text in part"); }; function sendmsg() { alert ("change msg content here"); } </script> <body> <h1>welcome program!</h1> <button onclick="changecolor()">color</button> <button onclick="changetext()">text</button> </br> <p>can ask ive wanted ask real batman?</p> </br> <input type="text" name=""> </body> document.body.style.background = color; there's not more it, it's simple that!

ruby - Rails: How To Track Down A Method Called On An Array That Has No Such Method? -

i'm trying figure out in rails application. have class site has themes (of class theme) , when site uploads theme can install specific site. i'm tracking down code , see calls method 'build' this: @theme = @current_site.themes.build(params[:theme]) the themes method returns array of theme objects associated site. in rails console tried (result included): >> site.themes.method(:build).__file__ nameerror: undefined method `build' class `array' and tried this: >> site.themes.respond_to? :build => true so question twofold, how can find out 'build' defined can understand how works?, , can explain me how method 'build' works in terms of being able called @ end of array object has no such method? thanks! given site model has_many :themes , 1 of association methods automatically gets added association. if want more reading material, check out association basics guide (for example, section on has_many assoc

How design Employee table for many phone numbers? -

let's you're designing employee table , have accommodate different phone numbers.. home, work, , cell suppose there others in future. let's business cares know kind of cell phone each employee uses. how design it? here's denormalized way. simple, means adding column new phone type: employee employeeid employeelastname employeefirstname employeehomephone employeeworkphone employeecellphone cellphoneid cellphone cellphoneid cellphonemake cellphonemodel here's more normalized/extensible way, there's figuring out put cellphone make/model info phone numbers of type = cell (but not type = home or work): employee employeeid employeelastname employeefirstname employeephone employeephoneid employeephonenumber phonetypeid phonetype phonetypeid phonetypename cellphonetypeid <-- that's null non-cell numbers? seems bad design. my tendency lean toward extensible (though more complex) toward simple (but less exte

php - Image Not Uploading - Codeigniter -

i have problem uploading image in codeigniter app i'm working on. code working when on pc (ubuntu) fine, it's given in tutorials. when i'm trying in (centos) server, it's giving error "you did not select file upload.". just reference, i'll paste code here. controller- upload1.php <?php class upload1 extends ci_controller { function __construct() { parent::__construct(); $this->load->helper(array('form', 'url')); } function index() { $this->load->view('upload_form1', array('error' => ' ' )); } function do_upload() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '

How can I use media-queries to load a javascript file from HTML -

is possible (and if how) have media query load different javascript file html depending on browser size? something along lines of this? <script media="screen , (max-width: 900px)" src="/js/menu_home.js" type="text/javascript"></script> or found on internet didn't load either file <script> function require(path) { try{ document.write('<script type="text/javascript" src="'+path+'"><\/script>'); } catch(e) { var script = document.createelement('script'); script.src = path; document.getelementsbytagname('head')[0].appendchild(script); } } if (ismedia("screen , (max-width:900px)"){ require('/js/menu_home.js'); } else { require('/js/menu_photo.js'); } </script> on website http://www.kujawadesigns.com/web/where_art_thou/ have set load different script files allow accordion menu expanded on right category.

jsf 2 - jsf 2 ui:include .html give error "XML Parsing Error: no element found" -

i include header.html (not .xhtml) page, when preview page, give me error "xml parsing error: no element found". know tag no closed issue, since header page html file, not xhtml file, shouldn't must close tag, right? if close meta tag in header.html, page working fine, wish know must close tag in html file if include them in jsf2, thanks. header.html <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <title>header</title> <meta name="description" content=""> </head> <body>header content</body> </html> welcome1.xhtml <ui:include src="header.html" /> <p>welcome page</p> from oracle's documentation , <ui:include> used encapsulate , reuse content among multiple xhtml pages . src attribute expected point well-fo

python - Return statement not executing -

hey guys have problem , return statement not executing. sudo code. searches tree see if item in tree. def search(self, i): if left child none , right child none if self.data == i: return true else: pass elif self.data == i: return true else: if left child exists: return self.left.search(i) if right child exists: return self.right.search(i) the code seems work except when self.data == i , code not run return true statement though if statement executed. know why is? in advance! edit: added self parameter. supposed there, typo.. i inserted numbers 3, 8, 2 , 1 tree , searched 1. added print statement if left child none , right child none: if self.data == i: print('self.data == i') return true added print statement when searching 1 , print statement did print means if statement executed, however, return true statement not execute i imagine you're trying binar

backbone.js - Unable to initialize new marionette router -

i trying create new app router within 'products' module shown below using marionette @myapp.module "productsmodule", (productsmodule, app, backbone, marionette, $, _) -> class productsmodule.router extends marionette.approuter approutes: "products" : "listgoods" api = listgoods: -> console.log('list goods') app.addinitializer -> console.log('init app router') new productsmodule.router controller: api the higher level app code follows @myapp = (backbone, marionette) -> app = new marionette.application app.addregions headerregion: "#header-region" mainregion: "#main-region" footerregion: "#footer-region" app.on "initialize:after", (options) -> if backbone.history backbone.history.start root: '/admin/' app however after trying run, approuter products module did not run i.e. console.log did not print out console

sharepoint - Can we query and fetch data from LIST between different subsites using CAML Query.? -

have list created under 1 site, can same list used fetch data other site using caml query.? eg: consider list "xxx" created under sitepages/aaa/lists/ can access list "xxx" other site i.e sitepages/bbb/ to summarize, possible access list across parent , child sites, vice-versa. thanks in advance yes it's possible. condition have same domain (for example http://mydomain.com/sitepages/aaa/ , http://mydomain.com/sitepages/bbb/ ). then, sharepointplus library ( http://aymkdn.github.io/sharepointplus/symbols/%24sp%28%29.list.html#.get ) javascript api (if on http://mydomain.com/sitepages/aaa/ * site) : $sp().list("listname","http://mydomain.com/sitepages/bbb/").get({ fields:"title" }, function getdata(data) { (var i=0; i<data.length; i++) console.log(data[i].getattribute("title")); });

iphone - how to use AES encrption/decryption logic in ios? -

i want aes encryption/decryption logic in ios application. using following things. 1. password 2. iv a file encrypted in java code. file not able decrypt objective-c. in java code use iv , password encryption.now want decrypt objective-c. can 1 able me resolve issue. thanks in advance, senthilkumar there number of opensource libraries available has implementation of aes alogrithm. https://github.com/gurpartap/aescrypt-objc if have correct passowrd(private key) can decrypt library. thanks!

app store - how to create .ipa file from Corona SDK -

please tell me how create .ipa file instead of .app file in corona sdk? , how submit corona application in appstore? i got solution creating . ipa file while creating build file corona . steps given below - step 1 - create .app file step 2 - create folder name "payload" step 3 - compress "payload" folder , rename file name.ipa "payload.zip".

javascript - how to retrieve IMEI no using NativeAndroid/Phone Gap for Blackberry 10 -

i porting android app bb 10.i not able retrieve imei number android porting application ,is there way can use phonegap script file in android app ,by creating local html , using java script retrieve imei number using phone gap using below concept http://developer.android.com/guide/webapps/webview.html#bindingjavascript presently, tried using javascript below retrieve imei no <script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script> </head> <script type="text/javascript"> function showandroidtoast(toast) { android.showtoast('kkkkkkk'); var idno = device.uuid ; var string = device.version; android.showtoast('idno' + string); android.showtoast('string ' + idno); toast = toast + idno; android.showtoast(toast); } </script> i getting value of null,i testing in bb 10 dev alpha device. is there other workaround it? imei not a

php - mysql query name from list id -

i have little problem here... let me explain.. lets have table this... barang ╔══════════╦════════════╦════════════╗ ║ idbarang ║ nama ║ idkategori ║ ╠══════════╬════════════╬════════════╣ ║ 1 ║ ban becak ║ 1,3 ║ ║ 2 ║ velg becak ║ 2,4 ║ ╚══════════╩════════════╩════════════╝ kategori ╔════════════╦══════════════╗ ║ idkategori ║ namakategori ║ ╠════════════╬══════════════╣ ║ 1 ║ ban dalam ║ ║ 2 ║ velg canggih ║ ║ 3 ║ ban keren ║ ║ 4 ║ velg monster ║ ╚════════════╩══════════════╝ and question is.. how fetch result become this ╔══════════╦════════════╦═══════════════════════════╗ ║ idbarang ║ nama ║ idkategori ║ ╠══════════╬════════════╬═══════════════════════════╣ ║ 1 ║ ban becak ║ ban keren,ban dalam ║ ║ 2 ║ velg becak ║ velg monster,velg canggih ║ ╚══════════╩════════════╩═══════════════════════════╝ i try use find_in_set gets nothing... thanks b

HTML - Importance of Double Quotes in HTML Tags -

i have been working html time, question popped in mind when ever give tags <input type = "text" name="c-id" /> <input type =text name=c-id /> with or without quotes there no difference, when working v-studio, ide doesn't put quotes automatically, while working dreamweaver if remember correctly put quotes automatically... what want know @ point\s absence of quotes makes difference or creates problem, , best practice, go quoted or quotes-less... p.s. there chance question has been asked before didn't show in search it makes difference when attribute value contains space, linefeed, formfeed, or tab character, because attribute value end @ 1 of characters if value not wrapped in quotes. from ide point of view, it's little more matter of preference whether add quotes or not when attribute value not contain 1 of whitespace characters.

c# - How to identify the user from windows service? -

this question has answer here: how logged in user name window service 2 answers i have developed windows service sends mail automatically when windows user logs in. want add user's name in body of mail. how can identify user, using windows service? possible? please tell me properties allowed in windows service (c#) can identify user's name. the current user logged on system can extracted follows: string user = system.security.principal.windowsidentity.getcurrent().name; here msdn reference .

c++ - Overload of pure virtual function -

i use pure virtual functions methods required code work well. therefore, create interfaces , other users implement derived classes. derived classes have these virtual functions public while additional methods should implemented private since code not call them. don't know if can considered practice of oop (are there design pattern?). anyway, question is: can user overload pure virtual function? i.e. class base { public: base(); virtual ~base(); virtual void foo(int,double)=0; }; class derived: public base { private: // methods public: derived(); virtual ~derived(); virtual void foo(int, double, double); //this doesn't work }; a solution be: virtual void foo(int,double,double=0)=0; in base class limited. think about? these 2 functions different. latter not overriding first virtual void foo(int,double)=0; virtual void foo(int, double, double); the second 1 new virtual function specific derived. if put override @ end compile complain not

JQuery DataTables with ASP.Net MVC 4 with Custom Buttons -

i want use jquery datatables @ mvc 4 project grid based operations , general listing. after search found jquery datatables , decided use it. @ first everythings seems when came add custom row buttons details, edit , delete problems started. in conventional way adding button row adding code relevant <td> </td> but datatables quite different, got below sample code here https://stackoverflow.com/a/9774102/423699 "aocolumndefs" : [ { "atargets": [0], "fncreatedcell" : function(ntd, sdata, odata, irow, icol){ var b = $('<button style="margin: 0">edit</button>'); b.button(); b.on('click',function(){ document.location.href = odata[0]; return false; });

.net - code writing optimisation -

i have class person, id, name, salary properties. class person friend id long friend name string friend salary decimal end class i wan't make list of salaries. dim plist new list(of person) plist loaded 50 entries dim salarylist new list(of decimal) each p person in plist salarylist.add(p.salary) next ok, works. there way : dim salarylist list(of decimal) = plist(each).salary you can use select projection: dim salarylist = plist.select(function(p) p.salary).tolist() or dim salarylist = p in plist select p.salary note later returns query ( ienumerable(of decimal) ) , not list . if need list , call tolist() on query, not necessary.

android - how to make an UI like an alert dialog and its button(like ok and cancel)works as tabs -

i want make ui similar alert dialog comes on click event , button of ui(eg. ok,cancel) should work tabs. if click on tab1 should load contents of tab1 , on. should tab activity comparatively smaller main activity. try use popupwindow . hope help edit simple example of using popupwindow custom layout edit2 mojo popup_layout <linearlayout android:id="@+id/popup_main" android:layout_width="match_parent" android:layout_height="wrap_content" > <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tv_1" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tv_2" /> <button android:layout_width="wra

Learning Google Prediction API with JSON data -

i've found samples of using google prediction api, there csv data used in sample. want feed prediction api data organized this: [{ number: 1, type: 0, channels: [ [1, 5, 3, ...], [7, 1, 3, ...], [1, 23, 7, ...], [5, 4, 3, ...], [1, 3, 3, ...], [6, 4, 3, ...]] }, ...] is possible learn model such data or have use csv only? no. prediction api has support csv format. write script iterates through instances in json array , converts them comma-separated values.

c# - Windows application error after install -

i'm getting following error after install windows application client machine. works in development machine. system.io.filenotfoundexception: not load file or assembly 'microsoft.office.interop.word, version=14.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c' or 1 of dependencies. system cannot find file specified. file name: 'microsoft.office.interop.word, version=14.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c' thanks in advance. you need install office interop assemblies on target machine. they're available download redistributable link below http://www.microsoft.com/en-us/download/details.aspx?id=3508

Store output from command in variable in Bash. The output is being run instead of stored -

i trying store output command in bash in variable, instead of storing output being interpreted command , run. not want. tmp="$($line | awk '{print $1}')" runs output awk command. echo $line | awk '{print $1}' prints out output want store in variable. how can output second line stored in variable? you're looking this: tmp=$(echo "$line" | awk '{print $1}') but that's useless use of echo . use here-string instead: tmp=$(awk '{print $1}' <<< "$line")

png - FrameBuffer to file inside libgdx or OpenGL -

i trying take screenshots in efficient way. thing using framebuffer efficient way of taking screenshots because can process data in different thread rendering thread. how can information framebuffer , transfer file? framebuffer m_fbo; render(){ m_fbo = new framebuffer(format.rgb565, (int)(w * m_fboscaler), (int)(h * m_fboscaler), false); m_fboregion = new textureregion(m_fbo.getcolorbuffertexture()); m_fboregion.flip(false, true); m_fbo.begin(); ...rendering... m_fbo.end(); writetextureregiontofile(); - need lines of code implementation of method } the framebuffer contents reside in memory managed opengl, (as far understand things) still need fetch bytes using opengl apis on render thread. specifically, want the screenutils class byte[] containing rgba8888 contents of framebuffer . once raw bytes, can compression/conversion/output on different thread, of course. there forum post has quick , dirty png writer. libgdx-specific (?) cim form