Entries Tagged 'Tips & Tricks' ↓

How to really fix the too many open files problem for Tomcat in Ubuntu

Johan Haleby

A couple of days ago we ran into the infamous “too many open files” when our Tomcat web server was under load. There are several blogs around the internet that tries to deal with this issue but none of them seemed to do the trick for us. Usually what you do is to set the [...]

Tags: , ,

How you list the available goals for a maven plugin

Tobias Södergren

I’ve been attending an excellent lab by Sune Simonsen which was about how to create a Javascript twitter client. The lab utilizes the maven-lab-plugin, which can be used to create step-by-step labs using Maven. During the lab, i wanted to know which step I was at and I figured that there should be a goal [...]

Tags: ,

Builder pattern with a twist

Uzi Landsmann

The builder pattern is great, isn’t it? It lets you create nice immutable classes without the need for multiple constructors and it gives the API users freedom in choosing which arguments they want to use when creating the instance. But what happens when you want to tell the user that she must call one builder [...]

Tags: ,

Finding with Git

Anders Janmyr

Git is an amazing version control system that never loses anything, but sometimes it can be hard to find out where things are. Most of the time it is going to be git log that is our friend, but not all the time. Where is my file? Sometimes you know that you have a file [...]

Tags:

Capistrano and Net:SSH with login shell

Johan Lundahl

New to Capistrano? Read my previous and more introductory blog post on Capistrano – Remote builds with Capistrano. Are you using Capistrano and are confused why the user environment, the PATH for example, is different from when you log on to your server via SSH? Perhaps you have failed to use RVM or other user [...]

Tags: , , , , ,

Graphite with .Net and Ubuntu 11.10

Henrik Feldt

This is a quick write-up on how to get started with graphite as a .Net developer. We’re going to start using graphite with a virtual machine in VirtualBox, although you could use something else also. Steps: Download/install VirtualBox Download/install Ubuntu Download/install Graphite Expose VM to network Use Graphite from C# Download/install VirtualBox Start by downloading [...]

Tags: , , , , ,

Android: The Mysterious NullPointerException

The Problem One day it was just there. A mischievous NullPointerException causing, eh, mischief. It was fairly easy to provoke with my application but for some reason my code was not part of the stacktrace. 12-07 14:42:52.722 E/AndroidRuntime(18421): FATAL EXCEPTION: main 12-07 14:42:52.722 E/AndroidRuntime(18421): java.lang.NullPointerException 12-07 14:42:52.722 E/AndroidRuntime(18421): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1064) 12-07 14:42:52.722 E/AndroidRuntime(18421): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1081) [...]

Tags: , ,

Testing Web.config Transformations, Part 1

Mads Troest

Web.config transformations is a Microsoft-supported technology for adapting a base configuration to a particular deployment environment. In my previous post, I mentioned how AppHarbor provides an online tool for manually testing transformations. Also, the Visual Studio extension SlowCheetah provides support for manually testing and transformation and diffing them against the base configuration from inside Visual Studio. These [...]

Tags: , , , , , ,

WinRM w/ self-signed certificate in 4 steps

Henrik Feldt

Targeted environment: Windows Server 2008 or Windows Server 2008 R2 You’ll be self-signing with makecert from the Windows 7.1 SDK. The certificate tool is a single executable, specifically at %PROGRAMFILES%\Microsoft SDKs\Windows\v7.1\Bin\makecert.exe, per default. You’ll need it – copy it to the server unless you already have the SDK installed on it. Secondly, you’ve got a [...]

Tags:

Web.config Transformations and XML Namespaces

Mads Troest

In the project I’m currently working on, we use Web.config transformations to adapt a base configuration to a particular deployment environment. I was adding a transformation to adapt our NLog configuration for the various environments, when I ran into a problem. I’d added the following transformation, intended to set the log level to Warning on [...]

Tags: , , , , , , , ,

WP7 app update and NeutralResourcesLanguage

Andreas Hammar

The Windows Phone Marketplace was updated with new features in July 2011, one has to do with default language. The previous process to submit an app required you to define the default language when submitting the app, the new version checks the default language in the uploaded xap. The problem An app created before July [...]

Tags: , , , ,

WP7 Marketplace Beta – new app downloadable delay

Andreas Hammar

Have you seen the new (since fall 2011) ways to publish a Windows Phone app to Marketplace? In addition to regular publishing, you can now publish as private beta or targeted. Neither will make the app discoverable in the Marketplace, Beta is time limited and does not include the full certification requirements. MSDN has a [...]

Tags: , , , ,

Azure Blob Storage – a simple example

Peter von Lochow

This is for all of you that just want a simple, up to date, example/how-to/tutorial of how to use Azure Blob Storage. You won’t see any screen shots or a lengthy guide on how to get started from scratch. Instead I will just focus on writing some code examples for general stuff that you might [...]

Tags: ,

Getting started with Android NDK

Per-Erik Bergman

You want to try out the Android NDK? I have gotten a lot of questions about how to setup and work with the NDK and I decided to write down how I do it. My goal with this entry is to gather all the information you need to get started with the Android NDK. I [...]

Tags: , , ,

Fixing WP7 app not starting after project rename

Andreas Hammar

If your Windows Phone 7 project isn’t starting at all – you’re not even hitting App.xaml.cs, you’ve probably renamed the app project. Fix: Set the startup object on the app project’s properties page In the .csproj file, this corresponds to the SilverlightAppEntry element: <SilverlightAppEntry>PhotoDiary.App</SilverlightAppEntry> I would call it a bug, that you cannot rename a [...]

Tags: , , , , ,