FCVNx

  HP -- Неподдельная Радость (не Hewlett-Packard)

H6oC5

Notepad++ Enumerate lines (np++ 7.4.2)

  cursorpos(1,1)
  column editor -> number to insert -> 1, +1, leading zeroes

H5KAP

This should be enough to install VirtualBox Guest additions

  sudo apt-get install -y dkms build-essential linux-headers-generic \
                          linux-headers-$(uname -r).

H5BC5

  Shared folders in VirtualBox. Add user to vboxsf group

H5A9t

Find file containing some text. Something that works..

  sudo find . -type f -exec grep -IHn sometext {} \;

See also: grep -r

  http://stackoverflow.com/questions/4767396
       /linux-command-how-to-find-only-text-files

H588A

Search for TAB with grep

  http://stackoverflow.com/questions/10038188/searching-tabs-with-grep

Use a literal Tab character, not the \t escape. (You may need to press Ctrl+V first.)

H575o

Forget tabs in BlueGriffon (2.3.1)

  Tools ->
      Preferences ->
          Advanced ->
              Advanced Configuration ->
                  Configuration Editor (about:config)

bluegriffon.defaults.lastTabs:               user_set string  ""
bluegriffon.defaults.restorePreviousSession: user_set boolean false

H51AA

Closing Notepad++ tabs on closing application

  https://superuser.com/questions/10538
        /closing-notepad-tabs-on-closing-application

Settings > Preferences > Backup >

  Uncheck Remember the current session for next launch

H0U0t

How to prevent HD from sleep in VLC

Open VLC Player. Click Tools > Preferences
At the Bottom Left, Show Settings, Click All

In the Advanced Tab
Put a check by "Inhibit Power Management Daemon During Playback"

In the Video Tab
Put a check by "Disable Screensaver"

Mine had both of these checked by default. I would expect yours to be as well, but you never know.
H096e

VirtualBox with PPA.

Setup repository with:

  sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian yakkety non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list'

  http://www.ubuntuupdates.org/ppa/virtualbox.org_contrib?dist=yakkety

  sudo apt-get purge virtualbox*

since 2016 you will get certificate error - use new key - with "_2016" name suffix

  wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add -

Install Oracle VirtualBox 5.1.8 on Ubuntu 16.10, Ubuntu 16.04, Ubuntu 15.10 and Linux Mint 18
in emulator by Ubuntu Maniac on 11:47:00 PM
  http://www.ubuntumaniac.com/2016/10/install-oracle-virtualbox-518-on-ubuntu.html

Add the following line to your /etc/apt/sources.list:

  deb http://download.virtualbox.org/virtualbox/debian yakkety contrib

Like this to add repository using ubuntu terminal :

  add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian xenial contrib"

You can add these keys with ;

  wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

To install VirtualBox, do

  sudo apt-get update
  sudo apt-get install virtualbox-5.1

For Ubuntu 16.10 yakkety yak 64 bit :

  wget http://download.virtualbox.org/virtualbox/5.1.8/virtualbox-5.1_5.1.8-111374~Ubuntu~yakkety_amd64.deb

  sudo dpkg -i --force-depends virtualbox-5.1_5.1.8-111374~Ubuntu~yakkety_amd64.deb

GCGMS

PowerShell: Ping IP range

  http://www.thomasmaurer.ch/2011/11/powershell-ping-ip-range/

Sometimes you need to know which IP in a specific range is already in use. With Windows PowerShell there is a simple way to ping a IP range.

You can use the .Net class

  System.Net.Networkinformation.Ping

to do this.

  $ping = New-Object System.Net.Networkinformation.Ping
  1..254 | % { $ping.send(“192.168.100.$_”) | select address, status }

GBIIN

Text editors

  https://github.com/notepadqq/notepadqq
  atom.io

  add-apt-repository ppa:notepadqq-team/notepadqq
  apt-get update
  apt-get install notepadqq
  notepadqq &
  apt search atom
  add-apt-repository ppa:webupd8team/atom
  apt-get update
  apt-get install atom
  atom &

GBIHX

Mass convert a project to UTF-8 using Notepad++

  https://pw999.wordpress.com/2013/08/19
    /mass-convert-a-project-to-utf-8-using-notepad/

First of all you’ll need to install the Python Script plugin using the Notepad++ Plugin Manager. Then, after installing and restarting, you have to create a new script with the following code:

  import os;
  import sys;
  filePathSrc="C:\\Temp\\UTF8"
  for root, dirs, files in os.walk(filePathSrc):
      for fn in files:
        if fn[-4:] != '.jar' and fn[-5:] != '.ear' and fn[-4:] != '.gif' and fn[-4:] != '.jpg' and fn[-5:] != '.jpeg' and fn[-4:] != '.xls' and fn[-4:] != '.GIF' and fn[-4:] != '.JPG' and fn[-5:] != '.JPEG' and fn[-4:] != '.XLS' and fn[-4:] != '.PNG' and fn[-4:] != '.png' and fn[-4:] != '.cab' and fn[-4:] != '.CAB' and fn[-4:] != '.ico':
          notepad.open(root + "\\" + fn)
          console.write(root + "\\" + fn + "\r\n")
          notepad.runMenuCommand("Encoding", "Convert to UTF-8 without BOM")
          notepad.save()
          notepad.close()

GBB7e

In Notepad++ 7.1 TAB settings are now language specific:

  Settings -> Preferences -> Language -> TAB settings

  TAB Size: 2
  [v] Replace by spaces.

G7IAj

Converting with Calibre: HTML to epub sure can bring embedded pictures to your e-Reader (tested with Kobo Aura), but this ignores CSS styles.

So if they are really needed (like colorized source code), stay on HTML with embedded Base-64 images, like

  <img src="data:image/png;base64,iVBORw0...I="

G68C0

Google: notepad2 strip trailinng blanks on save

  http://www.flos-freeware.ch/doc/Notepad2.txt

- Auto strip trailing blanks option (File, Line Endings, Default)

------------------------------------------------------------------------

G52MA

Problems with NTP on Windows 10. Suncronize now -- an error occured
fixed, set NTP server to pool.ntp.org (Ubuntu)

F5DL5

------------------------------------------------------------------------

sizeof( long) changed in Linux
------------------------------

foo.c

  #include <stdio.h>

  int main() {
    printf("%ld %ld\n", sizeof( unsigned long), sizeof( unsigned int));
    return 0;
  }

Windows 8.1-x64, tdm-gcc 4.9.2:

  > gcc foo.c -o foo
  > foo
  4 4

Ubuntu Linux 15.04

  virtu@VIVI:~/chess$ clang --version
  Ubuntu clang version 3.6.0-2ubuntu1 (tags/RELEASE_360/final)
  (based on LLVM 3.6.0)
  Target: x86_64-pc-linux-gnu
  Thread model: posix
  virtu@VIVI:~/chess$ clang foo.c -o foo
  virtu@VIVI:~/chess$ ./foo
  8 4

  virtu@VIVI:~/chess$ gcc --version
  gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
  Copyright (C) 2014 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.
  There is NO warranty; not even for MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.
  virtu@VIVI:~/chess$ gcc foo.c -o foo
  virtu@VIVI:~/chess$ ./foo
  8 4

------------------------------------------------------------------------

F51CC

Let's get Chocolatey!
---------------------

  https://chocolatey.org

Chocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind.

To install chocolatey now, open an administrative cmd.exe command prompt and paste the text below and press enter

  @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Next:

  C:\WINDOWS\system32>choco install git
  Chocolatey v0.9.9.5
  Installing the following packages:
  git
  By installing you accept licenses for the packages.

  git v1.9.5.20150320
   The install of git was successful.

  Chocolatey installed 1/1 package(s). 0 package(s) failed.
   See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Next: Install Visual Studio Code from

  https://code.visualstudio.com/

------------------------------------------------------------------------

F4NLt

How-to run Ubuntu Snappy in Virtualbox
--------------------------------------

Code:

  wget -c http://releases.ubuntu.com/15.04
               /ubuntu-15.04-snappy-amd64-generic.img.xz

  xz -dc < ubuntu-15.04-snappy-amd64-generic.img.xz \
         > ubuntu-15.04-snappy-amd64-generic.img

  qemu-img convert -O vmdk ubuntu-15.04-snappy-amd64-generic.img \
                           ubuntu-15.04-snappy-amd64-generic.vmdk

xz is a lossless data compressor.

User:      ubuntu
Password:  ubuntu

Snappy is the new package manager, and that is the one that you should use (Ubuntu Core does not use apt-get, see 'snappy --help'). In particular, snappy does not have the concept of 'repository': i.e. all packages come from the same source.

Links
-----

  http://ubuntuforums.org/showthread.php?t=2260169

  http://askubuntu.com/questions/92328
       /how-do-i-uncompress-a-tarball-that-uses-xz

  http://qemu.weilnetz.de/w64/

  http://tukaani.org/xz/

  http://askubuntu.com/questions/574501
       /virtualbox-ubuntu-image-username-password

------------------------------------------------------------------------

F4NBZ

Контейнеры в Ubintu Vivid (15.04)

  https://www.stgraber.org/2015/04/21/lxd-getting-started/
  http://vasilisc.com/lxd-lightervisor (русский перевод)

------------------------------------------------------------------------

F4D9R

How Microsoft Will Earn A Free Windows?
---------------------------------------

  attraction   -- привлечение внимания
  engagement   -- вовлечение в использование продукта
  recruitment  -- найм разработчиков и квалифицированных пользователей
  monetization -- монетизация, переход к более продвинутой,
                  но платной версии продукта
Links
-----

  http://latestworldtechnology.com
       /how-microsoft-will-earn-a-free-windows/

------------------------------------------------------------------------

F4D15

SSH Server/Client
-----------------

Installing freeSSHd [2]

Download and double-click the installation file. The installation is
fairly straightforward except for these points:

  -- Private keys should be generated (you will be prompted
     during the installation), and

  -- Do not start freeSSHd as a system service
     (this will cause problems with the configuration
     and can cause security issues).

Adding  new user

  + freeSSHd settings ---------------------------------------------+
  |  + User Properties -----------------------------------------+  |
  |  | General                                                  |  |
  |  |                                                          |  |
  |  |              Login: [ virtu                          ]   |  |
  |  |        Autoization: [ Password stored as SHA1 hash |v]   |  |
  |  |           Password: [ *****                          ]   |  |
  |  |   Password (again): [ *****                          ]   |  |
  |  |   Domain                                                 |  |
  |  |                                                          |  |
  |  |       User can use: [v] Shell                            |  |
  |  |                     [v] SFTP                             |  |
  |  |                     [v] Tunneling                        |  |
  |  |                                                          |  |
  |  +----------------------------------------------------------+  |
  +----------------------------------------------------------------+

Links
-----

  1. http://www.freesshd.com/freeSSHd.exe

  2. http://www.techrepublic.com/blog/tr-dojo
       /set-up-a-free-ssh-server-on-windows-7-with-freesshd/

  3. http://www.codeproject.com/Articles/11966
       /sharpSsh-A-Secure-Shell-SSH-library-for-NET

------------------------------------------------------------------------

F4D00

SharpDevelop Multiform application
----------------------------------

1. Create Windows Application. Put button on MainForm

2. DoubleClick it to add event

3. Right click on current project -> add -> new item ->
     Categories C# -> Windows Application -> Form -> Form1.cs

4. Code for MainForm Button1Click

      Form f = new Form1();
      f.ShowDialog( this); // just Show() for non modal

5. Code for Form1 button click

      this.Close();

------------------------------------------------------------------------

F4CNe

Serial communication in C#
--------------------------

Download [1] source. Make changes in:

Class variable:

  private Graphics g;

Constructor code:

  public MainForm()
  {
      InitializeComponent();
>>    g = panel1.CreateGraphics();
      UserInitialization();
  }

iMainForm code:

  void _spManager_NewSerialDataRecieved(object sender, SerialDataEventArgs e)
  {
      if (this.InvokeRequired)
      {
          // Using this.Invoke causes deadlock when closing serial port,
          // and BeginInvoke is good practice anyway.
          this.BeginInvoke(
              new EventHandler<SerialDataEventArgs>(_spManager_NewSerialDataRecieved),
              new object[] { sender, e });
          return;
      }

>>    string str = Encoding.ASCII.GetString(e.Data);
>>    int R = 100;
>>    if (str == "A")
>>        g.DrawEllipse(
>>            new Pen( Color.Red, 5),
>>            panel1.Size.Width/2 - R ,
>>            panel1.Size.Height/2 - R,
>>            2 * R,
>>            2 * R
>>    );
>>    if (str == "B") g.Clear( Color.Blue);
  }

Links

  1. http://www.codeproject.com/Articles/75770
       /Basic-serial-port-listening-application

  2. http://www.codeproject.com/Articles/678025
       /Serial-Comms-in-Csharp-for-Beginners

  3. http://www.eterlogic.com/downloads/SetupVSPE.zip

------------------------------------------------------------------------

F45JS

Keyboard controlled circle
--------------------------

1. Drop panel to a form (panel1 on MainForm, SharpDevelop 5.1)
2. Replace MainForm.cs with following
3. Connect panel1 Appearance.Paint event with Panel1Paint code.

  using System;
  using System.Drawing;
  using System.Windows.Forms;

  namespace ni {
    public partial class MainForm : Form {
      Graphics g;
      Pen p;
      int x, y;

      public MainForm() {
        InitializeComponent();
        g = panel1.CreateGraphics();
        p = new Pen(Color.Blue, 5);
        x = panel1.Width / 2;
        y = panel1.Height / 2;
      }

      protected void Repaint() {
        panel1.Refresh();
        g.DrawEllipse(p, x, y, 5, 5);
      }

      // net-informations.com/q/faq/arrowkeys.html
      protected override bool ProcessCmdKey(
        ref Message msg, Keys keyData) {
        switch (keyData) {
          case Keys.Up:    y = y > panel1.Height ? panel1.Height : y - 1;
                           break;
          case Keys.Down:  y = y < 0 ? 0 : y + 1;
                           break;
          case Keys.Left:  x = x < 0 ? 0 : x - 1;
                           break;
          case Keys.Right: x = x > panel1.Height ? panel1.Height : x + 1;
                           break;
          default: return  base.ProcessCmdKey(ref msg, keyData);
        }
        Repaint();
        return true;
      }

      void Panel1Paint(object sender, PaintEventArgs e) {
        g.DrawEllipse(p, x, y, 5, 5);
      }
    }
  }

------------------------------------------------------------------------

F44JZ

Creating Bitmap Regions for Forms and Buttons
Weiye Chen, 9 Feb 2004

  http://www.codeproject.com
       /Articles/6048/Creating-Bitmap-Regions-for-Forms-and-Buttons

F44D0

How to write C# windows apps?

1. Learn basics of Windows programming and C# fundamentals.
2. Split your problem into a list of mini tasks.
3. Collect solutions for each mini task in Google
   (stackoverflow, codeproject, MSDN are good..)
   C# is chosen because it's popular today.
4. Share your code.

Examples (VS2008):

Drawing image on the form
-------------------------

  https://www.youtube.com/watch?v=lt8Lk4LlTPA

  using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;

  namespace WindowsFormsApplication2
  {
      public partial class Form1 : Form
      {
          private Graphics GFX;
          public Form1()
          {
              InitializeComponent();
              GFX = this.CreateGraphics();
          }

          protected override void OnDoubleClick(EventArgs e)
          {
              base.OnDoubleClick(e);
              GFX.Clear(Color.Yellow);
              GFX.DrawImage(
                  Bitmap.FromFile("check.png"),
                  new Point(0, 0)
              );
          }
      }
  }

Transparency OK ^


Draw image on the desktop
-------------------------

  using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Runtime.InteropServices;

  namespace WindowsFormsApplication2
  {
      public partial class Form1 : Form
      {
          private Graphics GFX;
          public Form1()
          {
              InitializeComponent();
              GFX = Graphics.FromHwnd(IntPtr.Zero);
          }

          protected override void OnDoubleClick(EventArgs e)
          {
              base.OnDoubleClick(e);
              GFX.DrawImage(
                  Bitmap.FromFile("check.png"),
                  new Point(0, 0)
              );
          }
      }
  }


Make a transparent borderless form moveable
-------------------------------------------

"This is tested and easy to understand" found here:

  http:// stackoverflow.com/questions
       /1592876/make-a-borderless-form-movable

Screen.PrimaryScreen.WorkingArea.Width found here:

  https://social.msdn.microsoft.com/Forums/en-US
        /aba4d7cb-8114-4018-bff0-582756c0ae70
        /getting-desktop-widthheight?forum=Vsexpressvcs

  using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;

  namespace WindowsFormsApplication3
  {
      public partial class Form1 : Form
      {
          private int delta = 1;

          public Form1()
          {
              InitializeComponent();
              BackColor = Color.Blue;
              TransparencyKey = Color.Blue;
              FormBorderStyle = FormBorderStyle.None;
              BackgroundImage = Bitmap.FromFile("check.png");
          }

          // This is tested and easy to understand

          protected override void WndProc(ref Message m)
          {
              switch (m.Msg)
              {
                  case 0x84:
                      base.WndProc(ref m);
                      if ((int)m.Result == 0x1)
                          m.Result = (IntPtr)0x2;
                      return;
              }

              base.WndProc(ref m);

          }

          private void timer1_Tick(object sender, EventArgs e)
          {
              if ( this.Left < 0 ||
                   this.Right > Screen.PrimaryScreen.WorkingArea.Width
                 ) delta = -delta;
              this.Left += delta;
          }
      }
  }

------------------------------------------------------------------------

F3QLj

Connection UnoEx --> Simulator (for connection Simulator -> UnoEx see
note F3IJU::UnoArduSim extender (this file))

  http://wpfkb.codeplex.com/
  http://wpfkb.codeplex.com/downloads/get/98359
  http://wpfkb.codeplex.com/downloads/get/98360

  http://inputsimulator.codeplex.com/
  http://inputsimulator.codeplex.com/downloads/get/98050
  http://inputsimulator.codeplex.com/downloads/get/98049

Reading

  Programming Windows, 6th Edition
  By Charles Petzold
  2013

  https://www.microsoftpressstore.com/store
    /programming-windows-9780735671768

------------------------------------------------------------------------

F3MM0

Setting Up Visual Studio 2008 with DirectX SDK (June 2010) found in

  C:\Program Files\Microsoft DirectX SDK (June 2010)

(2013.03.23 lesson TPT::B316)

  1. Open Visual Studio 2008 IDE, Menu Tools -> Options
  2. [-] Project and Solutions
          |  ..
           - VC++ Directories
  3. Show Directories for: Include files
  4. Add new: C:\Program Files\Microsoft DirectX SDK (June 2010)\Include
  5. Show Directories for: Library files
  6. Add new: C:\Program Files\Microsoft DirectX SDK (June 2010)\Lib\x86
  7. Open Solution:

    C:\Program Files\Microsoft DirectX SDK (June 2010)
      \Samples\C++\Direct3D\Tutorials\Tut06_Meshes\Meshes_2008.sln

  8. Menu Build -> Rebuild
  9. Menu Debug -> Start Debugging

Enjoy rotating tiger.

Setting Font in Visual Studio 2008

  Tools -> Options
    Environment -> Fonts and Colors:
      Lucida Console  12

------------------------------------------------------------------------

F3IJU

UnoArduSim extender
-------------------

  void setup() {
    pinMode(13, OUTPUT);
    pinMode(12, OUTPUT);
    pinMode(11, OUTPUT);
    pinMode(10, OUTPUT);
    pinMode(09, OUTPUT);
    pinMode(08, OUTPUT);
    pinMode(07, OUTPUT);
  }

  void loop() {
    digitalWrite(13, HIGH);
    digitalWrite(12, LOW);
    delay(1000);
    digitalWrite(13, LOW);
    digitalWrite(12, HIGH);
    delay(1000);
  }

---------

// Compiled with SharpDevelop 5.1

  using System;
  using System.Collections.Generic;
  using System.Drawing;
  using System.Windows.Forms;
  using System.Runtime.InteropServices;

  namespace drwf
  {
    /// <summary>
    /// Description of MainForm.
    /// </summary>
    public partial class MainForm : Form
    {
      [DllImport("user32.dll", SetLastError = true)]
      public static extern IntPtr GetDesktopWindow();
      [DllImport("user32.dll", SetLastError = true)]
      public static extern IntPtr GetWindowDC(IntPtr window);
      [DllImport("gdi32.dll", SetLastError = true)]
      public static extern uint GetPixel(IntPtr dc, int x, int y);
      [DllImport("user32.dll", SetLastError = true)]
      public static extern int ReleaseDC(IntPtr window, IntPtr dc);

      private System.Drawing.Graphics g;
      private System.Drawing.Pen pen1 = new System.Drawing.Pen(Color.Blue, 2F);

      public Color GetColorAt(int x, int y)
      {
          IntPtr desk = GetDesktopWindow();
          IntPtr dc = GetWindowDC(desk);
          int a = (int) GetPixel(dc, x, y);
          ReleaseDC(desk, dc);
          return Color.FromArgb(255, (a >> 0) & 0xff, (a >> 8) & 0xff, (a >> 16) & 0xff);
      }

      public void Dra(Point pt)
      {
        Graphics g = Graphics.FromHwnd(IntPtr.Zero);
        g.DrawEllipse(Pens.Red, pt.X - 10, pt.Y - 10, 20, 20);
        }

      public MainForm()
      {
        InitializeComponent();
      }

      void Timer1Tick(object sender, EventArgs e)
      {
        // UnoArduSim 1.0.1 220: 668 682 696 710 724 738  754 768 782 796 810 824 838 852
        // Siemens LOGO V.8 916: 587 616 645 674 703 732  761 790 819 848 877 906 935 964

        Point p13 = new Point(668, 220);
        Point p12 = new Point(682, 220);
        Point p11 = new Point(696, 220);
        Point p10 = new Point(710, 220);
        Point p09 = new Point(724, 220);
        Point p08 = new Point(738, 220);
        Point p07 = new Point(754, 220);

        g = panel1.CreateGraphics();
        g.FillRectangle(new SolidBrush(GetColorAt( p13.X, p13.Y)), 100, 50, 200, 50);  // A
        g.FillRectangle(new SolidBrush(GetColorAt( p12.X, p12.Y)), 300, 100, 50, 200); // B
        g.FillRectangle(new SolidBrush(GetColorAt( p11.X, p11.Y)), 300, 350, 50, 200); // C
        g.FillRectangle(new SolidBrush(GetColorAt( p10.X, p13.Y)), 100, 550, 200, 50); // D
        g.FillRectangle(new SolidBrush(GetColorAt( p09.X, p09.Y)), 50, 350, 50, 200);  // E
        g.FillRectangle(new SolidBrush(GetColorAt( p08.X, p08.Y)), 50, 100, 50, 200);  // F
        g.FillRectangle(new SolidBrush(GetColorAt( p07.X, p07.Y)), 100, 300, 200, 50); // H

        Dra( p13);
      }
    }
  }

------------------------------------------------------------------------

F33HK

RapGraph to C++
---------------

Closest approach for RapGraph -> C++ converter (that still works), seems to be WinBGIm Graphics Library with BloodShed Dev-C++, 2008, Michael Main

  http://www.cs.colorado.edu/~main/bgi/dev-c++/

API (32bit, ca 110 items, tested on VirtualBox/Windows XP)

  http://www.cs.colorado.edu/~main/bgi/doc/

Another implementation (opensource, tested with Portables-F-F32)

  http://sourceforge.net/projects/openbgi/

Modify library/Makefile, line 8

  libopenbgi.a: $(OBJS)

Move graphics.h -> C:\Portables-F\TDM-GCC64\x86_64-w64-mingw32\include
     libopenbgi.a -> C:\Portables-F\TDM-GCC64\x86_64-w64-mingw32\lib

Modify rgbmode.c, add

  #define RGB(r,g,b) ((r)|((g)<<8)|((b)<<16))

Compile

  gcc rgbmode.c -o rgbmode -lopenbgi -mwindows

F33B0

Math Input Panel
----------------

On Windows 8.1

  windows 8.1 start screen -> search -> Mat(h Input Panel)

  https://www.youtube.com/watch?v=167MVQDr2kA
  https://www.youtube.com/watch?v=lFSGCRp0Dcg
  https://www.youtube.com/watch?v=Jh0LbnkW6no
  http://windows.microsoft.com/en-us/windows7
    /use-math-input-panel-to-write-and-correct-math-equations

MyScript®-The Power of Handwriting
----------------------------------

Discover MyScript handwriting recognition technology for text, math, shape and music, and harness the power of handwriting.

  https://www.youtube.com/watch?v=yojFiBhPMUo

MyScript Calculator (Android)

  https://www.youtube.com/watch?v=Fx8vS24xK-o

F31BK

Virtual Serial for Arduino
--------------------------

  http://www.eterlogic.com/Downloads.html
  https://www.youtube.com/watch?v=aT6E1OblR4A

Устройство управления через USB
-------------------------------

Arduino Uno:

  http://justforduino.blogspot.com/2014/03/blog-post.html
  http://justforduino.blogspot.ru/2014/02/blog-post_9.html

F2MAS

Затеи с Portables-F
-------------------

Необходимо установить Portables-F-F2L в каталог C:\, в TCCLE13 выполнить скрипт init.bat

Build Horde3D. In my case:

  1. Download and unzip Horde3D_SDK_1.0.0_Beta5.zip

  2. Apply this to rapidxml_print.hpp:

    http://stackoverflow.com/questions/14113923
      /rapidxml-print-header-has-undefined-methods Answer 1.

    .. changed the rapidxml_print.hpp header to have the following
    right before the declaration of the print_node function (line 132):

    ////////////////////////////////////////////////////////////////////
    // Internal printing operations

    template<class OutIt, class Ch>
    inline OutIt print_children(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    template<class OutIt, class Ch>
    inline OutIt print_attributes(
      OutIt out, const xml_node<Ch> *node, int flags
    );

    template<class OutIt, class Ch>
    inline OutIt print_data_node(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    template<class OutIt, class Ch>
    inline OutIt print_cdata_node(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    template<class OutIt, class Ch>
    inline OutIt print_element_node(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    template<class OutIt, class Ch>
    inline OutIt print_declaration_node(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    template<class OutIt, class Ch>
    inline OutIt print_comment_node(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    template<class OutIt, class Ch>
    inline OutIt print_doctype_node(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    template<class OutIt, class Ch>
    inline OutIt print_pi_node(
      OutIt out, const xml_node<Ch> *node, int flags, int indent
    );

    It now compiles nicely using GCC with a single warning since
    apparently int flags is unused in the print_attributes function.

  3. Apply CMake-GUI for

    - Mingw Makefiles/Use default native compilers

    Where is the source code: D:/home/Horde3D
    Where to build the binaries: D:/tmp

    - Configure for (push Configure until RED dissapears)

    CMAKE_BACKWARDS_COMPATIBILITY  2.4
    CMAKE_BUILD_TYPE
    CMAKE_GNUtoMS                  [ ]
    CMAKE_INSTALL_PREFIX           C:/Program Files (x86)/Horde3D
    CMAKE_RUNTIME_OUTPUT_DIRECTORY D:/home/Horde3D/Horde3D/Binaries/Win32
    EXECUTABLE_OUTPUT_PATH
    HORDE3D_BUILD_TERRAIN          [ ]
    LIBRARY_OUTPUT_PATH

  4. d:
     cd \tmp
     mingw32-make

Demos now in D:\home\Horde3D\Horde3D\Binaries\Win32: You may strip exe's if you like.. Mouse move and keyboard "W"^ "S"v "A"< "D"> ESC.

  https://www.youtube.com/watch?v=bzy6MWE7hV8

   Directory of  D:\home\Horde3D\Horde3D\Binaries\Win32\*

   2/22/2015  10:26         <DIR>    .
   2/22/2015  10:26         <DIR>    ..
   2/22/2015  10:25       2,047,205  Chicago.exe
   5/28/2011  15:13             514  ColladaConv.bat
   2/22/2015  10:25       3,486,383  ColladaConv.exe
   2/22/2015  10:27           8,210  Horde3D_Log.html
   2/22/2015  10:25       2,098,891  Knight.exe
   2/22/2015  10:24       4,618,530  libHorde3D.dll
   2/22/2015  10:24       2,030,944  libHorde3DUtils.dll

F2LGP

TDragon GCC 4.9.2 x64 Адаптация. Разработка игры на OpenGL

  http://tempload.com/category/opengl/

  0. Инициализация
  1. Геометрия
  2. Шейдеры
  3. Матрицы
  4. Ввод и движение
  5. Текстуры

TDMGCC64-4.9.2:

0 g++ main.cpp game.cpp -o game -O2 -std=c++11 \
     -lSOIL -lglfw3 -lglew32 -lopengl32 -lglu32 -lgdi32

1 g++ main.cpp game.cpp buffers.cpp -o game -O2 -std=c++11 \
     -lSOIL -lglfw3 -lglew32 -lopengl32 -lglu32 -lgdi32

2 g++ main.cpp game.cpp buffers.cpp shaders.cpp -o game -O2 -std=c++11 \
     -lSOIL -lglfw3 -lglew32 -lopengl32 -lglu32 -lgdi32

3 g++ main.cpp game.cpp buffers.cpp shaders.cpp -o game -O2 -std=c++11 \
     -lSOIL -lglfw3 -lglew32 -lopengl32 -lglu32 -lgdi32

4 g++ main.cpp game.cpp material.cpp object.cpp buffers.cpp \
     shaders.cpp -o game \
     -O2 -std=c++11 -lSOIL -lglfw3 -lglew32 -lopengl32 -lglu32 -lgdi32

5 g++ main.cpp game.cpp material.cpp object.cpp buffers.cpp \
     shaders.cpp textures.cpp -o game \
     -O2 -std=c++11 -lSOIL -lglfw3 -lglew32 -lopengl32 -lglu32 -lgdi32

 2/21/2015  16:08       2,168,719  game.exe

 > strip game.exe

 2/21/2015  16:53         827,392  game.exe

------------------------------------------------------------------------

F2LDj

Unzip http://www.lonesock.net/files/soil.zip (2008)

In projects\makefile create directory named obj
make and copy libSOIL.a into x86_64-w64-mingw32\lib,
SOIL.h into x86_64-w64-mingw32\include

No SOIL_STATIC defined, always static.

  d:
  cd \home\SOIL\projects\makefile
  md obj
  mingw32-make

  [C:\Portables-F\TDM-GCC64\x86_64-w64-mingw32\lib]dir libSOIL.a

  2/21/2015  13:32          91,730  libSOIL.a

------------------------------------------------------------------------

F2KLe

Build GLFW3 with MinGW on Windows 8.1 x64

1. Install CMake with GUI

  http://www.cmake.org/files/v3.2/cmake-3.2.0-rc1-win32-x86.exe

  (*) do not add to system path
  [v] create desktop icon

2. Download and Extract GLFW sources for v.3.1: glfw-3.1.zip

  http://www.glfw.org/download.html

3. Use CMake GUI, create Makefile for MinGW:

  Where is the source code: D:/home/glfw-3.1
  Where to build the binaries: D:/tmp

  Press [Configure]
        MinGW Makefiles
    (*) Use default native compilers
  until RED rows dissapear.
  Press [Generate]

  NB! Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) is OK.

4.  With Portables-F++ (execute init.bat first)
  D:
  cd \tmp
  mingw32-make

5. Yielded D:\tmp\src\libglfw3.a with a bunch of cool examples.

  boing.exe gears.exe heighmap.exe particles.exe
  simple.exe splitview.exe wave.exe

  [C:\Portables-F\TDM-GCC64\x86_64-w64-mingw32\lib]dir libglfw3.a

  2/20/2015  22:05         107,742  libglfw3.a

------------------------------------------------------------------------

F2KG5

Multiinput XOR

  http://electronics.stackexchange.com/questions/93713
    /how-is-an-xor-with-more-than-2-inputs-supposed-to-work
  http://commons.wikimedia.org/wiki
    /File:Odd_parity_detector_IEC_symbol.svg

There are different points of view regarding how an exclusive-OR gate with more than two inputs should behave. Most often such an XOR gate behaves like a cascade of 2-input gates and performs an odd-parity function. However, some people interpret the meaning of exclusive-OR more literally and say that the output should be a 1 if and only if exactly one of the inputs is a 1. I do seem to recall that Logisim uses the latter interpretation, and somewhere in my rusty memory I have seen it in an ASIC cell library. One of the the international standard symbols for an XOR gate is a rectangle labelled with =1 which seems to be more consistent with the "1 and only 1" definition.

EDIT: The definition of exclusive-OR as "1 and only 1" is uncommon but it can be found. For example, IEEE-Std91a-1991 gives the symbol for the exclusive-OR on p. 62 with the note: "The output stands at its 1-state if one and only one of the two inputs stands at its 1-state." For more than 2 inputs the standard recommends using the "odd parity" (2K+1) symbol instead. Web sites that discuss this confusing situation include XOR: The Interesting Gate and gate demos at TAMS. A google search will also turn up sites that claim that, strictly speaking, there is no such thing as an XOR gate with more than two inputs.


F2KFe

NB! make is mingw32-make in TDMGCC64 distribution.

Step: install TDMGCC-4.9.2 on WXP, make is in path
      install TDMGCC64-4.9.2 on W10G, no make
      see
        bin/mingw32-make.exe 214 KB (219,662 bytes)
      compare WinAVR/utis/bin
        make.exe 162 KB (166,400 bytes)

Also:

  https://xcodelovers.wordpress.com/2011/02/01
    /tutorial-installing-tdm-gcc-windows/


F2KDM

Build GLEW on Windows 8.1 with MinGW

  http://stackoverflow.com/questions/24839120
    /building-glew-on-windondows-with-mingw

  gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD \
      -o src/glew.o -c src/glew.c

  gcc -shared -Wl,-soname,libglew32.dll                 \
      -Wl,--out-implib,lib/libglew32.dll.a              \
      -o lib/glew32.dll src/glew.o -L/mingw/lib         \
      -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32

  ar cr lib/libglew32.a src/glew.o

  gcc -DGLEW_NO_GLU -DGLEW_MX -O2 -Wall -W -Iinclude    \
      -DGLEW_BUILD -o src/glew.mx.o -c src/glew.c

  gcc -shared -Wl,-soname,libglew32mx.dll               \
      -Wl,--out-implib,lib/libglew32mx.dll.a            \
      -o lib/glew32mx.dll src/glew.mx.o -L/mingw/lib    \
      -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32

  ar cr lib/libglew32mx.a src/glew.mx.o

------------------------------------------------------------------------

F2AM0

Preparing Portables++ 2015

1. Install TDragon C to C:\Portables-F\TDM-GCC64\

2. Merge folders and subfolders for

  C:\Portables-F\TDM-GCC64\x86_64-w64-mingw32

  with

    SDL2-2.0.3\x86_64-w64-mingw32
    SDL2_image-2.0.0\x86_64-w64-mingw32
    SDL2_mixer-2.0.0\x86_64-w64-mingw32

  respectively.

3. The OpenGL Extension Wrangler Library

     http://glew.sourceforge.net/

   Binaries for Windows 32-bit and 64-bit

     https://sourceforge.net/projects/glew/files/glew/1.12.0
       /glew-1.12.0-win32.zip/download

   All dll files to C:\Portables-F\TDM-GCC64\x86_64-w64-mingw32\bin

   All include files to

      C:\Portables-F\TDM-GCC64\x86_64-w64-mingw32\include

   Rebuild from sources .a files for /lib and /lib32

3. Compile LazyFoo SDL2 examples

  g++ sample.cpp \
      -w -Wl,-subsystem,windows -lmingw32 -lSDL2main \
      -lSDL2 -lSDL2_image -lSDL2_mixer -o sample

4. Acceptable path for 8.1 x64:

    %SystemRoot%\system32;
    %SystemRoot%;
    %SystemRoot%\System32\Wbem;
    %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
    C:\Program Files (x86)\Estonian ID Card\;
    C:\Portables-F\TDM-GCC64\bin

   C:\Portables-F\PortableApps\TCCLE13\init.bat

    cd "\Portables-F\cmd"
    SET PATH=%path%;%cd%
    cd "\Portables-F\TDM-GCC64\bin"
    SET PATH=%path%;%cd%
    cd "\Portables-F\TDM-GCC64\x86_64-w64-mingw32\bin
    SET PATH=%path%;%cd%
    cd "\Portables-F\PortableApps\7-ZipPortable\App\7-Zip"
    SET PATH=%path%;%cd%
    cd "\Portables-F\PortableApps\Far Manager"
    SET PATH=%path%;%cd%
    cd \Portables-F\PortableApps\FirefoxPortable
    SET PATH=%path%;%cd%
    cd \Portables-F\PortableApps\Notepad2Portable
    chcp 65001

5. C:\Portables-F\PortableApps\UnoArduSimV1.0.1

  ItchyAndScratchy.ino              2,281
  MusicalNoteData.h                 4,269
  myUnoDevs_ItchyAndScratchy.txt      746
  README.txt                        1,455
  UnoArduSim.exe                  741,376
  UnoArduSim.pdf                  270,437
