Posts

Showing posts from February, 2011

matlab - Normrnd Function generating same random numbers -

is possible normrnd function of matlab generates same set of random numbers on 2 different machines (when no seed has been set)? it may if both generators seeded same way on both machine (ex. launched @ same time, , seeded current time). actually, mentionned in comment, seeding in matlab not current time, same @ launch if not seeded. if wish reproduce same series of random numbers, may take @ example: can save current seed , reuse later. save current generator settings in s: > s = rng; call rand generate vector of random values: > x = rand(1,5) > x = 0.8147 0.9058 0.1270 0.9134 0.6324 restore original generator settings calling rng. generate new set of random values , verify x , y equal: > rng(s); y = rand(1,5) > y = 0.8147 0.9058 0.1270 0.9134 0.6324 matlab gives possibility choose generator. choosing pseudo random number generator mersenne twister, , seeding same seed @ each run, same series.

java - can JLabel be added to JTextArea? -

Image
is there way add jlabel jtextarea? cause try add didnt work , set visible true, allowed add jlabel inside jtextarea? through append? here current code didnt work jta = new jtextarea(); jta.seteditable(false); jta.setlinewrap(true); jta.setwrapstyleword(true); jta.setfont(new font("calibri", font.plain,16)); jlarray = new jlabel("radsjhkaljk sadf"); jta.add(jlarray); jta.setvisible(true); jsptextfield = new jscrollpane(jta); can append jlabel inside jtextarea each time message added? jtextarea not appropriate swing component insert jlabels or other components within it. can use jtextpane purpose. example , consider code given below: import javax.swing.*; import javax.swing.text.*; import javax.swing.border.*; import java.awt.event.*; import java.awt.*; class jlabeltotextpane extends jframe implements actionlistener { jtextfield tf; jtextpane tp ; jbutton click; styleddocument doc; simpleattributeset attr; public void

c# - Convert language characters to Latin alphabet -

Image
i try program application learn foreign characters. if example want learn japanese, you'd have memorize hiragana, katakana , kanji letters. (e.g あ、い、か... = hiragana カ、サ、ケ... = katakana 本、学... = kanji). example: user trying learn japanese. has learn: か = ka 本 = hon, meaning: basis/ book/ this and has learn pronunciation. my first question if there library or in .net? looked @ microsoft ime, couldn't find out how use in project. i looked @ unicode database , it's possible it. managed write project convert か ka. thing missing meanings (for example 本=basis/ book/ this), provided unicode database. unfortunately couldn't find them in .xml file ucd data. works, when enter word on ucd-website . another approach use cldr-library seems related ucd. unfortunately couldn't figure out of 2 (ucd or cldr) should use. cldr: http://cldr.unicode.org/ my question if ucd best way , if use cldr. i don't want work normal lists type in characters myself. take time,

asp.net mvc - Redirecting from ane action to another controller action in mvc -

this code want post data(date of calendar here) "index" action of "home" controller , want save data in database , @ same time want redirect action of controller i.e "index" action of "home" controller here jquery code below, function getdate() { $('.cal_daybox').on('click', function () { var timestamp = parseint($(this).attr('id')); var day = new date(timestamp); alert("you clicked " + day.todatestring()); var url = '@url.content("~/home/index")'; var date = day.todatestring(); $.ajax({ type: "post", url: url, data: { date: day.todatestring() }, datatype:"json" }); return false; }); eventscontroller.cs public actio

android - SELECT WHERE sql query -

i'm trying match username , password in existing database , i'm stuck @ point in writing sql query. cursor cursor = db.rawquery("select " + dbh.name + dbh.pass + " tablename where" +dbh.name +"="+ e1.gettext().tostring()+";", null); you can using follows highly discouraged: string selectquery = "select * "+ table_name +" "+column_username + " = '"+usrname+"' , "+column_passwd+" = '"+passwd+"' "; //column_username column name stores username column_passwd column storing password cursor cursor = database.rawquery(selectquery, null); you can try use accountmanager class purpose. there questions deal how store username , passwords. should checkout following threads: 1) android: storing username , password? 2) is safe store username + passwords in local sqlite db in android? hope helps.

javascript - Scraping a url ending in .js using python -

i trying historical earnings data website using python. url data ends in .js (which javascript link). problem if use urllib.urlopen read link, converts string , it's nightmare extract data string. wondering if there module allows download data in similar json. the link trying scrape is: http://test.optionslam.com/site_media/chart/data/goog_data.js this how trying it: data = urlopen(' http://test.optionslam.com/site_media/chart/data/goog_data.js ').read() can please suggest better approach this? just remove var = parts , terminating ; , use json parser on rest. sure such thing exists python . something this: get string do replace var { replace = : replace ; }, remove last , read in json

c# - DISQUS comments in asp.net webforms -

hi want use disqus comments system. couldnt find resource c# asp.net webforms, examples , source code or implement. have found project in codeplex , codeproject seems code in mvc haven't used mvc . can find disqus implementation code in asp.net c# webforms? not mvc. in cases implementing disqus website easy, since you're not building markup. @ minimum, need add universal code on proper page templates, links embed javascript file , "disqus_thread" div. at point make "complete" integration, need output javascript configuration variables (using unique identifier, url, , title each thread) , maybe comment counting script , should it. the webforms-specific examples might possibly need how output article's unique id, title , url variables onto page. if have idea of how that, shouldn't need existing integration.

ios - Trying to use NSDate for time only -

i'm struggling find way use nsdate time purposes. trying following code: - (void)awakefrominsert { nsdatecomponents *comps = [[nsdatecomponents alloc] init]; comps.minute = 45; comps.second = 0; nscalendar *calendar = [[nscalendar alloc] initwithcalendaridentifier:nsgregoriancalendar]; self.periodduration = [calendar datefromcomponents:comps]; nslog(@"periodduration: %@",self.periodduration); comps = [[nsdatecomponents alloc] init]; comps.hour = 8; comps.minute = 0; self.firstperiodstarttime = [calendar datefromcomponents:comps]; nslog(@"firstperiodtime: %@",self.periodduration); } but result is: periodduration: 0001-12-31 22:24:04 +0000 firstperiodtime: 0001-12-31 22:24:04 +0000 the result expecting: periodduration: 45:00 firstperiodtime: 08:00 what doing wrong? how can fix this? thank you. the log of date misleading you, if forming date few components not proper date instance uniquely ident

ios - Struggling with integrating iAd -

i have tab bar application have table views sub views. need show ad banner @ bottom above tab bar. ad banner seen , not long time. leaves white view when not available , not. not getting happening here: i using: - (void)viewdidload { [super viewdidload]; cgrect frame=cgrectzero; frame.size = [adbannerview sizefrombannercontentsizeidentifier:adbannercontentsizeidentifierportrait]; // place frame @ bottom edge of screen out of sight frame.origin = cgpointmake(0.0, 317); // create , configure banner view adbannerview *adview = [[adbannerview alloc] initwithframe:frame]; adview.requiredcontentsizeidentifiers = [nsset setwithobject:adbannercontentsizeidentifierportrait]; // set delegate self, notified of ad responses adview.delegate = self; adview.hidden = yes; [self.view addsubview: adview]; } - (void)bannerviewdidloadad:(adbannerview *)banner { nslog(@"ad available"); banner.hidden = no; // brand new frame

html - submit button 'depressed' state on focus -- potential chrome bug? -

what's submit buttons in chrome? <input type='text' placeholder='dummy input'/> <input type='submit'/> the active 'depressed' state of submit button occur if button does not have focus. reproduce, see this jsfiddle . in fact, text-field isn't necessary, allow tab focus submit button. so go ahead, place cursor in text field, press tab , click submit while button focused (orange). event fires, button not depress. pressing spacebar when focused instead of click will depress button. (thx @ineentho) gives? note: i've submitted this chrome issue tracker you use javascript/jquery un-focus textbox on hover :active properties applied when clicked. $("input[type=submit]").hover(function(){ $(this).blur(); }); also, apply css :focus pseudoclass, outline invisible. input[type=submit]:focus {outline:none;} see fiddle: http://jsfiddle.net/qahcj/1/ update i think can't solve without ja

jsf 2 - retrieve items from textboxlist in mootools -

i have problem textboxlist component found @ http://www.devthought.com/2008/01/12/textboxlist-meets-autocompletion/ need retrieve selected items bind jsf backing bean, there method update, update: function() { this.element.set('value', this.bits.getvalues().join(this.options.separator)); return this; } and don't know how use it.thanks in advance this plugin old , not work on chrome (what tested on). i recommend move wonderful solid plugin uses latest mootools,works in every browser, more robust: http://julesjanssen.github.io/chosen/

html - CSS screen resolution adaption with browser's "zoom", "moz-zoom", etc -

while searching easy way make menu ( http://www.ck-game.com/newindex.html ) fit screen size stumbled on possibility of using browser's zoom functionalities (zoom, moz-zoom, etc.). imagine it's easier using "em", "%" , media queries make elastic layout, more because have background-images need keep aspect ratio. there speaks against using besides wanting zoom in/out , menu adjust it? edit: proof of concept: http://www.ck-game.com/newindex.html please try different viewports , see how adapts :) tested in ie9, latest ff , latest chrome. works on android devices, breaks on ios devices.

ruby on rails - Error after adding @import "bootstrap"; ArgumentError in Static_pages#home -

i'm @ 5.1.2 of railstutorial, have installed bootstrap-sass (i've double checked, gem there). http://ruby.railstutorial.org/chapters/filling-in-the-layout#top i added file: app/assets/stylesheets/custom.css.scss and when give content: @import "bootstrap"; my http://localhost:3000/static_pages/home not work anymore. gives following error: argumenterror in static_pages#home showing c:/sites/rails_projects/sample_app/app/views/layouts/application.html.erb line #5 raised: different prefix: "e:/" , "c:/sites/rails_projects/sample_app/app/assets/stylesheets" (in c:/sites/rails_projects/sample_app/app/assets/stylesheets/custom.css.scss) extracted source (around line #5): 2: <html> 3: <head> 4: <title><%= full_title(yield(:title)) %></title> 5: <%= stylesheet_link_tag "application", :media => "all" %> 6: <%= javascript_include_tag "application" %>

google cloud messaging - Error on getErrorCodeName() in android code using GCM -

how rectify error "the method geterrorcodename() undefined type multicastresult" ? used following code multicastresult result = sender.send(message, androidtargets, 1); if (result.getresults() != null) { int canonicalregid = result.getcanonicalids(); if (canonicalregid != 0) { // same device has more on registration id: update database } } else { int error = result.getfailure(); system.out.println("broadcast failure: " + error); string error_code_name = result.geterrorcodename(); //error here if (error_code_name.equals(constants.error_not_registered)) { // application has been removed device - unregister database or remove database } } thanks in advance ! you want this: result.getresults().get(0).geterrorcodename(); or like:

oracle - Cursor for loop creating duplicate entries for nested XQUERY -

i have created procedure parsing xml data multiple tables. catching exception primary key constraint, , if there duplicate found in result, inserted table named duplicate. when use cursor tends iterate more required number of times i.e. 1. procedure declare per_id varchar2(20); name varchar2(20); sections_id varchar2(20); sections_name varchar2(20); var1 number; exception_var number; cursor c1 select d.department_id , d.department_name , s.sections_id , s.sections_name xml_unit_download t , xmltable( '/rowset/data' passing t.xml_file columns department_id varchar2(20) path 'department/department_id' , department_name varchar2(30) path 'department/department_name' , sections xmltype path 'sections' ) d , xmltable( '/sections' passing d.sections columns sections_id varchar2(20

php - JS events. Only one of the event handler function is being called? -

hi everybody! have problem , have no idea how fix it! i have simple html page button: <input type = "submit" value = "ok" onclick="f1()"/> i have script on page: <script> function f2() { var firstbtn = document.createelement("button"); firstbtn.appendchild(document.createtextnode("firstbtn")); document.body.appendchild(firstbtn); var xmlhttp = createrequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4 && xmlhttp.status==200) { var response = xmlhttp.responsetext; document.body.innerhtml += response; } } firstbtn.onclick = function() { alert("inside f2 onclick"); xmlhttp.open("get","test.php",true); xmlhttp.send(); } } function f3() { var secondbtn = document.createelement("button"); second

php - Show duplicate elements from an array -

i'm making calender , want show elements (public holiday etc.) array. $holidays = array ( "20130101" => "new year's day", "20130101" => "school holiday", "20130126" => "australia day", ... ); $today = '20130101'; foreach ($holidays $key => $val) { if ($today == $key) echo $val; else; } but shows "school holiday" last element in array want show both "new year's day" , "school holiday". any advice on how approach problem? thank in advance. you cannot have 2 elements same key in array. this: $holidays = array ( "20130101" => "new year's day", "20130101" => "school holiday", "20130126" => "australia day" ); evaluates to [ "20130101" => "school holiday", "20130126" => "australia day" ] so it

c++ - .obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592 -

i trying load .obj model c++ opengl 3 code reason gives me error : 1>linking... 1>.\bunny.obj : fatal error lnk1107: invalid or corrupt file: cannot read @ 0x6592 i tried search similar errors, there .dll's or .lib's. can please me out issue. have tried different obj models gives me error. you trying load object model c++ linker (probably have added project, , tries compiled). linker can process .obj files, waits them 'object-code' files (which have .obj extension), compiled modules (e.g. written in c++ language) ready linked single executable or dll. neither part of c++ compiler able read graphical object model. should remove .obj file ide project. , make sure have code reads file when program runs. if want object model embedded .exe (so program not require file in directory), can put resources , link them executable.

hibernate - How to map an ArrayList of primitives to a single column? -

let's have following situation: object car has arraylist of prices, numbers. possible in hibernate save prices in single column? know violates first normal form there might cases when don't want them saved in separate table it's classically done in one-to-many or many-to-many relationships. in jdo i'd saving arraylist in blob column. some useful related sof questions: arraylist of primitive types in hibernate , map arraylist hibernate . any idea highly appreciated! i know old question trying in jpa context can this import org.apache.commons.lang3.stringutils; import javax.persistence.attributeconverter; import javax.persistence.converter; import java.util.arraylist; import java.util.arrays; import java.util.list; import java.util.stream.collectors; import java.util.stream.stream; @converter public class intarraytostringconverter implements attributeconverter<list<integer>,string>{ @override public string converttodatabasecol

php - MySQL to refresh memcached -

we have web application running on lamp stack, application depends on various services. these services gets data cache (memcached) being refreshed using cron (from mysql). cron processes running every 5 mins. in approach can not serve data updated cache getting refreshed every 5 mins. is there mechanism exists can trigger cache refresh data gets updated in mysql? i don't know if best solution, can create mysql trigger gets executed on insert/update/delete. inside mysql trigger execute udf . udf can execute php script using sys_exec() . read triggers read udf read using sys_exec() , more

design patterns - What mechanism in JavaScript causes a change in DOM or CSSStyleDeclaration to trigger a redraw of the page? -

i think take granted whenever change dom element's property or cssstyledeclation object's property, page redrawn: http://jsfiddle.net/peqtl/ document.getelementbyid("foo").innerhtml = "bar"; document.getelementbyid("foo").style.padding = "30px"; but think it, .style returns cssstyledeclaration object, , padding returns property. set property, , how trigger , cause page different? i thinking, classic " observer pattern ", page renderer register every dom element , cssstyledeclaration object that, whenever property changes, notify renderer redraw part of page? or, isn't true that, if change something, whole page can affected: example, z-index affect , siblings' "cover up" order, need redraw parent node , down tree, or if element has position: relative or position: absolute , can affect element on page @ all, whole page needs redrawn. in other words, renderer may not need register every dom e

c# - LIKE command Mysql -

can tell me wrong command? error. use c# , mysql database. public static dataset getinstructorlistsearchemail(string instemail) { db.connecttodb(); db.dbopen(); dataset ds = new dataset(); try { string comtext = "select * instructor instructor_email %instemail"; mysqlcommand com = new mysqlcommand(comtext, db.conn); com.parameters.add("instemail", mysqldbtype.varchar, 200).value = instemail; mysqldataadapter adapter = new mysqldataadapter(com); adapter.fill(ds); seeing used cmd parameter need modify query string accept parameters changing string comtext = "select * instructor instructor_email @instemail"; com.parameters.addwithvalue("@instemail", "%" + instemail); or work using single quotes , drop parameter think using parameters better. string comtext = "select * instructor instructor_email &#

c++ - VAO problems with bind -

help find error. suppose wrong bind. in "display" used vbo - works fine. when used vao - black screen. void createvao(gluint *_vid, gluint *_cid, gluint *_tid, gluint *_vao) { glgenvertexarrays(1, _vao); glbindvertexarray(*_vao); glenableclientstate( gl_vertex_array ); glbindbuffer(gl_array_buffer, *_vid ); glvertexpointer( 3, gl_float, 0, 0 ); glbindvertexarray(0); glbindbuffer(gl_array_buffer, 0); glbindbuffer(gl_element_array_buffer, 0); } void createvbo(gluint *_vid, gluint *_cid, gluint *_tid) { glgenbuffers(1, _vid); glbindbuffer(gl_array_buffer, *_vid); glbufferdata(gl_array_buffer, sizeof(xyz) * cubeverticescount, cubepositions, gl_static_draw ); glbindbuffer(gl_array_buffer, 0); } void display() { glclear(gl_color_buffer_bit); glmatrixmode(gl_modelview); glloadidentity(); gltranslatef(0, 0, -800); glrotatef(rotate.angle_x, 1, 0, 0); glrotatef(rotate.angle_y, 0, 1, 0); glscalef(zoom,zoom,zoom); // vao - dont work glcolor3f(1.0f,1.0f,1.0f); glbindverte

asp.net mvc - Passing array of integers to webapi Method -

i trying pass array of int can not value in webapi method var postdata = { "deletedids": deletedids }; $.ajax({ type: "delete", traditional: true, datatype: 'json', contenttype: 'application/json', cache: false, url: "/api/management/models", data: json.stringify(postdata), success: modeldeleted, error: modelnotdeleted }); and in apicontroller : [httpdelete] public bool deletemodel(int[] deletedids) { return modelsrepository.deletemodels(deletedids); } your code looking pretty ok me. please define structure of "deletedids" object. 1 suggestion use new array() object initialize deletedids property , remove json.stringify() . similar question asked here . edit web api supports parsing content data in variety of ways, not deal multiple posted content values. solution problem create viewmodel

c - How to write interactive wallpaper for Mac OS X Lion -

i need write interactive live wallpaper mac os x lion on c/c++. type of application (target in terms of xcode) must be? plugin? cocoa application? etc? please me tutorials, maybe working source code. this little tricky can done. have use 2 windows this. create 1 spans whole screen , has level of kcgdesktopwindowlevel . window layered above standard desktop picture below desktop icons. in there can render custom desktop available drawing technologies. the user can not interact window though because finder layers actual desktop (icons , on) above level , catches events don’t reach background window. so have create window each interactive region layered below kcgnormalwindowlevel . have experiment exact value.

php - IRC login with authentication send to NICKSERV if loggin try echo connected? -

here code <html> <title></title> <body> <form method="get" > username: <input type="text" name="user"><br> password: <input type="password" name="pwd"><br> <input type="submit" value="submit"> </form> <?php //konfig $server = "xxxx"; $port = "xxxx"; $enable_password = true; //error error_reporting(0); if (isset($_get['user']) && isset($_get['pwd'])) { $username = $_get['user']; $password = $_get['pwd']; if (($username !== "") && ($password !== "")) { set_time_limit(30); if (!($socket = fsockopen($server, $port, $errno, $errstr, 10))) { echo "cant connect server"; flu

ios - peripheral:didUpdateValueForCharacteristic can't be reached -

my code based on apple's corebluetooth sample code named " temperaturesenor ". find phenomena if set peripheral repeat sending message, call peripheral:setnotifyvalue:yes forcharacteristic: , @ last peripheral:didupdatevalueforcharacteristic: called. if call peripheral:setnotifyvalue:yes forcharacteristic: listen messages peripheral, set peripheral send message central, central not call peripheral:didupdatevalueforcharacteristic: . what's reason? maybe should sure whether characteristic use send message has notify property decided peripheral.if characteristic doesn't has notify property still call "peripheral:setnotifyvalue:yes forcharacteristic:",you receive unknown error 2. if characteristic has notify property , call "peripheral:setnotifyvalue:yes forcharacteristic:",the central call "peripheral:didupdatevalueforcharacteristic:"

wpf - How to set the Control Visibilty of the Second Control depending on the Binding Value of the first -

i have custom wpf control i.e. combobox:wpftwcombobox . want set visibility using property called disableproviderselector . the usual use of triggers not helping. scenario here when above control i.e. windowsformshost made visible or collapsed, want opposite happen below custom control. <stackpanel grid.row="3" grid.column="2" height="25" orientation="horizontal" width="375" horizontalalignment="left"> <windowsformshost height="25" width="375"> <windowsformshost.style> <style targettype="windowsformshost"> <style.triggers> <datatrigger binding="{binding path=disableproviderselector}" value="true"> <setter property="visibility" value="collapsed"/> </datatrigger> <

error at setContentView - android.view.InflateException -

i have splash screen shows image 2 sec. image png image. when start app crashes following error messages. exact line app crashes setcontentview(r.layout.splash); key error lines : see there error reference java.lang.outofmemoryerror while inflating layout could please let tell me need correct code. xml <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/splash"> </relativelayout> java code: public class splash extends activity{ @override protected void oncreate(bundle goonsudha) { // todo auto-generated method stub super.oncreate(goonsudha); requestwindowfeature(window.feature_no_title); getwindow().setflags(windowmanager.layoutparams.flag_fullscreen, windowmanager.layoutparams.flag_fullscreen); setcon

java - Closing ConfirmDialog from method -

i have class 2 methods. first method invoking confirm dialog , second thread listener waiting complete status. if listener executed, want close confirm dialog. possible? my code: public class newnetworkgame implements threadlistener { readmsg read; network net; // dialog joptionpane canceldialog; boolean accepted = false; boolean readstopped = false; public newnetworkgame(network net) { this.net = net; read = new readmsg(this.net); threadhandler rm = read; rm.addlistener(this); rm.start(); jpanel cancelconn = new jpanel(); cancelconn.add(new jlabel("waiting host response...")); // showing dialog int result = canceldialog.showconfirmdialog(null, cancelconn, "host response", joptionpane.cancel_option); // client clicked on cancel option while thread still reading host response if (result == joptionpane.cancel_option && !accepted && !readstopped) { net.sendreject(); } i

prolog - Querying each element of a list -

i doing homework ai class , writing prolog program. i supposed take list of names , check if each person in list belongs specific country chosen. what have far % facts person(bruce, australia, rhodri, bronwyn). person(rhodri, newyork, dan, mary). person(bronwyn, miami, gar, roo). person(dan, miami, george, mimi). person(mary, texas, mack, tiki). person(gar, jamaica, zid, rem). person(roo, newzealand, john, jill). person(tom, mayday, dick, mel). person(dick, newyork, harry, rin). person(mel, miami, tom, stacey). person(harry, miami, george, mimi). person(rin, texas, mack, tiki). person(tom, jamaica, zid, rem). person(stacey, newzealand, john, jill). % rules eligible(p,c) :- person(p, c, f, m) , ! ; person(f, c, newfather, newmother), ! ; person(m, c, newfather, newmother), ! ; person(newfather, c, grandfather , grandmother), ! ; person(newmother, c, grandfather, grandmother). checkteam([] , c). checkteam([h|t] , c) :- eligible(h, c) , checkteam(t, c). the last 2

jQuery click event not firing in jQueryMobile -

using jquery jquery-1.9.1.js , jquerymobile 1.3.1 (chrome 26/windows 7) cannot see why 1 of these 'click' events bound #one1 fires , other doesn't: html: <div data-role="page" id="one" data-theme="a"> <div data-role="header" data-position="inline"> <h1>one</h1> </div> <div data-role="content" data-theme="a"> <a href="#" id="one1">[one]</a> <a href="#two">two</a> <a href="#three">three</a> </div> </div> javascript: <script> $(document).on( "mobileinit", function() { $(document).on('click', '#one1', function(e){ console.log('firing'); }); $('#one1').on("click", function() { console.log('not firing'); }); }); </script> whe

ruby on rails - Ubuntu - cannot install RMagick -

this question has answer here: can't install rmagick rbenv 1 answer how install rmagick gem ubuntu? found few threads here on so, of there directly pointed out installation on ubuntu systems, none of them working me. here output got if run sudo gem install rmagick building native extensions. take while... error: error installing rmagick: error: failed build gem native extension. /opt/bitnami/ruby/bin/ruby extconf.rb checking ruby version >= 1.8.5... yes checking gcc... yes checking magick-config... yes warning: found more 1 imagemagick installation. cause problems @ runtime. /opt/bitnami/common/bin/magick-config reports version 6.7.5 q16 installed in /opt/bitnami/common /usr/bin/magick-config reports version 6.6.9 q16 installed in /usr using 6.7.5 q16 /opt/bitnami/common. checking imagemagick version >= 6.4.9... yes ch

java - StackOverflowError while saving and loading my object in android -

i'm writing android program , ran problem. my program serves create graphs, run specific algorithms on them (dijsktra, belmanford, etc.), save graphs sd card , loading them back. the problem: if save little bigger, more complex graph stackoverflow error.. serialization: public void createexternalstoragepublicgraph(string filename) { file dir = environment.getexternalstoragepublicdirectory("grapher"); try { if (!dir.exists()) { dir.mkdirs(); } file file = new file(dir, filename); fileoutputstream fileoutputstream = new fileoutputstream(file); objectoutputstream objectoutputstream = new objectoutputstream(fileoutputstream); objectoutputstream.writeobject(graphdrawerview.getgraph()); objectoutputstream.close(); } catch (ioexception e) { log.w("externalstorage", "error writing" + filename, e); } } deserialization: public graph loadexternalstoragep