Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Nico van de Kamp

Greenhorn
+ Follow
since Jan 25, 2017
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nico van de Kamp

Hello,

Maybe stupid question and I'm not certain if may ask this question but:
- In 2019 I have done the OCA certification for JAVA 8.
- I'm now "In Between Jobs" , and I thought to finish my OCP in... two/three months.
- I have read the book "OCP Oracle Certified Professional Java SE 8 Programmer II" (Jeanne Boyarsky/Scott Selikoff), one time in the past weeks.
- I have made for every chapter the examples, change the examples by myself, in Eclipse. And so far I can follow this, what it is doing.
- I'm now reading the book for the second time and I'm at chapter 5 again.
- BUT chapter 3 (Generics and Collections) and 4 (Functional Programming) are for me very hard. When I made the questions, it's a mess. I can follow the explanation but to reproduce it, it is hard!

For example I do understand what a Functional Interfaces are and what you can do with it, I can follow it. But to apply it  or to reproduce it, certainly when it is mixed up with lambda's, streams, Generics, Lists, method references etc, than I'm getting completey lost! (I'm reading more than once "Ok what was before a function of 4 lines is now achieved the same in one line (lambda)".)

My question is, does someone have an advise or tip, how to get this easier to understand in steadof that just learning a lot of tables from the the top of head and hoping that I remember the righ table(s) from the book? (There are a lot of tables in the book they say mostly "you have to memorize it...",)

Again, maybe stupid question, but maybe is someone saying you are not the first one there is a site... otherwise I have to find out by myself...

Nico
Ok thanks Stephan

I'm using the book of Jeanne Boyarsky & Scott Yelikoff Java 8, because 1,5 year I have done the OCA certification.

In these book is nothing said about the Number() even not mentiond. But exist I see now. I hope that I can come further now, because it is very hard part.
Hello,

I'm busy with the OCP certification and here I have an example of code:


This gives an ClassCastException, ok that can I understand. But I expect nt compile error at tjhe line "unicorn.add(new Dragon());" , because the list has the type "Unicorn" and you add an Dragon object? Or at least I should expect an runtime error at this line.

What do I not understand or what have I missed?

Nico
1 week ago
Hello,

I'm bussy with OCP and Chapter 3 there Upper-Bounded Wildcards.

There is an example like:

But what is Number?
What kind of objects can I add to this list?
It is compiling, it running...

The method they give in the book:

Or is this a mistake in the book (typo) in the declaration? (is not mentioned in the studyguide as a mistake)

I'm asking this, because the declaration is with "List<? extends Number>" and not as 'norma'l with "List<Integer>", see example Tutorialspoint below.
I have found this on Tutoiralspoint:


But I can follow this how this works but what is Number? Number does not exist in Java as far as I remember. Is not declared anywhere. I know/understand that the ? wil be converted to Object (tyep erasue)

Nico
Hello,

We are using Jenkins and there is a groovy script created by my colleague but he is on holliday. I have some Java knowledge and I know that I can import a class.

But I will run the groovy script outside Jenkins in the groovy console or eclipse.

It seems to that this must be possible.

But the first line is:


I'm looking in the Jenkins dir to find there the EnvVars class. Till without success.

Maybe I'm searching in the complete wrong direction, but maybe someone can help me out with this or has a suggestion that will put me in the right direction.

Thanks in advance.

BR.

Nico
5 months ago
Hello Tim,

Thanks for you're answer. I like to give info so that others know what I'm doing and mark my questions with red. But ok, maybe it is to much.

Friday late I understand the clue or let say I think I know for now the clue. It is the last line in my code example:


On most google site's what I found is this line not declared or explained! I was not aware what this was doing or the what the meaning of this line is. But in other example or a book what I have bought, I found this:


So this line is I think doing were I was searching and looking for. Than I understand more or less how it can work.

What still not understand is with POLLING, how do I know at Jenkins side, what is new commited in SVN and do I have to check out?

With regards,

Nico
1 year ago
Hello,

This year feb. I started working with Jenkins.  Now I want to deploy new versions from SVN.

I understand there two ways:
  • Push: initiative is at the side of SVN.
  • Pull: initiative is at Jenkins side by polling.


  • On this moment I prefer the Push method, but...


    Structure in SVN is:
    > Implementation
      > Data
         > Tool
            > tags
               >Toolname-<version number> #Location 1: This is a directory and for every new version a directory will be added with files.
                 > all kind of files

         > Tool
            > tags
               >Toolname-<version number> #Location 2: This is a directory and for every new version a directory will be added with files.
                 > all kind of files



    1. Push Method:
    I have found that at the SVN post-commit hook (at the repository/hook) has to be created like:


    This is the 'simple' script version. There is also a 'Robust' version but to explain how does this work it make no difference if we look to the simple version or the robust version I think

    I think at the Jenkins side I have to do:
    1. I have to create a freestyle job with "Source Code Management" see my screenshot "2019-05-03 08_20_36-Jenkins_job SVN.png"
    2. And do I have to create a "Remote Build trigger" see my screenshot "2019-05-03 08_28_06-Jenkins Build trigger.png"

    But my question are:
    1. What makes the connection between SVN and Jenkins?
       - I understand if something is committed were does that script point to the instance of Jenkins? At which part is the connection declared?
       - And were does that script make a kind of connection with that specific job? or is that ${UUID}
       - And my idea is that pos-commit hook need to placed at the location of the repository were we are interested in. This means that if somenthing in SVN is commited, but that has nothing todo were we are not interested, the script will not be executed. Or does it work different?
    2. What will trigger the Job? must I create a trigger "Trigger builds remotely"? If so, can I create any kind of token string? like my name? If I need this than I think I need also to fill that token at the SVN side or...?
    3. And do I have to create for every SVN location a new Job and than also for every SVN location a post-commit hook script? I think so, but I'm not sure


    2. Pull by Polling Method:
    First thing to is not difficult, create a "Poll scm schedule" for the Crontab.
    But than? What todo next?

    My questions about polling are:
    1. Now I have connection between Jenkins and SVN. I have the Cronjob running.
       - But how do I know if there is a new version?
       - How do I know which is the new version? Which directory is new and do I have to pick up from SVN
       - And what does it trigger the job? I mean ok, If I have found with Jenkins the latest version to check-out, what made that the job is triggered and the build is started and the directory's/files's are checked out?


    Or does any know a good tutorial were all this is explained? I have googled a lot and bought three books, I can't find the answers on these questions. I hope that someone can help me out with this or point me in direction so that I can solve it by myself.

    Thanks in advance.

    With regards,

    Nico
    1 year ago
    Hello,

    I'm busy with the certification of OCA 1Z0-808.
    My question is simple I think, why must be the variable of a switch statement a constant? I believe in other languages is this not necessary.


    Maybe a stupid question, and maybe due to my English, what is exactly a 'literal'? a discreet value string or number like "Test" or 5?

    Nico