Monday, January 30, 2017

Windows 10 slow initialization | high disk / cpu / memory utilization

I've been using Windows 10 since mid-2016 and it was working fine, until some day after a system update around dec-16 the initialization would take forever. I mean around 5 to 10 minutes to start up Windows. The system initializes with black screen and the mouse cursor active, but need to wait all the mentioned time to load the desktop and enable the system for use. I am running a core-i7 4770 with 16gb RAM and SSD, so the initialization should take a few seconds.

Apparently the issue is caused by the "Microsoft Compatibility Telemetry" app / service which takes all computer resources to do some dirt work and send data to Microsoft.

Sunday, January 29, 2017

node.js and express for dummies (1)

I've been looking for tutorials on the internet about node.js for beginners. The very basic steps in order to start doing something like "Hello World" are described below. Note that I am a completely dummy in this subject, so maybe there is something missing. A reminder to myself: please do update this post in the future.

Working on Arch Linux

Sunday, January 8, 2017

archlinux - error during update (pacman)

ERROR #1:

# sudo pacman -Syu
(...)
error: jasper: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/jasper-2.0.10-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: krb5: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/krb5-1.13.7-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: libpsl: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/libpsl-0.16.1-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: gegl: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/gegl-0.3.8-3-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: libwmf: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/libwmf-0.2.8.4-14-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: gimp: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/gimp-2.8.18-4-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: vala: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/vala-0.34.4-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: libraw: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/libraw-0.17.2-3-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: smplayer: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/smplayer-16.11.0-1-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: wget: signature from "Levente Polyak (anthraxx) <levente@leventepolyak.net>" is unknown trust
:: File /var/cache/pacman/pkg/wget-1.18-3-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

Solution: 

# sudo pacman -S archlinux-keyring
resolving dependencies...
looking for conflicting packages...

Packages (1) archlinux-keyring-20170104-1

Total Installed Size:  0.81 MiB
Net Upgrade Size:      0.03 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) upgrading archlinux-keyring                  [######################] 100%
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
  -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
  -> Locally signing key 91FFE0700E80619CEB73235CA88E23E377514E00...
  -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887...
  -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0...
  -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
==> Importing owner trust values...
==> Disabling revoked keys in keyring...
  -> Disabling key F5A361A3A13554B85E57DDDAAF7EF7873CFD4BB6...
  -> Disabling key 7FA647CD89891DEDC060287BB9113D1ED21E1A55...
  -> Disabling key D4DE5ABDE2A7287644EAC7E36D1A9E70E19DAA50...
  -> Disabling key BC1FBE4D2826A0B51E47ED62E2539214C6C11350...
  -> Disabling key 9515D8A8EAB88E49BB65EDBCE6B456CAF15447D5...
  -> Disabling key 4A8B17E20B88ACA61860009B5CED81B7C2E5C0D2...
  -> Disabling key 63F395DE2D6398BBE458F281F2DBB4931985A992...
  -> Disabling key 0B20CA1931F5DA3A70D0F8D2EA6836E1AB441196...
  -> Disabling key 8F76BEEA0289F9E1D3E229C05F946DED983D4366...
  -> Disabling key 66BD74A036D522F51DD70A3C7F2A16726521E06D...
  -> Disabling key 81D7F8241DB38BC759C80FCE3A726C6170E80477...
  -> Disabling key E7210A59715F6940CF9A4E36A001876699AD6E84...
==> Updating trust database...
gpg: next trustdb check due at 2017-09-07



ERROR #2:

# sudo pacman -Syu
(...)
error: failed to commit transaction (conflicting files)
ttf-dejavu: /etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/57-dejavu-sans-mono.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/57-dejavu-sans.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/57-dejavu-serif.conf exists in filesystem
Errors occurred, no packages were upgraded.

Solution: 

# sudo pacman -S --force ttf-dejavu
resolving dependencies...
looking for conflicting packages...

Packages (1) ttf-dejavu-2.37-1

Total Installed Size:  9.75 MiB
Net Upgrade Size:      0.57 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) upgrading ttf-dejavu                         [######################] 100%


References:

Thursday, January 5, 2017

SAP HANA Express - XS Advanced Model - User Provided Service to connect to non-HDI DB schemas

Annotation 2017-01-05: Nothing important happened today. Just the average dinner with fried pork loin steak, potatoes and baked mushrooms seasoned with black pepper, garlic, salt and butter. As always, I ate a lot!

HANA - in order to access a table within another container, or connect to existing database schemas which aren’t managed by HDI (this would be the case for replicated schemas or ERP ABAP schemas for instance) - need to create the User Provided Service (xs cups) manually from the command line;

Sample pass parameters as JSON to create a service non-interactively:

# xs cups CROSS_SCHEMA_SFLIGHT -p "{\"host\":\"<host>\",\"port\":\"30013\",\"user\":\"<user>\",\"password\":\"<pwd>\",\"driver\":\"com.sap.db.jdbc.Driver\",\"tags\":[\"hana\"] , \"schema\" : \"SFLIGHT\" }"

Then modify the requires section of the core-db module in the mta.yaml:

   - name: CrossSchemaService
     group: SERVICE_REPLACEMENTS
     properties:
       key: hdi-sflight-service
       service: ~{sflight-service-name} 


Then modify the resources section of the mta.yaml:

  - name: CrossSchemaService
    type: org.cloudfoundry.existing-service
    parameters:
      service-name: CROSS_SCHEMA_SFLIGHT "same service name created in the command line
    properties:
      sflight-service-name: ${service-name}


Note that indentation is important when editing the mta.yaml !!!

Then create a new folder called cfg under the core-db folder. Create a new file in the cfg
folder called SFLIGHT.hdbgrants with the following code:

{
  "hdi-sflight-service": {
    "object_owner" : {
      "schema_privileges":[ 
        { 
          "reference":"SFLIGHT",
          "privileges_with_grant_option":["SELECT", "SELECT METADATA"]
        }
      ]
    },
    "application_user" : {
      "schema_privileges":[ 
        { 
          "reference":"SFLIGHT",
          "privileges_with_grant_option":["SELECT", "SELECT METADATA"]
        }
      ]
    }
  }
}


Then create a new file called sflight.hdbsynonym in the data folder within the src folder. Enter the corresponding Synonym, Table and Schema name. As a result the tables will be available to be consumed within CDS  artifacts.

The above information was extracted from the HANA5 exercises, and it is also available in the Developer Guide for SAP HANA XSA Model (SP12).


Wednesday, January 4, 2017

Happy new year

Just started studying again, about to start a "XS Advanced Application Project". As described in the developer guide, "The end-to-end process of developing an application that you want to deploy on SAP HANA is straight forward". Let's see how straight forward is the process, it must probably be not so straight forward for dummies (beginners) like myself.


I tried beer battered cod fish for dinner and the result was satisfactory. Followed the foodnetwork recipe today. Next time I'll try the allrecipes recipe.