Posts

java - How does all annotations work in TestNg without main() method -

i have doubt in testng java. completly new testng. doubt is, how test cases executing using testng in java without having main() method? please suggest me if have ideas. following code example of sample test case using testng in java. if notice, can find 1 thing there no main() method in code. then, how testcases executing? i have doubt. main() method needed selenium webdriver , testng combination execute script? or can execute testcases without main() method? if can execute testcases without main(), how possible? package com.first.example; import org.testng.annotations.test; public class demoone { @test public void firsttestcase() { system.out.println("im in first test case demoone class"); } @test public void secondtestcase() { system.out.println("im in second test case demoone class"); } } this valid doubt many testers have. because main() method needed run java program , while writing tests in tes...

sql - Can you have a foreign table name like a foreign key? -

i'm playing ideas. want foreign key want table key should used in row. foreign keys can refer different tables. you'd returning 1 result given query needed dereference 'pointer'. i know store table name , use 2 select statements it, inserting result of first select table , key next call index right table, can done single select on database? sql like? edit: let me see if can come example. mediatable id | name | owner| type | fkey mp3 id | artist | album | title | bitrate | codec | data movie id | title | resolution | imdburl | audiocodec | videocodec | data ok contrived ... leta want search mediatable titles (in mp3 or movie tables) mediatable.owner = "ekl" assuming fkey foreign key of id field. can "mediatable.type" select table fkey should apply to? yes, know not best way particular example, easier explaining 2 larger projects want this. basically, want parameterise foreign key , add table refer. theoretically, can ...

node.js - Easy way to reference Documents in Mongoose -

in application have user collection. many of other collections have author (an author contains user._id , user.name), example post collection. since need _id , name display e.g. posts on ui. this works fine, , seems approach, since everytime deal posts don`t have load whole user object database - can load post.author.userid/post.author.name. now problem: user changes or name. author objects scattered around in database still have old author. questions: is approuch solid, or should reference userid everywhere need it? if i'd go solution i'd remove author model , need make user database call everytime want display current users`s name. if leave author is, way implement solution situations user.name change? i write service checks every model has authors of current user._id , updates them of course, sounds tedious. although i'm not sure there's better solution. any pro tipps on how should deal problems in future? yes, sometime databa...

sql server - SQL - select data that have dates greater than a month in a year -

i have table called quiz , has 3 columns: enteryear entermonth quizmark 2013 7 9.5 2013 8 8.5 2013 9 9.75 2013 10 10 2013 11 7.75 2013 12 8.5 2014 1 5 2014 2 8.75 2014 3 10 now, want select entries enter after sept. of 2013 (including sept). tried wrong: select * quiz q q.year>=2013 , q.month>=9 this omitted entries in 2014 since months less 9, want them in result since after sept. of 2013. so then, tried this select * quiz q convert(date, cast(q.year varchar(4))+'/'+cast(q.month varchar(2))+'/01')>='2013/9/01' which showed result half second , disappeared giving error message: msg 241, level 16, state 1, line 1 conversion failed when converting date and/or time character string." can correct code achieve result, appreciated! ...

python - Fast basic linear algebra in Cython for recurrent calls -

i'm trying program function in cython monte-carlo simulation. function involves multiple small linear algebra operations, dot products , matrix inversions. function being called hundred of thousands of times numpy overhead getting large share of cost. 3 years ago 1 asked question: calling dot products , linear algebra operations in cython? have tried use recommendations both answers, first scipy.linalg.blas still goes through python wrapper , i'm not getting improvements. second, using gsl wrapper slow , tends freeze system when dimensions of vectors large. found ceygen package, looked promising seems installation file broke in last cython update. on other hand saw scipy working on cython wrapper lapack, looks still unavailable ( scipy-cython-lapack) in end can code own c routines operations seems kind of re-inventing wheel. so summarize: there new way kind of operations in cython? (hence don't think duplicate) or have found better way deal sort of problem haven...

php - How to Update Two table Data one after other In codeigniter? -

Image
how update plan vendor_plan_task_status_mapp table. the model plan update public function updateplandata(){ $planid = $this->input->post('plan_id'); $data = array( 'plan_title' => $this->input->post('plan_title'), 'plan_price' => $this->input->post('plan_price'), 'plan_desc' => $this->input->post('plan_desc') ); $this->db->where('plan_id', $planid); $this->db->update('tbl_plan', $data); $this->db->where('plan_id',$planid); $this->db->delete('plan_task_mapping'); foreach ($this->input->post('task_id') $key => $value) { $data2 = array( 'plan_id' => $planid, 'task_id' => $value ); // echo "index {$key}'s value {$value}."; ...

freeze - Visual Studio 2010, HP Fortify freezing -

Image
i've run hp fortify scan on large project of approximately 500k lines of code appears stuck on "loading issues" modal no further progress 12 hours. i can see analysis results listing items under critical , high, because "loading issues" modal not completing, cant them. do know why happening , how can resolved ?