teleren/devto huggingface dataset:
Tips To Buy Awards or Trophies Without Spending A Lot
Tags: buyawards, buytrophies, trophymanufacturers
Published: 2020-09-04 09:15:00

An essential element of any organization is its employees. They are the soul of the company without whom the functioning for the entire organization will come to a complete halt, the organization has a duty upon themselves to keep their employees motivated. This motivation cannot simply be made possible by salary and incentives, there need to be praises and a sense of competition among the employees. But is the simple words like "well done John" enough? Obviously not, the company need to come up with some creative ideas. This tricky part is made quite simple by awards or trophies. It is known to us that the employees push themselves harder when there is the best employee title at stack.

The award or trophy just won't appear by itself, the company has to put investment into this. If not planned well and thought through even buying of this simple thing can become a burdensome business for the company.

The first thing that is to be done is assigning this task to a person who has already done this kind of a job in the past. This will help in getting the job done and this person experience might just make the whole task more affordable and less bothersome.

Next thing would be to decide the size, design/object and the budget. this will create a mental image as to what we are actually looking for and hence make the entire process more effective. Here it is also important to decide whether the company is ready to compromise with the quality and the price points depending upon the available material.

After these primary things are decided, now the task is upon the assigned person to look into various options where he can purchase the items according to the plan previously thought of. It is important to note that now the <a href="https://www.angelstrophies.com/">medals and trophies</a> are available online too at very reasonable and affordable prices. Every possible option is to be taken into account and the best options are to be shortlisted.

After shortlisting every possible place, a complete examination and reviewing are necessary. Reviewing has to include the efficiency of the seller, the quality and most importantly the price. Remember this is not a one-time thing, there may be a chance that this is a place our company has to visit often.

If you want to know more about Trophy manufacturers in Onam then <a href="https://www.angelstrophies.com/oman.htm">visit here</a>.
Is remote work bad for innovation?
Tags: discuss, healthydebate
Published: 2020-09-04 08:58:41

The world’s largest work from home experiment has entered its midgame. So far, it was all about adapting quickly and making the best of it. Individual productivity has increased, there is no more commuting, which saves both time and money, work hours are flexible, and there are [other advantages](https://www.statista.com/statistics/1110849/remote-work-advantages-during-covid-19-russia) as well. 
After all, this is what [agile](https://chiefmartec.com/2020/08/bending-martecs-law-2020-taught-us-agile-thought/) taught us to do, embrace change and adapt quickly to it. 
We have won the earlygame, but now I ask question: “What did we lose in the process and are we prepared for the midgame?”

There are many [disadvantages](https://www.statista.com/statistics/1110850/remote-work-disadvantages-during-covid-19-russia/) to remote work, but I would like to focus on a big one, innovation, or creativity if you will.

I have observed that thoughts and ideas, along with chitchat and casual smalltalk travel very difficulty across a remote medium, in contrast to the office environment where this happens naturally all the time.
In a remote environment, you are usually not going to video-call your colleague just to tell him how you solved X or how Y happened and made you wonder about Z and so on. And texting just doesn’t cut it, we communicate so much non-verbally and explaining thoughts and ideas via text is just cumbersome and time-consuming.

However, it is from this [collision of ideas](https://www.ir.com/blog/communications/the-collision-of-ideas) that great innovation and progress is created. It is from these small, seemingly meaningless social interactions that creativity and innovation come from. It is from talking face-to-face to a colleague that you build a relationship and make a [friend](https://hbr.org/2010/07/why-friends-matter-at-work-and). Without these things, creativity and team’s cohesion is slowly being [sapped away](https://hbr.org/2015/04/is-working-remotely-sapping-your-creativity).

As a great counter-example, let's look at the legendary Bell Labs, which fostered 9 Nobel Prizes and 4 Turing Award winners. Bell Labs is home to the transistor, UNIX and C among [many many other innovations](http://blog.tmcnet.com/next-generation-communications/2011/08/the-top-bell-labs-innovations---part-i-the-game-changers.html).
When these people were asked what was so special about this building, the [common answer](https://www.youtube.com/watch?v=QFK6RG47bww&t=490) was that it was an open environment packed with smart people who collaborated together and openly exchanged thoughts and ideas. (and had unlimited AT&T funding, which helps, but would not produce the innovations by itself).

I would really like to hear about <b>your</b> experiences, are you noticing the same things at your workplace? How are you addressing these issues? Let's discuss!

Thanks!
TYPO3 Routing Explained: Enhancers & Aspects
Published: 2020-09-04 08:56:47

TYPO3 Routing was one of the most-awaited features in the history of TYPO3. Finally, the TYPO3 Community developed and released from TYPO3 v9. In this article, I want to guide you (beginners to advanced level) about TYPO3 routing.

Since 20+ years, TYPO3 was missing the built-in TYPO3 routing feature for Human/SEO-friendly URLs. In the past, the TYPO3 Community was dependent on third party TYPO3 URL management extensions like EXT:realurl. For such an important feature, to depend on other extensions was very difficult for everyone. Anyway, now we have an awesome TYPO3 routing feature within the TYPO3 core, so let’s explore how it works.

In this TYPO3 routing guide you'll read, 
- What is TYPO3 routing and their Terminologies?
- What is a Prerequisite in TYPO3 Routing?
- TYPO3 Page Based Routing
- Enhancers: TYPO3 Routing for Extensions
- TYPO3 Aspects: Routing for Extensions
- Practical Example of TYPO3 Enhancers & TYPO3 Aspects
- Helpful TYPO3 Routing Extensions
- Tips & Tricks for TYPO3 Routing
Read the complete blog at - https://t3terminal.com/blog/typo3-routing/
Becoming a coder #003 - Mentoring my non-coder friend in his programming journey
Tags: beginners, motivation, mentoring, react
Published: 2020-09-04 08:34:28

Sam has been learning coding since December 2019, we talk every two weeks about his progress. We record our calls thinking that maybe some other beginners would find some of what we discuss useful.

https://www.youtube.com/watch?v=324VUHnUaJM
{% youtube 324VUHnUaJM%}

This call was recorded on end of June 2020, where we discussed edabit learning platform, the timeline for applying for jobs, created a Google Document where we list down sam's learning roadmap, Firebase, Redux, Docker, NPM and terminal, Less and Sass, and many more.

Hope some of you may find it useful 👋
Salesforce integration: sync data efficiently

Tags: salesforceintegration, syncdataefficiently
Published: 2020-09-04 08:25:33

Regardless of the size of the [company](https://www.cloudanalogy.com/), one of the biggest challenges every business faces is managing customers effectively. Businesses spend millions developing customer relationship management solutions. The task of synchronizing customer data across all nodes in a company is always a challenge. This is where software as a service (SaaS) can be of great help. SaaS provides an excellent platform for synchronizing data between shared databases.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gt9uoepd12j4axbb69t2.png)

[Salesforce](https://www.cloudanalogy.com/) is known for being a company specializing in SaaS applications. With the Salesforce integration, businesses can greatly facilitate the customer and data management process. Salesforce offers web-based customer management software applications with excellent data synchronization capabilities. Users from different nodes can access the data without latency. It allows companies to share data between various sources without any difficulty. Most SaaS applications are extremely easy to use; So regardless of what CRM employees in a company are used to working with, it won't take long to get used to SaaS CRM.

The [Salesforce integration](https://www.cloudanalogy.com/) is ideal for companies that use cloud computing and handle large volumes of data. It offers a fast and flawless option to synchronize data between databases used by a company. And because the CRMs offered by Salesforce are hosted off-site, companies pay for the software they use using a pay-as-you-go system. Salesforce also spares companies the maintenance required by CRM because they also take care of software maintenance.
How to wrap Rails mailer previews in a database transaction
Tags: rails, ruby, tutorial
Published: 2020-09-04 08:24:24

Most of the web applications today need to send some kind of email. In Ruby on Rails, this is an easy task. Just use the Action Mailer, create the email content, set up the SMTP configuration and you are ready to go.

The hardest part of this process is the content creation. Especially if you are building a multi-language application, seeing the big picture just from the source code can be quite hard. Fortunately, Rails provides a way to see how these emails look right in a web browser, using the [Action Mailer Previews](https://guides.rubyonrails.org/action_mailer_basics.html#previewing-emails). Just create a class that inherits from the `ActionMailer::Preview` and call the required mailer action.

```ruby
# test/mailers/previews/user_mailer_preview.rb

class UserMailerPreview < ActionMailer::Preview
  def confirmation
    user = User.new(email: "tester@example.com")
    UserMailer.with(user: user).confirmation
  end
end
```

However, sometimes your mailer expects the ID of a record in the database, not the object itself. And sometimes you need to prepare this record, for example to create a new email confirmation token.

```ruby
# test/mailers/previews/user_mailer_preview.rb

class UserMailerPreview < ActionMailer::Preview
  def confirmation
    user = User.first
    user.prepare_token!(:confirmation)
    UserMailer.with(user_id: user.id).confirmation
  end
end
```

But this should be just a temporary change. Sure, you can wrap the whole method in a database transaction and use the database rollback command. But… How exactly?

Fortunately, there is an easy way to accomplish this using some Rails monkey patching. Just create the following module:

```ruby
# lib/core_extensions/mailer_preview_rollback

module CoreExtensions
  module MailerPreviewRollback
    def preview
      ActiveRecord::Base.transaction do
        super
        raise ActiveRecord::Rollback
      end
    end
  end
end
```

Create an initializer in your Ruby on Rails application and prepend this module:

```ruby
# config/initializers/mailer_preview_rollback.rb

Rails.configuration.after_initialize do
  require "core_extensions/mailer_preview_rollback"
  Rails::MailersController.prepend CoreExtensions::MailerPreviewRollback
end
```

And voila! All of your mailer previews are now safely wrapped in a database transaction.

---

Original article: [How to wrap Rails mailer previews in a database transaction](https://www.kostolansky.sk/posts/rails-mailer-preview-database-transactions/)
How does readline() know where each line is im Python?
Tags: python, ddsry, codenewbie, beginners
Published: 2020-09-04 08:24:08

How does readline() know where each line is im Python Programming Language? 


- Inside readline() is code that scans each bytes of the file until it finds a \n
character, then stops reading the file to return what it found so far.
- The file f is responsible for maintaining the current position in the file after
each readline() call, so that it will keep reading each line.
José Valim: "Elixir is great for everything that runs on top of a socket"
Tags: elixir, webdev
Published: 2020-09-04 08:19:52

Evrone is not just a custom software development company, we also stay highly connected with local and international communities. We organize the annual Ruby Russia conference, a huge event featuring expert guests. These community connections give us a competitive edge and provide us with better technical expertise and consulting opportunities. 

We have conversations with developers around the world, including the creators of innovative new technologies, and we try to strengthen connections and give back to the community through interviews, conferences, and meetups. We recently conducted an interview with José Valim, the creator of the [Elixir](https://evrone.com/elixir) programming language, and asked him about his goals for the language and how it came to be.

[Read the interview on our blog](https://evrone.com/jose-valim-interview)
Extending the UmbracoHelper class in Umbraco v8
Tags: umbraco, cms, tutorial
Published: 2020-09-04 08:15:58

While setting up an Umbraco site you'll probably end up with some "site settings" that will eather be on a top level node or on a child settings node. Think things like setting up the nav, the footer...

These are items you only set up once a site and want to manage in a global way.

You can of course write a query each time to traverse the tree... but something that v8 makes easy and possible is to extend the UmbracoHelper that is available in your Razor Views.

Imagine that you can simply do @Umbraco.WebSiteSettings.Footer and that you get the data you want (strongly typed). THis is nice and readable and folks without a lot of razor knowledge can also see what is happening...(maybe if a frontend dev needs to do some changes).

Ok let's get started. First of all, to do the stronlgy typed stuff, use Modelbuilders (duh).

I tend to use this config:
{% gist https://gist.github.com/TimGeyssens/5b4b1ba925d28af2729e171319c22636 file=ModelsBuilder.config %}

Once generated you'll need to include the files in the vs project...

With that in place I now have strongly typed models of my document types...

Next is to get into the DI magic of V8, and build a custom Service

Define an interface (I called mine ISiteService)

{% gist https://gist.github.com/TimGeyssens/5b4b1ba925d28af2729e171319c22636 file=ISiteService.cs %}

It has 2 methods, 1 that fetches a Website doc based on id and one that will fetch the SearchPage doc based on id (both returning strongly typed models generated by ModelsBuilder)

The implementation looks like this

{% gist https://gist.github.com/TimGeyssens/5b4b1ba925d28af2729e171319c22636 file=SiteService.cs %}

So using the alias of  the type. And then looks for the ancestor of the current fed in node id of that alias (since the website will always be at the top of the tree)

For the Searchpage, it first fetched the Website and then looks for the child of the correct alias (since it will be located directly under the website node)


Of course for all of this to work we need to register the custom service

{% gist https://gist.github.com/TimGeyssens/5b4b1ba925d28af2729e171319c22636 file=RegisterSiteServiceComposer.cs %}

And now we can inject it where we want...

But I'll also create an extension for the UmbracoHelper

{% gist https://gist.github.com/TimGeyssens/5b4b1ba925d28af2729e171319c22636 file=UmbracoHelperExtensions.cs %}

Since it is static I can't use the standard constructor approach for injecting my custom service but I can still get to it with  
 
Umbraco.Web.Composing.Current.Factory.GetInstance<ISiteService>();

And with all that in place I can now access my service from the Umbraco Helper in views:

{% gist https://gist.github.com/TimGeyssens/5b4b1ba925d28af2729e171319c22636 file=viewsnippet.cshtml %}
Quick tip about TypeScript and why to avoid these types
Tags: typescript, tips, javascript, quicktip
Published: 2020-09-04 08:09:25

Avoid the non-primitive `Number`, `String`, `Boolean`, `Object`, and `Symbol` types in **TypeScript**. 
All of them refer to **non-primitive** reference types.
Instead, prefer the corresponding **primitive** types.

```typescript
let textToCheck: String = 'text';
console.log(typeof textToCheck); // 'string'
console.log(textToCheck === 'text'); // true

textToCheck = new String('text');
console.log(typeof textToCheck); // 'object'
console.log(textToCheck === 'text'); // false
```

It's easy to failed your equality check with them.

There is also a performance part that I will not detail here. I recommend this article from [mozilla](https://hacks.mozilla.org/2012/12/performance-with-javascript-string-objects/) which makes a performance comparison between a literal string and its object version in **JavaScript**.

That's it, make good use of it !

---

I'm not a native English speaker so, thanks in advance if you want to improve my article with correct syntax/grammar/sentences.

I can accept all kind remarks :)

Cover by [JC Dela Cuesta](https://unsplash.com/@markuswinkler) on [Unsplash](https://unsplash.com/photos/QFPtc0EGCtI)
How to pass variables to a JSON file in Terraform
Tags: terraform, aws, devops
Published: 2020-09-04 07:53:38

Let's say you are creating an IAM policy with Terraform by using a seperate json file which includes the statement for the policy.

In a typical statement we have 4 values to satisfy. These are Sid, Effect, Action and Resource.

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Policy Name",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::mytestbucket"
            ]
        }
    ]
}
```

How should we dynamically change Resource and Sid values in this statement?

Well, Terraform has a data resource called [template_file.](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/file) With this, we can easily pass parameters dynamically to our statement file.

##Demo Time!

First, we need to create a user, policy and bucket. We will then use the bucket ARN in our statement. I am using variables for most of the things in order to have a clean code.

```
resource "aws_iam_user" "iam-user" {
    name = var.iam_user_name
}

resource "aws_s3_bucket" "s3-bucket" {
    bucket = "mytestbucket"
}

resource "aws_iam_user_policy" "iam-policy" {
    name = var.iam_policy_name
    user = aws_iam_user.iam-user.name
}
```

Normally we can attach the json policy with the following;
    
` 
policy = file("/path/to/policy.json")
`

Since we want to pass parameters to the json file, we will use a data resource called "template_file".

In order to use it, we must rename our json extension to **tpl**. With this we are stating that we want to use this file as a template.

Now we will modify our template file using interpolation syntax. We will pass parameters for both Sid and Resource.

```
"Statement": [
    {
        "Sid": "${sid-name}",
        "Effect": "Allow",
        "Action": [
            "s3:ListBucket"
        ],
        "Resource": [
            "${resource-name}"
        ]
    }
]
```

Back to our main file we will add template_file resource.

```
data "template_file" "iam-policy-template" {
    template = file("/path/to/policy.tpl")

    vars = {
        sid-name = "Policy for S3 Access"
        resource-name = aws_s3_bucket.sample_bucket.arn
    }
}
```

Here we specified the **vars** block and inside we use the variables from the template file. Now we can use this data in our IAM policy resource.

Notice that we are accessing our template's rendered version.

```
resource "aws_iam_user_policy" "iam-policy" {
    name = var.iam_policy_name
    user = aws_iam_user.iam-policy.name

    policy = data.template_file.iam-policy-template.rendered
}
```
Design and development of a minimalistic fashion photography website
Tags: design, minimalism, webdev
Published: 2020-09-04 07:49:38

In 2020, [Evrone designer](https://evrone.com/design) Natasha Yankelevich decided, as an exercise, to create the concept of a personal website for an individual who inspired her - photographer Elizaveta Porodina.

Natasha published the concept on social networks and tagged Elizaveta. She almost immediately received a message from the photographer praising the site concept. Elizaveta wanted us to fully develop the site and turn it into a representation of herself and her style. We reached an agreement on all the documentary details, discussed the nuances of the fashion photography website project, and got down to work.

[Learn more about how we created a professional photography portfolio website that showcased Elizaveta’s work and clearly represented her vision and style](https://evrone.com/porodina)
Compare Two Word documents and get the difference reports in Java 
Tags: compare, word, java
Published: 2020-09-04 07:49:11

---
title: Compare Two Word documents and get the difference reports in Java 
published: true
description: compare two word documents in Java
tags: Compare, Word,Java
---
It is a time-consuming job when we need to analyzes two Word documents which look similar.  Spire.Doc for Java offers a method of doc1.compare(doc2, "Author") to compare the word document and generate a report in track changes to make the difference clearly. As long as you have two separate Word documents, you can compare them in three lines of codes in Java applications.
Firstly, ensure that you are using [Spire.Doc for Java V 3.8.8](https://www.e-iceblue.com/Download/doc-for-java.html) or above and please check the sample word document as below:
![Sample word](https://dev-to-uploads.s3.amazonaws.com/i/hytu330uhaikpdkuxqqk.png)

```java
import com.spire.doc.Document;

public class CompareWordDocuments {

    public static void main(String[] args)throws Exception  {
        //Create a Document instance
        Document doc1 = new Document();
        //Load the first Word document
        doc1.loadFromFile("Sample.docx");

        //Create a Document instance
        Document doc2 = new Document();
        //Load the second Word document
        doc2.loadFromFile("Sample1.docx");

        //Compare the two Word documents
        doc1.compare(doc2, "E-iceblue");

        //Save the result to file
        doc1.saveToFile("Result.docx");

    }
}
```
After run the project,we will get the Word document as below:
![Output](https://dev-to-uploads.s3.amazonaws.com/i/qta0yogcvdi1dsywoazv.png)