<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>software on Tech for Breakfast</title><link>https://techforbreakfast.com/en/categories/software/</link><description>Recent content in software on Tech for Breakfast</description><generator>Hugo</generator><language>en-GB</language><lastBuildDate>Mon, 10 Jun 2024 18:21:41 +0100</lastBuildDate><atom:link href="https://techforbreakfast.com/en/categories/software/index.xml" rel="self" type="application/rss+xml"/><item><title>Syncing email locally</title><link>https://techforbreakfast.com/en/sync-email-locally/</link><pubDate>Mon, 10 Jun 2024 18:21:41 +0100</pubDate><guid>https://techforbreakfast.com/en/sync-email-locally/</guid><description>&lt;p&gt;To sync our email from the service provider to our computer, we can use an email client such as Thunderbird or any of the many others available.&lt;/p&gt;&#10;&lt;p&gt;But if we want, for example, to read our email with mutt (even offline), or to make an archive / backup of our email, we can use offlineimap.&lt;/p&gt;</description></item><item><title>Installing Windows 11 without a Microsoft account</title><link>https://techforbreakfast.com/en/install-windows-11-without-microsoft-account/</link><pubDate>Mon, 04 Dec 2023 17:05:21 +0000</pubDate><guid>https://techforbreakfast.com/en/install-windows-11-without-microsoft-account/</guid><description>&lt;p&gt;When installing Windows 11, the initial setup includes connecting to the internet and signing in with a Microsoft account. If you don&amp;rsquo;t want to create an account or link an existing one, you can enable the option to finish the setup without an internet connection, and therefore without setting up and linking a Microsoft account to the new installation.&lt;/p&gt;</description></item><item><title>Notes (todo) in LaTeX</title><link>https://techforbreakfast.com/en/todo-notes-in-latex/</link><pubDate>Sun, 19 Nov 2023 22:47:21 +0000</pubDate><guid>https://techforbreakfast.com/en/todo-notes-in-latex/</guid><description>&lt;p&gt;When writing a long document that takes a long time to finish, it is important to have some way of keeping notes, so that you don&amp;rsquo;t lose track of it or of the revision notes you need.&lt;/p&gt;&#10;&lt;p&gt;To meet this need, after some searching, I came across the &amp;ldquo;todonotes&amp;rdquo; package. It is maintained by Henrik Skov Midtiby and the repository can be found at &lt;a href="https://github.com/henrikmidtiby/todonotes"&gt;https://github.com/henrikmidtiby/todonotes&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Synology – Active Backup for Google Workspace</title><link>https://techforbreakfast.com/en/synology-active-backup-for-google-workspace/</link><pubDate>Sat, 04 Nov 2023 00:55:55 +0000</pubDate><guid>https://techforbreakfast.com/en/synology-active-backup-for-google-workspace/</guid><description>&lt;p&gt;&amp;ldquo;Active Backup for Google Workspace&amp;rdquo; is a Synology application that can be used on some models of its NAS range.&lt;/p&gt;&#10;&lt;p&gt;This software backs up Google Workspace domains and several of their applications, such as Gmail, Drive, Shared Drives, Contacts, etc.&lt;/p&gt;</description></item><item><title>Thunderbird – adding several identities / signatures</title><link>https://techforbreakfast.com/en/thunderbird-add-multiple-identities-signatures/</link><pubDate>Thu, 14 Sep 2023 12:19:45 +0100</pubDate><guid>https://techforbreakfast.com/en/thunderbird-add-multiple-identities-signatures/</guid><description>&lt;p&gt;If we want to use several signatures with the same email account, in Thunderbird we can create several identities.&lt;/p&gt;&#10;&lt;p&gt;To do this, in the account settings in Thunderbird (you can see how to get there &lt;a href="https://techforbreakfast.com/en/thunderbird-create-text-signature/"&gt;here&lt;/a&gt;), we can add identities with the &amp;ldquo;Manage Identities&amp;rdquo; option.&lt;/p&gt;</description></item><item><title>Thunderbird – creating a signature with formatting and images</title><link>https://techforbreakfast.com/en/thunderbird-create-signature-with-formatting-and-images/</link><pubDate>Thu, 14 Sep 2023 12:01:02 +0100</pubDate><guid>https://techforbreakfast.com/en/thunderbird-create-signature-with-formatting-and-images/</guid><description>&lt;p&gt;To add signatures, see the article &lt;a href="https://techforbreakfast.com/en/thunderbird-create-text-signature/"&gt;Thunderbird – Creating a text signature&lt;/a&gt; to find out how to reach the settings.&lt;/p&gt;&#10;&lt;p&gt;However, if you want to create a signature with other kinds of formatting, you can point to an external file with its layout.&lt;/p&gt;</description></item><item><title>Thunderbird – Creating a text signature</title><link>https://techforbreakfast.com/en/thunderbird-create-text-signature/</link><pubDate>Thu, 14 Sep 2023 11:40:25 +0100</pubDate><guid>https://techforbreakfast.com/en/thunderbird-create-text-signature/</guid><description>&lt;p&gt;Thunderbird lets you set a text signature, which is added to the message editor as soon as you start writing a new message.&lt;/p&gt;&#10;&lt;p&gt;Signature settings are changed for each account the user has set up on their computer. To reach the settings, select the &amp;ldquo;Account Settings&amp;rdquo; option in the Thunderbird menu.&lt;/p&gt;</description></item><item><title>Formatting chapters in LaTeX</title><link>https://techforbreakfast.com/en/format-chapter-in-latex/</link><pubDate>Thu, 30 Mar 2023 10:19:30 +0100</pubDate><guid>https://techforbreakfast.com/en/format-chapter-in-latex/</guid><description>&lt;p&gt;If you need to change the chapter formatting in a LaTeX document, you can use the titlesec package (&lt;a href="https://ctan.org/pkg/titlesec?lang=en"&gt;https://ctan.org/pkg/titlesec?lang=en&lt;/a&gt;)&lt;/p&gt;&#10;&lt;p&gt;For example, to change the chapter so that it shows the chapter number followed by its name, follow these steps:&lt;/p&gt;&#10;&lt;p&gt;Declare that we want to use the titlesec package&lt;/p&gt;</description></item><item><title>Uninstalling the WooCommerce plugin</title><link>https://techforbreakfast.com/en/uninstall-woocommerce-plugin/</link><pubDate>Tue, 14 Mar 2023 10:46:40 +0000</pubDate><guid>https://techforbreakfast.com/en/uninstall-woocommerce-plugin/</guid><description>&lt;p&gt;Removing WooCommerce from your site is as simple as going to the admin area of your WordPress site, selecting the WooCommerce plugin in the plugin list and uninstalling it.&lt;/p&gt;&#10;&lt;p&gt;However, if you look at the database, you will see that the WooCommerce-related tables are still there.&lt;/p&gt;</description></item><item><title>Setting up Webmin with Let's Encrypt</title><link>https://techforbreakfast.com/en/setup-webmin-with-letsencrypt/</link><pubDate>Fri, 09 Sep 2022 16:08:00 +0100</pubDate><guid>https://techforbreakfast.com/en/setup-webmin-with-letsencrypt/</guid><description>&lt;p&gt;We have installed Webmin, but now it is important to install a certificate that is not self-signed, so we don&amp;rsquo;t keep seeing error messages in browsers.&lt;/p&gt;&#10;&lt;p&gt;In Webmin we can change this setting directly in Webmin itself&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://techforbreakfast.com/configuracao-de-webmin-com-letsencrypt/image.png" class="img-link"&gt;&lt;img src="https://techforbreakfast.com/configuracao-de-webmin-com-letsencrypt/image_hu_2161996271e74ab8.webp" width="900" height="146" alt="" loading="lazy" decoding="async"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Going to the Webmin option in the main menu and then &amp;ldquo;Webmin Configuration&amp;rdquo;, we find the &amp;ldquo;SSL Encryption&amp;rdquo; option&lt;/p&gt;</description></item><item><title>Installing Webmin on Ubuntu Server</title><link>https://techforbreakfast.com/en/install-webmin-ubuntu-server/</link><pubDate>Fri, 09 Sep 2022 16:01:32 +0100</pubDate><guid>https://techforbreakfast.com/en/install-webmin-ubuntu-server/</guid><description>&lt;p&gt;&lt;strong&gt;Downloading Webmin&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;To install Webmin on Ubuntu Server, we first have to download it from &lt;a href="https://webmin.com/"&gt;https://webmin.com/&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;There you can download Webmin for several distributions. We will download the Debian package from the &amp;ldquo;&lt;a href="https://webmin.com/download.html"&gt;Downloads&lt;/a&gt;&amp;rdquo; section of the site.&lt;/p&gt;&#10;&lt;p&gt;On this page you can download the &amp;ldquo;Debian package suitable for Debian, Ubuntu or other derived Linux&amp;rdquo;&lt;/p&gt;</description></item><item><title>LibreOffice 4.1 from the libreoffice.org PPA – error opening files on a Samba share</title><link>https://techforbreakfast.com/en/libreoffice-4-1-ppa-error-opening-samba-share-file/</link><pubDate>Tue, 19 Nov 2013 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/libreoffice-4-1-ppa-error-opening-samba-share-file/</guid><description>&lt;p&gt;When using LibreOffice version 4.1.3.2 from the LibreOffice PPA to open files located on a share provided by a SAMBA server, an error message may say that the file we are trying to open is corrupted.&#10;To get around this problem, edit the launcher file of the LibreOffice application you want to use and remove or comment out the line:&lt;/p&gt;</description></item><item><title>Submitting CD information to MusicBrainz on Ubuntu (or Debian)</title><link>https://techforbreakfast.com/en/submit-cd-information-to-musicbrainz-ubuntu-debian/</link><pubDate>Tue, 10 Sep 2013 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/submit-cd-information-to-musicbrainz-ubuntu-debian/</guid><description>&lt;p&gt;When they put an audio CD in the drive, many users get information about the CD, its tracks, durations, cover images, etc., from a database such as &lt;a href="http://musicbrainz.org/"&gt;MusicBrainz&lt;/a&gt;. But for us to use the information it holds, someone also has to submit the data, since the information comes from its community of users.&lt;/p&gt;</description></item><item><title>Elastix – Setting up a virtual extension</title><link>https://techforbreakfast.com/en/elastix-virtual-extension-setup/</link><pubDate>Mon, 09 Sep 2013 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/elastix-virtual-extension-setup/</guid><description>&lt;p&gt;Parameters to set up a virtual extension that forwards to another number. Device options:&lt;/p&gt;&#10;&lt;p&gt;dial: Local/9041@outbound-allroutes&lt;/p&gt;</description></item><item><title>Owncloud Debian client update from 1.3.0 to 1.4.0 – does not start</title><link>https://techforbreakfast.com/en/owncloud-debian-client-1-3-0-to-1-4-0-does-not-start/</link><pubDate>Sat, 07 Sep 2013 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/owncloud-debian-client-1-3-0-to-1-4-0-does-not-start/</guid><description>&lt;p&gt;If the Owncloud client for Debian stops working after updating it from version 1.3.0 to 1.4.0, the libocsync0 library must be updated manually, since it is not updated along with the client. To do so, open a terminal and get a root shell with:&lt;/p&gt;</description></item><item><title>Converting video formats – HandBrake – installing on Ubuntu 12.04</title><link>https://techforbreakfast.com/en/convert-video-formats-handbrake-install-ubuntu-12-04/</link><pubDate>Fri, 06 Sep 2013 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/convert-video-formats-handbrake-install-ubuntu-12-04/</guid><description>&lt;p&gt;To convert between video formats we can use &lt;a href="http://handbrake.fr/"&gt;HandBrake&lt;/a&gt;. To install it quickly on Ubuntu 12.04:&lt;/p&gt;&#10;&lt;p&gt;Open a terminal window and type the following commands to add the PPA to sources.list&lt;/p&gt;&#10;&lt;p&gt;Add the PPA repository&lt;/p&gt;&#10;&lt;div class="code"&gt;&#10; &lt;div class="code-bar"&gt;&#10; &lt;span class="code-dots" aria-hidden="true"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&#10; &lt;span class="code-lang"&gt;text&lt;/span&gt;&#10; &lt;button type="button" class="code-copy"&gt;copy&lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo add-apt-repository ppa:stebbins/handbrake-releases&amp;lt;br&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Update the list of available packages&lt;/p&gt;</description></item><item><title>jGnash – Personal finance software</title><link>https://techforbreakfast.com/en/jgnash-personal-finance-software/</link><pubDate>Thu, 09 May 2013 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/jgnash-personal-finance-software/</guid><description>&lt;p&gt;If you need software for basic personal finance management, you can try jGnash (the project page is &lt;a href="http://sourceforge.net/apps/mediawiki/jgnash/index.php?title=Main_Page"&gt;here&lt;/a&gt;).&#10;Of all the software available in the repositories of most Linux distributions, this is the one I have always liked best. Although the features of the 1.x versions are more limited, the new 2.x versions also let you manage several personal budgets and easily track how they are being spent, among other improvements that make managing personal finances simpler.&lt;/p&gt;</description></item><item><title>Iceweasel – VLC plugin</title><link>https://techforbreakfast.com/en/iceweasel-vlc-plugin/</link><pubDate>Sun, 27 Jan 2013 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/iceweasel-vlc-plugin/</guid><description>&lt;p&gt;If a page tells you that you need to install the VLC plugin manually, as in the example below:&lt;/p&gt;&#10;&lt;!-- imagem em falta: /assets/iceweasel_-_erro_de_plugin_vlc.png --&gt;&#10;&lt;p&gt;In this case we need to install the VLC plugin for the Iceweasel browser. To do this we can install it from the console with apt-get or, if you prefer a graphical application, you can use Synaptic.&#10;When you start Synaptic you will be asked to log in as an administrator user (one with permission to install applications).&lt;/p&gt;</description></item><item><title>Lunacloud servers – Starting and stopping servers</title><link>https://techforbreakfast.com/en/lunacloud-servers-start-and-stop-servers/</link><pubDate>Mon, 07 Jan 2013 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/lunacloud-servers-start-and-stop-servers/</guid><description>&lt;p&gt;If you use Lunacloud&amp;rsquo;s services, you can start or stop virtual machines without going to the control panel. To do this on Linux, you can for example install the curl application (if you don&amp;rsquo;t have it installed yet):&lt;/p&gt;&#10;&lt;div class="code"&gt;&#10; &lt;div class="code-bar"&gt;&#10; &lt;span class="code-dots" aria-hidden="true"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&#10; &lt;span class="code-lang"&gt;text&lt;/span&gt;&#10; &lt;button type="button" class="code-copy"&gt;copy&lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install curl&amp;lt;br&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;To list the virtual machines of an account:&lt;/p&gt;</description></item><item><title>Gnome3 – “Extract” option in the Nautilus context menu</title><link>https://techforbreakfast.com/en/gnome3-extract-option-nautilus-context-menu/</link><pubDate>Sun, 30 Dec 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/gnome3-extract-option-nautilus-context-menu/</guid><description>&lt;p&gt;If, after installing Wheezy with Gnome3, the option to extract or compress files does not appear in the Nautilus context menu, check whether file-roller is installed:&lt;/p&gt;&#10;&lt;div class="code"&gt;&#10; &lt;div class="code-bar"&gt;&#10; &lt;span class="code-dots" aria-hidden="true"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&#10; &lt;span class="code-lang"&gt;text&lt;/span&gt;&#10; &lt;button type="button" class="code-copy"&gt;copy&lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo dpkg -l file-roller*&amp;lt;br&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;To install it:&lt;/p&gt;&#10;&lt;div class="code"&gt;&#10; &lt;div class="code-bar"&gt;&#10; &lt;span class="code-dots" aria-hidden="true"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&#10; &lt;span class="code-lang"&gt;text&lt;/span&gt;&#10; &lt;button type="button" class="code-copy"&gt;copy&lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install file-roller&amp;lt;br&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Then we can restart Nautilus to make the options appear (without restarting the session)&lt;/p&gt;</description></item><item><title>Validating a Portuguese tax number (NIF)</title><link>https://techforbreakfast.com/en/validate-portuguese-tax-number-nif/</link><pubDate>Mon, 17 Dec 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/validate-portuguese-tax-number-nif/</guid><description>&lt;p&gt;As I needed to build a tool to validate Portuguese tax numbers (NIF), here is the PHP function I wrote for that purpose.&lt;/p&gt;&#10;&lt;div class="code"&gt;&#10; &lt;div class="code-bar"&gt;&#10; &lt;span class="code-dots" aria-hidden="true"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&#10; &lt;span class="code-lang"&gt;text&lt;/span&gt;&#10; &lt;button type="button" class="code-copy"&gt;copy&lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/**&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * Checks whether the structure of a Portuguese tax number (NIF) is valid&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; *&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * @todo check that all characters are digits…&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; *&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * Returns:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * – 0 if the number is valid&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * – 1 if the number is invalid&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * – 2 if the number has the wrong length&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; *&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; *&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; */&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; function calcularNif($string_nif){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; if(strlen($string_nif)==9){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $nif_temp=str_split($string_nif);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $soma_controlo=0;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $digito_controlo_calculado=0;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; for($indice=0;$indice&amp;lt;8;$indice++){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $soma_controlo+=$nif_temp[$indice]*($indice+2);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $calculo_parcial=intval($soma_controlo/11);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $calculo_parcial2=11*$calculo_parcial;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $digito_controlo_calculado=$soma_controlo-$calculo_parcial2;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; if($digito_controlo_calculado==10)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $digito_controlo_calculado=0;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; if($digito_controlo_calculado==$nif_temp[8])&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; return 0; //Returns 0 if the number is valid&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; else&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; return 1; //Returns 1 if the number is invalid&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; return 2; // Returns 2 if the number has an invalid length&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Obviously, you use this code at your own risk and should check that it is correct.&#10;I do not have and do not accept any responsibility for its use or for any damage resulting from it.&lt;/p&gt;</description></item><item><title>Steps to set up backups for Zimbra 7 Open Source Edition</title><link>https://techforbreakfast.com/en/zimbra-7-open-source-edition-backup-setup-steps/</link><pubDate>Sun, 18 Nov 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/zimbra-7-open-source-edition-backup-setup-steps/</guid><description/></item><item><title>R Commander on Xubuntu 12.04 – changing the language</title><link>https://techforbreakfast.com/en/r-commander-xubuntu-12-04-change-language/</link><pubDate>Fri, 26 Oct 2012 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/r-commander-xubuntu-12-04-change-language/</guid><description>&lt;p&gt;After installing R and the Rcmdr package, the default language will be Portuguese (apparently Brazilian Portuguese). If you want to change the language, for example to English, you can follow these steps:&lt;/p&gt;&#10;&lt;p&gt;In the /usr/share/applications folder there is a file called Rcmdr.desktop, which holds the settings of the entry in the applications menu.&#10;What we need to do is add, to the command that is run, the LANGUAGE variable set to the language we want.&lt;/p&gt;</description></item><item><title>Resources for R (help)</title><link>https://techforbreakfast.com/en/r-help-resources/</link><pubDate>Thu, 19 Apr 2012 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/r-help-resources/</guid><description>&lt;p&gt;A link with a list of resources related to the R statistics software: &lt;a href="http://www.stat.ucl.ac.be/ISdidactique/Rhelp/"&gt;http://www.stat.ucl.ac.be/ISdidactique/Rhelp/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Converting RData files created by R on Windows for use on Linux</title><link>https://techforbreakfast.com/en/convert-r-rdata-files-from-windows-to-linux/</link><pubDate>Wed, 28 Mar 2012 00:00:00 +0100</pubDate><guid>https://techforbreakfast.com/en/convert-r-rdata-files-from-windows-to-linux/</guid><description>&lt;p&gt;Starting from the beginning: R is an open source statistical computing application.&#10;Since it is used in a Statistics course I am taking, a problem came up with some R files and text files whose format was not suitable for R on Linux.&#10;The problem in this case was that the files provided were encoded in ANSI instead of UTF8 (for example). For the text files, the following command is enough:&lt;/p&gt;</description></item><item><title>SAP B1 – Getting the data in a form field for a formatted search</title><link>https://techforbreakfast.com/en/sap-b1-get-form-field-data-for-formatted-search/</link><pubDate>Mon, 19 Mar 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/sap-b1-get-form-field-data-for-formatted-search/</guid><description>&lt;p&gt;To get the data held in a form field (for example in the inventory transfer form), use:&lt;/p&gt;&#10;&lt;div class="code"&gt;&#10; &lt;div class="code-bar"&gt;&#10; &lt;span class="code-dots" aria-hidden="true"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&#10; &lt;span class="code-lang"&gt;text&lt;/span&gt;&#10; &lt;button type="button" class="code-copy"&gt;copy&lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SELECT $[$24.U_XX_NEnc.0];&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;By enabling the “System Information” option in the “View” menu, we can see some of the data we need for the formula above. &lt;div&gt;In the case of a grid: $24 is the value shown in “Item”, and “U_XX_NEnc” is the column. &lt;div&gt;&lt;/div&gt;&lt;div&gt;If the field does not belong to a grid, the “U_XX_NEnc” value is taken from the “variable” value. We can use this, for example, in a formatted search to get data from tables that are not directly accessible in the form, based on / filtered by the data returned by the formula above. &lt;/div&gt;&lt;/div&gt;&lt;/p&gt;</description></item><item><title>Subversion – Backing up and restoring a repository</title><link>https://techforbreakfast.com/en/subversion-backup-and-restore-repository/</link><pubDate>Tue, 28 Feb 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/subversion-backup-and-restore-repository/</guid><description>&lt;p&gt;I usually keep a Subversion repository to store some content I use regularly, in case I ever need to get back earlier versions. However, it also needs to be backed up.&lt;/p&gt;&#10;&lt;p&gt;To back up the repository I run the command:&lt;/p&gt;</description></item><item><title>Downloading YouTube videos</title><link>https://techforbreakfast.com/en/download-youtube-videos/</link><pubDate>Mon, 27 Feb 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/download-youtube-videos/</guid><description>&lt;p&gt;To save a YouTube video locally to watch offline later, there are several options, but the one I use most often is youtube-dl.&#10;Since I use Linux, usually a variant of Ubuntu or Ubuntu itself (or at least that is what I have installed, and I will use Xubuntu 11.04 as the reference), installing it is just:&lt;/p&gt;</description></item><item><title>HylaFAX setup on Ubuntu Server 10.04 LTS</title><link>https://techforbreakfast.com/en/hylafax-setup-ubuntu-server-10-04-lts/</link><pubDate>Mon, 27 Feb 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/hylafax-setup-ubuntu-server-10-04-lts/</guid><description>&lt;p&gt;After setting up HylaFAX on Ubuntu Server 10.04 LTS, the file may always be sent blank.&#10;To fix this, edit the file /var/spool/hylafax/bin/pdf2fax.gs and add the following parameter to the conversion command string: -dMaxStripSize=0&#10;example:&#10;$PS -q&#10;-sDEVICE=$device&#10;-dNOPAUSE&#10;-dSAFER=true&#10;-dMaxStripSize=0&#10;-sPAPERSIZE=$paper&#10;$FIXEDWIDTH&#10;-dBATCH&#10;-r$hresx$vres&#10;“-sOutputFile=$out”&#10;$fil&lt;/p&gt;</description></item><item><title>Recovering messages in Zimbra Open Source Edition</title><link>https://techforbreakfast.com/en/recover-messages-zimbra-open-source-edition/</link><pubDate>Mon, 27 Feb 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/recover-messages-zimbra-open-source-edition/</guid><description>&lt;p&gt;Zimbra v7 Open Source Edition does not come with any backup tool.&#10;So, after backing up to a backup server with rsync (steps I will post later), it is important to be sure how to recover the files if an account&amp;rsquo;s messages ever need to be restored.&#10;The messages are in the /opt/zimbra/store folder, which contains two subfolders, “0” and “incoming”.&#10;The messages are in the “0” folder, and inside it there are several folders, also numbered, one for each user.&#10;First problem… which folder belongs to the user in question?&#10;The solution I found was to follow these steps:&#10;Switch to the zimbra user:&lt;/p&gt;</description></item><item><title>Zindus – syncing Gmail and Zimbra contacts</title><link>https://techforbreakfast.com/en/zindus-sync-gmail-and-zimbra-contacts/</link><pubDate>Mon, 27 Feb 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/zindus-sync-gmail-and-zimbra-contacts/</guid><description>&lt;p&gt;If you use Thunderbird and need to sync your contacts with a Gmail or Zimbra account, you can use the &lt;a href="http://www.zindus.com/"&gt;Zindus&lt;/a&gt; extension.&lt;/p&gt;</description></item><item><title>PHP and CodeIgniter</title><link>https://techforbreakfast.com/en/php-and-codeigniter/</link><pubDate>Fri, 24 Feb 2012 00:00:00 +0000</pubDate><guid>https://techforbreakfast.com/en/php-and-codeigniter/</guid><description>&lt;p&gt;I am testing the &lt;a href="http://codeigniter.com/"&gt;codeigniter&lt;/a&gt; framework for &lt;a href="http://www.php.net/"&gt;PHP&lt;/a&gt; to develop php / &lt;a href="http://www.mysql.com/"&gt;mysql&lt;/a&gt; applications. It looks like a fairly easy framework to use (although you need to know its structure well).&lt;/p&gt;&#10;&lt;p&gt;So far so good… over time I will get to know the framework better and things will go faster.&lt;/p&gt;</description></item></channel></rss>