Thursday, January 28, 2021

Java libgrowl Revisit

Java libgrowl Revisit



This time I am going to write my own Java program with libgrowl GrowConnect class, just take it as an exercise.

First you need to get a copy of the libgrowl or you can compile on your own. There are at least 2 sources for the program:

classic https://github.com/feilimb/libgrowl
maven https://github.com/sbower/libgrowl

Write a GrowlNotify program to accept message, tittle, host, application name, notification name as parameters. Minimal to provide message as parameters, others are optional.
eg. $ GrowlNotify 'Hello, world.'

import net.sf.libgrowl.GrowlConnector;
import net.sf.libgrowl.Application;
import net.sf.libgrowl.Notification;
import net.sf.libgrowl.NotificationType;

class GrowlNotify {
	public static void main(String[] args) {
		if (args.length<1) {
			System.out.println("Usage: TestGrowlNotify <message> [<title> <host> <application> <notification>]");
			System.out.println("eg. TestGrowlNotify 'Hello, world.'");
			System.exit(0);
			}

    int counter= 0;
    int i;
    String message="", title="", host= "localhost", appName="libgrowl", notificationName="libgrowl";
    GrowlConnector growl;
    Application application;
    Notification notification;
    NotificationType notificationType;
    NotificationType[] notificationTypes;

    for (i=0; i<args.length; i++) {
      switch(counter++) {
      case 0:
        message= args[0]; break;
      case 1:
        title= args[1]; break;
      case 2:
        host= args[2]; break;
      case 3:
        appName= args[3]; break;
      case 4:
        notificationName= args[4]; break;
      default:
        break;
      }
    }

    application = new Application(appName);
    notificationType = new NotificationType(notificationName);
    notificationTypes = new NotificationType[] { notificationType };

    growl= new GrowlConnector(host);
    growl.register(application, notificationTypes);
    notification = new Notification(application,
        notificationType, title, message);
    growl.notify(notification);

    }
}



$ java -cp libgrowl.jar GrowlNotify.java
⇒ GrowlNotify.class
$ java -cp libgrowl.jar GrowlNotify 'Hello, world.'


If Growl software is installed and running, it shows "Hello, world.".

Just sample

Maven


I am using maven 3.6. Add dependency in pom.xml file:


<dependencies>
...
<dependency>
<groupId>net.sf</groupId>
<artifactId>libgrowl</artifactId>
<version>0.5</version>
</dependency>
<dependencies>


Copy libgrowl.jar to ~/.m2/repository/net/sf/libgrowl/0.5/.


$ cp libgrowl.jar ~/.m2/repository/net/sf/libgrowl/0.5/.
$ mvn compile
$ mvn exec:java -Dexec.mainClass="com.example.GrowlNotify" -Dexec.args="'Hello, world.'"

Saturday, January 16, 2021

Signal Server Down Due To Subscribers Surge

Signal Server Down Due To Subscribers Surge

Signal messenger down today for few hours, unable to send message through Signal desktop and iPhone, but Android seems ok.

According to the news, Signal server down due to surge in subscribers.

Don't know this is good news or bad news for Signal.

The Indian Express: Signal is down, unable to cope with influx of new users.

BBC News: WhatsApp changes: Signal messaging platform stops working as downloads surge.

Friday, January 15, 2021

Intel Change CEO 2020

Intel Change CEO 2020


Intel ousts BoB Swan as CEO and replaced with Pat Gelsinger. Pat Gelsinger was CEO of VMWare.

Intel is not important anymore, why am I writing this? Just for recording purpose.

There was one time, everyone was using Intel chips, especially when Apple switched to Intel. Windows, Mac OS, Linux, even SUN Solaris can run on Intel chips.

Now Wintel (Windows-Intel) alliance is not as strong bonded as before, Microsoft has tried to run Windows on ARM platform. Many others will follow Apple footsteps, switching to ARM base platform. Even Linux developers are focusing more on the ARM platform as well.

Intel semiconductor production can't match with Taiwan TSMC. Taiwan TSMC already mass production with 5nm, while Intel still with 7nm (refer Intel's 7nm is Broken here). Intel is not so experienced in SoC, where CPU, GPU and memory are integrated into 1 chip.

Intel still can do 1 more thing, license ARM instruction sets and make their own ARM chips. Qualcomm has their own ARM based chips, SnapDragon. Amazon has its own ARM server offer with their AWS services called Graviton2.

Intel owned ARM CPU before, which is StrongARM and renamed to XScale, that was around year 2000. StrongARM is a product of Digital Equipment Corporation that works together with ARM. Intel acquired StrongARM as a settlement of a lawsuit with DEC.

StrongARM/XScale chips are used in some mobile devices like the HP iPAQ handheld device. Intel decided to sell off StrongARM/XScale to Marvell Technology and focus on its own low power Atom cpu. I don't see Atom cpu going anywhere now.

Intel is going down trend and going nowhere, if Intel is not going to do something right, it is just a matter of time.

Reference:
https://edition.cnn.com/2021/01/13/investing/intel-new-ceo-pat-gelsinger/index.html

Thursday, January 14, 2021

Zoom meeting on Echo Show 8

Zoom meeting on Echo Show 8

Zoom at home service comes to Google Nest Hub Max and Amazon Echo Show 8. It is different from the Alex for Zoom Rooms skill.

To make it simple, it means user can join Zoom meeting with Echo Show 8 (but not Echo Show 5).

There are a few ways to join a Zoom meeting from Echo Show, you can get it from the official website for the detail instructions. For me I take some simple steps:

"Alexa, open Zoom meeting"
Join a zoom meeting with ID. This ID is from the host, or the URL of the zoom meeting. I don't even sign on to Zoom.

If the simple steps doesn't work, follow the help from Zoom support.

My short review of using Zoom meeting on Echo Show 8. User interface and fuctions are quite similar with the Zoom application on desktop. Can change the view, mute audio, disable video. Unable to chat with text, but can received text from the others. I am happy with it.

Zoom at home works on Echo Show 8 and not Echo Show 5, not sure about Echo Show 10. Since Show 10 is newer device, expect Zoom will worked on Show 10, if it doesn't for now.