Monday, March 31, 2014

UEFI related

Warning - UEFI install and secondary hard drive with Extended/Logical partitions.
a UEFI installed system, will fail to boot if a secondary drive is attached which contains logical partitions. This would have to be an MBR configured drive, of course, but if it has at least one primary and one extended partition, it will stop Windows 7 and Windows 8 from booting

Wednesday, March 26, 2014

OpenVPN on Mikrotik with Windows 7 client

Configuring a Windows OpenVPN client or server

Using a text editor, create an xxxx.ovpn file and save in C:\Program Files\OpenVPN\config e.g. C:\Program Files\OpenVPN\config\client.ovpn
Here is an example of an OpenVPN Windows client configuration file:
...


From Manual:Interface/OVPN, this can only be done with RouterOS v5+
...if you don't have milrotik version 5+, use PC as server
...use OpenVPN on both server and client PC
...use Community Edition (free) and Static Key for simplest setup

Mikrotik OpenVPN server / Windows 7 client
to create certificates and keys, follow guide below (section A.)
before importing server.key to mikrotik, it has to be converted to text:
...on lubuntu
...navigate to easy-rsa\keys
...openssl
...rsa -in server.key -text -out server.key.txt

A.
Setting up your own Certificate Authority (CA) and generating certificates and keys for an OpenVPN server and multiple clients
...Generate the master Certificate Authority (CA) certificate [and] key
......For PKI management, we will use easy-rsa, a set of scripts which is bundled with OpenVPN 2.2.x and
......earlier. If you're using OpenVPN 2.3.x, you need to download easy-rsa separately from here.
......NOTE to self: download and install easy-rsa using guide from Openvpn 2.3 on Ubuntu VPS:
......As of OpenVPN 2.3, Easy-RSA is no longer a part of the OpenVPN install, so we have to get it
......separately.  We will download it in our home directory.  Note: the latest version of Easy-RSA is version
......3, we needed the older release version 2.

......$ cd ~
......$ wget https://github.com/OpenVPN/easy-rsa/archive/release/2.x.zipwget ......https://github.com/OpenVPN/easy-rsa/archive/release/2.x.zip
......$ unzip 2.x.zip

......We now put it all together, transferring a copy of Easy-RSA to the openvpn directory.

......$ mkdir /etc/openvpn/easy-rsa
......$ cp -R ~/easy-rsa-release-2.x/easy-rsa/2.0/* /etc/openvpn/easy-rsa/
......$ cd /etc/openvpn/easy-rsa
...Generate certificate [and] key for server
...Generate certificates [and] keys for 3 clients
......no need to follow these steps(?)

Alternative(s)
-----------------
FreeLAN
- doesn't support Windows Server (?)


Tuesday, March 18, 2014

Filtering on temp table

SETSELECTIONFILTER in temporary records
Regular record variables are looking at the actual table, so you can take the filter from one variable, copy them to another variable, and you get the same results, because the variable goes to the table and retrieves records from the physical table. No brainer right. You'd think that the same applies to temporary records right? Well that's where you are wrong, because temporary records don't have any values in them when you instantiate them, so when you fill only one of them, set filters, and copy the filters to the other one, it comes as no surprise that there are no values in there, BECAUSE IT DOESNT HAVE ANY VALUES.

You have a temporary record variable, which is empty when it is instantiated. You fill it up. Now it has records, temporary records that only exist in this memory space that is occupied by this single record variable. Now you apply a filter on this set of records. Now you want to apply the same filter to another temporary record, but you are surprised that you don't see anything in the other one. The other one hasn't been filed yet, it is uninstantiated!!! The second variable doesn't just read from the first variable, you have to actually put the records into the variable.

Think of a temporary record variable as a collection of objects. Rec (the temporary record variable that your form is based on) and NewRec (which is a global or local variable somewhere in your logic) are two different collections. One of them has been filled, but the other one has not been filled. The selectionfilter from Rec is properly applied to NewRec, but since there is nothing in there, you don't see anything.

Lookup form on temp table

FORM.RunModal(FormID, MyRecord) vs MyForm.RunModal
For showing temporary records, my observation is that:
- FORM.RUNMODAL will allow a temporary record to show up correctly, but
- MyForm.RUNMODAL will only show the main table even if SETTABLEVIEW is issued with the temporary rec as the variable.
...
but this raises another issue to watch for: if the form identified by FormID is a tabular form with the LOOKUPMODE property set to FALSE and EDITABLE to Yes (look at F100 Accounting Periods, for instance, compare with F89 Job List), then you would need to either change the Form properties LOOKUPMODE to Yes and EDITABLE to No (bad idea! this is an invitation to problems due to unforeseen side-effects), or better yet, create a copy of the form in which the properties are set as appropriate for a Lookup Form and use that form instead.

Thursday, March 13, 2014

MySQL related

Backup then restore to another db
How to Import and Export a MySQL database using HeidiSQL
- using version 9 of portable app, "Load SQL file" is located under File menu

How to Reset the Root Password

Moving an InnoDB Database to Another Machine
You can move an InnoDB database simply by copying all the relevant files listed in Section 14.2.6, “Backing Up and Recovering an InnoDB Database

What is the exact location of Mysql database tables in XAMPP folder?
I think the matter is your tables engine. I guess you are using InnoDB for your table. So you can not copy files easily to make a copy.
Take a look at these links:
...

Attaching an existing database with MySQL
simply copy the folder into the data folder for MySQL and restart the service the database will show up

TOAD: Error "Physical Memory is low (Paging)" when exporting [to Excel file]
Use Tools \ Export \ Export Wizard instead
On "Select Output Format" step, UNCHECK "Check system resources" option

Visually build query (table drag-and-drop): Toad for MySQL
Note to self:
For query containing datetime column, use "Export data to an Excel file"
"Export data to an Excel instance" seems buggy (datetime column exported as mysterious big number)

How to remove 1000-row limit in MySQL Workbench queries?

To enable access from remote computer
MySQL Workbench \ Management \ Users and Privilages \ Add Account
...note: "Limit Connectivity to Hosts Matching" can accept hostname

How install and configure mysql 5.6.16 in windows 7

Connect [Excel 2010] to a MySQL database
Download Microsoft Power Query for Excel
On Excel:
Power Query \ From Database \ From MySQL Database \ type at least servername ("localhost" will do) and  one of the schema exists then click OK


Thursday, March 6, 2014

PBX call duration restriction related

[Panasonic KX-TDA] Conversation Features
----------------------------------------------
Extension-to-Trunk Call Duration:
If a call between an extension user and an outside party is established, the call duration can be restricted by a system timer selected for each trunk group (→ Extension-to-Trunk Call Duration [472]). Both parties will hear an alarm tone 15 seconds before the time-limit at five-second intervals. If the timer expires, the line will be disconnected.
COS programming determines to enable or disable this feature (→ Trunk Call Duration Limitation [502]). Whether this feature is applied to outgoing calls only or all calls (how?) is also programmable.