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 from range and melee h

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.