Posts

Showing posts from June, 2014

r - Density plot/histogram using intervals -

i have range of integer intervals, e.g. [1, 5], [1,3], [3,4] create density plot. suppose want plot of number of intervals overlapping each integer in entire range. using data above might looks this: 3 x 2 x x x x 1 x x x x x 1 2 3 4 5 the obvious (and terrible) way can think of doing loop through every interval , add integers single vector, use hist() or similar function create plot. there straightforward way this? thanks! you seem proposing this: x <- list(c(1,5),c(1,3),c(3,4)) hist(unlist(lapply(x,function(z) seq(z[1],z[2])))) # hist plot(density(unlist(lapply(x,function(z) seq(z[1],z[2]))))) # density and yes, - describe - obvious solution.

Entitfy Framework DbContext and xxxEntities? -

Image
i have sql server db ( tables etc) , ive installed ef6 in order use async stuff ( p.s. im new ef). so added : played wizard , created valid edmx files. my db name dump added dumpentities suffix :' so can : de = new dumpentities1(); var data=de.agegroups.tolist() but why don't have dbcontext ? see in many places ? is xxxentityes replacement dbcontext ? cause seems can actions xxentites ... edit ive searched "dbcontext" in solution , apprently have : so going on here? does using xxxentiyies new way ?( , not doing xxxcontext = new xxxcontext() ...even if wanted - dont have it...) you should not use dbcontext directly (that not make sense) in entity framework. instead use own custom context - class inherited dbcontext holds sets specific application. when use database first approach custom entity class generated based on edmx file data, in turn generated based on database schema. regarding naming... not obvious cust

c - Tools/Techniques for investigating video corruption -- ffmpeg / libavcodec -

in current work i'm trying encode images h264 video using ffmpeg's c library. resulting video plays fine in vlc, has no preview image. video can play in vlc , mplayer on ubuntu, won't play on mac or pc (in fact, causes "vtdecoderxpcservice quit unexpectedly" error on mac). if run resulting file through ffmpeg using command line, resulting file has preview image, , plays correctly everywhere. apparently file out of program corrupt in weird place, don't have output during compilation or run indicate where. can't share code @ moment (work code isn't open source yet :-( ), have tried number of things: writing header , trailer data (av_write_trailer) , no frames writing frames minus trailer (using avcodec_encode_video2 , av_write_frame) adjusting our time_base , frame pts values encode 1 frame per second removing variable frame rate code numerous other variants won't bother here in creating project, i've followed following tutorial

mysql - How to order articles by both quality score and publish date? -

i have database contains articles pre-calculated quality scores ranging 0 10 (with 10 being best quality) , each article has published date. here example database schema. create table `posts` ( `id` int(10) unsigned not null auto_increment, `title` varchar(255) not null, `content` longtext not null, `score` int(10) unsigned not null default '0', `published` datetime not null, primary key (`id`) ) engine=innodb auto_increment=357 default charset=latin1; how can order articles newest , best scored? for example, following doesn't work because places scored 10 articles first if old. newest scored 9 article appears after 10 s. select * posts order score desc, published desc; if order published first, score value has no effect because published times unique. select * posts order published desc, score desc; i need somehow order these records higher scored articles come first, place them lower in list older get. here quick sample data made. i

feed - How to successfully parse images from within content:encoded tags using SAX? -

i trying parse , display images feed has imgage url inside tags. example this: *note>> http://someimage.jpg not real image link, example. have done far. public void startelement(string uri, string localname, string qname, attributes atts) { chars = new stringbuilder(); if (qname.equalsignorecase("content:encoded")) { if (!atts.getvalue("src").tostring().equalsignorecase("null")) { feedstr.setimglink(atts.getvalue("src").tostring()); log.d(tag, "inside if " + feedstr.getimglink()); } else { feedstr.setimglink(""); log.d(tag, feedstr.getimglink()); } } } i believe part of programming needs tweaked. first, when qname equal "content:encoded" parsing stops. application runs endlessly , displays nothing. second, if change initial if qname cannot equal "purplebunny" works perfect, except there no

Import an Android Project from Eclipse to Android Studio and I have this error message "failed to find Build Tools revision 8.0.0" -

i'm trying import android project eclipse android studio, in eclipse done step export, adding build.gradle ... have error message "failed find build tools revision 8.0.0" when import project in android studio, ideas?... your build.gradle trying use android sdk tools 8 isn't installed on machine. if @ build.gradle file have line buildtoolsversion "8" . want build.gradle file point android sdk tools have installed (preferably latest). open android sdk manager , see tools have installed , change buildtoolsversion "8" right version.

cocoa touch - change button type programatically -

is possible change programmatically type of button in xcode? i trying change type "info light" "info dark". no, can't. these button types subclasses of uibutton , not settable properties. can specify type when creating button in interface builder or when creating button class method [uibutton buttonwithtype:(uibuttontype)buttontype] . if want change button type, suggest creating button of each type same frame, 1 hidden property set true. toggle between them needed setting hidden property. can share same target , action. the question near-duplicate of one: change uibutton type programatically

vb.net - Synchonizing SQLite and MySql together -

i trying synchronize 2 different type of database together. here better explanation of trying do: i have mysql database on server main database. have application installed on multiple computers. i need main database updated modification inside computers , need computer version updates main database. i have seen replication option in mysql it's not want do. have seen other stuff replace still don't see clear solution. i'm not asking full solution maybe pseudocode or cool functionality can try implement it. used on end of school project. i have timestamps on each row can detect changes. sorry bad spelling, english not native language. thanks in advance. this how if had app run in different sql environments. it cleaner if communication between yourapp & db through php class. class instance created based on user's sql version. then, code in class decide how connect db.

random - Python - randint() returns empty range, crashing error -

i've been able duplicate error multiple times in poker program , tried various unsuccessful solutions. here's latest: traceback (most recent call last): file "c:\users\pangloss\desktop\tgchanpoker\poker.py", line 1868, in <module> if __name__ == '__main__': main() file "c:\users\pangloss\desktop\tgchanpoker\poker.py", line 1866, in main maingame = game(opponent) file "c:\users\pangloss\desktop\tgchanpoker\poker.py", line 1443, in __init__ if randint(1,betcheck+(10-handvalue[1]))<5 or gamestage == "bettingstay": file "c:\python27\lib\random.py", line 241, in randint return self.randrange(a, b+1) file "c:\python27\lib\random.py", line 217, in randrange raise valueerror, "empty range randrange() (%d,%d, %d)" % (istart, istop, width) valueerror: empty range randrange() (1,-7, -8) and here's relevant code: handvalue = checkhand(oppone

HTML input tag file handling -

in code pdf reader pdf-js there input tag let user upload input file <input id="fileinput" class="fileinput" type="file" oncontextmenu="return false;" style="visibility: hidden; position: fixed; right: 0; top: 0" /> this input tag not part of form. once user uploads file, go? code processes file? (i'm asking in general, not specific piece of code.) "then it's interesting. code doesn't have server side" no, doesn't. pdf.js client side program written javascript. works on javascript side. it takes file wanna show, , whatever must done converting buffer uint8array renders it. all processes happen on javascript side. no server side, no file upload. here article reading local files in javascript here related part of code in pdf.viewer.js window.addeventlistener('change', function webviewerchange(evt) { var files = evt.target.files; if (!files || files.length

mongodb - Unable to upgrade mongod configuration server -

after running brand new cluster 6 hours. restarted 1 of mongos instances , failed: ... wed jul 10 22:02:36.526 [mongosmain] error: error upgrading config database v4 :: caused :: newer version 4 of mongo config metadata required, current version 1, need run mongos --upgrade i ran following command: mongos --configdb mongoconfig1.xxxxx.com:1234,mongoconfig2.xxxxx.com:1234,mongoconfig3.xxxxx.com:1234 --upgrade which failed. ... wed jul 10 22:10:39.218 [mongosmain] starting upgrade of config server v1 v4 wed jul 10 22:10:39.355 [mongosmain] distributed lock 'configupgrade/mongos2.xxxxx.com:12345:1373494238:1804289383' unlocked. wed jul 10 22:10:39.356 [mongosmain] error: error upgrading config database v4 :: caused :: newer version 4 of mongo config metadata required, current version 1, don't know how upgrade version this error seems strange. machines running latest version 2.4.5. has seen before? ideas in how resolve this? also seeing lot of this:

jsp - Javascript variables should retain same value of a variable,declared and initialized before -

i need save value of variable in javascript declared , assigned value during previous call function in javascript. both declaring , initializing variable once, need value of variable when needed. there way store value of variable , retrieve it, time needed?? p1.jsp <table> <% for(i=0;i<g;i++){ request.getsession().setattribute("incr",i); %> <tr><td><jsp:include page="/p2.jsp" /></tr></td> <%}%> </table> p2.jsp <%!int i;%> <% i=request.getsession().getattribute("incr"); %> <script type='text/javascript'> var k<%=i%>; function d(){ k<%=i%>=5; } </script> //here, need print k0,k1,.... value needed use sessionstorage or localstorage save data need. example: sessionstorage.setitem("variable",value);

php - Delete code not working with connecting button -

on page trying have delete button on update form other edit functionality, , in attempts seems delete messes this. this link site can test: http://exhibitjewellery.com/editstocktest.php (the button under 'all pieces in series' , clicking name opens form collapsible panel) i have used dreaweaver cs5 wizard if getting idea of how rest of code looks. can me? <?php if (isset($_get['delete'])) { echo 'do want delete ' . $_get['delete'] . '? <a href="editstock.php?yesdelete=' . $_get['delete'] . '">yes</a> | <a href="editstock.php">no</a>'; exit(); } if (isset($_get['yesdelete'])) { $deletesql = sprintf("delete pieces id='%s' limit 1", getsqlvaluestring($_post['id'], "int")); mysql_select_db($database_connectmysql, $connectmysql); $result1 = mysql_query($deletesql, $connectmysql) or die(mysql_error()); header("

c# - JSON.NET: Serialize json string property into json object -

is possible tell json.net have string json data? e.g. have class this: public class foo { public int id; public string rawdata; } which use this: var foo = new foo(); foo.id = 5; foo.rawdata = @"{""bar"":42}"; which want serialized this: {"id":5,"rawdata":{"bar":42}} basically have piece of unstructured variable-length data stored json already, need serialized object contain data part. thanks. edit: make sure understood properly, one-way serialization, i.e. don't need deserialize same object; other system shall process output. need content of rawdata part of json, not mere string. you need converter that, here example: public class rawjsonconverter : jsonconverter { public override void writejson(jsonwriter writer, object value, jsonserializer serializer) { writer.writerawvalue(value.tostring()); } public override object readjson(jsonreader reader, type objecttype

Displaying API xml data on laravel 4 blade view -

i developing website search items amazon product advertising api. have search box on views/layouts/master.blade.php following code: {{ form::open(array('url' => 'amazonapi/api.php', 'method' => 'get')) }} {{ form::text('itemsearch', 'search ...', ) }} {{ form::submit('search') }} the form posting api file following code: <?php if(isset($_get['booksearch'])) { /* example usage of amazon product advertising api */ include("amazon_api_class.php"); $obj = new amazonproductapi(); $result ='' ; try { $result = $obj->searchproducts($_get['booksearch'], amazonproductapi::dvd, "title"); } catch(exception $e) { echo $

auto generate number of days in another textbox upon selection of start and end date in asp.net c# -

i got task creating leave application employees.. contains 3 tabs 1 apply leave has type leave description begin date end date number of days those begin , end date contains calendar extenders , once select both dates , cursor should point on number of days textbox , should calculate total number of days leave taken... please me sort out.. i have tried cs protected void btnapply_click(object sender, eventargs e) { mtmsdto objc = new mtmsdto(); int flag = 0; lbllogdinuser.text = session["empname"].tostring(); objc.loggedinuser = lbllogdinuser.text; objc.typeofleave = drptypeofleave.selecteditem.text; string date; date = convert.todatetime(txtbegindate.text).tostring("dd/mm/yyyy"); datetime dt = new datetime(); dt = convert.todatetime(date); objc.begindate = dt; objc.enddate = convert.todatetime(txtenddate.text); objc.description = txtdes

c# - How to convert this scientific notation to decimal? -

after search in google, using below code still can not compiled decimal h = convert.todecimal("2.09550901805872e-05"); decimal h2 = decimal.parse("2.09550901805872e-05", system.globalization.numberstyles.allowexponent); you have add numberstyles.allowdecimalpoint too: decimal.parse("2.09550901805872e-05", numberstyles.allowexponent | numberstyles.allowdecimalpoint); msdn clear that: indicates numeric string can in exponential notation. allowexponent flag allows parsed string contain exponent begins "e" or "e" character , followed optional positive or negative sign , integer. in other words, parses strings in form nnnexx, nnne+xx, , nnne-xx. it not allow decimal separator or sign in significand or mantissa; allow these elements in string parsed, use allowdecimalpoint , allowleadingsign flags , or use composite style includes these individual flags.

ruby - How do I elegantly install RVM on Ubuntu? -

i install rvm onto ubuntu 13.04 running distribution packaged ruby 1.9.3p194. what should install rvm version use version of ruby? official website's installation directions not clear . i might upgrade ruby later figured i'll start version included in ubuntu 13.04, rvm allow me safely use newer versions anyway. in python, need issue one-liner , have virtualenv installed. install current version of rvm. author , maintainers great job of keeping date , react bug reports quickly. rvm's whole reason existence manage multiple rubies in own home directory's sandbox, not make easier manage system-wide, default version of ruby; won't make easier @ all. rvm allow access/use system ruby if necessary, have revert using traditional sudo commands modify things , if don't know permissions , when , why should tweak it, you're better off leaving things alone. yes, rvm has lot of functionality in it, people few commands needed. in general you'll s

out of memory - Please help solve these exceptions, android? -

this logcat of app 07-11 11:31:25.269: d/-heap(6666): gc_for_alloc freed 1256k, 13% free 28316k/32227k, paused 34ms 07-11 11:31:25.309: d/-heap(6666): gc_before_oom freed 414k, 14% free 27901k/32227k, paused 42ms 07-11 11:31:25.309: e/dalvikvm-heap(6666): out of memory on 20155408-byte allocation. 07-11 11:31:25.309: i/dalvikvm(6666): "main" prio=5 tid=1 runnable 07-11 11:31:25.309: i/dalvikvm(6666): | group="main" scount=0 dscount=0 obj=0x40b01c58 self=0x1640e80 07-11 11:31:25.309: i/dalvikvm(6666): | systid=6666 nice=0 sched=0/0 cgrp=default handle=1074922856 07-11 11:31:25.319: i/dalvikvm(6666): | schedstat=( 0 0 0 ) utm=351 stm=36 core=0 07-11 11:31:25.319: i/dalvikvm(6666): @ android.graphics.bitmapfactory.nativedecodestream(native method) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.graphics.bitmapfactory.decodestream(bitmapfactory.java:500) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.graphics.bitmapfactory.decodefi

c# - WebSecurity.CreateUserAndAccount "Field does not exist" -

i trying extend simple membership include firstname, secondname , email address, getting problems createuserandaccount. so in registermodel have added following :- [display(name = "first name")] [required(errormessage = "text required")] public string firstname { get; set; } [display(name = "second name")] [required(errormessage = "text required")] public string secondname { get; set; } [display(name = "email")] [required(errormessage = "email required")] [regularexpression(@"^\w+([-+.]*[\w-]+)*@(\w+([-.]?\w+)){1,}\.\w{2,4}$")] public string contactemail { get; set; } in register.cshtml have added user inputs :- <li> @html.labelfor(m => m.firstname) @html.textboxfor(m => m.firstname) </li> <li> @html.labelfor(m => m.secondname) @html.textboxfor(m => m.secondname)

jquery - pop up for terms and conditions wihtout postback of parent page -

i have signup page cloned jquery controls need open terms , condition page , on accepting terms , condition enable signup button on parent page cannot post parent page until final signup submission have use popup terms , conditions guess. possible can send parameter parent page without postback parent could put in hidden form element?

c# - Validating two checkboxes -

i have custom validation code checking 2 checkboxes checked displaying 1 message both of them. public class severalcheckboxesrequiredattribute : validationattribute, iclientvalidatable { private readonly string[] _properties; public severalcheckboxesrequiredattribute(params string[] properties) { errormessage = "you must confirm have entered correct information "; errormessage += "for income , expenditure. wrong information may result in "; errormessage += "us not being able lend @ time or in future."; _properties = properties; } protected override validationresult isvalid(object value, validationcontext validationcontext) { if (_properties == null || _properties.length < 1) { return null; } foreach (var prop in _properties) { var property = validationcontext.objecttype.getproperty(prop); var propertyvalue = (bool

ruby - Fast way to check if partial value is present in large array of hashes -

i have large array (a) containing 50,000 values (hashes). have 2 other arrays containing blacklist (b) , whitelist (w) of values (also strings) checked against a. know array.include? function have check if value b or w partially in key "text" of each hash in a. so example: a = [ { :text => 'cat', :some_other_key => 'bla' }, { :text => 'dog', :some_other_key => 'blub' }, { :text => 'wolve', :some_other_key => 'example' }, { :text => 'bird', :some_other_key => 'test' }, { :text => 'white whale', :some_other_key => 'test' } ] w = [ 'whale', 'cow' ] b = [ 'pig', 'chicken' ] i want match 'white whale' against 'whale' w. far know, include? match if values same. what did far is: a.each |value| if w.any? { |w| value[:text] =~ /#{w}/ } #do stuff next elsif b.any?

asp.net mvc 4 - Deploy Sencha 4.2.1 with MVC 4 Web application -

Image
i creating mvc4 web application , using sencha 4.2.1 library downloaded sencha website. library size 300+ mb can not deploy package iis. please let me know how can deploy website along sencha iis. thanks, nishant you don't need of files in project. file structure described in extjs sencha tutorials. for more details visit : http://docs.sencha.com/extjs/4.2.2/#/guide/application_architecture

ios - No internet access on startup of app -

my app makes network call data @ startup of app. network call made in viewdidload . i'm using reachability class detect internet availability before making call. (most of times) give me no internet access right away. i'm unable understand assumptions of ios on subject. i.e apps stalled sometime till allotted internet access etc. happens in background? have seen many apps achieve same functionality without major errors. doing i'm missing. general approaches same problem on other platforms well? (android etc.)

jquery - Selector based on css property -

is possible select elements based on value of css property. example: css rules: div.blockwithborder { border: 1px solid red; } html markup: <div id="a" class="blockwithredborder">...</div> <div id="b" style="border: 5px dashed red">...</div> <div id="c" style="border: 2px solid #ff0000">...</div> i want find div elements red border. a, b , c match query. you this, mean getting computed style value each element querying against expensive operation. here's example: var = [].slice.call(document.queryselectorall("a")); var redlinks = a.filter(function(i){ window.getcomputedstyle(i); var color = i.style.bordercolor.tolowercase(); return (color === 'red' || color === '#f00' || color === '#ff0000') ? : false; });

objective c - I want change my own app language on button click in iOS -

if(btn.tag==1) { [[nsuserdefaults standarduserdefaults] setobject:[nsarray arraywithobjects:@"en", nil] forkey:@"applelanguages"]; [[nsuserdefaults standarduserdefaults]synchronize]; }else{ [[nsuserdefaults standarduserdefaults] setobject:[nsarray arraywithobjects:@"ar", nil] forkey:@"applelanguages"]; [[nsuserdefaults standarduserdefaults]synchronize]; } but it's not changing language first time first select language , restart app change language not change first time thanks i don't think can change language, once it's set. thats why right, after next time launch app. if knew this, please explain question bit more.

PDO use Fetch to get the first row from a query (without using FetchAll first?) -

using php, pdo query games database, retrieve game available join. if use fetch bring last row meets criteria. want first row, i'm using fetchall looking @ first row retrieved. there way use fetch , tell first row. using fetchall seems gathering lot more data require. i'm new of (animator trade), having got head around old mysql i've moved on using pdo seems great. building working asynchronous game server. here's code, works wonder if more efficient, if did'nt use fetchall. //set variables use when searching random game in table $player2_id = 0; //if 0 player 2 slot has not been filled. $whose_turn = 2; //if 2 player twos go...so join. //is there random game join $current_game = $db->prepare("select * games_database player2_id=? , whose_turn=?"); $current_game->execute(array($player_2_id, $whose_turn)); //fetch results $random_game_to_use = $current_game->fetchall(pdo::fe

c++ - Converting byte array containing non-ASCII characters to a string -

i want convert byte array (containing 64 elements) looks this: 9b b4 f5 b0 67 3c f8 e1 f1 f8 02 8c b2 13 4d 66 f0 72 a0 05 ... to string. "9bb4f5b067.....". want write byte array cfile , realized easy way convert byte array string , write content. whenever try convert array string special characters , when try write byte array directly file, see special characters written in file. suggestions please? here code: pbsignature of type pbyte , printed this: printf("the signature is: "); (dword = 0 ; < cbsignature ; i++) { printf("%2.2x ",pbsignature[i]); } // imprint signature crc file if (!file.open(crcfilepath, cfile::modewrite, null)) { printf("file not opened %d\n"); goto cleanup; } (dword = 0 ; < cbsignature ; i++) { //printf("size of pbsig %d , value of pbsig %d\n",sizeof(pbsignature[i]),pbsignature[i] ); file.write(&pbsignature[i],sizeof(pbsignature[i])); //printf("

c++ - how to request cmake to be not verbose? -

every time launch make (generated cmake ), each build steps introduced multiple lines formated way: [100%] built target foobar linking cxx executable ../../bin/foobar make[2]: quittant le répertoire « /home/me/git/master/build/debug » that goes 0% 100%. everytime launch make, outputs lot of lines. lot. that's verbose , warnings lost in process. how can ask cmake remove that, , generate makefile s make output compiler output. just do: make > /dev/null you still compiler error messages printed out since go stderr.

fortran90 - Converting string to real or double -

in f90 need encode 30 character string real/double , recover in different place real/double number. how that? thanks, mark i wouldn't use doubles, i'd use integers. array of integers. , intrinsic functions ichar , achar convert character ascii equivalent , (respectively). you whip easily: program string_to_int implicit none integer :: mystring_int(30), character(len=30) :: mystring mystring = "fortran best language!!" i=1,30 mystring_int(i) = ichar(mystring(i:i)) enddo print *,mystring_int call read_back_int(mystring_int) contains subroutine read_back_int(cvar) integer, intent(in) :: cvar(:) character(len=size(cvar)) :: substring integer :: i=1,size(cvar) substring(i:i) = achar(cvar(i)) enddo print *,substring end subroutine read_back_int end program string_to_int using (intrinsic) function sizeof , shows me character string 30 bytes while integer array 120 bytes. if r

python - AttributeError 'tuple' object has no attribute 'get' -

i have django application. can't error have been struggling time now. exception value: 'tuple' object has no attribute 'get' exception location: /library/python/2.7/site-packages/django/middleware/clickjacking.py in process_response, line 30 and traceback django provides me. traceback: file "/library/python/2.7/site-packages/django/core/handlers/base.py" in get_response 201. response = middleware_method(request, response) file "/library/python/2.7/site-packages/django/middleware/clickjacking.py" in process_response 30. if response.get('x-frame-options', none) not none: i have hard time figuring out why error occurs. how can find out tuple in code? the view: def products(request, category=none, gender=none, retailer_pk=none, brand_pk=none): # if request doesn't have referer use full path of url instead. if not request.meta.get("http_referer", none): referer = request.g

c# - Passing parameters from one app to the other -

following on thread starting application before target application i have application gets passed parameter (a filename) , registry work before opening microsoft infopath. i need open infopath parameter passed original application. here how open infopath system.diagnostics.process prc = new system.diagnostics.process(); prc.startinfo.arguments = convertarraytostring(constants.arguments); //prc.startinfo.arguments = "hello"; prc.startinfo.filename = constants.pathtoinfopath; prc.start(); note when set arguments "hello" infopath pops message saying cannot find file "hello" when set constants.arguments error , windows asks me if want debug or close applicatiion. here how set constants.arguments in main(string[] args) static void main(string[] args) { constants.arguments = args; //... } and here convertarraytostring private string convertarraytostring(string[] arr) { string rtn = ""; foreach (string s in arr)

javascript - Refresh a MVC view page using Jquery -

how refresh view page without refreshing page in jquery. here code..please resolve it <html> <head> <title>just test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> <script type="text/javascript"> var auto_refresh = setinterval( function () { $('#load_me').load('samp.jsp').fadein("slow"); }, 10000); // autorefresh content of div after //every 10000 milliseconds(10sec) </script> </head> <body> <div id="load_me"> <%@ include file="samp.jsp" %></div> </body> /html> perhaps forgot execute function 'auto_refresh();' ! try this: <html> <head> <title>just test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/li

jmx - Java jmxremote not opening port -

i've made hello world java program test how jmxremote works: public class main { public static void main(string argv[]) { try { system.out.println("press continue..."); system.in.read(); } catch (exception e) { e.printstacktrace(); } } } compiled javac main.java , , run like java -dcom.sun.management.jmxremote \ -dcom.sun.management.jmxremote.port=9010 \ -dcom.sun.management.jmxremote.local.only=false \ -dcom.sun.management.jmxremote.authenticate=false \ -dcom.sun.management.jmxremote.ssl=false \ main however port never gets opened: # telnet localhost 9010 trying ::1... telnet: connect address ::1: connection refused (nc -l , netstat show same results). java version is java version "1.5.0" gij (gnu libgcj) version 4.4.7 20120313 (red hat 4.4.7-4) and os centos 6.5 (java installed default repo yum). how fix this? i've tried messing option nam