Pesquisar neste blogue

sábado, 28 de abril de 2018

Thinking about the past , moving to the future



Image retrieved at wired

Some days ago on my 35th birthday, after a number of surprises from my future wife and my parents, i found myself digging into my past on some old boxes my parents had at their home. Found stuff ranging from  cheesy late 80's Portuguese music to 56k modem's and a passively cooled Riva TNT.
Gaming of course was already a big part of my life back then, even more so than today i regret to admit, so i had a good time going through my old gaming systems (Master System, Sega Saturn, Sega Dreamcast - yep i'm a Sega guy -  PC builds) and a lot of magazines.
A particular magazine from 1995 had a review of Phantasmagoria.  I must admit the FMV point and click genre always passed me by - not sure if the sheer amount of cds or the movie quality itself - but i was never drawn into it.
At that time some - Ripper  for instance - even had a cast that would make a wanna be movie director give some limbs for.
The general consensus at the time was that a mouse was not the best tool to experience such artistic achievements - "if i wanna read a book ,i'll read a book..if i wanna watch a movie, i'll watch a movie i don't see the need to click a mouse to go through it" was a quote i can't pinpoint exactly to whom said but seemed the general opinion.
Moving on to 2018, VR/AR is gaining more and more traction, gaming has become the number one entertainment in terms of revenue - nasdaq.com - so how really far are we from movie studios converting some movies into games - a side adventure on the universe of "Blade Runner 2049" would make this particular person pay without looking back.
A few examples i have found are

 Are there any more that you are aware of?

I usually like to write, think, listening to music. So if this post can be described by a song my choice goes to 

quinta-feira, 5 de abril de 2018

How to convert Pem certificate to Hex string in Java (a stackoverflow conglumerate)


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//*******************************************************************
// Welcome to CompileJava!
// If you experience any issues, please contact us ('More Info')  -->
//*******************************************************************

import java.lang.Math; // headers MUST be above the first class
import java.util.Base64;

// one class needs to have a main() method
public class HelloWorld
{
  public static String toHexString( byte[] bytes )
  {
      StringBuffer sb = new StringBuffer( bytes.length*2 );
      for( int i = 0; i < bytes.length; i++ )
      {
          sb.append( toHex(bytes[i] >> 4) );
          sb.append( toHex(bytes[i]) );
      }

      return sb.toString();
  }
  private static char toHex(int nibble)
  {
      final char[] hexDigit =
      {
          '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
      };
      return hexDigit[nibble & 0xF];
  }
  // arguments are passed using the text field below this editor
  public static void main(String[] args)
  {
    String pemText="-----BEGIN CERTIFICATE-----"+
"blablabla"+
"-----END CERTIFICATE-----";
   byte[] certificateBytes = Base64.getDecoder().decode(
    pemText.replaceAll("-----(BEGIN|END) CERTIFICATE-----", "").replaceAll("\n", "").getBytes()
);
    System.out.println(toHexString(certificateBytes));
  }
}

quarta-feira, 4 de abril de 2018

That nice function you didn't know existed

Today while trying to solve a problem with PLSQL i came across  DBMS_UTILITY.FORMAT_ERROR_BACKTRACE  dba-oracle.com

This nice function gives you a more complete backtrace of where the exception ocurred.
Me afterwards: