Pull to refresh

How to become an author

Tutorial. Deploying Django project to Heroku and storing static content on AWS S3: basic scenario from start to finish

Reading time12 min

This tutorial is aimed to help Django beginners who want to run a project on Heroku while storing static files on AWS S3. While being a major help for web developers, both services can be hard for beginners to set up correctly. I’ll admit these topics can be found covered separately elsewhere, but there are also some unaccountable nuances if you are trying to make both work in a single project.

Personally I couldn’t find a source which would not only cover Heroku deployment or S3 usage, but would address those nuances as well. Reading the manuals trying to figure out what do you have to do to deploy a project correctly might be an important part of learning, but it can also make you lose focus on what you are currently trying to study or, even worse, discourage you altogether. If this is your story, look no further. I hope instructions below will help you to deploy your project in a single track without having to consult with other resources.

The text is broken down into 3 logically distinct chapters: prerequisites for local Django app (a mini-chapter), integrating  AWS S3 into your app for storing static files, and finally deploying to Heroku. You might not want to go through the entire process in one sitting. In the beginning of each chapter an approximate time required to complete chapter’s instructions will be noted so it is possible for the reader to plan ahead. I would advise not to break down a single chapter into multiple sittings, but if it is not possible, at least try to complete all work covered by a single sub-chapter section in a single go.

Links to official documentation will be provided in text in case you might need extra details on particular actions.

Text highlighted in yellow needs to be replaced in accordance with your settings/paths/accounts.

Read more
Total votes 3: ↑3 and ↓0+3
Comments1

Algorithms in Go: Sliding Window Pattern

Reading time3 min

Let's consider the following problem: we have an array of integers and we need to find out the length of the smallest subarray the sum of which is no less than the target number. If we don't have such a subarray we shall return -1.

We can start with a naive approach and consider every possible subarray in the input:

Continue reading
Total votes 5: ↑5 and ↓0+5
Comments4

Confusing extensions in Swift

Reading time4 min
This post is a little bit the information aggregator. If you find a mistake, you could write to me about it I really appreciate that. Have a nice read.

Example with JSONDecoder


What would happen if we run the following piece of code?

struct Test<T>: Codable where T: Codable {
    enum CodingKeys: String, CodingKey {
        case value
    }
    
    let value: T
    let info: String
}

extension Test {
    init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        self.value = try container.decode(T.self, forKey: .value)
        self.info = "Default init(from decoder:)"
    }
}

extension Test where T == String {
    init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        self.value = try container.decode(T.self, forKey: .value)
        self.info = "Custom init(from decoder:)"
    }
}

let data = #"{"value":"Hello, World!"}"#.data(using: .utf8)!
let object = try? JSONDecoder().decode(Test<String>.self, from: data)
print(object.debugDescription)

Try thinking for 5 seconds about the result.

The result
Optional(
    Test<String>(
        value: "Hello, World!", 
        info: "Default init(from decoder:)"
    )
)


Read more →
Rating0
Comments0

The Different RPG styles between East and West

Reading time6 min

image


The Chinese Mobile RPG: the Genre of Giants.


Chinese RPGs make up 56% of the top 500 grossing iOS games in China. According to data gathered in 2019 by Game Refinery’s Joel Julkunen. Let’s take a look at the genre and some important points for game developers and RPG enthusiasts to consider Chinese Mobile RPGs.


RPG or role-playing game is a game where the player plays as a character, often the main character, in a fictional game world.

Read more →
Total votes 5: ↑5 and ↓0+5
Comments0

How to prepare for PMP exam in 60 days

Reading time4 min
Do you think of taking the PMP exam? Awesome! Do you know how to plan your preparation for the test? Here I’m going to share the plan of how to get prepared for the PMP exam in 60 days.

PMP exam = your own project


To begin with, let’s clarify: you’re ready to work hard and to follow the plan. Otherwise, this journey will take you forever. The key here is to perceive the PMP exam as your personal project and manage it like you're managing projects for your clients. The difference here is that you are your client yourself; and you are the resource to release this project. What is more, you will need not only to plan this project, but to execute the plan yourself too. On one hand, it will add an additional challenge. On the other hand, it will make things even more exciting to get them done.

What do you need to launch this project? First of all, the input data. This is actually what you usually need to start a project. I’m talking about the key performance indicators that we consider while planning a project. They are time, scope and budget. Of course, funds are important. As you have decided to take the test and to pass the certification you should be aware of the process: how much the test costs, how much the course costs, and other relevant expenses. Therefore, let’s move directly to the time and scope.

Time


You have 60 days in order to get prepared for the PMP exam, and that is why you need to define how much time you are able to allocate to get prepared for the tests daily.

Yes, daily, because 60 days is quite an intense period. I know that for some people it takes six months or even a year to get prepared for this test. However, the less period of time you have, the more advantages you finally get.

Here is the thing, for the PMP there is no shortcut. It is quite a big volume of knowledge that you need to obtain in order to pass this test.
Read more →
Rating0
Comments0

How to rank higher on Google?

Reading time6 min
image

There are different approaches to manage construct a brand online, get leads and win in business. By the by, on the off chance that you know a smidgen at a time measure on the most proficient strategy to rank higher on Google first page nothing can stop your business developing expedient. Different SEO methodologies are basic when ranking on Google typically. Additionally, you head the centre insider real factors.

Once more thing you ought to have is consistent quality considering the route that in 2019 SEO requires some certified imperativeness and only the best page that gives the most spurring power to the clients will rank. Notwithstanding, for that, your site page ought to get made and more references must come towards the site page with backlinks. Backlinks are an inside factor to rank higher on Google search. After the On-page, SEO is done well, by and large, your next off-site SEO work begins with vault posting for citation building. It must be done by specialists and Dinesh is the world's best as for citation building.
Read more →
Total votes 3: ↑3 and ↓0+3
Comments1

JavaCC 21 Parser Generator

Reading time4 min

JavaCC 21 is a continuation of work on the venerable JavaCC parser generator, originally developed at Sun Microsystems in the 1990’s and released under a liberal open source license in 2003. It is currently the most advanced version of JavaCC. It has many feature enhancements (with more to come soon) and also generates much more modern, readable Java code. Also, certain key bugs have finally been fixed. (N.B. The “21” in JavaCC 21 is not a version number. It is simply part of the project name and means that this is a JavaCC for the 21st century!)

Read more →
Total votes 8: ↑8 and ↓0+8
Comments0

How Can AI & Data Science Help to Fight the Coronavirus?

Reading time4 min
image

Do you know AI can save us from a worldwide pandemic?

Yeah, it's true. Our global researchers have touted these two buzzing technologies can provide a substantial social benefit to this worldwide health crisis.

Before I begin, I would like to take this moment to say THANK YOU to all our COVID-19 Warriors standing on the frontline and working day and night for us. We can’t thank them enough. Our healthcare staff, police, scientist, security guards, and sweepers. Their contribution is overwhelming and commendable ?

Discovering a drug for any medicine demands the joint efforts of the world's brightest minds. The process is notoriously long, complicated, and expensive. And that's how health experts are involved in searching COVID-19 medicine. In the midst of such a crisis, artificial intelligence solutions are offering a new hope that a cure might appear faster with it.
Read more →
Total votes 3: ↑3 and ↓0+3
Comments0

Don't spoil Desktop Software Engineers with your Mobile First solutions, think about it

Reading time4 min

image


English translation of Philip Ranzim's post at his blog page here. (With author's permission)


Once upon a time, my girlfriend started using Instagram. She asked me to sign up for it and subscribe to it. I tried — I couldn't do it because you couldn't register at Instagram from a desktop computer. I then thought — how weird people are. Well, what kind of fool would make a software product that can't be used with a normal computer? They won't succeed, and this Instagram will be a marginal service for a bunch of strange women, who for some reason don't like desktops.


It has only been a few years, the market has put everything in place — and the biggest fool was me. And the geniuses at Instagram predicted how and where everything would develop. Today, most of the user applications are made primarily for mobile platforms. At best, they include a universal web client, which is still optimized for mobile phones. Because users love iPhones, not computers. Business people sat down, counted, and made a decision — let's make more money, let's have mobile First everywhere.

Read more →
Total votes 3: ↑3 and ↓0+3
Comments4

The Testcontainers’ MongoDB Module and Spring Data MongoDB Reactive in Action

Reading time19 min

1. Introduction


How can I easily test my MongoDB multi-document transaction code without setting up MongoDB on my device? One might argue that they have to set it up first because in order to carry out such a transaction it needs a session which requires a replica set. Thankfully, there is no need to create a 3-node replica set and we can run these transactions only against a single database instance.

Read more →
Rating0
Comments0

10 Best Email Scraping Tools for Sales Prospecting in 2020

Reading time3 min
We all know how hard it is to build an email sales list from scratch, especially for small companies. There left no options due to limited resources. In fact, many companies even buy preset profiled lists from the third party and send identical mass emails. It can put your business in a vulnerable position ascribed into the low quality of the email lists. However, there is a better way to build a highly targeted email list with email scraping tools.

Email scraping can help you collect email addresses shown publicly using a bot. What makes this great is that you have control over where to get the email lists from, and who can opt-in. Moreover, you don’t have to rely on the second-hand source. I profiled a list of best 10 email scraping tools for sales prospecting. Let’s take a look.

1. Zoominfo

A full-featured email scraping platform with a comprehensive database. You can directly search for titles and companies within their platform. It is more like a directory system that covers professionals in all industries with contact information. Email lists are the assets. That said, it comes with a price tag. It is worth to invest if you are looking for accurate sales leads. Zoominfo is an excellent option for enterprise-level sales prospects.

image
Read more →
Total votes 3: ↑3 and ↓0+3
Comments0

[Dribbble Challenge] — Coffee Ordering Animation

Reading time11 min

Tutorial level: Beginner/Junior


Motivation


Sometimes, when we surf dribbble, uplabs and similar design clouds, we often find many concepts or prototypes with animations, micro interactions, application flow and so on.
I often find illustrations of mobile apps that are good and interesting, but of course they are still in the form of concept, so therefore, why don't we try to apply them as an interface for applications that we will build next.


Original concept


In the Dribbble Challenge we will try to build an interface for Coffee Ordering, as I found on Dribble.



GIF here

Read more →
Total votes 1: ↑1 and ↓0+1
Comments3

Implementation of Linked List in PHP

Reading time3 min

A linked list is a linear data structure, which contains node structure and each node contains two elements. A data part that stores the value at that node and next part that stores the link to the next node as shown in the below image:


Linked List Node

The first node also known as HEAD is usually used to traverse through the linked list. The last node (next part of the last node) points to NULL. The list can be visualized as a chain of nodes, where every node points to the next node.


Linked List

Implementation of Singly Linked List


Representation:


In PHP, singly linked list can be represented as a class and a Node as a separate class. The LinkedList class contains a reference of Node class type.


//node structure
class Node {
  public $data;
  public $next;
}

class LinkedList {
  public $head;

  //constructor to create an empty LinkedList
  public function __construct(){
    $this->head = null;
  }
};

Read more →
Total votes 7: ↑5 and ↓2+3
Comments4

Medical Ventilator +STONE LCD + Arduino UNO

Reading time6 min

Brief


Since December 8, 2019, several cases of pneumonia with unknown etiology have been reported in Wuhan City, Hubei Province, China. In recent months, nearly 80000 confirmed cases have been caused in the whole country, and the impact of the epidemic has been expanding. Not only the whole country has been affected, but also the confirmed cases have appeared in the whole world, and the cumulative confirmed cases have reached 3.5 million. At present, the source of infection is uncertain From where, but we can be sure that everyone needs masks very much, and those who are serious need respirators.

So, taking advantage of this hot spot, I also came to do a project about the ventilator, and there was a STONE in my hand TFT serial port screen is very suitable for the display screen of the ventilator. When the screen is available, I need a single-chip microcomputer to process the commands issued by STONE's serial port screen and upload some waveform data in real time. Here I choose a more general and easy to use MCU, Arduino uno single-chip microcomputer, which is widely used and supports many libraries.
Read more →
Rating0
Comments1

Java vs .Net: Who will Reign in the Future?

Reading time6 min
As the time is changing, technologies are expanding and with that, the priority and the importance of the technical languages are also changing. So, usually, it becomes difficult to pick when we have to choose between two languages.

 

 

java vs .net


 

Here we will see the battle between Java and Microsoft .Net in order to make this clear which language is better to choose. For that, you may also have a quick look at this short video:
Read more →
Total votes 13: ↑8 and ↓5+3
Comments3

Diamond inheritance problem is not a problem, that's a tricky feature

Reading time7 min

General


Before discussing the topic I’d like to start with a general suggestion not to use multiple inheritance and especially diamond unless you are strongly forced to. You may use e.g. composition or aggregation instead.


Well, “Diamond inheritance problem” is some kind of steady expression which formed many years ago. You can easily find a lot of articles suggesting usage of “virtual public” to avoid the ambiguity and so on. For instance, https://en.wikipedia.org/wiki/Multiple_inheritance


image


 That is not wrong as for the problem stated but anyway it is quite one-side statement.
 Below you can find:


  • difference in memory allocation and initialization order between public and public virtual inheritance (examples 1, 2),
  • examples of practical usage of both public and public virtual inheritance (examples 3, 4).
Read more →
Total votes 4: ↑4 and ↓0+4
Comments0

Are Your File Transfer Integrations GDPR Compliant?

Reading time5 min

The onslaught of data security breaches today is relentless, with thousands of major breaches each year and 50 percent more breaches in 2019 vs. 2018, according to a report by Risk Based Security. The costs for each breach have burgeoned as well, with the average cost of a data breach at about $3.92 million.


Securing data from breaches not only spares bottom line and publicity, it's now also a basic legal requirement to comply with rapidly growing data privacy laws.


While organizations have long had to comply with industry-specific standards, such as HIPAA in healthcare and the Payment Card Industry Data Security Standard (PCI DSS), you now also face new consumer privacy regulations. Including:

Read more →
Total votes 1: ↑0 and ↓1-1
Comments0