Posts

Blockchain?

Image
   What is blockchain and how does it work? You may have heard the term "blockchain" before, but if you're not quite sure what it is or how it works, don't worry. In this article, we'll give you a brief overview of what blockchain is, how it works, and some potential applications for this revolutionary technology. Blockchain is a digital ledger technology that allows multiple parties to securely and transparently exchange data without the need for intermediaries or trusted third parties. The data in a blockchain is stored in a series of blocks, each of which contains a set of transactions that have been verified by a network of computers called nodes. Once a block is added to the blockchain, it cannot be altered or deleted, making it a highly secure and immutable form of data storage. So how does blockchain work in practice? Let's take the example of a cryptocurrency like Bitcoin. When someone wants to send Bitcoin to another person, they initiate a transactio...

Romantic Movies that involve Time Travel

Image
Here are some romantic movies that involve time travel:   "About Time" (2013) - Tim Lake is a young man who discovers that he has the ability to travel through time. He uses this ability to find happiness and love, but eventually realizes that altering the past has consequences. He meets and falls in love with a young American woman named Mary, and learns that the best way to live a happy life is to accept and embrace the present. "The Lake House" (2006) - Doctor Kate Forster and architect Alex Wyler live two years apart but are able to communicate through letters left in a mailbox of a mysterious and isolated lake house. Despite the distance, they fall in love and try to find a way to be together. "Somewhere in Time" (1980) - Richard Collier is a successful playwright who becomes infatuated with a photograph of a young woman. He learns that the woman, named Elise McKenna, was a famous stage actress who lived in the year 1912. Determined to be with her, ...

Splinterlands: Getting out of Bronze III

Image
  Well, MYLOR is the answer! Bronze III is hard because the only ruleset is Standard which is basically no restrictions in ability, splinter type, rarity, etc. only MANA cost. It is much harder to predict or counter your opponents' monsters. I had to rent this summoner which gives thorns ability to all monsters.  It is also advisable to rent these monsters:   Wood Nymph - has the Tank Heal ability, place the Unicorn Mustang in front.  Earth Elemental - with its low mana you'll have 6 HP, this may serve as meat shield specially in low mana battle, place this in second position. Mushroom Seer - with its Silence ability, opponent's magic attack will be reduced, use this whenever possible. Depending on the mana cost, oftentimes I used Unicorn Mustang as tank , then Failed Summoner on 2 , Wood Nymph on 3 . You may also use Khmer Princess and Regal Peryton . Take a look at some of my battles:

Splinterlands: Water Deck for Beginners

Image
Splinterlands has been fun for me!  I love strategy games, coming from NarutoArena way back 2000s, this NFT game is enjoyable. Being a beginner, to get your rank up from Bronze III to Bronze II is hard compared to Bronze II to I. I guess because in B3 the only ruleset is Standard (no restrictions except mana costs) making it hard to select/build your splinter in battle.  In this post, I'll be sharing my water deck. I rented the cards below. Summoner : Alric Stormbringer +1 Magic to splinters and just 3 mana cost. This makes this summoner great. Tank :  Lobstradamus   For its hit points at 9 and ability to reduce damage from melee and range attacker, and just 6 mana cost this is a great tank although it is slow. Adding the +1 magic from Alric, you have 2 direct damage per attack. Support: Venari Wavesmith   This card adds armor to friendly monsters (plus +2 direct damage per turn), although it has 5 mana cost having this gives your low HP splinters protection fr...

Implementing Datatables in Django

Image
  DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, built upon the foundations of progressive enhancement, that adds all of these advanced features to any HTML table. I've been using this plug-in for almost every project that I'm involve with. It has a built-in search, sorting and pagination facility. Less hassle and simple to implement specially in dealing with huge datasets such as 100,000+ or even millions. It's UI can be in Bootstrap, among others. Implementing it in Django requires proper format, it should follow the required structure of JSON and the table itself. Django views.py and urls.py Create a function in views.py that will handle sorting, searching and pagination of your table. To start, In your HTML file. Some common error encountered is on columns, make sure the index are properly matched!

Creating heat map using GeoDjango

Image
  GeoDjango is a Django module that turns it into a web-GIS app. It is powerful as it uses geospatial engines such as GDAL, GEOS and PostGIS.  In this post, we'll be creating heat map using leaflet plugin https://github.com/Leaflet/Leaflet.heat . From our views.py , we need to create a function that can return JSON object with this format: [[ 50.5 , 30.5 , 0.2 ] , // lat, lng, intensity [ 50.6 , 30.4 , 0.5 ] , ] Below is an example: Basically, the proposed_roads query uses the Centroid function of GeoDjango, also intensity is obtain by getting the sum (change this depending on your specification or needs) based on the subquery. The output of this query is intensity and the Point object derived from Centroid which is named as "cent". To turn it into the desired format, we need to convert it into list and append the intensity (which is the 3rd value). The function returns a JSON data similar to the required format of leaflet heatmap. You can then use AJAX in ...

Auto-calculate your Splinterlands Assets/Income

Image
  Keep track of your Splinterlands assets or income by using this tool: http://kagkaghair.herokuapp.com/spl/calculate All you have to do is key in your username in Splinterlands.  The values are rough estimates only, exchange rates are fetch from coingecko and your DEC, CREDITS and CARDS are from Splinterlands API. The values are in PHP and computed using the following method: DEC value is computed by multiplying your DEC to its rate in peso. CARDS value is calculated by adding all your cards using the last price from the market (which is in dollar) then it is multiplied to dollar to peso exchange rate. SPS value is computed by multiplying your SPS to its rate in peso. CREDITS is computed by dividing it in 1000 and multiplying to dollar to peso exchange rate.

Rendering huge GeoJSON data using leaflet

Image
  Huge GeoJSON data may cause browser to crash, this is because of its limitations.  Let's say you have a 100+ MB file, displaying it on the map without map server will cause a lag or unresponsive browser. In order to address this issue, you can reduce the GeoJSON file size by simplifying its vertices using mapshaper (or using QGIS or any desktop GIS software) and converting it in TopoJSON . TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs . This technique is similar to Matt Bloch’s MapShaper and the Arc/Info Export format, .e00 . This will significantly reduce the file size, I have tried a 100+ MB file it reduces to 30+ MB. After the conversion, we'll be using a parser and rendering plugin for leaflet. Let's use leaflet-omnivore from mapbox in parsing TopoJSON and convert it to GeoJSON, then use Leaflet.VectorGrid . Here...

1st Wedding Anniversary

Image

I Am Getting Married!

Image
I proposed to her just few days after our 2nd anniversary, the idea is to surprise her and I think I did. 😂 The Engagement Ring I also bought the ring on the same day, funny things happened but I won't share it here. (HAHA) I have prepared a simple note stating my intentions to her. As I am a man with few words, that was just maybe four sentences. The Note I ask the question, and (hoooorayyy) she answered "Yes" after a minute or two. My fiancée wearing the ring. Fast forward to the day that I (with my family) formally asked to marry her, I was nervous but way more excited. US holding the cake I am more than happy and excited to what's coming ahead for us.

A Short Letter For You

Image
For the second time in a row, I'll be celebrating Valentine's Day with you in my life. Just two words for today. BLESSED AND LOVED. That's how my life has been since I had you again . You brought a different kind of happiness. You brought a new perspective to my life. You brought sunshine in my gloomy days. You brought lots of good things by just being yourself. And for the million times, I'll keep on saying this. "I love you for that." With no definite reason, I love you. With all the good reasons or even worse, I'll be staying with you. Don't ever forget that no matter what happens  in the future, that's ahead of us. We can make it. Why? Because... We share the same love, and that will always be enough. Happy Valentines my chikading !!! 💗💓💑💘 I have loved you and I will love you.

My Choice

Image
From Just My Thoughts I choose you. Everyday I wake up, I choose to love you. I will continue to choose you everyday 'til forever. I choose to love you, cherish you, adore you, take care of you and spoil you. I choose to be loyal to you, to be honest with you, to fight for you. You are deserving of all these things and more. I have loved you, but haven't shown it well. But I will try everyday to do better, because you make me a better person. I never knew love, never knew understanding, before I met you. Until forever. From My Thinking Cap: 😊😍 when it is hard to love you, I will love you more. when I feel like you're pushing me away, i will hold you tight. you are who you are, and I love you for that. although it puzzles me. the change in mood, the way you talk to me. out of concern, maybe. i get it. you need to grow. you are afraid of the future. uncertain things. actually, uncertainty excites me as long as we're together. keep in ...

Updating Features in Openlayers 4.x

Image
Let's say you have this following set-up: var jsonObj = {         "type": "FeatureCollection",         "features": [             {                 "geometry": {                     "type": "Point",                     "coordinates": [124.112122, 8.112132]                 },                 "type": "Feature",                 "properties": {        ...

Deploying Django Apps in Heroku

Image
Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. If you have a simple Django app that doesn't require huge storage or database, Heroku is the best choice . Their free service will suffice your need. Your app will be available almost 24/7 (~23 days up time in a month). You are given 550 hours per month and if you have a credit card, an additional of 450 hours will be rewarded. Enough to make your app to be available always. The server also sleeps  after 30 mins of inactivity. This enables you to save uptime hours. In deploying Django in Heroku you just need to have this ff. files: .gitignore runtime.txt requirements.txt Procfile Django App  All file must reside in the project directory as shown below:   .gitignore is a text file containing the type of files within the directories that wont be included in the deployment of app runtime.txt is a text file containing the version o...

KAKEGURUI : A TASTE FOR GAMBLING

Image
Is there anything better than food reactions? Yes. Insane gambling reactions. If you thought Shokugeki no Soma was full of excessive reactions on 2015, well, buckle up as you watch Kakegurui this year. I have to say, the new anime releases this season are really great especially Shingeki no Bahamut: Virgin Soul * I have my eyes on Nina Drango, she’s so cute* but that’s for another topic. What made this anime unique in its own kind of way is the fact that it has its own charisma. Anyone who has seen Prison School could surely sense that the way the students treat the “house pets” were much like how the boys in Prison School were treated minus the prison cell. Kakegurui has this creative visual presentation within each episode wherein they showcase different forms of gambling and how each game has their own sets of thrills and risks. The main character herself is very interesting and mysterious. I should say, I am very impressed as to how the anime tells its story. Not o...

A Year with Her

Image
I’ll be taking my time spending my life Falling deeper in love with you One person is enough to touch your life. She is that person for me. History...over a year ago. It was a rainy evening. I had an umbrella though. I was wearing a blue shirt, grey pants and a Nike Shoe. Before going for dinner to meet her, I went to store to buy school materials for my sister. The store is not that far from our meeting place, so I decided to walk going there. It was still raining but I managed to arrive there first. I waited a little bit then she showed up without me noticing her. I think I was busy browsing and checking with my phone. I was surprised. Well, I haven't seen her for almost a decade. But how can I forget my first love? That was young love but she is. I took an order already, it was a full meal. She just ordered cake and shake if my memory serves me well. We talked, we exchanged words. She has a lot to say about something. She's still the same. I was amaz...

Revamped Our Rainfall Monitoring System

I had mentioned that I was digging ReactJS in my last post, so I applied what I have learned about it to revamp our rainfall monitoring system. It's funny how we code last day, month or year is very much different compared today. It's not bad though, that means we're (I'm) improving or there's a progress. The system before uses JavaScript, JQuery, Openlayers and  a JavaScript library for date formatting. Here's how it works: Request data from a different (an external) domain(server) Get the latest value and append it to the pre-defined GeoJSON object Evaluate the value to determine its rainfall intensity  Finally, plot it on the map Downside, upon clicking each points, the system needs to request again the data to display it in graph. Now, like I said, there's a progress. Aside from using ReactJS, I also changed how it works. Request data from a different (an external) domain(server). Get all the data (not just the last value) from all ava...

My Adventure with ReactJS and Django I

Image
I am digging ReactJS these past days. I am trying to figure out how it works this is because of my curiosity looking at the source code of a certain website with clean html structure--like having just a head, body and a division within it only . I was wondering how the HTML elements have been rendered on that page, and there I found out that it is possible by using ReactJS (I don't know if there are other library that can do it). Just an introduction what is this ReactJS --it is developed by Facebook (made it more appealing to me). If they are using it, therefore, it must be really efficient and fast. As the description on the website states, it is "A JavaScript library for building user interfaces". Based on my understanding, it utilizes the Virtual DOM, meaning instead of directly changing or re-rendering the DOM when updates is needed,  ReactJS will determine and calculate if there are changes in the UI in Virtual DOM and if there is, it will re-render the entire ...

Publish PostGIS Layers in GeoServer Automatically using cURL and REST

Disclaimer: The idea came from this blog . So, what's the difference? I'm using Windows.  cURL should be installed already. If you have lots of tables in your database that you wanted to publish in GeoServer, you can use this method. Just prepare a list of tables (separated by new line) you want to publish in a text file format. Before proceeding in publishing layers, you need to setup a workspace and store in your GeoServer first. Although this can be done using cURL and REST API, but it is more convenient in that way. After a minute.... :D :D Create ".bat" file Use the code below but (of course) change the necessary inputs for /f %%a in ( <list of tables you want to publish> .txt) do  curl -v -u <username> : <password>   -XPOST -H "Content-type: text/xml" -d "<featureType><name>%%a</name></featureType>" http://localhost:8080/geoserver/rest/workspaces/ <name of workspace> /datastores/...

Confianza x Amor

Image
Confidence. That word does not run in my veins. I always have doubts with my being. As if, in every step I take, worst can happen. I don't know. I was not raise like this. I've changed a lot. As I grew older, I am becoming more doubtful with myself. Love. I have found love. A love that suits for my being. As if, it was meant for me, specifically prepared. I don't know. It's a mixed feeling but not a mishmash. It has changed me. As this love goes deeper, I am believing that the best is yet to come.