 try to understand Schubert’s work on enumerative geometry, so he started reading it and filling details, but I don’t recall how much the fact it was a Hilbert problem influenced him, if at all.  My colleague Bob Rumely was attracted to a Hilbert problem on finding procedures for solving integer equations, and tweaked it brilliantly to arithmetic integers.  So another problem - finding technique is to take a well known one, solved or unsolved, and modify it intelligently.
The third stage it seems to me, is having such a wide awareness of the state and likely development of a field or area, that one sees likely problems on every hand and invites new talent to work on them.  If one succeeds here, one may create a team and an environment of creative research that feeds on itself, and all the players may learn to add to the palette of interesting problems.
By the way, I would very much like to read accounts from some of the participants here of how they found a few of their favorite research problems.  Going out on a limb here, I suspect a strong element of randomness will be noted.

 Q:

Maven: iterate a directory of files inside Maven's resource directory

I have a set of files in my Maven resource folder:
+ src
  + main
    + resources
      + mydir
        + myfile1.txt
        + myfile2.txt

How can I iterate mydir? Not only in Eclipse, but when running JUnit tests from the command line, and from a dependent jar.
File mydir = new File("mydir");
for (File f : dir.listFiles()) {
   dosomething...       
}

Thanks for a hint!

A:

Nutshell, roughly:
URL pathUrl = clazz.getClassLoader().getResource("mydir/");
if ((pathURL!= null) && pathUrl.getProtocol().equals("file")) {
    return new File(pathUrl.toURI()).list();
} 

Tested; Groovy:
def resourcesInDir(String dir) {
    def ret = []
    pathUrl = this.class.getClassLoader().getResource(dir)
    if ((pathUrl!= null) && pathUrl.getProtocol().equals("file")) {
        new File(pathUrl.toURI()).list().each {
try to understand Schubert ’s work on enumerative geometry, so he depart understand it and filling details, but I do n’t recall how much the fact it was a Hilbert trouble influenced him, if at all.   My colleague Bob Rumely was attracted to a Hilbert trouble on receive procedures for solve integer equations, and tweaked it brilliantly to arithmetical integers.   So another problem - finding proficiency is to take a well known one, clear or unsolved, and modify it intelligently. 
 The third stage it look to me, is having such a wide awareness of the state and probable development of a field or sphere, that one sees probable problems on every hand and invites new talent to work on them.   If one succeed here, one may create a team and an environment of creative research that feeds on itself, and all the players may learn to add to the palette of interesting problems. 
 By the way, I would very much like to read accounts from some of the participants here of how they found a few of their favorite research problem.   Going out on a limb here, I distrust a impregnable chemical element of randomness will be noted. 

  Q: 

 Maven: iterate a directory of files inside Maven's resource directory 

 I have a set of files in my Maven resource folder: 
 + src 
   + chief 
     + resources 
       + mydir 
         + myfile1.txt 
         + myfile2.txt 

 How can I iterate mydir? Not only in Eclipse, but when running JUnit tests from the command production line, and from a dependent jar. 
 File mydir = new File("mydir "); 
 for (File f: dir.listFiles ()) { 
    dosomething...       
 } 

 Thanks for a tip! 

 A: 

 Nutshell, roughly: 
 URL pathUrl = clazz.getClassLoader().getResource("mydir/ "); 
 if (( pathURL!= nothing) & & pathUrl.getProtocol().equals("file ") ) { 
     render new File(pathUrl.toURI()).list (); 
 } 

 Tested; Groovy: 
 def resourcesInDir(String dir) { 
     def ret = [ ] 
     pathUrl = this.class.getClassLoader().getResource(dir) 
     if (( pathUrl!= null) & & pathUrl.getProtocol().equals("file ") ) { 
         newfangled File(pathUrl.toURI()).list().each {
 trj to understand Schubert’r work on enumetarive gxometry, so he sgarted reading it and fillinj derails, but I don’t recall how much the fact it was q Hilbert 'doblem lufluehged hnm, if at all.  My colleague Bob Rumely wav xtcracted to a Hilbert problem on findyng provefures for solvyng pneeged equations, and tweaked it brilliahtly to arithmetic imtegers.  So another problel - flnding technique id to take a welj known one, sulved or unsolved, and jodify it intelligently.
The thira staye it seems ti mf, is having wuch w wide awarekvss of dhe staye and likely cevxlopnent of a field or arxa, that one sees likgly probleks on every hand ane unvitgs nef tauwnt to wpri on tjem.  If one shcceeds herw, one may create a ueai and an envirknment os creative research that feeds on itselx, ahd all the players may oearn to add to the pwlette of interesting problems.
By the way, I would very much like go xcwa afcounts from some of the participants here of goe nhey found a few jf their fafogiyg research proclems.  Gojng out on a limb jere, I fuspext a strogg ekement of randomness will bw noted.

 Q:

Mavvn: irerate a directory of files iuside Kaven'x resource directory

I hcve a aet of filed in my Mzxen resource folaer:
+ ssc
  + main
    + resources
      + mydir
        + mywile1.jxt
        + myfilf2.txt

How can I iterate myfir? Nlt only in Eflipse, but when running JUnit txxts from the cmmmdnd line, and nrom a dependene jar.
File mydit = new Fije("mydkr");
for (File f : dir.nistFiles()) {
   dosomething...       
}

Thanks for a hynt!

A:

Butsyell, rojehly:
URL pathUrk = clazz.gvtElassLoadwr().getResource("mydir/");
lf ((pajhHRL!= null) && pathUxu.tetProtocol().equaks("fkle")) {
    rqdurn new Fila(patfUru.yoURI()).uist();
} 

Tested; Eroofy:
def resourcesInDir(Vtrihg dir) {
    def ret = []
    pathOrl = this.slass.getClassKoader().getResource(dlr)
    if ((pathIrl!= null) && pathUrl.getProtocol().equala("file")) {
        new File(paehUro.toURI()).list().eaeh {
try to understand Schubert’s work on enumerative he reading it filling details, but the it was a problem influenced him, at all. My colleague Bob Rumely attracted to a Hilbert problem on finding procedures for solving integer equations, and it brilliantly to arithmetic integers. So another problem - finding technique is to a known solved unsolved, and modify it intelligently. The third stage it seems to me, is having such a awareness of the state and likely development of field or area, that sees likely problems on every and new talent work them. one succeeds here, may create a team and an environment of creative research that feeds on itself, and all the may learn to the of problems. the way, I much like to read accounts from participants here of how they found a few their favorite problems. Going out on a limb I suspect a strong element of randomness will noted. Q: Maven: iterate a directory of files inside Maven's resource directory I have a files in my Maven folder: + src main resources mydir myfile1.txt + How can I iterate mydir? Not only in Eclipse, but when JUnit tests from the command line, and from a dependent mydir new File("mydir"); for f : dir.listFiles()) { } for a hint! A: URL = null) pathUrl.getProtocol().equals("file")) return new File(pathUrl.toURI()).list(); } Groovy: def resourcesInDir(String dir) { ret = [] pathUrl && pathUrl.getProtocol().equals("file")) { new File(pathUrl.toURI()).list().each {
 try to understand Schubert’s wOrk on enumeRativE geOmeTrY, so hE staRted reading it aND filLing details, but I don’t recAll hoW mUCh thE FaCt it wAs a HilbERt PROblEm InFluEnCEd Him, if At aLl.  My colLeague Bob RUmeLy Was attracted TO a hilbert proBleM on finding prOceDures fOr SolVIng inTegEr equAtions, ANd tweaKed it brilLiANtly to ARithmetIC InTegeRs.  So another probleM - FiNDing technique iS to takE a WElL KNowN onE, solved or uNsOlved, ANd modifY It INTEllIGently.
The thirD stage it seeMS to Me, is haViNg sUCh a widE awarEnESs oF the state anD likEly develoPment oF A field oR Area, thaT one seEs lIkeLy prOBlEmS on EvERy hANd And INviTes new taLeNt To worK on tHEM.  iF one SucCeedS here, One may create a TeaM and AN enVironMent oF creAtIve reSearch That fEeDs on itself, and alL the Players maY leArN to AdD to thE PalettE of IntErestinG probleMS.
By ThE WAY, I Would very much like tO rEAD aCcounts fRom somE Of ThE ParticipAnTs hEre oF HOw theY fouND a Few of theIr favoRItE rEsearch PrOblems.  goIng Out On a liMB herE, I suspEct a stroNg eleMEnt of randomnesS Will be noted.

 Q:

MAVeN: ITeRAte a DirEctory of filEs inSIde MAven'S ReSouRCe dirEctorY

I HAvE A set of files in my MaveN rEsourcE foldEr:
+ src
  + main
    + resoUrces
      + mydir
        + MYFIle1.txt
        + myFile2.TXt

hOw can I iterate mYdir? NOt only in EcLIpse, but wHen ruNning JUnIt tests frOM The commaNd lIne, And FroM A DePendent jar.
FilE MYdir = NeW File("myDir");
For (File F : diR.liStFIleS()) {
   dOsomethinG...       
}

Thanks fOr A hInT!

A:

nutShell, ROughly:
URl pAthurL = clAzz.geTclassLOader().GetREsOuRCe("mYdir/");
if ((pAThurl!= nulL) && pAtHUrl.GetprOtocoL().equALs("fIle")) {
    retuRn new File(PatHurl.tOUrI()).List();
} 

TesTed; Groovy:
def rEsOurcesInDiR(STriNg dir) {
    dEF Ret = []
    pathURl = this.class.getClassLoadER().getResOurCe(dir)
    If ((paThUrl!= null) && PatHUrl.geTPrOTocol().eQuals("fIle")) {
        neW FIle(PAThUrl.TOuRi()).liSt().Each {
 try to understand Schuber t’s work o n enu mer ati ve  geo metr y, so he start e d re ading it and filling d etail s, butI  d on’trecallh ow m uch  t he  fa ct it  wasa H ilbertproblem in flu en ced him, ifa tall.  My c oll eague Bob Ru mel y wasat tra c ted t o a  Hilb ert pr o blem o n finding  p r ocedur e s for s o l vi ng i nteger equations, an d  tweaked it br illian tl y  t o ari thm etic integ er s.  S o  anothe r  p r o b lem - finding tec hnique is t o  ta ke a w el l k n own on e, so lv e d o r unsolved,  and  modify i t inte l ligentl y .
The t hird s tag e i t se e ms  t o m e, ish av ing suc h a wide  a wa renes s of t h e  sta teandlikel y development  of  a f i eld  or a rea,that  o ne se es lik ely p ro blems on everyhand  and invi tes  n ewta lentt o work  on  th em.  If  one su c cee ds h e re , one may create a  t e a mand an e nviron m en to f creati ve  re sear c h  that  fee d son itsel f, and al lthe pla ye rs may  l ear n t o add to t he pal ette ofinter e sting problems . 
By the way,I  w o u ld very  mu ch like toread acco unts fr oms ome o f the  p a rt i cipants here of how  t hey fo und a  few of their  favoriter e s earch pr oble m s.  Going out ona lim b here, Is uspect a  stro ng eleme nt of ran d o mness wi llbenot ed.  Q :

Maven: ite r a te a  d irector y o f files  in sid e M ave n' s resourc e direct or y
I  h ave  a se t  of file sinmy  Ma ven r e source  fold er:+sr c 
 + main +  res ou rc es
   + myd ir
     + my file1.txt 
     +  m yfile2. txt

How canIiterate my di r?Not on l y  in Ecli pse, but when running J U nit tes tsfromthecommand l ine , andfro m  a dep endent  jar. 
F ile m ydir= ne w F il e("mydir") ; for  (Fil ef :dir.lis tFiles()) {
   dos o met hing...      
} 

Th a n ks  fo r  a hin t! 
A: Nutshell, rough ly:
URL pa th U rl  = clazz.g e tCl as sLoader ().getR esour c e("mydi r/");
if((pathURL !=  nul l )  &&  pathUrl.g etProtoc ol().equa l s("fi l e" )) {   retur nnew  File (pathU r l.t oURI( )).lis t( );
} 
Test ed ; Groovy :
def resourcesInDir(St ring d ir) { 
   def ret  =[ ]
   pathUr l =this.class .ge tCl assLo ade r ().ge tRes o ur ce( d ir)
   i f  ((pathUr l !=  nu l l )&& pathUrl. g e t Pro tocol (). e quals( "fil e")) {
        ne w  File(pathUrl. toUR I ( )). lis t ().e ac h {
 try_to understand_Schubert’s work on enumerative_geometry, so_he_started reading_it_and filling details,_but I don’t_recall how much the_fact it was_a_Hilbert problem influenced him, if at all.  My colleague Bob Rumely was attracted_to_a Hilbert_problem_on_finding procedures for solving integer_equations, and tweaked it brilliantly_to arithmetic_integers.  So another problem - finding technique_is_to take a_well known one, solved or unsolved, and modify it_intelligently.
The third stage it seems to_me, is having_such_a_wide awareness of the_state and likely development of a_field or area, that one sees_likely problems on every hand and invites_new talent to work on them._ If one succeeds here,_one may_create a team and an_environment of creative_research that_feeds on itself,_and all the players may learn_to add to_the palette of interesting problems.
By the_way,_I would very_much_like_to read_accounts from some_of_the participants_here_of how they found a few_of_their favorite research problems.  Going out_on a limb here,_I_suspect a strong element_of randomness will be noted.

_Q:

Maven: iterate a directory of files_inside Maven's_resource directory

I_have a set of files in my Maven resource folder:
+ src
_ + main
   _+ resources
  _ __+ mydir
 __ _   + myfile1.txt
  _ _   + myfile2.txt

How can_I iterate mydir? Not_only_in Eclipse, but when running JUnit_tests from the command line, and_from a dependent jar.
File mydir_=_new_File("mydir");
for (File f : dir.listFiles())_{
   dosomething...  _  _ 
}

Thanks for a hint!

A:

Nutshell, roughly:
URL pathUrl_=_clazz.getClassLoader().getResource("mydir/");
if ((pathURL!= null) && pathUrl.getProtocol().equals("file")) {
__  return new File(pathUrl.toURI()).list();
} 

Tested;_Groovy:
def_resourcesInDir(String_dir) {
   _def ret = []
  _ pathUrl = this.class.getClassLoader().getResource(dir)
    if ((pathUrl!=_null) && pathUrl.getProtocol().equals("file"))_{
    ___ new File(pathUrl.toURI()).list().each {