Pesquisar neste blogue

sexta-feira, 13 de setembro de 2019

Xbox + Cxbx + Linux

Today i decided it would be the day i tried to fix the problems i had been having with Cxbx-Reloaded and Linux.
Armed with Duke and a 3 in 1 Magic Box there i went.


My first problem was that CDEMU did not mount the images of my games.
A bit of google-fu after i found xbfuse . Installed on Ubuntu libfuse-dev and after a little and very cleanly the program was compiled.

Next running CXBX-Reloaded itself was giving me issues, which from the debugger i could see were related to missing functions from Wine builtin dll.Using Winetricks i was able to install the vc2017 package.

And then


Now let's see if the controllers work..

terça-feira, 19 de março de 2019

Google Stadia - Glimpse of the future?





With the introduction of Google Stadia today the gaming world became a bit more confusing. Don't get me wrong from a technical standpoint Stadia is amazing. Running on next-gen AMD custom hardware, and on top of Google's infrastructure you have to accept that what was presented was something special (well the controller..).

However technology alone does not make a product successful. I'd like to focus on two points:

- How much revenue will this generate for the content creators? We've seen some games moving from Steam to Epic with the promise of a bigger slice of the cake.
With the onus on Google/Microsoft/Apple, how much will it have to cost to be profitable for the provider and its partners?  Microsoft has a winning point here as already as an installed base of users, owns several game studios and seems willing into the integrate better with what exists now than the vision Google is selling.
Apple is rumoured to enter this market (https://www.techradar.com/news/apple-is-reportedly-putting-together-a-netflix-for-games-streaming-service), however if they choose to do so, partners are a must. Valve with SteamPlay (https://support.steampowered.com/kb_article.php?ref=9439-QHKN-1308) , Steam RemotePlay (https://store.steampowered.com/streaming/) and the new Steam Link app (when they decide to unblock it ) Sony has recently announced streaming to iOS devices (https://itunes.apple.com/us/app/ps4-remote-play/id1436192460?mt=8).

- One thing i dislike about games with a big component on the cloud and multiplayer side, is that when the fanfare surrounding the game ends the company shutdowns the servers and boom no more game. Streaming for me has the potential to bring this to the whole catalog of games. As a gamer, even if i'm the only person on the world playing a given game i would like to have a chance to play it whenever i want and not have it removed from the catalog of available games because it is too old or just not good for business. And it is on this point i believe the existing game stores can thrive. Consider still the Nintendo Switch and the physical launch of games (https://www.gamesindustry.biz/articles/2017-11-17-nintendo-switch-is-dominated-by-physical-sales-game).

sexta-feira, 4 de janeiro de 2019

Validating XML against XSD in Java

There are several ways to do this however to most simplest way i came across is using XmlUnit

From the manual

Validator v = Validator.forLanguage(Languages.W3C_XML_SCHEMA_NS_URI);
v.setSchemaSource(new StreamSource("Book.xsd"));
ValidationResult r = v.validateInstance(new StreamSource(new File("Book.xml")));
 
StreamSource accepts more constructors as shown here StreamSource Doc 

Here is the API of ValidationResult so you can transverse the problems encountered.

I usually work with Oracle Databases so i found this thread to create a XSD file from a table.

So if you need to validate data coming your table from a given file (csv,xlsx etc..) my suggestions are :

  • Look into SimpleFlatMapper to load the data.  
  • Look into Jackson to convert into XML
  • Consider XmlUnit to do the validation.
All the best.

segunda-feira, 31 de dezembro de 2018

Technical - Year review and looking forward

Technically wise this year was amazing , in terms of the technologies i had to either deal with or learn.
If i had to do a top 3, no order implicit, i would say:

  • Cisco Kubernetes Solutions - I had the opportunity to attend at WebSummit a presentation on  Cisco Container Platform and i must say it was the one that stuck with me. The way AI and Deep Learning is integrated with the whole platform really left an impression on me.  I recommend you see this video Cisco Artificial Intelligence at Cisco with Kubeflow . Deep learning will be my main learning focus in 2019.

  • SteamPlay - As a Linux user, this is one of those things i always craved for: Seamless integration of Wine and Steam .At this moment in time it is still not perfect, but its future potential is huge, even outside of Linux/SteamOS. In 2019 i am hoping for Stemplay to branch out to MacOS X and to Android based machines. The possibility of running Windows applications on ARM devices is something i feel a lot of people will be looking into, in the not so distant future (hint hint Snapdragon 8cx )

  •  Vulkan - If w« you have either a Nintendo Switch , a MacOS X /IOS machine , a Linux Desktop, Windows Machine, anything else, there is a chance a Vulkan Graphics API driver is available for your machine.  Having a single API to write against is something that cannot be undervalued. Saves you money, time and gives you a much greater user base.
       “The needs of the many outweigh the needs of the few” .


Hardware wise, i have to give it to Apple . My IPad Air is still rocking and the update to  IOS 12 just made it feel brand new.
Updated my desktop PC to a AMD Ryzen platform from an Core i5 - 3rd gen and i am happy. 😀


On the dark side, lays my Android phone Honor 8 for which OTA updates seem to have left me and gone on vacations. It is still a fully usable phone but the lack of security updates and platform updates makes me feel a bit "bah" on a 2 year phone with better specs than an Iphone Xr Compare Apple iPhone XR vs Honor 8 64GB
Have to do my research on terms of updates a bit more next time i buy a phone, or for that matter anything with Android (people talk up Xiaomi and oneplus  in this department)
My wish for 2019 is for a new contender to appear in this space (SailfishOS maybe).
 

sábado, 29 de dezembro de 2018

Non technical - Year review and looking forward

This year was a slow one , with some big highlights both my private life and professionally .

Having a chance to travel with my future wife this year helped stabilize my life. It is kinda funny how going places, even if they are not very different from your home town, broadens your horizons and makes you feel and notice things you would probably not care about when you come back home.
Had a chance to visit Berlin, amazing city loved it, for a opera show and came back with the German language so stuck on my head that when i landed in Lisbon i had this weird sense that everyone would still speak in German.
Of course i had to start learning the language. That is a must do point for me in 2019.
Also on my birthday i was given the chance to attend the F1 race in Barcelona and for a die hard F1 fan like me it was a experience i will cherish for a long long time. Even if today i look at Formula E with more interest (i love racing and engineering wise electric vehicles are a more daunting project)  than F1, i still wake up  before dawn to watch races. Can't wait for February to see new cars. Let's hope that Williams F1 (more on them a bit below) and Mclaren get up the ladder. Mclaren did that project with OnePlus so let's hope they can "warp charge" their season.
This year my main media comsuption platform was youtube.comDigitalFoundry was my main go to after work. A lot of work goes into their videos and it shows.
Latter on the year i came accross Vin and Sori on a reaction video  (they seem to have exploded on this year) and i must say it was one of my best findings of 2018.
There were some bad moments, the passing of one of my grandmothers, some people who revealed their true self and it was a bad sight.

Professionally still on the same job, however got chances of capitalizing on my knowledge elsewhere also. On 2019 i do plan on expanding that side. The post with more views on this blog was the PDF Signing without Java. and maybe i'll explore a bit more on that side. If there is something related to Java/Javascript that you would like to read about please let me know.
Also been looking into elementaryOS and the way they try to entice developers (you can leave an idea for an app on the comments section).
Also this year had a chance to attend the WebSummit at Lisbon and it was amazing. Saw a lot of tech stuff , i'll keep that for a future post, but was surprised me the most was the applications that Williams has developed for use outside F1. I was like "How come i don't this stuff" - for instance BabyPod .

A long post already, so more technical stuff for next post.
Have a nice entry into the new year.

segunda-feira, 17 de dezembro de 2018

CSV handling in Java

These past days i've been trying to load CSV files in Java. Used opencsv with some degree with success, however some fields were still misinterpreted .
Next an old friend by name of FasterXML/jackson came to the rescue, however i was still having some issues.
Last but not least on stackoverflow.com (where else) i came across https://simpleflatmapper.org/ and with something like:


CsvParser.separator(';')

   .mapTo(MyClass.class)

   .headers("my","headers","list")

   .iterator(new File(filepath));


I was up and running .

Note : If you find MalformedInputException check if your input is UTF-8 , more info here  http://biercoff.com/malformedinputexception-input-length-1-exception-solution-for-scala-and-java/

terça-feira, 13 de novembro de 2018

JAVAMAIL: Cleaning temporary files used as attachments

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
private static void cleanAttachments(MimeMessage message) {
   try {
 if (message.getContent() != null) {
  MimeMultipart multi = (MimeMultipart) message.getContent();
  for (int j = 0; j < multi.getCount(); j++) {
   BodyPart bodyPart = multi.getBodyPart(j);
   if (bodyPart.getDataHandler().getDataSource()
     instanceof FileDataSource) {
    FileDataSource f = (FileDataSource)
    bodyPart.getDataHandler().getDataSource();
    f.getFile().delete();
   }
  }
 }
  } catch (MessagingException e) {
  e.printStackTrace();
  } catch (IOException e) {
  e.printStackTrace();
  }
}

For when you use File.createTempFile  to support the attachments of a mail message and cannot use deleteOnExit because the JVM will not exit.
Something i saw myself needing.

All the best.