Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts

Monday, 30 March 2020

How to Run Android Apps on Ubuntu

How to Run Android Apps on Ubuntu


Running android application APK's on you Linux(Ubuntu) or PC computer requires the use of an android emulator.

The top 10 best emulators that can be used are:
  1. Genymotion
  2. Andro VM
  3. Anbox
  4. Android-x86
  5. Shashlik
  6. ARChon
  7. Android SDK
  8. Andy OS
  9. Jar of Beans
  10. Bliss
Reviews on the emulators can be found here.

I used Anbox emulator and  the steps on how to install it on Ubuntu can be found here

Download your Android app or a Game from here (APKMirror)


Related Resources

Wednesday, 12 February 2020

Ubuntu 18 - My laptop shuts down when I close the lid even though it's set to hibernate



Tested Solutions

My laptop shuts down when I close the lid even though it's set to hibernate

Edit logind.conf file

/etc/systemd$ sudo nano logind.conf

Insert the following changes (remove #'s )

#HandleLidSwitch=suspend
#HandleLidSwitchDocked=suspend

Restart logind.service unit

$ systemctl restart systemd-logind.service (help man)

Note: If changes are not working yet, use this command to suspend the computer system.

$ systemctl suspend


Useful Knowledge

  • systemd  - (systemctl manual) is a suite of basic building blocks for a Linux system.
  • Power management with systemd (read more)
  •  
  • ACPId - (is a flexible and extensible daemon for delivering ACPI events, When an event occurs, it executes programs to handle the event.)
sudo apt install acpi
acpi -i   (To read out battery information)

ACPI (Advanced Configuration and Power Interface) is an open industry specification co-developed by Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. 
ACPI modules are kernel modules for different ACPI parts.


 

 

Thursday, 12 April 2018

Data Privacy and New GDPR


What data is included in GDPR

Data covered under GDPR includes any data or information that can be used to identify a person, whether directly or indirectly. This data must be protected under the new regulation.

GDPR - General Data Protection Regulation , EU

Data Protected under GDPR, that can be used to identify an individual includes;
  • Name 
  • Photo 
  • Email address 
  • Banking information 
  • Medical information
  • Computer IP address

Requirements for Companies Under GDPR, 

  •  Companies must prevent the loss, alteration or distribution of customers’ personal and sensitive data. 
  •  Companies will be required to maintain and update a repository that defines the mapping between each item of sensitive data and the corresponding anonymization rule
  • They must also find new ways of managing data collected through mailing lists, online forms, business cards and, in general, marketing and sales activities.
GDPR compliance projects will have a noticeable impact on the information management processes, including: 
  • Data identification and categorization, 
  • Data encryption and masking, 
  • Data supervision, security and data protection, 
  • Compliance audits and reporting.


Readup source:

Wednesday, 7 June 2017

Learn About Code Editor




A Programmer's Tool - Learn About Code Editor. 

Code Editor.

What is a Code Editors?


A source code editor is a text editor program designed specifically for editing source code of computer programs by programmers.
It may be a standalone application or it may be built into an integrated development environment (IDE) or web browser.
Source code editors are the most fundamental programming tool, as the fundamental job of programmers is to write and edit source code. (Source code editor)

Source Code Editor versus Text Editor

Source code editor  - enhances, automates and eases the production and editing of source code, it's a more advanced text editor.
Text editor -  are a type of program used for editing plain text files, it provides the very basic functionality for making changes to Config files. Some of the basic features of a text editor may
include; Find and replace, Cut, copy, and paste, Text formatting, Undo and redo, Data transformation, Filtering, Syntax highlighting, Extensibility

Tools to help you code more efficiently

Listed below are some of the best source code editors available to programmers. Some may have steep learning curves over others, but before choosing make sure you understand the features to look of for in a great code editor (scroll down)
  1. Notepad++
  2. Atom
  3. Vim
  4. Light Table
  5. Bluefish
  6. Sublime
  7. Vim
  8. Emacs
  9. Visual Studio Code

Notepad + +

 

Features to look out for in a great code editor

This source code editor features help you work more efficiently while writing code or developing a web application, by enhancing, automating or ease the editing of code.
  • Syntax highlighting for multiple programming and scripting languages
  • Autocompletion
  • Auto Indentation
  • Code folding
  • Text folding
  • Function list
  • Brace matching
  • Support for other programming features - Text shell integration, Graphical shell integration, Macro language, Collaborative editing, Large file support, Long line support, Multi-line regex support, Search in files.
  • Playback and Recordable macros (keyboard or mouse strokes, cache your progress automatically so nothing is lost if you accidentally close the program) to help you code more efficiently
  • History support for calling up commonly used snippets of code
  • Built-in script for automation and customization
  • Flexible customization options and plugins
  • Provide a convenient way to run a compiler, interpreter, debugger, or other programs
  • Syntax  highlight, checking, validation and error notifications
  • Code compression - converting common keywords into single-byte tokens, removing unnecessary whitespace, and converting numbers to a binary form
  • Code uncompression - for viewing, pretty printing, formatting or beautifying code
  • Greater support for specific programming language over others languages (Comparison of text editors - Overview )
  • Support for common document interfaces (i.e. Multiple instances, Single document interface, Single document window splitting, multiple document interface )
  • MDI(multiple document interface): overlapped windows, tabbed document interface, window splitting)
  • Support for basic editing features - Spell checking, Regex-based find & replace, Encoding conversion, Newline conversion, Multiple undo/redo, Rectangular block selection
  • Support for key bindings -  a keyboard shortcut and may be customizable to a user's preference and that program functions may be 'bound' to a different set of keystrokes instead of or in addition to the default
  • Support for remote file editing over network protocols (FTP, HTTP, SSH, WebDAV)
  • Support for some of the most common character encodings (ASCII, ISO-8859,DOS (OEM), EBCDIC,UTF-8, UTF-16)
  • Availability of built-in package managers,  used to search for expansion options from within the program, without the need to fire up your web browser.
  • Instant previews of code with availability of the embedded web browser (i.e Light Table)

Atom

Visual Studio Code Editor


Other Editors

Hex Editors - used for editing binary files. Its also known as binary file editor or byte editor. allows for manipulation of the fundamental binary data that constitutes a computer file The name 'hex' comes from 'hexadecimal': a standard numerical format for representing binary data.
Comparison of hex editors

Stream Editor – used for non-interactive editing

Related Readup





Saturday, 6 May 2017

Launch Batch Script to Prompt for Administrator Privileges in a GUI


Launch Batch Scripts as Administrator (with GUI UAC prompt)

Imagine you write a batch script(.bat) and you converted it to an executable file (.exe), then you try to run it, it says access denied.
You could add the runas command to your batch script and have to type the admin password at the prompt.
OR 
You should put into your batch script some additional batch code (as shown below) that launches the batch script or created executable (.exe) file as an administrator GUI UAC prompt, where we can select either yes or no options, rather than have to type in the admin password on the prompt.
Thank you Eneergehttps://sites.google.com/site/eneerge/scripts/batchgotadmin

Solved, tested and it works, find script below, copy and paste, then run.
@echo off
REM Launch Batch Scripts as Administrator (with GUI UAC prompt)
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >>
"%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
REM <YOUR BATCH SCRIPT HERE>


Stackover Source: http://stackoverflow.com/questions/1894967/how-to-request-administrator-access-inside-a-batch-file

Tuesday, 30 April 2013

5 Programming Languages a Programmer Should know + 15 Programming Skills Most Coveted By Employers


Bjarne Stroustrup: most notable for the creation and the development of the widely-used C++ programming language in 1978, suggest the following languages:
    C++
    Java
    Python
    Ruby & Javascript
    C-Objective & C#


Larry Walls : most widely known for his creation of the Perl programming language in 1987, suggest the following languages:
    Javascript
    Java
    Haskell -- is a functional programming language in a mathematical sense
    Python, Perl, Ruby in Rails(Leap Frog)--- is a scripting language
    C-Objective (over 40yrs old)

15 Programming Skills Most Coveted By Employers:
Bjarne_Stroustrup and Larry Walls excluded SQL and NoSQL in their choices on the 5 most important programming language, reasons best know to them.


Read more on the 15 Programming Skills Most Coveted By Employers

Anaconda Python Distribution Python 3.3 linking



Anaconda Python Distribution

Anaconda is a pre-packaged Python distribution for scientific users. [1]
Direct your browser to http://continuum.io/downloads.html ; download the version for your machine. Then follow the steps described for your machine here: http://docs.continuum.io/anaconda/install.html. You do not need to worry about setting the paths yet. By default, the Anaconda Python distribution uses Python 2.7 – we want Python 3.3. For this reason, we need to create a corresponding environment. In a shell (see below for opening one), go to the directory where you installed Anaconda.
On Windows, type:
cd Scripts conda create -n py33 python=3.3 anaconda


On MacOS / Linux, type:
cd bin ./conda create -n py33 python=3.3 anaconda Accept the list of things to be installed and wait for a bit. This will install an Anaconda Python environment based on Python 3.3 to the envs/py33 subdirectory of your Anaconda installation.

Data Sciencing

The art of data sciencing(i.e living in and with science) has existed right from time immemorial.... Our continuous and sustainable levity, is and has been dependent on evolution of knowledge, Past on from generation to generation, from species to species as data....in our DNA, books or environment.


"" Sherlock Holmes(movie) ---- Data Data Data How can you build a house without bricks ""