Around 18th century, Peter the Great opened Czarist Russia to the West. As you imagine, the immediate result of this move was that the commerce and economy between Czarist Russia and Western European countries flourished. At that time, Arthur Guiness had just took “Porter” recipes from England to Ireland while he increased the dark, coffee-tinted profile of the style. He also added “Extra Stout” sign on the label of Guiness beer, which makes him the founder of the new beer style called “Stout”.
In 1698, Peter the Great travelled to England and tasted stout. He immediately adored it and he…
In this article we will create a European roulette in SwiftUI. During the process we will learn about animations, structs, enums and state variables.
As Wikipedia states:
“Roulette is a casino game named after the French word meaning little wheel. In the game, players may choose to place bets on either a single number, various groupings of numbers, the colors red or black, whether the number is odd or even, or if the numbers are high (19–36) or low (1–18)”
The European roulette has 37 distinct pockets (numbered 1 to 36) and a green pocket marked 0 (zero).
As you may already know Swift is a really modern and powerful language. However, many times we may face difficulties and / or problems during the development process, that Swift cannot handle properly all by herself. Actually most of the times it does but in the end of the day it may not achieve it in the most efficient way. And that’s the point where Swift libraries comes in.
Swift’s native tools and classes for network layer handling such as URLSession, HTTPURLResponse etc, have been better and better over the years. However, there are many libraries out there making things…
I am not a financial, investment or legal advisor. All views expressed in this article are only that and nothing more, just my views, and their only purpose is to entertain you. Do not take investment advices from random guys on internet. Always talk to a certified advisor.
COVID-19 pandemic has already caused tremendous economic consequences worldwide. In the beginning of the pandemic global markets fell sharply (but then most of them recovered rather fast) as economies “slowed down” and demand for goods and commodities diminished. However, as in every crisis investment opportunities emerged. …
In the previous part, we covered
In this part, we will cover
Cross-Site Request Forgery according to OWASP
Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they’re currently authenticated. CSRF attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request.
In order to prevent this kind of attack, we should implement a synchronized CSRF tokens policy.
Swift brought more power to a feature already known from the Objective-C days, enumerations.
However, unlike Objective-C enums which could enumerate related names only to Integer values, Swift enums are much more flexible and do not obligate the developer to provide a value (also known as a “raw value”) for each and every case as Objective-C enums did.
Swift enums also come with associated values, computed properties, instance and methods, initializers, conform to protocols and many more features that empower them to use them as models for our data. Yes, we can use enums almost as we can use classes…
You can easily reverse a string in python like this:
This syntax reverses the string by converting it to an array (in python strings are actually arrays of characters) and then slicing it The syntax for the array slicing is as follows:
[start:end:step] where empty start means 0 and empty stop means the length of the array. So [::-1] means to slice the array from the 1st element to the last element in reverse order.
Hope you enjoyed!
Stay tuned for more coding tips.
As you may already know, one of the biggest troubles in Swift and iOS development is retain cycles. Retain cycles are the causes of another major pain: Memory leaks. A retain cycle is caused every time 2 or more objects hold a strong reference to each other. Swift uses a mechanism called Automatic Reference Counting (ARC) in order to manage memory (allocations / deallocations etc.) . As the name suggests, in Layman’s terms ARC counts how many strong references of an object exist in memory and when the count for an object is 0, then ARC deallocates the memory it…
As you may already know the initials stand for “India Pale Ale” and as many beer styles, this one emerged from a specific need. The hoppy beer that you may enjoy today in a pub or with an original Mexican plate has a really interesting and long history starting back to the early eighteenth century. IPA is the beer shipped to the eastern countries of British Empire and mainly India. The British Indian Army was thirsty for English beer but due to the tropic and hot climate, the brewing process in India was not an option. So, the only way…
Beer, as many drinks, has a so long history that humanity is unable to trace completely.
The first time beer is recorded in history seems to be in ancient Egypt around 5.000 B.C. but there are strong evidence that it existed millennia before. However Egyptians were the first civilization that recorded and documented the brewing process on papyrus.
Since then, this amazing drink has evolved enormously and it continues evolving until today.
Sometimes my friends say that I am an original “Zythophile” , a word coming from Ancient Greek ζῦθος (zûthos, “barley beer”) + phile, from ancient Greek φίλος (phílos…
💻Code-blooded, 🌏 Traveler ⌨️ Computer Science graduate, AUEB alumnus. Passionate Homebrewer🍺. Lifelong learner 📚.