Posts

java - WildcardPatternSuite finds no classes -

i'm trying use wildcardpatternsuite junit-toolbox , testsuite fails with java.lang.exception: failed scan c:\users\ms\workspaces\comet4\pubservertests\build\com\priint\pubserver\tests\testsuites using wildcard patterns [**/*test.class] -- org.junit.runners.model.initializationerror @ org.junit.runners.model.initializationerror.<init>(initializationerror.java:32) @ com.googlecode.junittoolbox.wildcardpatternsuite.findsuiteclasses(wildcardpatternsuite.java:128) @ com.googlecode.junittoolbox.wildcardpatternsuite.getsuiteclasses(wildcardpatternsuite.java:54) @ com.googlecode.junittoolbox.wildcardpatternsuite.<init>(wildcardpatternsuite.java:180) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:57) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) @ java.lang.reflect.const...

php - How can i see profile details according to id? -

i trying see profile details there problem getting 'id'. have errors: severity: warning message: missing argument 1 customers::details() filename: controllers/customers.php and, a php error encountered severity: notice message: undefined variable: id filename: controllers/customers.php here model: function selectcustomer(){ $this->db->select('*'); $this->db->from('customers'); $query = $this->db->get(); return $query->result(); } function detailscustomer($id){ //$id= $_get['id']; //$this->db->select('*'); //$this->db->from('customers'); $this->db->where('id', $id); $query = $this->db->get('customers'); } here controller: publicfunction viewcustomers(){ $this->load->model('customermodel'); $result = $this->customermodel->selectcustomer(); return $result;} public function d...

javascript - Is it possible to define settimeout intervals in array? -

here's situation: var firefliptimer = ''; var unfliptimer = []; $('.categorybox').on('mouseenter', '.box', function() { cleartimeout(firefliptimer); var $t = $(this); var = $t.index(); cleartimeout(unfliptimer[i]); bht = settimeout(function() { flipcat($t); }, 250); }).on('mouseleave', '.box', function() { cleartimeout(firefliptimer); var $t = $(this); var = $t.index(); unfliptimer[i] = settimeout(function() { unflipcat($t); }, 600); }); basically there div, on: mouseenter - animates mouseleave - after 600ms comes previous state before animation. i'm trying thing, if leave mouse , enters div in 600ms interval, div not come previous state :) as there multiple div's i'm trying handle settimeout intervals array, not successfully... is possible define intervals in array? or should use different method task. p.s. problem in case last element reacts mouseleave event, if go...

javascript - Detecting collision on canvas border -

i making little game friends trying detect collision when bumping in the walls of canvas, , made work when hit wall caracter gets stuck.. , dont know how find out way make him move again. think of guys me out one. help! javascript / jquery: function player() { this.w = 50; this.h = 60; this.x = (cw / 2) - (this.w / 2); this.y = (ch / 2) - (this.h / 2); this.name = username.value; this.nw = ctx.measuretext(this.name).width; // username.clientwidth + 1; this.src = playerimage; this.dx = 0; this.dy = 0; this.render = function() { ctx.drawimage(this.src, this.x, this.y, this.w, this.h); ctx.fillstyle = 'orange'; ctx.font = '15px arial, sans-serif'; // fixa x-värdet ctx.filltext(this.name, (this.x + this.w / 2) - (this.nw / 2), (this.y - 6)); } } var player = new player(); function animate() { if(player.x > 0 && player.y > 0 && player.x + player.w < cw ...

XML with PHP “echo” getting error “Extra content at the end of the document” -

i have asked question here on how generate sitemap automatically, need xml? here solution have concluded: <?php header ("content-type:text/xml"); echo '<?xml version="1.0" encoding="utf-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; // code extract , echo links file echo ' </urlset>'; ?> <?php // original php code chirp internet: www.chirp.com.au // please acknowledge use of code including header. $url = "assets/includes/menu.inc"; $input = @file_get_contents($url) or die("could not access file: $url"); $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; if(preg_match_all("/$regexp/siu", $input, $matches, preg_set_order)) { foreach($matches $match) { // $match[2] = link address // $match[3] = link text echo '<url><loc>' . $m...

java - Multi module Ant build system and Eclipse -

se lets starting multi-module project. library , 2 modules depend on library. i planning on using ant plus ivy dependency management. looking way integrate eclipse + ant + ivy. so standard way of working these tools create different project in eclipse each module? or create single project , multiple src folders each module?. although question might seem subjective one, looking standard way handle multi-module projects under eclipse when using external tool building , dependency management. , standard mean, in way eclipse find dependencies project, auto complete works , src , javadoc available when needed inside ide, when debuging within eclipse, source attached navigate through breakpoints. please don't tell me use maven, have used , hate passion. you have ivyde works dependency management (can jar repository or ivy module in workspace). each eclipse project ivy module dependency may resolved workspace (build path entry eclipse project) or ivy resolver (buil...

ruby - php_serialize gem doesn't load -

i'm trying use gem: php serialize i type gem install php-serialize and in main.rb ruby app require 'php_serialize' the result is boot error went wrong while loading main.rb loaderror: cannot load such file -- php_serialize the environment sinatra, , in main.rb have: require 'rubygems' require 'sanitize' require 'sinatra' require 'active_record' require 'nokogiri' require 'open-uri' require 'uri' require 'pry' require 'chronic' require 'json' require 'zip' require 'php_serialize' any idea? update rubygems environment: - rubygems version: 2.1.11 - ruby version: 2.0.0 (2013-11-22 patchlevel 353) [x86_64-darwin13.0.0] - installation directory: /users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353 - ruby executable: /users/scrivoaroby/.rvm/rubies/ruby-2.0.0-p353/bin/ruby - executable directory: /users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353/bin - spec c...