27 November 2024

Office file navigation with useless Quick Access suggestions. Solved using... Quick Access Toolbar

The problem

Recently, when PowerPoint, Word or other office program Opening a document or saving it under another name office started showing a list of useless quick access locations that I don't use. These are locations from my organisations so I guess it shows the locations that are most used, organisation wide.

I have to scroll all the way down to get to the Browse menu item and navigate to the location I want to save to.

The solution: opening a document

When opening a document you can click on the folders tab in the right window pane to get a list of folders recently used by you. 

The solution: Save as...

For Save as... you can work around this Quick Access nuisance using another Quick Access:

  1. In the window header bar you can click the little arrow down next to the powerpoint (or word,...) icon, which opens the Customize Quick Access Toolbar menu
  2.  Select More commands.
  3. IN the window that pops up, scroll down in the left list and select Save As 
  4. Click the Add button in between the lists
  5. Click OK

 Now a small diskette with a pen icon is shown in your window header bar.

Clicking the icon will immediately  open up an explorer to browse to the desired location.

Related post in MS Community Forum...

21 October 2024

windows equivalents for popular unix commands

Some Windows cmd equivalents for common Unix commands for my onw reference

unix cmd
powershell
echo $variable echo %variable% $variable
$Env:variable //environment variable
cp source target copy source target  
cp -r source target 
xcopy source target /e/h
find -name '*.txt
dir /s *.txt
grep text
findstr text
ls -a dir /a
rm file del file
rm -rf directory rmdir /s /q directory
which command
where command

5 October 2024

New features since Java 21 LTS

 Java 22

_  name for variables that are declared but not used

 Java 23

/// Markdown comments

17 September 2024

Oracle wants to use AI for mass surveillance

 Larry Elisson, Executive Chairman of Oracle, said the company is going all in on using AI fro mass surveillance, the register reports. At he Q&A session of the 2024 financial analyst meeting Elisson said:

  • Citizens will be on their best behavior because we're constantly recording and reporting,
  • Drones could be used to pursue police suspects instead of relying on patrol vehicle chases.
  • Every police officer is going to be supervised at all times, If there's a problem AI will report that problem to the appropriate person.

6 September 2024

Getting rid of Noto Sans Symbols and other fonts in Powerpoint

If someone worked on your PowerPoint presentation using Google presentations, you can end up in a situation that PowerPoint gives an error when saving the presentation that the a font (like Noto Sans Symbols) cannot be found.

Getting rid of this is not easy. Find and replace fonts often does not solve the problem for me.

Solution that did work: 

  1. save the Powerpoint as an XML file
  2. Open in a plain text editor (Notepad++, ...)
  3. find an replace "Noto Sans Symbols" (or the font mentioned in the error when saving) with something like "Arial"
  4. save again
  5. Open the XML file with PowerPoint
  6. Save again as .pptx
  7. phew!

I found the solution here...

23 July 2024

How to use Material Themebuilder generated themes with bundled fonts in an Android Compose project

When using Material theme builder, kotlin theme files are generated using downloadable Google fonts.

I wanted to change these fonts which are dynamically downloaded by the running application with fonts that were bundled with my Android Studio Kotlin Compose application. Here are the steps to do replace the downloadable fonts

  1. Download the kotlin theme and integrate it in your application's theme folder
  2. Download the font
      • Alternatively work with any other ttf file you want to replace the downloadable Google fonts with
  3. Add the font to your project. (Elaborate instructions on adding fonts to your compose project here)
    1. In your project create a font folder under res (if it does not exist yet)
    2. Put the downloaded ttf files in this folder. 
    3. Replace all dash characters "-" in the filename with underscores "_". Replace all uppercase characters in the filename with lowercace (optionally preceded by an underscore).
  4.  Adapt ...ui.theme.Type.kt in your project
    1. Replace all occurences of
      Font(
      googleFont = GoogleFont("theFontName"),
      fontProvider = provider,
      )
      with
      Font(
      R.font.the_font_filename
      )
    2. remove the provider variable and its initialisation

Test and run! 

Additional cookbooks on adding fonts to your compose project:


27 May 2024

Man prosecuted for fake Biden phone calls generated using AI

A political consultant for a rivaling democratic candidate generated AI driven phone calls to encourage supporters of US president Biden to abstain from participating in the pre-elections.

The consultant used software from elevenlabs for $150.

AI deep fakes are also being used in the Indian Elections to generate video's of politicians making fake statements.

This shows how AI generated deep fakes are a threat to democracy.

1 May 2024

Google bundles Gemini AI in latest Android Studio

Gemini chat integration and code completion are now bundled in the new Android Studio JellyFish, without licensing needs while in preview. You have to explicitly log in and enable the feature.


 


 

 

 

 

  • It comes with Android Gradle plugin 8.4 and gradle 8.6. Due to automatic profiling it runs our apps faster after the first run.
  • The layout inspector is now integrated in your device emulator window, allowing you to see if your components are where you'd expect them to be and to exaine their attributes.

24 April 2024

Android dessert names

 With version 10 Google stopped referring to Android versions using dessert names. Internally these names do still exist however. With version 13 I'm seeing external references to the desserts again.

  1. Quince Tart
  2. Red Velvet Cake
  3. Snow Cone
  4. Tiramisu
  5. Upside Down Cake
  6. Vanilla Ice Cream

14 April 2024

Not all AI content is spam, but I think right now all spam is AI content.

Jon Gillham

9 April 2024

Java -> Kotlin equivalents

If your starting Kotlin with prior java knowledge, here's a quick lookup table for some common equivalents:

 

Java

Kotlin

Accessibility modifiers:

  • private
  • protected
  • //default package private
  • public

     

    • private
    • protected
    • Internal // accessible in module
    • //default public

String [] anArray;

var anArray:Array<String>

(castType)

smart casting after is

as

public class Area {

private int length;

private int width;

 

//constructor

public Area(int length, int width){

this.length = length;

this.width =  width;

System.out.printf("Surface: %d",length*width);

}

 

//accessor

public int getCircumference(){

return 2*(length+width);

}

}

class Area(var length: Int , var width: Int) {

 

 

        //to add onstructor code

init {

println("Surface: ${length * width}")

}

 

 

 

 

//accessor

val circumference

get() = 2*(length + width)

 

}

anEnum.values()

anEnum.entries

class Shape{}

class Rectangle extends Shape{}

open class Shape {}

class Rectangle : Shape {}

final String aConstant="a";

val aConstant="a"

instanceOf

is

Primitives: int, double...

Int,Double...

lambda (shorter forms exist in both languages)

BiFunction<Integer, Integer, Integer> mutiply= (a, b) -> {

System.out.println("java lambda");

return a * b;

};

 

 

val multiply: (Int, Int)->Int = { a, b ->

println("kotlin lambda")

a * b

}

 

 

new Random();

Random();

Object

Any?

public static void main(String[] args){}

// Note: Java 22 has a preview of a main() function

fun main(args:Array<String>){}

static

companion

top level function

const

switch expression

when

int ternaryVar=test?1:2;

var ternaryVar = if(test) 1 else 2;

throw UnsupportedOperationException

TODO()

void

Unit

8 April 2024

intelliJ 2024.1 released

 

The yearly large IntelliJ release (2024.1) is out with a host of new features. Here's a list of highlights

  • the IDE comes wiith local language models trained to provide based line completion. It is included in the Ultimate Edition, you do not need an additional  AI Assistant license for this. Also, the AI assistant plugin has been unbundled: it was pretty useless if you did not have a dedicated license.
    You cannot run it in combinamtion with other external AI plugins like github copilot.
  • Refactoring inlay hint  when you rename something in your source code. Well that would be welcome, but I do not see this working??
  • Basic IDE features like code highlighting and completion are available during indexing, speeding up the IDE experience when switching projects.
  • There is a beta of a new, modern terminal. You get better assistance as you're used to have in the editor and can handle command reply interactions as blocks.
  • Freeze top lines: just like in a spreadsheet you can now freeze important top lines (start of cklass, method...) when scrolling
  • Better logging support: you can now navigate from logs to the statment that generated them. The IDE will also suggest inserting logging statements in your code.
  • The entire code review workflow is now implemented in your IDE. You can create merge requests from the IDE and reviewers and developers can interact on them from the IDE, without going to the github or gitlab websites.
  • You can now merge unrelated git histories
  • You can now download source code from the quick documentation popup.
  • Builtin CSS functions are now suggested by code completions
  • When debugging multiple statements in one line you get assistance on where exactly in that line you want to break. Useful, Given the ubiquitous use of lamda's.
  • Also in the debugger, when watching the call stack, subsequent calls to external libraries are folded, allowing you to pick calls to the code you wrote more easily
  • when running an npm script, you can now automatically launch a browser client.
  • When testing you get better feedback on which conditionals were not covered
  • The already great HTTP client now gets support for authentications like PKCE
  • Intellij now integrates with OpenRewrite refactorings to enhance you in version (and other) migarations.

More...

2 April 2024

Google to destroy data colleced in incongnito mode after lawsuit

After settling a lawsuit, Google will destroy tracking information it collected on websites containing google tracking (analytics) or advertising info for users browsing in incognito mode.

It only collected information if

  • users had a google account, even if the were not logged into it
  • users were not using firefox, which has better privacy

Data will be deleted on about 136 million users.

Separte from the lawsuit, Google is also phasing out usage of third party cookies in Chrome. Currently you can configure chrome to block third pary cookies, it just is not the default as it is in Firefox and Safari.

More...

27 March 2024

AI is tasting your beer for you

In a study in Nature  the taste of a potential recipe for a Belgian beer is being predicted by Machine Learning based on its chemical components at KUL (Catholic University Leuven).

One of the primary goals of the study is brewing better tasting alcohol free beers.

The techniques used are also interesting for being tested on other types of food.

Replacing Jest for TypeScript testing

 In an earlier post we explained how we moved from ts-node to tsx.

For testing we were using Jest. Unfortunatly Jest relies on ts-node for reading typescript configuration files. We used ts-jest for the configuration and even then we needed quite some configuration in jest.config.ts to work with ESM:

import type { JestConfigWithTsJest } from 'ts-jest'

const jestConfig: JestConfigWithTsJest = {
// [...]
preset: 'ts-jest/presets/js-with-ts-esm', // or other ESM presets
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
},
],
},
}

export default jestConfig
With the compatibility problem with Node.js 20 we looked for some alternatives:
  • vitest
  • node builtin testing 

vitest 

Vitest is built by the Vue community, who also made the vite build tool. As the name suggest, vitest's natural habitat is vite (which we are not currently using), but it runs without vite.

Like tsx it is a modern tool, built with support for typescript and ES modules builtin, and setup was a breeze. 

Just like tsx, it has a builtin watch mode. This mode is even the default: you run your test, then you correct our code and the test automatically reruns.

We adapted the test scripts to our package.json:

"scripts": {
"start": "tsx watch server.ts",
"debug": "tsx watch --inspect-brk server.ts",
"build": "tsc",
"test": "vitest",
"coverage" :
"vitest run --coverage "
}

Vitest's testing API is heavily inspired on, and compatible with Jest, easing migration. The only things we had to change, were some imports.

Node.js builtin Test Runner

The new Node builtin TestRrunner (node:test module), that is present in the Node.js 20 LTS, does not require you to add testing packages to your project. 
It does not have the same level of testing support as a specialised testing package like vitest, but it's feature set is surprisingly complete, but test coverage is still under an experimental flag. Here's a comparison.
Unfortunatly the test runner does not find *.ts files when looking for tests. You can work around this and they are also working on easier support for this in Node.js 21.

Conclusion: replace Jest with vitest

We'll certainly gives this another look when the next Node LTS is released, but as for now vitest is the way to go and we are happy with our tsx/vitest setup.

Firefox (124) adds in-browser PDF editing