background preloader

Java Programming Cheatsheet

Java Programming Cheatsheet
This appendix summarizes the most commonly-used Java language features in the textbook. Here are the APIs of the most common libraries. Hello, World. Editing, compiling, and executing. Built-in data types. Declaration and assignment statements. Integers. Floating-point numbers. Booleans. Comparison operators. Printing. Parsing command-line arguments. Math library. The full java.lang.Math API. Java library calls. Type conversion. Anatomy of an if statement. If and if-else statements. Nested if-else statement. Anatomy of a while loop. Anatomy of a for loop. Loops. Break statement. Do-while loop. Switch statement. Arrays. Inline array initialization. Typical array-processing code. Two-dimensional arrays. Inline initialization. Our standard output library. The full StdOut API. Our standard input library. The full StdIn API. Our standard drawing library. The full StdDraw API. Our standard audio library. The full StdAudio API. Command line. Redirection and piping. Functions. Libraries of functions. Our standard random library.

Free Java Tutorials & Guide | Java programming source code 10 Must Have JavaScript Cheat Sheets More and more websites are realizing the power of client side scripting and AJAX to bring their site to the next level of interaction as JavaScript is becoming a second hand language to almost every serious web developer today. Here is our collection of 10 must have JS cheat sheets to help you along on your web developing adventures. I hope you enjoy and find this as useful as many developers did! Related Posts: 1. QuicklyCode – Cheat Sheets and Programming Stuff This website links you to various cheat sheets and other developer resources to aid you in your programming, including JavaScript and other applications. Source + Demo 2. gotAPI – Instant Search In Developer Documentation Handy quick reference search for JavaScript and HTML (including HTML, CSS, JavaScript, AJAX, Web2.0) and other software/technologies. Source + Demo 3. A quick reference guide for JavaScript, listing methods and functions, and including a guide to regular expressions and the XMLHttpRequest object. Source + Demo 4. 5.

How to Use the System Tray (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features) The system tray is a specialized area of the desktop where users can access currently running programs. This area may be referred to differently on various operating systems. On Microsoft Windows, the system tray is referred to as the Taskbar Status Area, while on the GNU Network Object Model Environment (GNOME) Desktop it is referred to as the Notification Area. On K Desktop Environment (KDE) this area is referred to as the System Tray. However, on each system the tray area is shared by all applications running on the desktop. The java.awt.SystemTray class introduced in Java™ SE version 6 represents the system tray for a desktop. An application cannot create an instance of the SystemTray class. The system tray contains one or more tray icons which are added to the tray using the add(java.awt.TrayIcon) method. Note: The add() method can throw an AWTException if the operating system or the Java runtime determines that the icon cannot be added to the system tray. ... The SystemTray API

JavaScript & AJAX For Dummies Cheat Sheet Cheat Sheet The tables you find here offer a one-stop reference for the most common programming variables, commands, methods, and coding miscellany used in JavaScript programs, jQuery, and AJAX. Code to Use in JavaScript Variable Manipulation Functions As shown in the following table, you can use these JavaScript statements in your own code to create and modify variables in your JavaScript functions. Basic I/O Commands in JavaScript JavaScript programmers commonly use the commands shown in the following table for controlling dialog-based input and output in programs to be used on the Web. JavaScript Conditions and Branching Code Structures Look to the following table for JavaScript control structures you can use in your program code to add branching and looping behavior to your JavaScript programs. Add JavaScript Comparison Operators to Condition Statements Create JavaScript Structures and Objects Change Your Web Page with JavaScript Document Object Model Methods Common Methods of the jQuery Node

What is ClearDB? ClearDB is a faster, stronger, safer and more reliable way to get data to your applications, no matter where you (or your apps) are in the world. Global Architecture ClearDB is designed from the ground up around the premise of failure in order to provide true high availability and low latency performance to your MySQL powered applications. Scheduled Backups Your database is backed up in multiple regions and in multiple time zones to ensure that your data is available. Advanced Security Whether your data is in your database, on the wire, or in a backup, it's encrypted to keep it safe and secure. Always-On Monitoring Our team monitors your database 24 hours a day, 7 days a week to make sure that it's always available, secure and performant. Simple, Effective Tools Our graphical tools enable you to easily perform quick analysis on important database statistics. Easy Management API Wire & Disk Security Replicas Everywhere ClearDB is Right Next Door

Mastering recursive programming For new computer science students, the concept of recursive programming is often difficult. Recursive thinking is difficult because it almost seems like circular reasoning. It's also not an intuitive process; when we give instructions to other people, we rarely direct them recursively. For those of you who are new to computer programming, here's a simple definition of recursion: Recursion occurs when a function calls itself directly or indirectly. A classic example of recursion The classic example of recursive programming involves computing factorials. An interesting property of a factorial is that the factorial of a number is equal to the starting number multiplied by the factorial of the number immediately below it. Listing 1. int factorial(int n) { return n * factorial(n - 1); } The problem with this function, however, is that it would run forever because there is no place where it stops. Listing 2. int factorial(int n) { if(n == 1) { return 1; } else { return n * factorial(n - 1); } }

Killer Game Programming in Java Killer Game Programming in Java is for people who already know the basics of Java. For example, students who've finished an 'Introduction to Java' course. The aim is to teach reusable techniques which can be pieced together to make lots of different, fun games. For example, how to make a particle system, first-person keyboard controls, a terrain follower, etc. If you don't know Java, then Killer Game Programming in Java isn't for you. Instead, have a look at my Java book suggestions. The main emphasis of my book (over 17 chapters) is on 3D gaming using Java 3D. Early (sometimes very early) draft versions of the book's chapters can be downloaded from here (see the links below). All the book's code is here, either downloadable as a single zip file (visit the code page), or on a chapter-by-chapter basis from each chapter's page (see the links below). I've also been adding new chapters here; chapters which don't appear in the book. There's a Czech edition of my book. Dr.