IAmDann Ruby Programming Language ZSH-LOVERS(1) Mailpath: simple multiple mailpath: mailpath=($HOME/Mail/mbox'?new mail in mbox' $HOME/Mail/tux.u-strasbg'?new mail in tux' $HOME/Mail/lilo'?new mail in lilo' $HOME/Mail/ldap-fr'?new mail in ldap-fr') Mailpath: dynamic mailpath: Avoid globbing on special commands: for com in alias expr find mattrib mcopy mdir mdel which; alias $com="noglob $com" For migrating your bashprompt to zsh use the script bash2zshprompt located in the zsh source distribution under Misc. For migration from (t)csh to zsh use the c2z tool that converts csh aliases and environment and shell variables to zsh. Here are functions to set the title and hardstatus of an XTerm or of GNU Screen to zsh and the current directory, respectively, when the prompt is displayed, and to the command name and rest of the command line, respectively, when a command is executed: Put the following line into your ~/.screenrc to see this fancy hardstatus: caption always "%3n %t%? Special variables which are assigned:
GitHub - ctrlpvim/ctrlp.vim: Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder. Java Anti-Patterns This page collects some bad code that may not look so obviously bad to beginners. 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. String concatenation This is a real memory waster. Lost StringBuffer performance String name = ...
6 reasons to use Pearltrees Pearltrees is the first and largest social curation community on the Internet. It’s a place to organize, discover and share all the cool content you find online. However, beyond this basic definition, a question remains: why would I want to use Pearltrees? Well, what I want to share with you are six major use cases (or reasons) we’ve identified as being most popular across our entire community of web curators. In addition, I’ll also share with you a couple of interesting ways in which I have put Pearltrees to use for myself. Hopefully, you’ll not only get value in learning how the community uses Pearltrees, but also be inspired to find even more clever and creative ways to use our software yourself. 3. The problem is that aside from searching your personal twitter stream to get back to the cool stuff you tweeted there’s no great way to keep those links at hand. Note: For advanced users you can even hashtag the links you tweet with #PT and the name of a pearltree in your account (e.g.
scrooloose/nerdtree Don't write on the whiteboard :: Joseph Perla I recently interviewed at a major technology company. I won't mention the name because, honestly, I can't remember whether I signed an NDA, much less how strong it was. I did well. 1. When I interviewed at Palantir around 5 years ago, I had a lot of trouble with this. Most people think you have to write on the whiteboard. The interviewer started by asking me to code up a simple recursive calculation, using any language I wanted. The interviewers don't care. 2. So I asked for some paper and a pen. You should always have paper and pen anyway to write down ideas. Some of the best programmers figure out the high-level overview on paper before they write a single line of new code. 3. Even if you are a C++ systems guru. You will waste a lot of time writing string manipulation code and initialization code that you can do in one line of Python. All I had was a post-it note, a tiny amount of space. 4. Five minutes later, I had my algorithm. 5. 6. Read random Wikipedia articles. 7. 8. 9. 10. 11.
Sinatra: README This page is also available in Chinese, French, German, Hungarian, Korean, Portuguese (Brazilian), Portuguese (European), Russian, Spanish and Japanese. Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort: # myapp.rb require 'sinatra' get '/' do 'Hello world!' Install the gem: And run with: View at: It is recommended to also run gem install thin, which Sinatra will pick up if available. Routes In Sinatra, a route is an HTTP method paired with a URL-matching pattern. get '/' do .. show something .. end post '/' do .. create something .. end put '/' do .. replace something .. end patch '/' do .. modify something .. end delete '/' do .. annihilate something .. end options '/' do .. appease something .. end link '/' do .. affiliate something .. end unlink '/' do .. separate something .. end Routes are matched in the order they are defined. Route patterns may include named parameters, accessible via the params hash: Or with block parameters: locals
rking/ag.vim 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. 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<? Finally, in order to configure RESTEasy we must add the following snippet in the web.xml: Now every DAO class will extend AbstractDAO class.So in the case of categoryDAO we will have: package com.javaonly.mongo.daos; public class CategoryDao extends AbstractDao{ public CategoryDao(){ super(); } } As can see in the above class we've used a class named MongoDBUtil.
Tips for Having Great Virtual Meetings (Editor’s note: The following post is an excerpt from the book The Collaboration Imperative: Executive Strategies for Unlocking Your Organization’s True Potential by Ron Ricci and Carl Wiese. Ron Ricci is the vice president of corporate positioning and has spent the last decade helping Cisco develop and nurture a culture of sharing and collaborative processes. In addition, he has spent countless hours with hundreds of different organizations discussing the impact of collaboration. Carl Wiese is senior vice president of Cisco’s collaboration sales — a multi-billion global business. He has presented on the importance of collaboration to business audiences in dozens of countries, including Australia, China, Dubai, India, Mexico and all across Europe and the United States. For more information please visit The virtual workplace has many advantages, but it also introduces new challenges.
Seil - Software for OS X Step 1 Open a downloaded dmg file, and then open a pkg file in dmg. Step 2 Installer is launched. Install Seil. Seil will be installed into /Applications folder. Note: Do not change the location of Seil.app from /Applications. For example, Seil will not work properly if you moved Seil.app into /Applications/Utils. Step 3 Launch Seil from Launchpad. Open Launchpad (or open " Applications" folder from Finder). Then, click Seil. Note If you're using PCKeyboardHack 8.0.0 or earlier, Preferences is in System Preferences. Activate items and change the keycode if needed. If you are using Seil to change the behavior of caps lock, open "System Preferences > Keyboard > Modifier Keys..." and change caps lock configuration to "No Action". You need to do this step to to reduce caps lock delay. Note: If you are using multiple devices, you should choose devices at "No Action" configuration. Press the "Launch uninstaller" button in Seil Preferences. Seil changes key behavior in all keyboards. Steps: <? How to show help
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 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. Stanford CS Education Library -- #110 This is article #110 in the Stanford CS Education Library. Related CSLibrary Articles Linked List Problems ( -- a large collection of linked list problems using various pointer techniques (while this binary tree article concentrates on recursion) Pointer and Memory ( -- basic concepts of pointers and memory The Great Tree-List Problem ( -- a great pointer recursion problem that uses both trees and lists Binary Search Tree Niche Strategy 15.