In this article, we will talk about the config file used for a C# application. What is the goal of it, and how to use it. How to get values and create your own config section. What is a config file? It happens sometimes (quite often actually) that we need to store some parameters, default […]
Install Docker on Raspbian
When I received my first Raspberry Pi 2, I thought: “maybe I can use it as a web server to host a few of my websites”. Trying different configurations and security options, I had to start all over a few times… Hours and hours redoing more or less the same things again and again. Now […]
Raspberry Pi 3 – Integrated Wi-Fi setup
Hello Devz, I received my new Raspberry Pi 3 today with its integrated Wi-Fi, and I was wondering how to setup the ip address in a permanent way with console only. sudo nano /etc/network/interfaces Then find a line containing “wlan0” (zero) and replace the text by this: allow-hotplug wlan0 auto wlan0 iface wlan0 inet dhcp […]
WPF – Change color of a row in a DataGrid depending on the value with DataTrigger
Hi folks, Today we will see how to change the color or a row depending on the value of the content. To do that, create a simple View: <Window x:Class=”DataTrigger_Test.MainWindow” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″ xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ mc:Ignorable=”d” Title=”MainWindow” Height=”350″ Width=”525″> <Grid> <DataGrid Margin=”10″ ItemsSource=”{Binding Users}” AutoGenerateColumns=”False” ColumnWidth=”*” HorizontalAlignment=”Stretch” VerticalAlignment=”Stretch” HorizontalContentAlignment=”Stretch” EnableRowVirtualization=”false” EnableColumnVirtualization=”false” CanUserAddRows=”False” CanUserReorderColumns=”False” CanUserResizeColumns=”True”> <DataGrid.CellStyle> <Style […]
Xamarin.Forms – Use built-in Dependency Injection (IoC)
Hello Devz, Xamarin.Forms have its own Dependency Injection implementation. Of course you can still use other ones like MvvmCross, Ninject and so on, but they will ask you a bit more configuration and changes in your code. The one from Xamarin.Forms works pretty well and is really simple to use. Here is a simple example. […]
WPF – DataGrid with single click checkbox
The problem with the checkbox in a WPF DataGrid By default, if you place a checkbox in a WPF DataGrid, you will have to click twice to check or uncheck the checkbox. And there is a logical explanation. The first click will select the row in the DataGrid, and the second one, the checkbox in […]
Migrate a WordPress site with Linux
Hello Devz, Migrate a WordPress website can be a pain in the ass. But if you follow this procedure, it should be quite simple… Let’s considere: A = source site (ex: myoldwebsite.com) B = destination site (ex: newwebsite.com) Backup source site: 1. Deactivate all plugin in A (use the Select All the select Desactivate) 2. […]
Raspberry Pi – Raspberry phpmyadmin installation
Hello Devz, Are you looking to control and configure a php server on your Linux or Raspberry Pi machine? Here are simple steps for Raspberry phpmyadmin installation. sudo apt-get install phpmyadmin Using the above command line, you will be asked to choose the web server installed in the system, which is either Apache2 or Lighttpd. In […]
Raspberry Pi: Install a web server – the easy and fast way
Hello Devz, NGINX (pronounced engine x) is a popular lightweight web server application you can install on the Raspberry Pi to allow it to serve web pages. Like Apache, NGINX can serve HTML files over HTTP, and with additional modules can serve dynamic web pages using scripting languages such as PHP. INSTALL NGINX First install […]
Raspberry Pi – Useful commands for your web server
Hello Devz, Here are some simple steps to configure your own web server: INSTALL WORDPRESS sudo mkdir -p /var/www/html/mywebsite cd /var/www/html/mywebsite sudo wget http://wordpress.org/latest.tar.gz tar –strip-components=1 -xvf latest.tar.gz rm latest.tar.gz sudo chown -R www-data:www-data /var/www/html/mywebsite sudo chmod -R 755 /var/www/html/website KILL THE FIREWALL sudo iptables -F sudo iptables -X sudo iptables -t nat -F sudo […]