<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nasser's Blog</title><link>https://nasser.space/</link><description></description><atom:link href="https://nasser.space/rss.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:designernasser@gmail.com"&gt;Nasser Alshammari&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Sun, 05 Apr 2026 10:43:39 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Elm Koans</title><link>https://nasser.space/posts/elm-koans/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;div id="org212c86c" class="figure"&gt;
&lt;p&gt;&lt;img src="https://nasser.space/images/elm-koans.png" alt="elm-koans.png"&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
A while ago I made a video series on YouTube of me solving
&lt;a href="https://github.com/robertjlooby/elm-koans"&gt;Elm-Koans&lt;/a&gt;. I was using Elm
version 0.18 but recently Elm got a new release, Elm version 0.19.
&lt;/p&gt;

&lt;p&gt;
You can watch this video series
&lt;a href="https://www.youtube.com/watch?v=1JPGUgvlMKk&amp;amp;list=PLJKk7-PzFPgqvq76X-KCT0Prx6B6EVarg"&gt;Here&lt;/a&gt;.
&lt;/p&gt;</description><category>News</category><category>Videos</category><guid>https://nasser.space/posts/elm-koans/</guid><pubDate>Sat, 22 Sep 2018 20:52:46 GMT</pubDate></item><item><title>Arabic Fonts in Emacs</title><link>https://nasser.space/posts/arabic-text-in-emacs/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;p&gt;
If you are like &lt;a href="https://twitter.com/a3ammar"&gt;Ammar&lt;/a&gt; or &lt;a href="https://twitter.com/nashamri"&gt;me&lt;/a&gt; and use &lt;a href="https://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt; to write in both Arabic and English,
you might have encountered the problem of using some Arabic font in Emacs and
wished that you could use that font but you can't because the English text looks
terrible, or vice versa. Well, I found a little trick in &lt;a href="https://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt; that allows you
to assign a font for Arabic text and another font for English text.
&lt;/p&gt;

&lt;p&gt;
There's a function in &lt;a href="https://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt; called &lt;code&gt;set-fontset-font&lt;/code&gt; that allows us to specify
a range of characters to have a specific font. To assign the Arabic range to
have &lt;code&gt;Noto Sans Arabic UI&lt;/code&gt; font, for example. All you have to do is to add the
following somewhere in your &lt;code&gt;init.el&lt;/code&gt; if you are using &lt;a href="https://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt;, or in
&lt;code&gt;dotspacemacs/user-init&lt;/code&gt; in your &lt;code&gt;.spacemacs&lt;/code&gt; file if you are using &lt;a href="http://spacemacs.org/"&gt;spacemacs&lt;/a&gt;:
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;(let ((ar-font "Noto Sans Arabic UI")
      (range '(#x000600 . #x0006FF)))
  (set-fontset-font "fontset-startup"  range ar-font)
  (set-fontset-font "fontset-default"  range ar-font)
  (set-fontset-font "fontset-standard" range ar-font))
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;
or for a shorter solution:
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;(set-fontset-font t 'arabic "Noto Sans Arabic UI")
&lt;/pre&gt;&lt;/div&gt;</description><guid>https://nasser.space/posts/arabic-text-in-emacs/</guid><pubDate>Sat, 23 Jun 2018 20:44:45 GMT</pubDate></item><item><title>Site Update</title><link>https://nasser.space/posts/site-update/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;p&gt;
It has been almost three years since I posted anything here. I've decided to
revive my blog and do some updates here and there. I got a new
&lt;a href="https://www.nasser.space"&gt;domain&lt;/a&gt; instead of the &lt;a href="http://www.nass3r.com"&gt;old
one&lt;/a&gt; and now the site supports the https protocol (thanks to
&lt;a href="https://letsencrypt.org/"&gt;Let's Encrypt&lt;/a&gt;). I was using
&lt;a href="https://blog.getpelican.com/"&gt;Pelican&lt;/a&gt; to generate my blog. However, this
time I've decided to go with &lt;a href="https://getnikola.com/"&gt;Nikola&lt;/a&gt;, mainly for two
reasons:
&lt;/p&gt;

&lt;ol class="org-ol"&gt;
&lt;li&gt;Nikola has good &lt;a href="https://orgmode.org/"&gt;Org mode&lt;/a&gt; support,&lt;/li&gt;
&lt;li&gt;Nikola has good multilingual support.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
I've been using &lt;a href="http://spacemacs.org/"&gt;Spacemacs&lt;/a&gt; (An &lt;a href="https://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt; distribution) to do most of my work for the
past two to three years now and I wanted to make publishing new posts as easy as
possible. So after trying some ideas and workflows, I've settled on using &lt;a href="https://getnikola.com/"&gt;Nikola&lt;/a&gt;
with &lt;a href="https://orgmode.org/"&gt;Org mode&lt;/a&gt;. Also, I'm planning to publish (&lt;b&gt;hopefully&lt;/b&gt;) every post in English
and Arabic, so Nikola support for multilingual blogs was a must for me.
&lt;/p&gt;</description><category>News</category><guid>https://nasser.space/posts/site-update/</guid><pubDate>Sun, 13 May 2018 22:08:13 GMT</pubDate></item><item><title>Computer Science?</title><link>https://nasser.space/posts/computer-science/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;dl class="docinfo simple"&gt;
&lt;dt class="date"&gt;Date&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="date"&gt;2014-12-06 6:44&lt;/dd&gt;
&lt;dt class="category"&gt;category&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="category"&gt;&lt;p&gt;&lt;/p&gt;&lt;/dd&gt;
&lt;dt class="slug"&gt;slug&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="slug"&gt;&lt;p&gt;computer-science&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="tags"&gt;tags&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="tags"&gt;&lt;p&gt;computer science, art, engineering&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;What is computer science? is it a scientific discipline? or an engineering
discipline? or is it a form of Art? I tried to answer these questions with a
small presentation that I gave at the university and I thought should share the
slides of that presentation. So, grab it from &lt;a class="reference external" href="https://nasser.space/docs/cs.pdf"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><category>art</category><category>computer science</category><category>engineering</category><guid>https://nasser.space/posts/computer-science/</guid><pubDate>Sat, 06 Dec 2014 06:44:00 GMT</pubDate></item><item><title>Docker NuPIC</title><link>https://nasser.space/posts/docker-nupic/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;dl class="docinfo simple"&gt;
&lt;dt class="date"&gt;Date&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="date"&gt;2014-10-10 9:38&lt;/dd&gt;
&lt;dt class="category"&gt;category&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="category"&gt;&lt;p&gt;Linux&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="slug"&gt;slug&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="slug"&gt;&lt;p&gt;docker-nupic&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="tags"&gt;tags&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="tags"&gt;&lt;p&gt;linux, arch, docker, nupic, ipython, python, notebook, nupic studio, X11,
SSH, VNC, numenta, Dockerfile, image&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;img alt="Docker and NuPIC" src="https://nasser.space/images/docker_nupic.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;UPDATE&lt;/em&gt; Right now nupic is available at PyPi and can be simply installed by:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code bash"&gt;&lt;a id="rest_code_62157d1514fe4953a53b54274737c459-1" name="rest_code_62157d1514fe4953a53b54274737c459-1" href="https://nasser.space/posts/docker-nupic/#rest_code_62157d1514fe4953a53b54274737c459-1"&gt;&lt;/a&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;nupic
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I just set up a docker image that will provide an easy development environment
for the &lt;a class="reference external" href="https://github.com/numenta/nupic"&gt;NuPIC&lt;/a&gt; project. The image comes with the following:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;NuPIC&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;NuPIC Studio&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;iPython notebook&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Matplotlib&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL server&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The docker image is available at the docker hub &lt;a class="reference external" href="https://registry.hub.docker.com/u/nashamri/nupic/"&gt;here&lt;/a&gt;. And the &lt;a class="reference external" href="https://github.com/nashamri/nupic"&gt;Dockerfile&lt;/a&gt; is at
github with all the instructions to use.&lt;/p&gt;</description><category>arch</category><category>docker</category><category>Dockerfile</category><category>image</category><category>ipython</category><category>linux</category><category>notebook</category><category>numenta</category><category>nupic</category><category>nupic studio</category><category>python</category><category>SSH</category><category>VNC</category><category>X11</category><guid>https://nasser.space/posts/docker-nupic/</guid><pubDate>Fri, 10 Oct 2014 08:38:00 GMT</pubDate></item><item><title>Wacom Intuos Pro and Linux</title><link>https://nasser.space/posts/wacom-intuos/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;dl class="docinfo simple"&gt;
&lt;dt class="date"&gt;Date&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="date"&gt;2014-01-01 14:58&lt;/dd&gt;
&lt;dt class="category"&gt;category&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="category"&gt;&lt;p&gt;Paintings&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="slug"&gt;slug&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="slug"&gt;&lt;p&gt;wacom-intuos&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="tags"&gt;tags&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="tags"&gt;&lt;p&gt;krita, mypaint, paintings, linux, arch, wacom, intuos pro, review,
installation, configuration&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;section id="intuos-pro"&gt;
&lt;h2&gt;Intuos Pro&lt;/h2&gt;
&lt;p&gt;&lt;img alt="wacom intuos pro" src="https://nasser.space/images/wacom/wacom1.jpg"&gt;&lt;/p&gt;
&lt;p&gt;So a new year and I got my self a little gift, a Wacom Intuos pro. I'm upgrading
from an Intuos 3 so my opinions could be a little out of date.&lt;/p&gt;
&lt;p&gt;Here is a couple of pictures of the pen and the pen holder.&lt;/p&gt;
&lt;p&gt;&lt;img alt="wacom intuos pro pen and pen holder" src="https://nasser.space/images/wacom/wacom2.jpg"&gt;
&lt;img alt="wacom intuos pro pen" src="https://nasser.space/images/wacom/wacom3.jpg"&gt;&lt;/p&gt;
&lt;p&gt;The cool thing about the pen is the different nibs that you can use. As you can
see in the picture below, the nibs are stored in the pen holder and you can
choose the one that best suits your style.&lt;/p&gt;
&lt;p&gt;&lt;img alt="wacom intuos pro holde and nibs" src="https://nasser.space/images/wacom/wacom4.jpg"&gt;&lt;/p&gt;
&lt;p&gt;The Intuos pro comes in three different sized. I got the small one because it's
cheaper :P and I wanted a compact tablet that I can easily carry with me if
I want to. The tablet surface feels like paper and It's definitely an improvement
over the Intuos 3.&lt;/p&gt;
&lt;p&gt;&lt;img alt="wacom intuos pro table" src="https://nasser.space/images/wacom/wacom5.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Another thing that I really like about the Intuos pro is the ability to have it
work wirelessly. Underneath the tablet there is a removable battery and
a compartment for the wireless dongle. You can remove the battery and the
wireless dongle if you want to work in wired mode. The battery is charged via
the USB cable in wired mode.&lt;/p&gt;
&lt;p&gt;&lt;img alt="wacom intuos pro table" src="https://nasser.space/images/wacom/wacom6.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Here are closer pictures of the wireless and USB dongle.&lt;/p&gt;
&lt;p&gt;&lt;img alt="wacom intuos pro table" src="https://nasser.space/images/wacom/wacom7.jpg"&gt;
&lt;img alt="wacom intuos pro table" src="https://nasser.space/images/wacom/wacom8.jpg"&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="installation-and-configuration"&gt;
&lt;h2&gt;Installation and Configuration&lt;/h2&gt;
&lt;p&gt;The main purpose of this blog post is to show how I got the tablet to work under
Linux. I'm using Arch at the moment and when I plugged the tablet in, it did't
work. I had to mess with it a bit to get it working.&lt;/p&gt;
&lt;section id="driver-installation"&gt;
&lt;h3&gt;Driver installation&lt;/h3&gt;
&lt;p&gt;First off, you need to install the wacom drivers. So run the following command
which will install the drivers form the main repos.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_f245ca42b6df45679506b19f98f597a8-1" name="rest_code_f245ca42b6df45679506b19f98f597a8-1" href="https://nasser.space/posts/wacom-intuos/#rest_code_f245ca42b6df45679506b19f98f597a8-1"&gt;&lt;/a&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;pacman&lt;span class="w"&gt; &lt;/span&gt;-S&lt;span class="w"&gt; &lt;/span&gt;xf86-input-wacom
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="kernel-module-installation"&gt;
&lt;h3&gt;Kernel module installation&lt;/h3&gt;
&lt;p&gt;Then you have to install this kernel &lt;a class="reference external" href="https://aur.archlinux.org/packages/input-wacom-dkms/"&gt;module&lt;/a&gt;. Thanks to &lt;a class="reference external" href="https://aur.archlinux.org/packages/?K=apicici&amp;amp;SeB=m"&gt;apicici&lt;/a&gt; for maintaining
this. It's not in the official repos but you can get it from AUR. I'm using
yaourt here, but you can use whatever AUR manager you have. Also, you have to
have the kernel headers installed before this step, if you don't have them already.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_9b6b03295e95425ead710130e7927b60-1" name="rest_code_9b6b03295e95425ead710130e7927b60-1" href="https://nasser.space/posts/wacom-intuos/#rest_code_9b6b03295e95425ead710130e7927b60-1"&gt;&lt;/a&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;pacman&lt;span class="w"&gt; &lt;/span&gt;-S&lt;span class="w"&gt; &lt;/span&gt;linux-headers
&lt;a id="rest_code_9b6b03295e95425ead710130e7927b60-2" name="rest_code_9b6b03295e95425ead710130e7927b60-2" href="https://nasser.space/posts/wacom-intuos/#rest_code_9b6b03295e95425ead710130e7927b60-2"&gt;&lt;/a&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;yaourt&lt;span class="w"&gt; &lt;/span&gt;-S&lt;span class="w"&gt; &lt;/span&gt;input-wacom-dkms
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="desktop-environment-configuration"&gt;
&lt;h3&gt;Desktop environment configuration&lt;/h3&gt;
&lt;p&gt;I use KDE now and there's a cool &lt;cite&gt;KCM (KConfig Modules)&lt;/cite&gt; for the wacom
tablet in the AUR. To get it run the following:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_4ba0f638338f4865b1a553349c25774e-1" name="rest_code_4ba0f638338f4865b1a553349c25774e-1" href="https://nasser.space/posts/wacom-intuos/#rest_code_4ba0f638338f4865b1a553349c25774e-1"&gt;&lt;/a&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;yaourt&lt;span class="w"&gt; &lt;/span&gt;-S&lt;span class="w"&gt; &lt;/span&gt;kcm-wacomtablet
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here is a screen shot of it:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external image-reference" href="https://nasser.space/images/wacom/kcm1.png"&gt;&lt;img alt="Wacom KCM" src="https://nasser.space/images/wacom/kcm1.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The tablet could be used as a big touchpad. While it's good to have the option,
it's not really practical because the palm rejection isn't working. So I think
disabling the touchpad is better, for now at least. You can do so as shown in
the screen shot below:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external image-reference" href="https://nasser.space/images/wacom/kcm2.png"&gt;&lt;img alt="Wacom KCM" src="https://nasser.space/images/wacom/kcm2.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One awesome feature of this KCS, is the ability to have profiles. Here I have
some shortcuts for &lt;a class="reference external" href="http://mypaint.intilinux.com/"&gt;MyPaint&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external image-reference" href="https://nasser.space/images/wacom/kcm3.png"&gt;&lt;img alt="Wacom KCM" src="https://nasser.space/images/wacom/kcm3.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So this is it, have fun!&lt;/p&gt;
&lt;p&gt;&lt;img alt="wacom intuos pro table" src="https://nasser.space/images/wacom/wacom9.jpg"&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="updates"&gt;
&lt;h3&gt;UPDATES&lt;/h3&gt;
&lt;p&gt;Thanks to &lt;a class="reference external" href="https://plus.google.com/+VascoAlexanderBasqu%C3%A9/posts"&gt;Vasco Alexander Basqué&lt;/a&gt; for pointing out that the Intuos pro needs
xf86-input-wacom version 0.23 or newer. It won't work with older drivers.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;</description><category>arch</category><category>configuration</category><category>installation</category><category>intuos pro</category><category>krita</category><category>linux</category><category>mypaint</category><category>paintings</category><category>review</category><category>wacom</category><guid>https://nasser.space/posts/wacom-intuos/</guid><pubDate>Wed, 01 Jan 2014 14:58:00 GMT</pubDate></item><item><title>Android Storage Space Running Out!</title><link>https://nasser.space/posts/android-storage-space-running-out/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;dl class="docinfo simple"&gt;
&lt;dt class="date"&gt;Date&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="date"&gt;2013-03-28 14:37&lt;/dd&gt;
&lt;dt class="category"&gt;category&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="category"&gt;&lt;p&gt;Android&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="slug"&gt;slug&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="slug"&gt;&lt;p&gt;android-storage-space-running-out&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="tags"&gt;tags&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="tags"&gt;&lt;p&gt;android, storage space&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;I have my galaxy SII with Cyanogenmod 10.1 and I got this message
"Storage space running out some system functions may not work". I tried
to uninstall some applications but that didn't do the trick. I only had
like 100MB of free space. Then I found that there are like 1.8Gigs of
log files stored in the /data/log directory which I don't really care
about.&lt;/p&gt;
&lt;img alt="Android storage warning" src="https://nasser.space/images/androidStorage.png"&gt;
&lt;p&gt;So in order to free some space, I ran the following commands from the
terminal:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code bash"&gt;&lt;a id="rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-1" name="rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-1" href="https://nasser.space/posts/android-storage-space-running-out/#rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-1"&gt;&lt;/a&gt;$&lt;span class="w"&gt; &lt;/span&gt;su&lt;span class="w"&gt; &lt;/span&gt;-
&lt;a id="rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-2" name="rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-2" href="https://nasser.space/posts/android-storage-space-running-out/#rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-2"&gt;&lt;/a&gt;$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/data/log
&lt;a id="rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-3" name="rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-3" href="https://nasser.space/posts/android-storage-space-running-out/#rest_code_3e9a4685ea5a4451b3b8bc3b0cf38eae-3"&gt;&lt;/a&gt;$&lt;span class="w"&gt; &lt;/span&gt;rm&lt;span class="w"&gt; &lt;/span&gt;*.log
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It'll ask for root permissions when u run the first line.
Hope this helps!&lt;/p&gt;</description><category>android</category><category>storage space</category><guid>https://nasser.space/posts/android-storage-space-running-out/</guid><pubDate>Thu, 28 Mar 2013 14:37:00 GMT</pubDate></item><item><title>Arabic in Vim</title><link>https://nasser.space/posts/arabic-in-vim/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;dl class="docinfo simple"&gt;
&lt;dt class="date"&gt;Date&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="date"&gt;2012-12-12 19:52&lt;/dd&gt;
&lt;dt class="category"&gt;category&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="category"&gt;&lt;p&gt;Linux&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="slug"&gt;slug&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="slug"&gt;&lt;p&gt;arabic-in-vim&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="tags"&gt;tags&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="tags"&gt;&lt;p&gt;vim, arabic, linux&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;If you want to write Arabic in vim, there's a small option that sets the
direction of the page to right-to-left and lets you write Arabic with no
problems :D&lt;/p&gt;
&lt;p&gt;The option is:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code vim"&gt;&lt;a id="rest_code_45dd11ce5157459c89927ed8cfd4ab25-1" name="rest_code_45dd11ce5157459c89927ed8cfd4ab25-1" href="https://nasser.space/posts/arabic-in-vim/#rest_code_45dd11ce5157459c89927ed8cfd4ab25-1"&gt;&lt;/a&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="nb"&gt;arabic&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And to turn it off, type:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code vim"&gt;&lt;a id="rest_code_66143e73188f4ab8906910d05fd009c5-1" name="rest_code_66143e73188f4ab8906910d05fd009c5-1" href="https://nasser.space/posts/arabic-in-vim/#rest_code_66143e73188f4ab8906910d05fd009c5-1"&gt;&lt;/a&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="nb"&gt;noarabic&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here's a small screenshot of vim with Arabic working just fine!&lt;/p&gt;
&lt;img alt="Arabic in vim" src="https://nasser.space/images/arabicVim.png"&gt;</description><category>arabic</category><category>linux</category><category>vim</category><guid>https://nasser.space/posts/arabic-in-vim/</guid><pubDate>Wed, 12 Dec 2012 19:52:00 GMT</pubDate></item><item><title>Tips and Tricks for Elementary OS Luna</title><link>https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;dl class="docinfo simple"&gt;
&lt;dt class="date"&gt;Date&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="date"&gt;2012-12-11 19:19&lt;/dd&gt;
&lt;dt class="category"&gt;category&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="category"&gt;&lt;p&gt;Linux&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="slug"&gt;slug&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="slug"&gt;&lt;p&gt;tips-and-tricks-for-elementary-os-luna&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="tags"&gt;tags&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="tags"&gt;&lt;p&gt;elementary OS, linux, tips and tricks&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;img alt="Elementary OS Luna" src="https://nasser.space/images/elementaryLuna.png"&gt;
&lt;p&gt;After using Elementary OS as my main distro on my Desktop and my laptop
for sometime, Here are some tips and tricks and small modifications that
I have right now:&lt;/p&gt;
&lt;p&gt;Make sure you have dconf-editor installed you can do so by running this
command:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_4d934afdc093458abc310ec1d85e0011-1" name="rest_code_4d934afdc093458abc310ec1d85e0011-1" href="https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/#rest_code_4d934afdc093458abc310ec1d85e0011-1"&gt;&lt;/a&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt-get&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;dconf-tools
&lt;/pre&gt;&lt;/div&gt;
&lt;section id="remove-ubuntu-overlay-scroll-bars"&gt;
&lt;h2&gt;Remove ubuntu overlay scroll bars:&lt;/h2&gt;
&lt;p&gt;open dconf-editor then go to this path:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_b4467a2d921b4431a0f9e3d304d4631d-1" name="rest_code_b4467a2d921b4431a0f9e3d304d4631d-1" href="https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/#rest_code_b4467a2d921b4431a0f9e3d304d4631d-1"&gt;&lt;/a&gt;org.gnome.desktop.interface
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And uncheck the ubuntu-overlay-scrollbars entry.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="silencing-the-bell"&gt;
&lt;h2&gt;Silencing the bell:&lt;/h2&gt;
&lt;p&gt;This for muting that annoying sound when you try to auto-complete
something in the terminal and nothing matches. Go to this path with
dconf-editor:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_f9ecfcde4a8e489794757751a960476f-1" name="rest_code_f9ecfcde4a8e489794757751a960476f-1" href="https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/#rest_code_f9ecfcde4a8e489794757751a960476f-1"&gt;&lt;/a&gt;org.gnome.desktop.wm.preferences
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And uncheck the audible-bell entry.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="modify-the-dock"&gt;
&lt;h2&gt;Modify the dock:&lt;/h2&gt;
&lt;p&gt;I like to have the indicators on so I can know whether a program is
running or not.
To do so, open up this file with your favorite text editor:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_8e63d0b0bc454d6ca5192389bf8d3bd8-1" name="rest_code_8e63d0b0bc454d6ca5192389bf8d3bd8-1" href="https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/#rest_code_8e63d0b0bc454d6ca5192389bf8d3bd8-1"&gt;&lt;/a&gt;~/.config/plank/theme/dock.theme
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And change this line:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_f318728378344c82bceb46336c133c78-1" name="rest_code_f318728378344c82bceb46336c133c78-1" href="https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/#rest_code_f318728378344c82bceb46336c133c78-1"&gt;&lt;/a&gt;&lt;span class="nv"&gt;IndicatorSize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Its default value was zero on my installation, it might be different on
yours. You can change a lot of stuff in here, like the color of the
dock, the padding of the items, etc. Each entry is commented with a
small description.&lt;/p&gt;
&lt;p&gt;On my laptop I have a limited vertical space, so having the dock on the
bottom wasn't the best idea in my opinion. So to change the position of
the dock, open up this file&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code sh"&gt;&lt;a id="rest_code_1c68fcaf520a47538538da66180e1d72-1" name="rest_code_1c68fcaf520a47538538da66180e1d72-1" href="https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/#rest_code_1c68fcaf520a47538538da66180e1d72-1"&gt;&lt;/a&gt;~/.config/plank/dock1/settings
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And change the value of the "Position" variable to either 0,1,2,3.&lt;/p&gt;
&lt;p&gt;0 to move it to the left.&lt;/p&gt;
&lt;p&gt;1 to move it to the right.&lt;/p&gt;
&lt;p&gt;2 to move it to the top (doesn't work since we have the top bar).&lt;/p&gt;
&lt;p&gt;3 to move it to the bottom (the default value).&lt;/p&gt;
&lt;p&gt;That's it for now, hope you like it and to the elementary devs and
designers, you guys rock! \m/,&lt;/p&gt;
&lt;/section&gt;</description><category>elementary OS</category><category>linux</category><category>tips and tricks</category><guid>https://nasser.space/posts/tips-and-tricks-for-elementary-os-luna/</guid><pubDate>Tue, 11 Dec 2012 19:19:00 GMT</pubDate></item><item><title>Math Puzzle</title><link>https://nasser.space/posts/math-puzzle-4/</link><dc:creator>Nasser Alshammari</dc:creator><description>&lt;dl class="docinfo simple"&gt;
&lt;dt class="date"&gt;Date&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="date"&gt;2012-12-04 21:48&lt;/dd&gt;
&lt;dt class="category"&gt;category&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="category"&gt;&lt;p&gt;Programming&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="slug"&gt;slug&lt;span class="colon"&gt;:&lt;/span&gt;&lt;/dt&gt;
&lt;dd class="slug"&gt;&lt;p&gt;math-puzzle-4&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Yesterday, I was asked to solve a math puzzle that goes like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You have a 3x3 matrix where you have to fill it with the numbers 1-9,
as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;N1&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;N2&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;N3&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;N4&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;N5&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;N6&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;N7&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;N8&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;N9&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/blockquote&gt;
&lt;p&gt;Where:&lt;/p&gt;
&lt;p&gt;N1 + N4 = N7,&lt;/p&gt;
&lt;p&gt;N2 + N5 = N8,&lt;/p&gt;
&lt;p&gt;N3 + N6 = N9&lt;/p&gt;
&lt;p&gt;and no repetition is allowed!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So I spent sometime trying to solve it. Then I wrote a little Python
script to help me solve it, but it too didn't work. It was a bit
frustrating, to be honest. So I thought about it differently. We know
that an Even number + another Even number will yield an Even number. and
an Odd number + an Odd number will also yield an Even number. The only
case where we can get an Odd number is when we add an Even number with
an Odd number. Let me state these in a clear way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;O + O = E&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;E + E = E&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;O + E = O&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So I counted the Odds and Evens in the list, which are:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;1 -- O&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2 -- E&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;3 -- O&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;4 -- E&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;5 -- O&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;6 -- E&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;7 -- O&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;8 -- E&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;9 -- O&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;5 Odds&lt;/strong&gt;
&lt;strong&gt;4 Evens&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now, no matter how you arrange the first two rows of the matrix, you
can't come up with a formation that will satisfy these constraints :)&lt;/p&gt;
&lt;p&gt;Here are some illustrations:&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;An Even number remains.&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;An Even number remains.&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;An Even number remains.&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;An Odd number remains.&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;O&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;E&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;An Odd number remains&lt;/p&gt;
&lt;p&gt;etc...&lt;/p&gt;
&lt;p&gt;Thus! (I've always liked to say THUS! :D) no solution is valid!
and this is the Python script that I wrote:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code python"&gt;&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-1" name="rest_code_2149f3d492e74f7fa21894889e88f83e-1" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-1"&gt;&lt;/a&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;itertools&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-2" name="rest_code_2149f3d492e74f7fa21894889e88f83e-2" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-2"&gt;&lt;/a&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-3" name="rest_code_2149f3d492e74f7fa21894889e88f83e-3" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-3"&gt;&lt;/a&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-4" name="rest_code_2149f3d492e74f7fa21894889e88f83e-4" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-4"&gt;&lt;/a&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-5" name="rest_code_2149f3d492e74f7fa21894889e88f83e-5" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-5"&gt;&lt;/a&gt;&lt;span class="n"&gt;pro&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;repeat&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-6" name="rest_code_2149f3d492e74f7fa21894889e88f83e-6" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-6"&gt;&lt;/a&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-7" name="rest_code_2149f3d492e74f7fa21894889e88f83e-7" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-7"&gt;&lt;/a&gt;&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;matSum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-8" name="rest_code_2149f3d492e74f7fa21894889e88f83e-8" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-8"&gt;&lt;/a&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c1&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c2&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;c1&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c2&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;c1&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c2&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-9" name="rest_code_2149f3d492e74f7fa21894889e88f83e-9" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-9"&gt;&lt;/a&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-10" name="rest_code_2149f3d492e74f7fa21894889e88f83e-10" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-10"&gt;&lt;/a&gt;&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-11" name="rest_code_2149f3d492e74f7fa21894889e88f83e-11" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-11"&gt;&lt;/a&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-12" name="rest_code_2149f3d492e74f7fa21894889e88f83e-12" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-12"&gt;&lt;/a&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-13" name="rest_code_2149f3d492e74f7fa21894889e88f83e-13" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-13"&gt;&lt;/a&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-14" name="rest_code_2149f3d492e74f7fa21894889e88f83e-14" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-14"&gt;&lt;/a&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pro&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-15" name="rest_code_2149f3d492e74f7fa21894889e88f83e-15" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-15"&gt;&lt;/a&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pro&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-16" name="rest_code_2149f3d492e74f7fa21894889e88f83e-16" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-16"&gt;&lt;/a&gt;        &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;matSum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_2149f3d492e74f7fa21894889e88f83e-17" name="rest_code_2149f3d492e74f7fa21894889e88f83e-17" href="https://nasser.space/posts/math-puzzle-4/#rest_code_2149f3d492e74f7fa21894889e88f83e-17"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So, my dear reader, if you see any flaw in my mathematical reasoning,
please let me know in the comment section below. Thanks!&lt;/p&gt;</description><guid>https://nasser.space/posts/math-puzzle-4/</guid><pubDate>Tue, 04 Dec 2012 21:48:00 GMT</pubDate></item></channel></rss>