Enable WiFi on a Dell E7470 Laptop

Publié dans Geekeries | Un commentaire

When I received my new Dell Latitude E7470, I installed immediatly a Debian testing (Stretch) on it. This laptop, is really, really great, and is working like a charm with Linux. I still have to install manually a WiFi firmware iwlwifi-8000C. A simple « sudo dpkg -i *.deb », and it worked quite well!

Recently, in the beginning of 2017, a Debian update (maybe to due to testing freeze? Or something else?) has broken it… The WiFi was not available anymore, as if no WiFi board were loaded! Let’s fix this!

Latitude E7470

Continuer la lecture

Project Management – Quick Golden Rules

Publié dans Geekeries | Laisser un commentaire
  • Never estimate on the fly

    • You may be right technically, but:
    • Did you take into account meeting / preparation costs?
    • Did you take into account after-sales services?
    • Any estimation is stone set for any client.
    • Think about it twice.
  • Never give back a budget
  • Main decisions require time

Enable hardware keyboard on Android emulator

Publié dans Java | Laisser un commentaire

I thought it was possible in previous version, but it appears that now it is not possible to use the physical hardware keyboard of a computer in an Android emulator… Hopefully, this is just a small configuration to edit!

  • Open the AVD Manager: in Eclipse > AVD Manager
  • Select the particular AVD, or create a new one, and click on Edit
  • Go to the « Hardware » section, click on « New ».
  • Select the Property: « Keyboard Support », and change its value to « yes » (it is « no » by default)
  • That’s it! You can start your emulator and use your physical keyboard.

AVD Manager

More information

Logo Virgo

Virgo OSGi and command line

Publié dans OSGi | Laisser un commentaire

I already wrote about Virgo, a complete OSGi stack, based on Equinox and easily integrable on Eclipse (eh, it is done for that). Yes, it is possible to launch and manage our Virgo server using Eclipse (read: Let’s work OSGi Virgo on Eclipse), but if you try to launch a big project like Societies, you might may soon be blocked by an ugly Java « Out of memory ». This is because Eclipse is heavily using the Java memory, and if you launch your OSGi server using Eclipse, you increase again this memory usage.
So, what is the solution? It’s easy: don’t launch Virgo using Eclipse, launch it with command line. So, the server will have its own memory cluster. Lets do this.
Continuer la lecture

How to clear Cygwin screen in Windows?

Publié dans Geekeries | Laisser un commentaire

How to « clean » our Cygwin window? Not that obvious because the « clean » command doesn’t exist in Cygwin. Anyway, the solution is simple and usefull: CTRL+L. Hum… wait? 🙂
Found thanks to Mahbubur Rahman: » How to clear CYGWIN screen in Windows? Mahbubur Rahman – jQuery, PHP, JavaScript, Codeigniter, CSS.

Logo Eclipse

Automatically generate PHP get and set using Eclipse

Publié dans PHP | Laisser un commentaire

How to automatically generate PHP getter and setter using Eclipse? There are several possibilities, and no perfect one, but let’s try to list them all:

  • Using Eclipse templates: semi-automatic
    Window > Preferences > PHP > Editor > Templates -> New and use something like this:

    private $$${PropertyName};
    ${cursor}    
    public function get${PropertyName}() 
    {
      return $$this->${PropertyName};
    }
    
    public function set${PropertyName}($$value) 
    {
      $$this->${PropertyName} = $$value;
    }
    

    And then, to use this template type its name and press ctrl+space to generate this code. A context menu should also automatically appear when you type the name.

  • Use the Eclipse PDT plugin E-Surf: automatic, useful but not very clean and their is no way to configure it.
  • Use the Eclipse PDT PHPClassGenerator plugin by IBM to generate automatically classes and accessors: automatic but maybe to complex to configure and use. And it can’t generate getters / setters for attributes that have been added after the class creation.

If you don’t know yet how to install an Eclipse plugin: Let’s work OSGi Virgo on Eclipse (fr).

Humpf… At the moment, their is no perfect solution, and it is a shame! In Java, a simple right clic on a class > Source > Generate get/set or Generate toString… That is why developing in PHP on Eclipse is not yet as easy as developing in Java.

How to Make Your Laptop Choose a Wired Connection Instead of Wireless – How-To Geek

Publié dans Geekeries | Laisser un commentaire

Very useful tip for me: How to Make Your Laptop Choose a Wired Connection Instead of Wireless – How-To Geek. In my office, the Wifi connection can’t access the intranet, but the wired one can! Now I will be able to keep my Wifi ON 🙂

Maven Error « Could not find Launcher »

Publié dans Java | Laisser un commentaire

If you have the following error when launching a Maven command, for example « mvn install »:

Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher

Your are probably using a Maven 2 configuration for a Maven 3 usage. Delete your global variable M2_HOME and it should work. You can use M3_HOME instead to select the folder for the « repository » of dependencies, and the emplacement of the configuration file settings.xml.

PhoneGap Plugin System

Publié dans HTML et CSS | Laisser un commentaire

Overall Architecture

I have already presented PhoneGap, my goal here is to present its plugin system. Indeed, to enlarge web application possibilities, it may be useful to use native calls through Javascript. For example, to use a piece of complex Android code (Java code) easily in Javascript. This is possible using the PhoneGap plugin system.
The overall architecture of these plugins is the following:

  • a native component making the job, for example a Java Android file
  • a HTML / CSS / Javascript GUI using this native component through Javascript calls
  • a bridge between Javascript and the native code to create the link.

This bridge is composed of:

  • one native file (i.e. one Java file),
  • one Javascript file exposing this native component,
  • and generally one quick configuration file specific to the platform.

Continuer la lecture

Problèmes de mémoire ?

Maven OutOfMemoryError

Publié dans Java | Laisser un commentaire

Maven Error

Maven failed during a build whit the following error:

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: PermGen space

Solution

Add the environment variable MAVEN_OPTS: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m