Posts

Testing warnings in R by comparing strings (best idea?) -

i'm working on r package , need writing r test functions meant check whether correct warning being thrown on c-side code , caught on r side. let me give background on i'm working on exactly: most of i'm writing done on c side. in addition, have if-statement type macro in c allows coder pass warning r in form of string. basic premise if(statement_true) pass_warning_to_r("warning string pass"). i'd test whether these warnings being thrown when expect/need them writing r file uses trycatch blocks. so far i've written similar this: counter <- 0 trycatch({ function_im_testing() }, warning = function(war) { # check if warning expected , if increment counter if(tostring(war)=="the warning i'm expecting/testing for"){ print(tostring(war)) counter <- counter + 1 } }, error = function(err) { print(tostring(err)) }, = { print("leaving trycatch") }) # stop if 3 warnings expected aren...

aptana3 - Aptana Studio 3.4 HTML preview display error -

Image
i updated aptana studio 3.3 build: 3.4.0.201304151603. on windows 7 x64 system. after updating, html preview window no longer behaves correctly. html content rendered in right half of preview window, , left half left blank, except url bar controls. url file being previewed not shown in url field. wondering if 1 of other plugins causing problem, tried fresh install no plugins beyond installed along aptana studio. behavior same. wondering if windows issue, tried installing studio 3.4 on ubuntu 12.10 virtual machine, behavior same. any suggestions?

javascript - jQuery mobile: links have improper format on first load? -

i'm learning jqm , backbone.js , have few problems. im making recipe app following todo list example trying blend them both. anyway can't refresh page besides first one, i'm getting undefined variables. believe has dom , many views have. secondly upon entering recipe search query api, displays results first plain links! if got forward page or page , return results page display links should jqm style. because couldn't figure how or append in js, did in html. i know long shot can give me guidance hell i'm doing wrong, general advice, anything? var todo = backbone.model.extend({ defaults: function() { return { id: 0, title: 'defaultname', imgurl: 'defaultimageurl', order: searchtemp.nextorder(), rating: 0, timetomake: '', salty: 0, sour: 0, sweet: 0, bitter: 0, isperm: false, taggedforlist: false }; }, initialize: func...

actionscript 3 - In AS3, how do I run code when a when the movie starts? -

i'm making level editor game, , able access list of classes included in game. have static function in main class: public static function register(c:class, category:string):void { if (classregister[category] == null) { classregister[category] = new array(); } classregister[category].push(c); } then, in each class want registered, put static initializer: { main.register(prototype.constructor, "motion"); } however, static initializers called when class first gets used. there way class force used right when game starts? i'm aware explicitly list registered classes in main file, that's suboptimal in main file have edited whenever new class added wants registration. thanks, varga list class definition in applicationdomain, , filter them based on naming convention or type (an interface?). to achieve this, can use applicationdomain.getqualifieddefinitionnames() ( docs ), if target flash...

html - Bootstrap Thumbnail Class Not Recognized -

whenever try invoke thumbnails per twitter documentation, black dots on screen: <ul class="thumbnails"> <li class="span4"> <a href="large.jpeg" class="thumbnail"> <img data-src="http://placehold.it/330x230" alt="large"> </a> </li> am doing wrong here? can show using media-grid...which strange since that's old functionality, right? edit: still black dots left of thumbnails using media-grid, too. how turn off, , why isn't html wrote working? full code: <html> <head> <meta charset="utf-8"> <title>walls</title> <link rel="stylesheet" href="http://flip.hr/css/bootstrap.min.css"> <link rel="stylesheet" href="custo.css"> <script src="js/jquery.js" type="text/javascript" charset="utf-8"...

html - How to vertically and horizontally centre this input field in its container -

i trying horizontally , vertically centre input field inside container ( green box ) is there way without css3 flexbox techniques ? everything i've tried including normal centering techniques, margin , auto, , positioning doesn't work. well, problem positioning work, there has better way moving down. any ideas? here page: https://dl.dropboxusercontent.com/u/270523/help/new.html i trying centre input id #searchinput add position: relative section container, use absolute positioning vertically centre align input field using negative margin of half input height: #input { position: relative; } #searchinput { position: absolute; top: 50%; margin-top: -0.809rem; }

java - Sorting multiple arrays within a file. Putting states population in order -

**this first post don't know if did right. have read file , put list in order smallest largest population. alabama , shows 1 time. think problem "for" statement not sure. "return" statement. file set this alabama,4779736 alaska,7102313** import java.io.file; import java.io.ioexception; import java.io.printwriter; import java.util.scanner; public class inorder { /** * @param args * @throws ioexception */ public static void main(string[] args) throws ioexception { // todo auto-generated method stub printwriter prw = new printwriter("outfile.txt"); file f = new file("census2010.txt"); if(!f.exists()) { system.out.println( "f not exist "); } scanner infile = new scanner(f); infile.usedelimiter ("[\t|,|\n|\r]+"); ...