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.