ForEvolve

A piece of mind...

How to add your PHP runtime directory to your Windows 10 PATH environment variable

How to add your PHP runtime directory to your Windows 10 PATH environment variable

Today I will explain how to add your PHP runtime directory to your Windows 10 PATH environment variable. This will give you global access to php.exe from any command prompt.

Please note that you must reopen your command prompt windows (if you had any open prior to the update).

Command prompt loads the PATH environment variable when it is first open.

Target audience

  • Windows 10 users
  • PHP developers that want PHP to be globally accessible from any command prompt (ex.: php.exe for “linting” or to start a dev. server)

Note that you are not limited to PHP, this can be any directory containing any program - ex.: npm

Continue reading...

How to trick the EDM model builder to allow recursive ComplexTypes

How to trick the EDM model builder to allow recursive ComplexTypes

Before starting, this article is built on top of How to create an OData reporting service in ASP.NET 4.5 but you can easily adapt it to any of your project. The code is in the same git repository as the previous article, in the branch recursive-complex-type, on GitHub.

  1. The problem
    1. The model
    2. The configuration
    3. The failure
  2. Some added realism
    1. The new application
    2. The new and updated classes
  3. The solution
    1. The models
    2. Yeah, it worked!
  4. Conclusion

Continue reading...

Opérations Git de base en utilisant le client de GitHub

Opérations Git de base en utilisant le client de GitHub

Table des matières

  1. Comment clone un repo git GitHub
  2. Comment changer de branch
  3. Voir l’historique des modifications liste des commits
  4. commit ses changements
  5. push et pull
  6. L’état de la synchronisation
  7. L’état des fichiers avant un commit
  8. C’est la fin

Continue reading...

How to create an OData reporting service in ASP.NET 4.5

How to create an OData reporting service in ASP.NET 4.5

Before starting, I will assume that:

  • You know what OData is (at least a bit).
  • Have basic knowledge of Visual Studio, NuGet, ASP.NET, MVC5 and C#

What we will do is:

  1. Create a project
  2. Install dependencies
  3. Create some files and write some code
  4. Create a basic Model
  5. Create a basic Controller
  6. Create OData configuration
  7. Consume our OData service in a browser
  8. Some explanations
  9. Consume our OData service in Excel 2016

Continue reading...

Comment ajouter l'IntelliSense pour jQuery dans un fichier JavaScript - Visual Studio Code

Comment ajouter l'IntelliSense pour jQuery dans un fichier JavaScript - Visual Studio Code

Avant propos

Si vous voulez uniquement exécuter les étapes sans lire les explications, vous pouvez essayer de sauter directement à la Conclusion.

Cela étant dit, rien ne vous empêchera de relire les sections pour lesquelles vous avez besoin de plus d’explications plus tard :)

Prérequis

Nous aurons besoin de node.js et de npm afin de réaliser ce tutoriel. npm est le “package manager” que nous utiliserons afin de télécharger notre fichier de définition de jQuery.

Continue reading...

How to add jQuery Intellisense to a Visual Studio Code JavaScript file

How to add jQuery Intellisense to a Visual Studio Code JavaScript file

Before starting

If you really just want to execute the steps without any explanation, try to jump right to the Conclusion section.

That being said, you can always read the parts that you are not sure about later :)

Prerequisites

Before going further, you will need node.js and npm. If you don’t know what those are, lets just say that npm is a package manager and it requires Node. We will use npm from within VS Code (in command line), to help us install our jQuery “IntelliSense” definition file.

Continue reading...

PHP avec Visual Studio Code et XDebug

PHP avec Visual Studio Code et XDebug

Introduction

Pour mon cours d’introduction à la programmation serveur avec PHP et MySQL, j’utilise généralement l’IDE NetBeans, mais cette année j’ai décidé de donner une chance à Visual Studio Code. Bien entendu, avant de choisir un editeur de code, j’ai fait quelques tests de ses capabilités.

Voici la liste des choses que je veux:

  • Un environnement simple afin de mettre l’accent sur la programmation et non sur les outils
  • Un editeur de code gratuit
  • Coloration du code
  • Complétion de code PHP de base
  • Complétion de code pour PDO
  • Déboguer avec breakpoint
  • Prise en charge du serveur Web de développement intégré à PHP (sauver les “virtual host” d’Apache ou toute autre configuration ésotérique. Accent: programmation, ce n’est pas un cours orienté sur la gestion de serveur Web)

Ma conclusion: VS Code couvre la majorité de mes attentes pour l’editeur de code d’un cours d’introduction. Le seul problème est que, présentement, l’Intellisense pour PDO est couverte seulement en partie (voire même assez proche de 0%). Mais gardons ceci comme sujet pour un autre jour.

Dans le tutoriel actuel:

  1. Nous allons

Continue reading...

PHP with Visual Studio Code and XDebug

PHP with Visual Studio Code and XDebug

Introduction

In my introductory class to server-side programming with PHP and MySQL, I need a code editor or a full-featured IDE. Usually I go with NetBeans, but this year i decided to give the new cool kid a shot, so i picked : Visual Studio Code. Before officially choosing anything, I had to test its capabilities.

Here is what I am looking for:

  • A simple environment to focus on programming instead of on infrastructure (introduction on programming need to be on programming, not on tooling)
  • A free code editor (who does not like free stuff?)
  • Code coloring
  • Basic PHP code completion support
  • PDO code completion support (there is a part about database)
  • Debugger with breakpoints
  • Support for PHP built-in Web server (no Apache virtual host or any other esoteric setup to manage, again, programming should be the focus)

My conclusion: VS Code covers most of my expectation for an introductory class code editor. The only problem is that, as of today, the PDO Intellisense is only partly covered and pretty close to 0%. Let this be a subject for another day.

In the current tutorial:

  1. We will

Continue reading...

Back to blogging a new beginning

Back to blogging a new beginning

The past

I wrote my last blog post in January 2009. I never really plan to stop, but I never migrated my custom blog engine to my new (at the time) host. That’s the thing about custom engine, you always have ideas but you too often lack the time to implement them. And for some reasons, real life always get in the way (not entirely a bad thing).

Continue reading...