Saturday, July 25, 2015

Trying out Allcountjs Javascript Web App Framework for Rapid Application Development

allccountjs

2015-07-24 10:52PM -- 7/27 Ver 07

Summary: This is a node.js, mongodb, angular, express, based full stack javascript framework for creating web apps.
Category:
RAD -- Rapid App Develeopment

Purpose: Install on Windows my 'redek' computer to test this out.

See https://github.com/dgleba/toptal-community-allcount for the code.


I followed this article:

http://www.toptal.com/nodejs/rapid-application-development-with-allcountjs

by: Pavel Tiunov @paveltiunov


Install these software

node.js mongodb git

C:\n\01software\mongodb-win32-x86_64-2008plus-ssl-3.0.4-signed.msi
C:\n\01software\node-v0.12.7-x64.msi
C:\Users\dg\Downloads\Git-1.9.5-preview20150319.exe


mkdir toptal-community-allcount  
cd toptal-community-allcount  
npm install allcountjs  

cd C:\n\nodeprj\toptal-community-allcount

mkdir toptal-community-repo
cd toptal-community-repo

Create main.js in

C:\n\nodeprj\toptal-community-allcount\toptal-community-repo


start mongodb

C:\p2\MongoDB\Server\3.0\bin\mongod.exe --dbpath C:\n\nodeprj\mongodata

ref:

http://blog.ajduke.in/2013/04/10/install-setup-and-start-mongodb-on-windows/


start the app

cd ..
which is...

cd C:\n\nodeprj\toptal-community-allcount

"C:\n\nodeprj\toptal-community-allcount\node_modules.bin\allcountjs.cmd" --git toptal-community-repo --db mongodb://localhost:27017/toptal-community


http://localhost:9080/

visit this address and sign in with admin admin.

works!


import data

cd C:\n\nodeprj\toptal-community-allcount

run:

npm install xml2js
npm install request
npm install q
npm install moment

The following parts show steps I took that were not what was in the article -- I misunderstood.

Wrong:

create
C:\n\nodeprj\toptal-community-allcount\toptal-community-repo\toptal-community.js

start app again as before.

wrong:

"C:\n\nodeprj\toptal-community-allcount\node_modules.bin\allcountjs.cmd" --git toptal-community-repo --db mongodb://localhost:27017/toptal-community

got error:

This is system is fantastic!!!!

I am getting an error with the import feature.

C:\n\nodeprj\toptal-community-allcount\node_modules\allcountjs\node_modules\q\q.
js:126
throw e;
      ^
Error: toptal-community.js:1
var request = require('request');
              ^
ReferenceError: require is not defined
at toptal-community.js:1:15

The app starts and works before I add the toptal-community.js file. The file to add the import feature.

I am new to js frameworks.
Can someone help?


Answer:

ref: https://groups.google.com/d/msg/allcountjs/9C5A2qrrdHQ/rJxJ1e22jb0J

toptal-community.js was in wrong folder.

create
C:\n\nodeprj\toptal-community-allcount\toptal-community.js

edit main.js to call the import feature.

Start the app with:

cd C:\n\nodeprj\toptal-community-allcount  
node toptal-community.js

Works!


Add cards feature per article.

create events.js

edit main.js to call that view.

Works!


This is a great system!!


David Gleba

=

Wednesday, July 8, 2015

New.ampp.server.stack

New ampp server stack

2015-07-08Wed06.02-AM - 2015-07-12 rev 9


5. The current way

Use xampp or pre-made stack. I figure it is a stack tested by users actually using it.

Definitions:

Ampp: apache mysql php python [python for us... some use perl]

Stack: a collection of software in a usable combination resulting in a web site/app.


10. Compiler Issue

Windows amp software binaries are compiled with a variety of microsoft compiler versions denoted by vc9 vc10 vc11 etc.

If the versions of each binary don't match well a software binary like php, python, etc. may not run properly.


15. Python binaries, compilers, and others

Python seems to be vc9 or vc10

Apache and PHP are moving on to vc11 and vc14 for later versions. They are dropping vc9 / vc10.

This is creating a situation where it is harder to find binaries that all work together.

ref:
..
need to find web references to this.


20. Needs / Wants

It would be nice to have a newer ampp stack with the software we want.

I looked at ampps, xampp, and others.

see gsheet:
https://docs.google.com/spreadsheets/d/1AFIbGWJuyt01jwmQ9WVD76I1DomrxoDrtdw1MAupcqg/edit?usp=sharing


30. Manually installed stack - DAMP

I Manually installed a stack - Let's call it - DAMP by David Gleba

It has many packages in c:\p2\damp and others in c:\p2\python34 and Mysql in c:\Program Files because Mysql allows no other path using the installer.

Some of it is portable in the sense that the damp folder can simply be copied to another computer. Then use installers to install python, mysql, and filezilla FTP server.

Damp req'ts:

These are decisions made. Just follow them and many things will just work with on further setup or configuration.

  • must be in c:\p2\damp
  • doc root must be in c:\p2\damp\htdocs

  • use installer for mysql, it goes in c:\Program Files

  • use installer for python, it goes in c:\p2\python34
  • use installer for filezilla FTP server, it goes in c:\p2\damp\filezillaFTPserver

Notes on how I installed it are here:
...


Question posted

I asked the question: Is this setup reliable?

See Here:

...


90. How to test that it all works reliably?

That is the question.


.end.

Wednesday, July 1, 2015

Apache-Mysql-php-python Ampp install -- damp - Windows

Apache php mysql python mod_wsgi install - manually on Windows

2015-07-05 , rev 2015-07-10 Ver 45

1. this document shows several attempts....

This document shows several attempts at finding a combination of packages that works together. See #40. That is where I actually started getting somewhere.

10. see also

stack,web,amp,xampp.gsht - manualinstall tab. sheet1 tab compares software versions. 2015-06-28Sun12.12-PM
https://docs.google.com/spreadsheets/d/1AFIbGWJuyt01jwmQ9WVD76I1DomrxoDrtdw1MAupcqg/edit?usp=sharing

15. Graham posts what to use for mod_wsgi.

https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst

28. I didn't use this section.... php 5.4.42 vc9 download

"VC9 x86 Thread Safe (2015-Jun-11 01:49:48) Zip [16.47MB] sha1: 7f106152261a04dc3547f0f31b4563cefbe402f4"
http://windows.php.net/download/

29. I didn't use this section.... Struggling to find packages that should work together...

2015-06-28Sun12.56-PM
vc10 w64: py 3.4 ap24 modwsgi php is vc 9 11 or 14
http://www.easyphp.org/easyphp-devserver.php
for Windows 7 and 8 Windows 2012 - EasyPHP DevServer 14.1 VC11 - This version supports : PHP 5.6.x / 5.5.x / 5.4.x / 5.3.x - VC9, VC10 and VC11 VC11 builds don't run on XP and 2003 but load VC9 and VC10 builds. - All PHP versions can be used (VC9, VC10 and VC11). ref. http://www.easyphp.org/easyphp-devserver.php
PHP 5.5 (5.5.26) - VC11 x64 Non Thread Safe (2015-Jun-11 02:03:05) Note: x64 builds are currently experimental
conclusion:
  • x64 php is experimental
  • may be able to use php vc11 with apache vc10. - 2015-06-28

40. Use w32 vc10 - for apache python and mod_wsgi

vc10 w32:
- py 3.4, ap24, mod_wsgi vc11: - php 5.6 w32 (w64 is experimental) [Cannot find vc10 binary for php 5.6] mysql: - w64

45. Download..

follow: https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst
Apache 2.4 win32 VC10 binary http://www.apachelounge.com/download/win32/ http://www.apachelounge.com/download/win32/binaries/httpd-2.4.12-win32.zip
http://www.microsoft.com/en-us/download/details.aspx?id=30679 download: vcredist 2012 update 4 - w32

php 5.6 http://windows.php.net/download/ http://windows.php.net/downloads/releases/php-5.5.26-Win32-VC11-x86.zip thread safe
Somehow i didn't use this one, not sure why. http://windows.php.net/downloads/releases/php-5.6.10-Win32-VC11-x86.zip PHP 5.6 (5.6.10) VC11 x86 Thread Safe (2015-Jun-11 02:33:47)

Python 3.4.3 - 2015-02-25 https://www.python.org/downloads/windows/ https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi w32 vc10

modwsgi https://github.com/GrahamDumpleton/modwsgi/blob/develop/win32/README.rst https://github.com/GrahamDumpleton/mod_wsgi/releases https://github.com/GrahamDumpleton/modwsgi/releases/download/4.4.12/modwsgi-windows-4.4.12.tar.gz

https://dev.mysql.com/downloads/windows/installer/ 5.6.25

phpmyadmin http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.4.10/ http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.4.10/phpMyAdmin-4.4.10-english.zip/download

50. unpack and install

  • create .gitignore and create git repo to track edits I make to the settings.
I am following this: http://superuser.com/questions/748117/how-to-manually-install-apache-php-and-mysql-on-windows
  • I unpack apache into c:\p2\damp\apache
  • run httpd.exe from command prompt
  • need msvcr100.dll -- install 2012 vcredist x86
  • set paths in httpd.conf
  • win10: no error but httpd just sits there. localhost will not work.
  • win10: didn't get firewall request to add httpd to the allowed list.
  • win7: asked to add to firewall. it works.
  • copy php.ini-'dev' to php.ini
  • enable php in httpd.conf
  • test it. it works.
  • apache and php are working.
  • This will print a text file of the last 1 changes. >>> git format-patch -1 head --stdout > patch5630a.txt
Install apache as a service.
C:\p2\damp\apache\bin\httpd.exe -k install
C:\Windows\system32>C:\p2\damp\apache\bin\httpd.exe -k install Installing the 'Apache2.4' service The 'Apache2.4' service is successfully installed. Testing httpd.conf....

Mysql

From: C:\p2\damp\,this,\mysql-installer-community-5.6.25.0.msi
  • install mysql. it would only go in program files. No other choice was offered.
  • I installed win64, 64bit.
  • (next time do this later) made user dg417 passwd
  • root
  • done. ok.

55. Phpmyadmin:

https://wiki.phpmyadmin.net/pma/Quick_Install
cd phpMyAdmin mkdir config # create directory for saving http://localhost/phpMyAdmin/setup/ ## run setup
had to edit php.ini for mbstring ext. lots of edits. see git commit

Testing my 'prodrpt' app

"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" --user=root -p -e "create database prodrptdb";
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" --user=root -p prodrptdb < C:\p2\damp\htdocs\2test\prodrpt\documents\bkups\prodrptexp.sql
Set default collation in mysql.
This didn't do it: SET NAMES 'utf8';
The following worked. It's in my.ini
David Gleba set default collation...
collationserver=utf8unicode_ci
charactersetserver=utf8
Try this next time:
CREATE USER 'dg417'@'localhost' IDENTIFIED BY '**';
CREATE USER 'dg417'@'%';
GRANT USAGE ON . TO 'dg417'@'localhost' ;
GRANT ALL PRIVILEGES ON prodrptdb.
TO 'dg417'@'%';

60. Install python mod_wsgi module

C:\p2\Python34\
install wsgi module, w32 vc10 ap24 py34.
edit httpd.conf
install python 3.4 w32
cd C:\p2\Python34\Scripts
pip install Django
django get-pip.py
pip install Django
Successfully installed django-1.8.2
pip install django-admin-bootstrapped
Successfully installed django-admin-bootstrapped-2.5.2
I got error on trakberry app but the other two apps work.
Request Method: GET
Request URL: http://localhost:8986/trakberry/admin/
Django Version: 1.8.2
Exception Type: ImportError
Exception Value:
No module named 'views'

90. Summary

Working - per my basic testing by starting them up in a web page: Apache, mysql, php, python, django, xataface, codeigniter, yii, 2015-07-01Wed18.49-PM
I think the damp folder is portable. Install mysql and python using the installers. Everything except for mysql and python are in the c:\p2\damp folder.
files used:
httpd-2.4.12-win32-vc10(apache).zip
modwsgi-4.4.12-ap24-py34-VC10-w32.so
Graham Dumpleton's mod
wsgi-windows-4.4.12.tar.gz
mysql-installer-community-5.6.25.0,win32-and-win64.msi
php-5.5.26-Win32-VC11-x86.zip
phpMyAdmin-4.4.10-english.zip
python-3.4.3.msi (w32, all python windows is vc10 )
vcredist_x86-2012update4.exe

100. Question

I manually installed apache, python, modwsgi, mysql and php. I matched the compiler version -VC10, for python, apache, and modwsgi. I couldn't find a VC10 binary for PHP 5.5 so I used vc11. Mysql is the 64bit community binary.
Everything seems to be working OK.
Will the combination of vc10/11 compiler and 32/64 bit versions I used work ok, or will it lead to problems? Is there a way to test it other than just using it?
Windowsversionbitsvc
Apache2.4.12w32vc10
Python3.4.3w32vc10
MySQL5.6.24w64?
PHP5.5.26w32vc11
More detailed notes of my installation are at: http://davidgleba.blogspot.ca/2015/07/apache-install-2015-06-28-2md.html

Note: made the installation on st-dgleba machine. 2015-07-01.

105.

I added filezilla server. 2015-07-07 May be best to install over top using installer when installing this on another machine. It will install the service.

110. Compatibility

"although some docuentation suggests that VC10 and VC11 are compatible with each other, I make no guarantee of this." http://forum.wampserver.com/read.php?2,128113,128268

115. Mysql users.

Removed 'any' user see screenshots in dropbox. ver7 2015-07-10Fri12.22-PM C:\n\Dropbox\csd\computer\damp-2015-07-01\mysqlinstallnotes

120. enable mod_rewrite

uncomment this line in httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so
This won't display correctly. don't copy and paste this...
AllowOverride none Require all denied
DocumentRoot "c:/p2/damp/htdocs" <Directory "c:/p2/damp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted
Find any additional occurrences of the line “AllowOverride None” and change it to “AllowOverride All”.
Used some info of this link below and other info copied from xampp httd.conf. http://www.webdevdoor.com/php/mod_rewrite-windows-apache-url-rewriting/
ver 8 of damp, 2015-07-10Fri19.13-PM no zip/7z file made.

.end.

-

-

-

lenovop500redekfreshwin8.1-cute.md

Redek, Lenovo p500 corei7 install fresh win8.1

2015-07-01Wed11.30-pm -- 7/8 Ver 29


Note. fresh install - not upgrade.


this mentions the bios:

https://www.lenovo.com/shop/americas/content/userguides/zug_en.pdf


On Jul 1, 2015, at 7:22 AM, d gleba dgleba@gmail.com wrote: I am using that win81 image you recommended for me. I am getting the following error. See attached image.

It says windows cannot be installed on drive 0 partition 5. Windows cannot be installed on this disk. The selected disk is of the GPT partition style.

Can you help?


boot bios

fn f2 when powering up.


http://tipsandtricksforum.com/thread-245.html

These instructions are to make a gpt uefi bootable usb disk. It worked.

I used rufus:

Device: select your USB flash drive Partition scheme and target system type: select GPT partition scheme for UEFI computer File system: select FAT32 Cluster size: select Default Format Options: Quick format: checked Create a bootable disk using: select ISO Image then click on icon and select your ISO file. Create extended label and icon files: checked took over 50 min to make it.

  • This worked. it boots and allows me to install windows.
  • I had to let lenovo startup routine happen.
  • It wants to repair the computer.
  • Then select advanced options.
  • Boot from efi usb device.
  • Install windows.

Problem

I discovered that the computer will not shut down properly. the screen goes black the keyboard light is on, and the fans are running. it just sits there like that.

I installed most of the drivers on the lenovo site. Still won't shutdown.


updated bluetooth driver from device manager. 2015-07-06 7am.


unchecked a bunch of items in device manager like bluetooth intel properties / power management / allow the computer to turn off this device to save power.

mouse/ allow this device to wake the computer.

706 559pm


installed audio driver from lenovo drivers site.

turned on windows update, later set to automatic updates.

got message about power management conflict with windows. see screen shots. no idea to to deal with it.

"C:\n\Dropbox\,0,drp,dg\lenovowillnotshutdownredek\redek lenovo power problem Screenshot - 762015 , 70604 PM (1).png"


got message from action center re card reader driver. I acted by clicking the link. dl the driver. installed.

I think it still didn't shutdown after all this.


2015-07-07 - 7am this morning -- it works. it shuts down.


.end.