background preloader

Jmtobar

Facebook Twitter

José Miguel Tobar

Tricks with Direct Memory Access in Java « Highly Scalable Blog. Java was initially designed as a safe, managed environment.

Tricks with Direct Memory Access in Java « Highly Scalable Blog

Nevertheless, Java HotSpot VM contains a “backdoor” that provides a number of low-level operations to manipulate memory and threads directly. This backdoor – sun.misc.Unsafe – is widely used by JDK itself in the packages like java.nio or java.util.concurrent. It is hard to imagine a Java developer who uses this backdoor in any regular development because this API is extremely dangerous, non portable, and volatile. Nevertheless, Unsafe provides an easy way to look into HotSpot JVM internals and do some tricks. Sometimes it is simply funny, sometimes it can be used to study VM internals without C++ code debugging, sometimes it can be leveraged for profiling and development tools. Tree List Recursion Abstract. Stanford CS Education Library: one of the neatest recursive pointer problems ever devised.

Tree List Recursion Abstract

This is an advanced recursive pointer problem that uses a binary tree and a doubly linked list. You should be comfortable with pointers and recursion to understand this problem. Binary Trees. By Nick Parlante This article introduces the basic concepts of binary trees, and then works through a series of practice problems with solution code in C/C++ and Java.

Binary Trees

Binary trees have an elegant recursive pointer structure, so they are a good way to learn recursive pointer algorithms. Contents Section 1. Binary Tree Structure -- a quick introduction to binary trees and the code that operates on them Section 2. RESTful web services with MongoDB. A few tutorials ago,in the tutorial about RestEasy and Hibernate, we saw how we could integrate RESTEasy with Hibernate.Now in this tutorial we will see how can we create Restful web services with RestEasy and MongoDB.

RESTful web services with MongoDB

As an example we will see how to expose the documents of collection named Categories.The service class will be: Since our service class is ready we now need to create the Application class: package com.javaonly.service; import java.util.HashSet; import java.util.Set; import javax.ws.rs.core.Application; public class CategoryApplication extends Application { private Set<Class<? IAmDann. PhantomJS: Headless WebKit with JavaScript API. Vimcasts - free screencasts about the text editor Vim. Java Anti-Patterns. This page collects some bad code that may not look so obviously bad to beginners.

Java Anti-Patterns

Beginners often struggle with the language syntax. They also have little knowledge about the standard JDK class library and how to make the best use of it. In fact I have collected all examples from everyday junior code. I have modified the original code to give it example character and such that it highlights the problems. Many of these problems can easily be detected by SonarQube.

Some of these may seem like micro-optimization, premature optimization without profiling or constant factor optimizations. If you are interested in how to pogram compiler friendly, look at the JDK Performance Wiki. In the end a lot of your application's performance depends on the overall quality of your code.

Compare these scenarios (assume 100MB young generation): In the slower scenario the transaction duration is 10 times longer. The Startup Diet: How $99 and four hours every 2 weeks can provide rocket fuel to an Entrepreneur.

Learning

Reflections on the Eiffel Tower Isn't it romantic? What could be more perfect than a beautiful sunset here in Paris? There was a big storm all day long, but I could see the clouds were beginning to break up a little to the west, and I knew there was a pos. $ cheat git. Joseph Perla. Don't write on the whiteboard. Oauth. Learn.knockoutjs.com. In this first tutorial you'll experience some of the basics of building a web UI with the Model-View-ViewModel (MVVM) pattern using knockout.js.

learn.knockoutjs.com

You'll learn how to define a UI's appearance using views and declarative bindings, its data and behavior using viewmodels and observables, and how everything stays in sync automatically thanks to Knockout's dependency tracking (even with arbitrary cascading chains of data). Using bindings in the view In the bottom-right corner, you've got a viewmodel containing data about a person. In the top-right corner, you've got a view that's supposed to display the person data. Right now it just displays "todo", so let's fix that. Modify the two <strong> elements in the view, adding data-bind attributes to display the person's name: <p>First name: <strong data-bind="text: firstName"></strong></p><p>Last name: <strong data-bind="text: lastName"></strong></p> Running the code.

Vim: revisited. I’ve had an off/on relationship with Vim for the past many years.

Vim: revisited

Before, I never felt like we understood each other properly. I felt that the kind of programming I’m doing is not easily done without plugins and some essential settings in .vimrc, but fiddling with all the knobs and installing all the plugins that I thought I needed was a process that in the end stretched out from few hours to weeks, months even; and it the end it just caused frustration instead of making me a happier coder. Infographics & Data Visualizations - Visual.ly.

The TILT: The Coolest Cooling Stand for the MacBook Pro by madMINDS. Hey Kickstarters thanks for checking out The TILT for MacBook Pro.

The TILT: The Coolest Cooling Stand for the MacBook Pro by madMINDS

We are just two brothers with one bold idea...to put the "cool" back in cooling stands. As proud aluminum unibody MacBook Pro owners, we grew tired of the cooling options currently in the marketplace. Generic cooling stands & pads do not reach or target the hottest areas of the MacBook Pro and with their ugly and bulky design, these stands and pads ruin the sleek Apple design we all appreciate. Ejemplo simple con Ibatis - ChuWiki. Vamos a hacer aquí un pequeño ejemplo con Ibatis.

Ejemplo simple con Ibatis - ChuWiki

No voy a poner código completo, pero sí todo lo necesario para hacerlo. Veremos como hacer INSERT, UPDATE, DELETE y SELECT. La base de datos Como base de datos usaré MySQL y en la base de datos "prueba" tengo la siguiente tabla.

Recomendation