Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Friday, November 19, 2021

Installing Nodejs and NPM on MS Windows 10

What is NodeJS?

Its what is known as a runtime environment, where programmes written in JavaScript can run.

What is Python?

Python in a programming language. 

What is NPM?

Its a node package manager, which is an application and repository for developing and sharing JavaScript code. Many developers write applications and allow the NPM access to their programmes.

What is Chocolatey?

Its a package manager for windows that runs in Windows PowerShell. Which means, when installing a programme, and there are other dependencies, it will go search and download for you.

How to install Nodejs and NPM?

Download the executable for your version of Windows, at https://nodejs.org/en/download/ 

Example, download and Save the Windows Installaer (.msi) for 64-bit.

Run the installer. Make sure to CHECK box to Automatically install the necessary tools. This will add to path the Node.js and npm programmes.

At end of installation, a Windows prompt will appear. This runs several scripts, press "Space" and follow the instructions which will lead you to the Windows PowerShell prompt.

Test installation

Open a command prompt and type the following;

npm -version

node -v


My output was

8.1.0

v16.13.0

Run Hello World

Lets use an available helloworld package. At the windows terminal;

npm init hello-world helloworld

cd helloworld

npm run start


Use a web browser with the URL that is displayed at the terminal to see the results. In my case, the URL is http://localhost:3000

Issues

The Windows PowerShell waits for a long time with the last message, and task manager show lots of memory+disk activity+Ethernet. 

Created a UnelevatedInstallerTelemetryDecorator

Could it be a slow PC with slow network connectivity? If there are no errors in windows logs, just wait until its done processing and the text appears. My PC took almost 30 mins.

Press Enter to exit.

Tuesday, July 20, 2021

Disable "your organization requires you to change your password" in Windows 10

 This might not be part of the open source, but its just a thing to blog.

Recently a windows 10 Home, login screen after successfully entering the PIN popup the message "your organization requires you to change your password" and forced users to change the pin before proceeding. Those who were not aware, changed it, but did not remember this new PIN the next time they needed to login.

I am trying out this method, but can't say it works as I have not done more test. Its just for my record


Steps

In Windows 10, press Win+r and type regedit

Scroll through Registry Editor, explorer like navigation as follow

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Policies\PassportForWork

Look for the item within that sub-folder named Policies\PINComplexity where it contain several value. Change the value named "Expiration". Double click and choose decimal. In Value data put in the number of days before the PIN expires. 

I can't say whats the correct value to disable, but for now I am using the Value data=600 (in decimal). Expecting the PIN to last 600 days. Maybe Windows 11 would be out by then.


Wednesday, January 15, 2020

Android Studio 3 Installation on MS Windows 10

Android Studio is provided by Google for development of Android applications. Android Studio or AS is available for MS Windows, Linux and Mac OSX.

Following are steps to get started with a fresh MS Windows 10 machine.

Step 1. Download Android Studio


Download from https://developer.android.com/studio/index.html

and follow the installation process.


Step 2. Install Android Studio


Double click and run the downloaded EXE file. Accept the default selections and click "Next" until its installed. An internet connection is required to complete the installation.


Once installation is done, create a first application and test the emulator. In this example, I have choosen min API 23. You will be prompted by MS Windows to allow OpenJDK through firewall. Allow and proceed. Have to consider, the emulator require 1.5Gb additional disk space.

Step 3. Start and create an emulator.


In Android Studio, click "Tools" ->"AVD Manager" ->"Create Virtual Device"

Select "Phone", "Pixel 2". Click "Clone Device". This allows us to keep the original configuration intact and change what ever is required. Click Next.

Click Download for "Nougat" with API 25. Read and Accept the agreements. Click "Next" then "Finish"




Monday, May 21, 2018

Shut Down Dialog Box

First time all apps froze on MS Windows 10 and a popup appears to shutdown.


After a long 1 minute pause the standard screen Closing 4 apps, appears. Luckily the usual process to confirm save each application appears.

However, shutdown did not happen. Everything just so laggy. What happen Win10?

Wednesday, February 14, 2018

Cordova: Accepting user input

What would be the first thing in programming? A simple use of variable and user text input comes to mind. Following the previous post (link here), the Cordova programming environment is set up for Android. The existing files will be edited to do the following;

The HelloWorldApp when started, will prompt the user to enter a city name.






The user enters a city name and press "OK" button. The city name will be displayed on the app.






Step 1. Position the text to display user response.

Using a text editor, open the file index.html in HelloWorld/www and replace the previous <p> tag with the text "Hello World" with;

<div id="answer"></div>

Save the file.

Step 2. Prompt user at apps startup and display the reply.

Open the file index.js in HelloWorld/www/js

Add our function called getAnswer to the end of the file;
function getAnswer() {
    var ans = prompt("Name your city");
    if (ans.length > 0) {      
        document.getElementById('answer').innerHTML = "";      
        document.getElementById('answer').innerHTML = ans + " is a great place.";
    } else {      
        getAnswer();
    }
}


Activate the getAnswer function in the initialize:function( )by adding after document.addEventListener(...);

getAnswer( );

Step 3. Build and launch the app.

At the command line interface (CLI) or the command terminal, type

$ cordova build android
$ cordova run android

This will launch the default emulator.

In order to test the app, at any time after editing to the source files, just follow this Step 3.

Troubleshooting

Android emulator error: 
The connection to the server was unsuccessful. (file:///android_assets/www/index.html)

Edit the file config.xml in HelloWorld folder. Add the following line after the </platform> tag.

<preference name="loadUrlTimeoutValue" value="700000" />

Build and launch the app.

Wednesday, July 26, 2017

MySQL Console Pops Up Unexpectedly

MySQL database server provides an easy to implement and uses ANSI SQL syntax with wide implementation for many programming platforms. It is still open source licensed for the Community Edition as GPL (see details at mysql.com).

Current versions of MySQL Community Edition is available on Red Hat 6+, Centos 6+ and MS Window 10, for following versions;

  • MySQL 5.6 GA on 5.2.2013
  • MySQL 5.7 GA on 21.10.2015

Both versions are known to support current SQL standards, being SQL:2008.

Since using MySQL Community Edition version 5.6.21, something strange has been happening every midnight. A DOS like prompt pops up and very quickly does "something", which does NOT really allow me the time to read the messages and then it goes away (disappears). On one occasion I managed to capture that screen as the database it was trying to reach was not connected and here is how that screen looks like.


Apparently it was updating the MySQL catalogue, pretty harmless. The problem that I can see;
  • Takes up additional processing which is not good when I am running emulators or CPU intensive work
  • Distracts any on going work, such as when preparing documentation
  • Disrupts desktop on-going recordings
  • Disrupts benchmark operations

One could either disable the update process or assign it to another pre-defined time. On MS Windows 10, here are the steps to do either.

Step 1: Start MySQL Installer

Click the MS Windows Start and type; mysql installer
Click the Desktop App that appears. An upgrade my be required, proceed with the upgrade.


Step 2:  Edit Installer Options

In the installer option, click the Configure icon (Looks like a wrench).



  1. To disable the automatic catalog update; Uncheck "Should MySQL Installer update its catalog periodically?"
  2. To change the update time; Select a new time in "What time?" dropdown list.

Click Close.

Done.

Thursday, April 20, 2017

Mouse Cursor Disappear in Chrome Web Browser

Google Chrome is among the web browsers that I use frequently on MS Windows 10. Chrome provide many standard web browser features, security and option to extend its capability via plugin extensions. Work productivity goes up a notch when many application windows are launched to run concurrently. The monitor screen is big enough to allow re-positioning of the windows, overlapping windows and minimizing of windows.

On 20th April (today), the mouse cursor disappears when its moved over the Chrome window. It appears back when the cursor is moved outside of the Chrome window area. Moving the cursor again on Chrome window area, its noticeable that an invisible cursor is moving as hyperlinks light up, menu and buttons get active and the standard windows minimise and maximise buttons can be accessed.

A quick search on the internet shows that this problem have occurred way back in June 2014. Its almost the same thing, and issue only started after a MS Windows update that had occurred the day before. Yes, there was a Windows 10 updated yesterday.

Solution is to disable the Hardware Acceleration in Chrome. Here is how to get that cute cursor back on Chrome.


Step 1: Open Chrome web browser (if its not already open).

Step 2: Click "Customise and control Google Chrome" or the "3 vertical dots" button. Its usually at same row as the URL bar. Choose "Settings", scroll down and click "Show advanced settings...".

In the section "System" uncheck Use hardware acceleration when available. Close Chrome and launch Chrome or restart Chrome.

I have not found out if its due to MS Windows change in its settings or Chrome settings changed. Maybe someone out there have an answer.

Monday, June 20, 2016

Backup Thunderbird 45 on MS Windows 10

Just after installing the Kubuntu Jaunty 9.04 Linux, its time to restore some of my stuff. Firstly, I need communications and this is via my Thunderbird.

Thunderbird email client allow access of emails from online email providers and a local storage of email. It may be necessary to move these local emails and local Thunderbird profile to another PC or to be saved as a backup.



Here is the manual method. Save the local configurations by copying the files as listed in these locations to the backup location.

  • Thunderbird 45.1.1
  • MS Windows 10

Backup

Step 1. Identify location of the files for backup.

There are a few ways to do this, one of which is to open Thunderbird menu (3 horizontal lines), click Options-> Account settings. Then follow the steps below.
1. Signature. Right click the email account-> Account settings. In the right window, look for
Attach signature from a file instead



2. Email configuration profile. Right click the email account-> Account setting ->Server Settings ->Local directory





3. Local folders for offline access. Right click the Local folders ->Server Settings ->Local directory



4. Digital certificates. Right click the email account-> Account setting ->Manage Identities...
Then choose the email profile(s) and click Edit and choose the tab for Security.


Step 2. Stop Thunderbird and compact all large folders.

Example,
Inbox
Sent

Empty all Deleted folders

Step 3. Copy files in Step 1 to the new location.


Restore:

Step 1:
Copy the directory profile back to the new system

Step 2:
In the terminal create an email profile that uses the old directory, type

thunderbird -profilemanager

(WIP)

Tuesday, March 8, 2016

Boot Centos Linux to Windows

Centos 6 and 7 provide different approach for booting to a graphical windows interface known as X. Firstly, ensure the relevant packages to support display of windows where most of it are bundled as one of the popular Linux desktop environments.

Among the popular current desktops environments available are;

  • Gnome
  • KDE
  • Unity
  • Xfce
  • LXDe
  • Cinnamon
Here are the steps.

Centos 6 Approach


Edit the file /etc/inittab and change the number 3 to 5 as shown in the line below

id:5:initdefault:

Then reboot.

To start graphical windows without reboot, at the command prompt type

init 5
or
startx

Centos 7 Approach


Login as root and the prompt type

sudo systemctl set-default graphical.target

Then reboot.

To start graphical windows without reboot, at the command prompt type

sudo systemctl start graphical.target

Done

Wednesday, October 28, 2015

Check Disk Usage on Windows with WinDirStat

Running out of disk space and wondering where it all went to? Windows users can have their disk summarised and a treemap generated through the use of WinDirStat.

This Windows programme is a port from an open source application called KDirStat written for KDE running on Linux/BSD/Unix type operating system. In the spirit of open source, One characteristics of being open source is having others extend or provide their own version of the software. For example, altWinDirStat from from WinDirStat with some updates. Its a matter of seeing who can stand the test of time in the open source world.

Wouldn't you agree that it opens up more possibilities and increase access to better software?


In the diagram above, there are 3 distinct areas in the default layout after scanning of a directory. Which by the way can include a network share. 

In the area for Directory Summary, users can choose to access the sub-directories details and even delete directories. Click on a directory and its highlighted in the treemap. In the File extension summary, just a click and the disk view of that extension is shown. Click on the Coloured Treemap and the item is highlighted in directory and file extension summary areas, immediately.

Its a nifty and fast tool. 

Monday, April 20, 2015

Did you know there is a Windows Remix?

Just heard a pretty awesome tune but wait till you see the video.

How many of these screens have you seen?

Wednesday, April 15, 2015

Read DVD with Avidemux

Avidemux cannot directly open a DVD file. Instead a readable VOB file is needed to provide a format to access the DVD.

Operating system: MS Windows 7

Open a command prompt.

To create VOB for title 1, chapter 1, or in the DVD file its called VTS_01_0.vob, type

"E:\mplayer-svn-37386\mplayer.exe" dvd://1 -chapter 1 -dumpstream -dumpfile rippeddvd1_1.vob

To create VOB for title 2, or in the DVD file its called VTS_01_1.vob, type

"E:\mplayer-svn-37386\mplayer.exe" dvd://2 -dumpstream -dumpfile rippeddvd1_2.vob

To create VOB for chapter 2, or in the DVD file its called VTS_01_1.vob, type

"E:\mplayer-svn-37386\mplayer.exe" dvd://1 -chapter 2 -dumpstream -dumpfile rippeddvd1_2.vob

Alternatively if above still fails, use another application and convert the DVD to a readable format. E.g. Handbrake software.

Read www.avidemux.org for further details

Thursday, February 12, 2015

What causes Mozilla Thunderbird to Freeze constantly?

The last 1 month after a re-installation of MS Windows 8 and Mozilla Thunderbird, some productivity have drop and temper going up. One of the reasons is due to Thunderbird 31.4 freezing constantly.

Thunderbird email client, have always been on my Linux and MS Windows PC for years. But somehow, something changed that caused a lot of difficulties for me to work with emails. It is not clear when this started but its about the time I re-installed the computer.



Thunderbird setup:

  1. Thunderbird updated to version 31.4.0
  2. Email profile uses IMAP with the SMTP server in the same local network. There are few folders apart from the standard INBOX, SENT, which is less than 12 folders. Check for new messages is set to every 10 minutes and at startup.
  3. Address book includes sync with Google contacts
  4. Calendar includes Lightning sync with Google calendars
  5. Local folder is contains standard folders, which is less than 5 folders.
  6. The Profile folder is in the onedrive folder

Symptoms;

  1. After login, every 1 to 10 minutes Thunderbird freezes rather randomly. This "freeze" last about 30 seconds to 3 minutes and its not predictable.
  2. After I stop onedrive sync, problem still persist.
  3. Disconnect network and problem still persist.
Findings (to some extend)
Its unfortunate that I could not exactly identify the problem but I found 2 steps taken that have made this "freeze" vanish. In rush to resolve the problem, I did both at the same time.
  1. Using the Windows Explorer, access the C:\users\username and right click "appdata" folder, click "Advanced". UNCHECK Allow files in this folder to have contents indexed in addition to file properties, click "OK". Click "Apply" and choose to include subfolders.
  2. Open McAfee Internet Security Suite, it the default antivirus on the computer. Click on Real-Time Scanning (status is ON). Click "Real-Time Scanning:", current status is again On. Click "Settings", UNCHECK Email attachments. CHECK Strike a balance between the scan throroughness and my PC's speed (Recommended). Go back to the antivirus main screen, and turn off the "Scheduled Scans:"
If you encounter the same problem, do test and see which works for you.

Tuesday, June 25, 2013

Autoconfiguration ipv4 address

A funny thing happen on a newly installed MS Windows 8. After setting the fixed IP on the network interface (cable), it kept getting a an IANA ip of 196.254.x.x.

Although, the fixed IP was entered correctly, 10.x.x.x, the command ipconfig showed that it was still using the 196.254.x.x. Driving me mad, this don't happen on Linux as far as I know.

Resolve this by disabling the interface that is causing the problem.

At the command prompt as Admin follow the steps given below;

Step 1: Identify the interface name (Idx)
> netsh interface ipv4 show inter

Step 2: Disable the interface, replaceing the XXX below with the Idx found in Step 1.

> netsh interface ipv4 set interface XXX dadtransmit=0 store=persistent

Thanks to Lyngtinh

Friday, April 19, 2013

Faces of Clouds

Cloud is a big thing these last few months. Just to clear some terms that is of interest and where even so called IT experts are not able to agree on. This means, that its my personal view based on resources published by industry experts.

3 items are of interest. The first, is naming of a cloud based on its deployment. Second, clouds can further be classified based on services it provide to users. And lastly, a case study. Think of your plan to build a cloud and how it would be shaped.

A) A cloud is named based on its location or deployment.

  1. Public - Applications, storage and services made available to the general public for free or for a fee.
  2. Private - For a single organisation and decisions made centrally on resources.
  3. Community - Shared infrastructure having several organisation with specific interest that is managed internally or by a 3rd party.
  4. Hybrid - Combination of either Public, Private or Community, or all three.

B) A cloud can then be named based on its services.

  1. IaaS (Infrastructure-as-a-Service)
    1. Users install own operating system and maintain its own patches, IP addresses. - Rackspace, Amazon EC2.
    2. Users can leverage resources to sell as a service provider to their clients.
  2. PaaS (Platform-as-a-Service)
    1. Run your own application on a provider's platform
    2. Develop on a provider's platform - Google AppEngine, Oracle Cloud Platform, OpenShift.
  3. SaaS (Software-as-a-Service)
    1. Full web application - E.g. Googledocs, SalesForce, Gmail
    2. Web services (consumed by other web application) - GoogleMaps API, PayPal

C) A case study

How would you shape a cloud based on above (A) and (B) for following situation?
Lets say a government wants to setup a TeleHealth cloud. It allows any application for hospitals, clinics and government. Some of these applications are built and some bought. Geographically users are very dispersed throughout the country. 

A) Community
Why? Organisations apart from the Ministry of Health, clinics and hospitals would also include 3rd party resources for pharmaceutical, research, assets, payments.

B) PaaS

  1. By providing one or two standard platforms, all development can be better managed. Deployed applications can be made to meet security and other standards set.
  2. Many new applications/web services can be introduced by users. 


Tuesday, March 5, 2013

Installing JDBC on MS Windows 7

Basics on getting data from remote MySQL database requires installation of a Java driver.

The JDBC drivers is provided through the current Connector/J 5.1. This is a type 4 driver and works for MySQL 4.1, 5.0, 5.1, 5.5. MySQL reference for the driver can be found at http://docs.oracle.com/cd/E19957-01/mysql-refman-6.0/connectors-apis.html#connector-j-versions

Step 1. Ensure JDK 1.6 or 1.7 is already installed.
At the command prompt check the version, see below example where it was installed in C:\Program Files\Java\jre7


> java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)



Step 2. Download the driver from Maven2 project.
Download from http://mirrors.ibiblio.org/maven2/mysql/mysql-connector-java/5.1.19/
the file mysql-connector-java-5.1.19.jar

And save to C:\Program Files\Java\jre7\

Step 3. Tell Java where to find the driver
Click on Start ->Control Panel ->System
On the left menu choose, Advanced system setting
Choose Environment variables, in the System variables box click on CLASSPATH and choose Edit.
At the end of the text box, append a semi colon followed by location and the name of the drivers, e.g.

;C:\Program Files\Java\jre7\lib\mysql-connector-java-5.1.19.jar

Choose Ok until all boxes are closed.
If you have any command prompt or Java application, they need to be restarted.

Useful information in order to use the driver;

  1. The classname: com.mysql.jdbc.Driver
  2. The connection string: jdbc:mysql://server-name:server-port/database-name
  3. Username and password to the database
  4. Default port 3306

OpenOffice / LibreOffice Base

Step 1. Add the classpath
Open Writer and in the menu choose
Tools ->Option ->Java
Click on the JRE installed; Click Classpath ->Add Archive
Choose location of the driver (In this case C:\Program Files\Java\jre7\lib\mysql-connector-java-5.1.19.jar), click OK until all windows are closed.

Step 2. Close all OpenOffice / LibreOffice applications.

Test using the OpenOffice / LibreOffice Base



Tuesday, August 21, 2012

Kubuntu - USB disk does not mount

Followup from the Kubuntu 10.04 installation, for those who have opted to stay on with Kubuntu 10.04, mounting of USB disk is done manually or alternatively, install usbmount.

Using the Package Manager or at the command line, install the following packages

  1. usbmount
  2. pmount
Additionally, if you have NTFS (windows default file system, install the following package
  1. ntfs-3g
Logout, then log back in and plug-in the USB disk (or thumb drive). Dolphin should pop up saying it detected the disk. The USB disk are mounted by default in the /media folder with the name of the partition.



Tuesday, October 28, 2008

Rise of Email spam

The Sophos Report on spam in Aug 08 will really make many companies re-look at their anti spam capability, in particular MS Windows based systems.
There are a few employees who attempt to inform or complain in the increase number of spam to the ICT managers, but these are ignored or placed in a low level of importance. Worst, I heard that one MS Exchange based organisation decided that nothing much can be done and employees were to delete spams on their own.

Some of the spams are Agent-HNY Trojan Horse, is disguised as the Penguin Panic arcade game for Apple iPhones, EncPk-CZ Trojan which pretended to be a Microsoft security patch, and the Invo-Zip malware, which masqueraded as a notice of a failed parcel delivery from firms such as UPS.

Spam origins are ranked highest from US, Russia, Turkey and China. If more desktops for critical areas are migrated to Linux, then these desktops can be proctected.

Friday, October 17, 2008

OpenOffice.org 3.0 Released!

Installed Windows OOo 3.0 (OOO300m9) on Ubuntu Linux 7.10 with Wine 1.0 successfully! Downloaded from http://mirror.oscc.org.my for faster download. Already there is a 300m10 within the week.

But the Check for updates button isnt working.

Others look good!

Wednesday, July 16, 2008

Portable OpenOffice.org

OpenOffice.org flexibility is in the hands of creative users. One example is the installation of OpenOffice.org on a portable device such as a USB thumbdrive.

The OOo 2.4.1 and OOo 3 (beta) can be downloaded from portableapps.com

Blog Archive