Kubernetes allows for highly precise resource utilization and minimal cloud waste. But in reality, there are many good reasons why we have not yet reached this goal.
In this post, we’ll focus on getting more familiar with Jupyter notebooks and how we can leverage them within Kubeflow as part of our machine learning workflow.
In this post, we’ll focus on getting a little more familiar with one of the first Kubeflow components that data scientists need familiarity with, Kubeflow Notebooks.
Jira is feature-rich and exceptionally flexible, bending to meet your needs. Here are the add-ons and integrations to improve your software delivery processes.
this article is part 2 of a tutorial that will walk through adapting an open source javafx radialmenu ( http://jfxtras.org/ ) to replace the netbeans platform system menu. it will build upon both previous tutorials and part 1 that demonstrate complete replacements for the default netbeans swing components using javafx. code examples will feature netbeans platform, javafx and css. part 1 of the article walks through some of the code upgrades necessary for the task. as of this article’s writing the open-source jfxtras radialmenu needed a few upgrades to act as a system menu replacement for a netbeans platform rcp. part 2 will show the specific algorithm and code to then utilize the upgraded radialmenu as described. when complete you should be able to produce a slick radial system menu like this: previous tutorials in the integrating javafx with the netbeans platform series we showed how to replace the netbeans swing menubar with javafx components. you can find these tutorials here (first link is part 1): https://dzone.com/articles/javafx-accordion-slide-out https://dzone.com/articles/tabs-tabuless-netbeans and they are extensions themselves of these great articles written by geertjan wielenga: https://dzone.com/articles/how-integrate-javafx-netbeans-part2 to fully understand and follow this tutorial you will need to start with the previous tutorials mentioned above, especially part 1. create recursive container building method like most of the previous menu replacement articles, we are going to use recursion to build our components. in this situation we want to recursively build our extended radialcontainermenuitemsp components that we upgraded in part 1 of this tutorial. add this recursive method to your jfxradial component class: private void buildradialcontainermenuitem(fileobject fo, final radialcontainermenuitemsp rcmi) { datafolder df = datafolder.findfolder(fo); dataobject[] childs = df.getchildren(); for (dataobject onechild : childs) { //create filler graphic for container imageview filler = imageviewbuilder .create() .image(new image("jfxradial/dark_compass_icon_16.png")).build(); if(fo.getname().equals("web browser")) { system.out.println(); } //if child is folder we need to build recursively if (onechild.getprimaryfile().isfolder()) { fileobject childfo = onechild.getprimaryfile(); //create radialmenucontaineritemsp final radialcontainermenuitemsp newcontaineritem = new radialcontainermenuitemsp(containersize, childfo.getname(), filler, false); //recursively build submenu buildradialcontainermenuitem(childfo, newcontaineritem); //add radialmenucontaineritem to radialmenu rcmi.addmenuitem(newcontaineritem); } else { object instanceobj = fileutil.getconfigobject(onechild.getprimaryfile().getpath(), object.class); if (instanceobj instanceof action) { //if it is an action we have reached an endpoint final action a = (action) instanceobj; string name = (string) a.getvalue(action.name); string cutampersand = actions.cutampersand(name); //create radialmenuitemsp final menueventhandler meh = new menueventhandler(a); //add action to radialmenuitemsp and hide graphic filler final radialmenuitemsp menuitem = new radialmenuitemsp(menusize, cutampersand, filler, false, meh); //add radialmenuitemsp to radialcontainermenuitem rcmi.addmenuitem(menuitem); } } } } the recursion process of course looks very similar to that found in our previous articles. one thing to note here that the way that because the radialcontainermenuitem class extends the radialmenuitem class and because of the logic we added to dynamically provide mouseclicked event handling, we can recursively build a radialcontainermenuitemsp with as many nested levels as the jdk has memory. then only the root node in the chain needs to be added to the radialmenu itself. feed the netbeans platform system folders into the recursion add this block of code to the end of your createradialmenu() method: fileobject menufolder = fileutil.getconfigfile("menu"); fileobject[] menukids = menufolder.getchildren(); //for each menu folder need to create either radialmenuitemsp or a radialmenucontaineritem to hold sub menus for (fileobject menukid : fileutil.getorder(arrays.aslist(menukids), true)) { try { datafolder.findfolder(menukid); //create filler graphic for container imageview filler = imageviewbuilder .create() .image(new image("jfxradial/dark_compass_icon_16.png")).build(); //create radialmenucontaineritem and recurse //extend a custom container that uses text labels like we did for radialmenuitemsp radialcontainermenuitemsp newcontaineritem = new radialcontainermenuitemsp(containersize, menukid.getname(), filler, false); buildradialcontainermenuitem(menukid, newcontaineritem); //add radialmenucontaineritem to radialmenu radialmenu.addmenuitem(newcontaineritem); } catch (exception ex) { //we couldn’t load so drop it on the floor } } again it looks very similar to all our previous examples. one small note here, i don’t want to actually show any graphics in my menus, only menu text labels. so the filler imageview object is just that… an invisible filler to satisfy the available constructors. adding this code should provide you with a view similar to this: this view of course is after i’ve started clicking around expanding layers. wow. that’s a lot of options. it makes you appreciate how efficient a traditional menu is in terms of space. so right here we’ve already encountered a problem that plagues radial menu’s in general… they take up a ton of space and block out whats behind them. but javafx to the rescue… lets reduce the opacity of the menu to a really low number like 0.1. you can do this by changing the fourth component of the “slightlytrans" color object defined at the top of the createradialmenu() method and recompile. let’s try it with something in the background like a javafx web browsing component: hmmm… a lot of those menu items are too transparent and they don’t show well over dark patterns and backgrounds. let’s up the opacity to 0.3… so we’re getting closer… not bad at all on a light background and a bit better on dark/mixed backgrounds. we should probably increase the opacity a bit more to 0.6. let’s try it on a deeply dark background like a worldwind application! ugh. that grey box represents the specified scene size inside the transparent jfxpanel component. this is a bug when trying to overlay transparent javafx scenery on native/heavyweight components. basically the z-ordering gets mucked up. the non-transparent nodes in the javafx scene are rendered properly but everything else not so much. if someone out there has a workaround please let me and everyone else know. so from now on we will all agree to keep our heavyweight and translucent javafx separate and our opacity around half for all to see. if you follow those rules and these articles you should be able to make lot’s of cool looking menus and interfaces like the one at the start of this article and the one below:
To virtualize and make use of your data, you need to bring it into your platform. See how to do this with JBoss and OpenShift so you can get your data when you need it.
After a long career at Sun Microsystems and an impressive run at Liquid Robotics (a Boeing company subsidiary), the pioneer of the Java programming language has officially joined the team at AWS.
Want to learn more about the latest happenings in Java? Check out this monthly post looking at the Java 11, news in Kotlin and Spring, conferences, and more.
This month's edition of Java Annotated Monthly not only focuses on news and tutorials for Java, but also looks at cultural issues in the realm of software development.