teleren/devto huggingface dataset:
How to protect word document from reading and editing in Java applications
Tags: word, java, protect
Published: 2020-07-22 09:15:23

---
title: How to protect word document from reading and editing in Java applications
published: true
description: protect word document from reading and editing
tags: word, java, protect
---

The online document's safety becomes more and more important in our daily life. This article is aimed to show you how to protect the Word document in Java application using [Free Spire.Doc for Java](https://www.e-iceblue.com/Introduce/free-doc-for-java.html) library from the following three parts:

Encrypt Word Document
Set editing restrictions for word document
Decrypt Document

Encrypt Word Document. We could use the method document.encrypt(string) to set the password for the Word document.

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

public class EncryptWord {
    public static void main(String[] args) {

        //create a Document object
        Document document = new Document();
        //load a Word document
        document.loadFromFile("Sample.docx");

        //encrypt the document with a password
        document.encrypt("abc-123");

        //save as docx file
        document.saveToFile("output/Encrypt.docx", FileFormat.Docx);
    }
}
```
Set editing restrictions for word document. We need to use the document.protect() method to set the word document read only, only allow comments, track changes, etc. 

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

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

        //No changes (Read only)
        document.protect(ProtectionType.Allow_Only_Reading, "123456");

        //Allow only comments
        //document.protect(ProtectionType.Allow_Only_Comments, "123456");

        //Allow only filling in forms
        //document.protect(ProtectionType.Allow_Only_Form_Fields, "123456");

        //Allow only tracked changes
        //document.protect(ProtectionType.Allow_Only_Revisions, "123456");

        //Save the result document
        document.saveToFile("RestrictEditing.docx", FileFormat.Docx_2013);
    }
}
```
Decrypt Document: We could also decrypt the Word document with password to remove the protection for the word document.

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

public class DecryptWord {

    public static void main(String[] args) {

        //create a Document object
        Document document = new Document();

        //remove encryption while loading the password protected document
        document.loadFromFile("Encrypt.docx", FileFormat.Docx, "abc-123");

        //save as docx file.
        document.saveToFile("output/Decrypt2.docx", FileFormat.Docx);
    }
}
```
بتن اکسپوز-واش بتن-سنگ رودخانه
Tags: betonconcreet, landscape, zeriscape
Published: 2020-07-22 09:14:32

بهترین محصولات برای زری اسکیپ و لند اسکیپ و محوطه سازی چه محصولاتی هستند؟
محصولات بتنی و سنگ های رودخانه برای این که دارای دوام خوبی هستند در محوطه سازی ویلا‌ها، ساختمان های لوکس و... بسیار مورد استفاده قرار می گیرند.
یکی از این محصولات بسیار خوب، بتن اکسپوز است.این محصول علاوه بر مقاومت بالا چهره ای لوکس و جذاب در محوطه سازی ایجاد می کند.حتی برای این که در نما استفاده شود چهره ای بهتر و جذاب تر به ساختمان ها می دهد. در ادامه به چند مورد از مزایای این محصول اشاره میکنیم:
این محصول برای استفاده در

سازه های بتنی
دیوار‌های مغازه ها
ویلا ها (استفاده از تضاد و یا همگونی رنگ با محیط بسیار جذاب خواهد شد)
و همچنین به عنوان کفپوشی مقاوم در

پیاده‌راه ها
فضاهای تفریحی و گردشگری
ساختمان های تجاری و اداری
و غیره
روش ساخت و اجرای این محصول
بتن اکسپوز از سیمان با کیفیت، ماسه با دانه بندی ریز، آب و محصولات روان کننده و همچنین افزودنی های دیگر اروپایی( که به علت وجود فرمول اختصاصی در شرکت پروفسور از بازگوکردن آن معذوریم)، رنگ و… تشکیل شده است.
YouTube Video | Website with HTML & CSS -1
Tags: html, css, youtube, webdev
Published: 2020-07-22 09:02:20

We will build a simple and fully responsive, Agency site in HTML and CSS. If you are new to web-development, learn HTML and CSS first from my other courses.


In this series we are going to use a bit of old layout theme of float, instead of CSS Grid or Flexbox. As even in 2020 float, position are very much used and you can find them in a lot of old projects.

Here is the first part of the series.

{% youtube _oO9MtdEHsg %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
Introducing myself !
Tags: introduction
Published: 2020-07-22 08:52:59

So finally, I have decided to blog. I made a list of a few topics that I am interested in talking about, but I was wondering where to start with. 

Then, I started to read different posts by the amazing people out here. And I found this lovely lady @pabiforbes and went to see what her first post is about. It was quite simple and nice, just an introduction of herself. However, I wonder how  can someone be so precise! 

So, I am also going to introduce myself first, instead of jumping to the technical discussions straight away. 

To start with, I am an Indian and India is my heart and soul. 

I don't know how to say it, I am still 22 years old or I am already 22 years old. 

People around me expect me to be quite mature till now. But I am basically still a child trying to act like an adult. And this is how most people feel but they don't say it, I guess.

Moving further, I am a fourth year student (recently promoted) pursuing B.E. in Computer Science Engineering in Bangalore, Karnataka. Currently I am staying home, trying to stay safe, in Patna, Bihar during this pandemic. I am doing my second internship as an android developer.

I am learning something each and every moment including programming skills but not limited to that.

I will begin to share my experiences with java and android concepts as far as I know them till now. And as the never ending quest for knowledge continues, I'll keep posting here simultaneously.

My next post will be on 
*How to upload your very first android app on playstore*.

Thank you !
Day 20 of #100DaysOfCode
Tags: 100daysofcode
Published: 2020-07-22 08:25:52

Today's Progress: Added backdrop menu and modified the custom shape for the front layer (Home Page).(ShrineApp)

Link to work: https://github.com/Kyawkhaing444/Shrine-Flutter-App

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4ugc3amsqdjaxssxlcr0.gif)
How to setup sass in your project
Tags: tutorial, webdev, beginners, css
Published: 2020-07-22 08:13:08

Sass is a CSS preprocessor that makes writing CSS more efficient and in my opinion much easier. In this post, I'll show you how you can set up SASS in your project. 


#1. Create a package.json file
```terminal
npm init
```
When you run the command in your project folder, you'll get a series of questions like the package name, description, author, license, etc. You don't have to answer all of them, it's okay to leave some fields empty. Once you've answered them and confirmed, the package.json file will be created in your project folder. 

#2. Install node-sass
```terminal
npm install node-sass
```
This command will install the node-sass dependency in your project. In the package.json file under the dependencies object, you'll see node-sass listed along with the version installed.

#3. Get node-sass working
 In the package.json file, you'll find the scripts object.

```json
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
```
First, change "test" to "sass".

```json
"scripts": {
"sass": "echo \"Error: no test specified\" && exit 1"
},
```
Then, delete everything in between the double quotes and replace it with this.

```json
"scripts": {
"sass": "node-sass -w scss/ -o css/ --recursive"
},
```
This will run the node-sass program, go to the scss folder where all your scss files are, and compile them into regular CSS in the CSS folder that will be created as a result when you first run the sass script.

#4. Run the sass script

In the terminal, type in this command.
```terminal
npm run sass
```
This will start the sass script and the image below shows what you'll see in your terminal when it is run successfully. 

![Result of the npm run sass script in the terminal](https://dev-to-uploads.s3.amazonaws.com/i/b4779toi0xdfvx6ybhbb.PNG)

If you save your scss file and it is compiled successfully, your terminal will be like this and you'll see a CSS folder created in your project folder.

![scss file successfully compiled green message](https://dev-to-uploads.s3.amazonaws.com/i/fpe8mcwss6topdympols.PNG)

On the other hand, your terminal will look like this. If there's no indication of what the error may be just like in the picture below just keep saving the file it will work after a few tries, otherwise, the error will be indicated in the red message.

![sass script failed to run red message](https://dev-to-uploads.s3.amazonaws.com/i/7ud3hqd7x74oj61h89jm.PNG)
Setup Robo3T with Atlas - A step by step guide
Tags: tutorial, mongodb
Published: 2020-07-22 08:01:32

If you don't know it yet, Atlas is the Cloud solution to host your Mongo database. 
It's dead simple to set up, and the team behind MongoDB makes it. So it's a pretty reliable solution when you're looking to host your database. 
And the best part is that you can start for free and pay as you grow! 

Robo 3T is a powerful MongoDB GUI that allows you to visualize, create, update/patch & delete documents. Connected to Atlas, you can easily maintain and manage your collections & documents.

If you already have a Cluster ready, feel free to go to the second part of this article. 

First - Let's create and set up our first Atlas Cluster.
A Cluster is like a server. It's your personal space where your whole MongoDB ecosystem lives. 

To create a free Cluster, we'll need : 
1 - To create an Atlas account and to choose the right Cluster
2 - To create an admin user, a super-user that can access all your Collections 
3 - To add your IP address in the Allowed list
4 - and finally, create some "dummy" collections, for demo purpose 

1 - Create an Atlas account https://www.mongodb.com/cloud/atlas
![Atlas Homepage](https://i.imgur.com/eyRcBrU.png)
(Atlas Server Setup)[https://i.imgur.com/jYOug1g.png]

2 - You made it! Your Cluster is now ready to be set up
Create an admin user
![Create Admin user Atlas](https://i.imgur.com/hU0P2Nl.png)
![Add New Database User](https://i.imgur.com/7Szo6CL.png)
![Admin configuration](https://i.imgur.com/9FqxpLI.png)

3 - You now have an Admin user that can access all your Cluster's collections. Time to add your IP address to the Allowed list
![Allow your IP address to access](https://i.imgur.com/G7tUcK6.png)
![Add your current IP](https://i.imgur.com/7IcRnWZ.png)

4 - Your Cluster is ready to get Collections! Let's load some sample Collections data.
![Add demo collections](https://i.imgur.com/I2WE5A8.png)

Second - Now that everything is ready, we can connect Robo3T to our Cluster.

To do that, we'll need: 
1 - to copy the Replica set
2 - to create a new connection into Robo3T 

1 - let's copy our replica set


Click on your Clusters name

![Click on your CLusters name](https://i.imgur.com/lk4UMrN.png)
Go to your replica set

![Go to your replica set](https://i.imgur.com/wszJu9f.png)
Copy all the replica

![Copy all the replica](https://i.imgur.com/d3ZYawK.png)

2 - Download https://robomongo.org/ and open it.

Click on "create."
![Open Robo3T and create a new connection](https://i.imgur.com/Ws0gywN.png)
![Connection options](https://i.imgur.com/vR4kwF7.png)
![Authentication Options](https://i.imgur.com/ZtXg1hk.png)
![SSL Option](https://i.imgur.com/3sgJL3M.png)
![Advanced Option](https://i.imgur.com/h3GgTaT.png)
![Save it and connect to your Cluster](https://i.imgur.com/yFy3RS8.png)

Once set up, double click on your connection. You're now connected to your Cluster!
Basic Authentication using NodeJS, Express and MongoDB
Tags: javascript, node, mongodb
Published: 2020-07-22 07:30:21

Firstly develop this basic method in your app.js of express application to perform basic auth
```javascript
// Basic Authentication
function auth (req, res, next) {
  console.log(req.headers);
  var authHeader = req.headers.authorization;
  if (!authHeader) {
      var err = new Error('You are not authenticated!');
      res.setHeader('WWW-Authenticate', 'Basic');
      err.status = 401;
      next(err);
      return;
  }

  var auth = new Buffer.from(authHeader.split(' ')[1], 'base64').toString().split(':');
  var user = auth[0];
  var pass = auth[1];
  if (user == 'admin' && pass == 'password') {
      next(); // authorized
  } else {
      var err = new Error('You are not authenticated!');
      res.setHeader('WWW-Authenticate', 'Basic');      
      err.status = 401;
      next(err);
  }
}
```
Secondly call the method before static rendering line of express.static 
```javascript
// first
app.use(auth);
// second
app.use(express.static(path.join(__dirname, 'public')));
```
In this server will perform basic-auth before giving access or serves up the request coming.

That's it.
We make FLAPPY BIRD in JavaScript, HTML and CSS (No Canvas!) + DEPLOY it on IPFS in under 1min!
Tags: javascript, ipfs, tutorial
Published: 2020-07-22 07:11:58

Hey Everyone! This is a really exciting video. Not only are we going to learn how to make Flappy Bird in pure JavaScript, HTML and CSS (No canvas required), but we are going to learn how to:

1. Deploy it onto a website so we can share it, thanks to Fleek.
2. Make it Multiplayer in Part 2 on Srushtika's channel.
3. PLUS BONUS: Watch me and Srushtika get interviewed on the making of the game by fellow YouTuber Eddie.

We are going to be hosting our built games on Fleek in this walkthrough. You will leave with a personalized fleek URL, but if you would like a different one you can also purchase domains via them too.

For those of you who have not heard of Fleek, they make it easy to build and integrate privacy, encryption, and p2p functionality into your sites, web & native apps. It's built on the new internet! So on IPFS,  a protocol and peer-to-peer network for storing and sharing data in a distributed file system.

Links mentioned in the video:
Fleek: https://bit.ly/fleek-co
Srushtika's Channel for Part 2: https://www.youtube.com/channel/UCC-sGGUfT-ot_E8i1ARYQVw
Eddie's Channel for Part 3: http://youtube.com/eddiejaoude
Keycodes: https://keycode.info/

I hope you enjoy the video, please don't forget to like, comment and subscribe for more if you have enjoyed watching!

As always, please do share your finished games with me on :
https://www.twitter.com/ania_kubow

#javaScriptGames #100DaysOfCode #gameDev

{% youtube gxHcW84izz0 %}
How to Build a TYPO3 website in minutes with TYPO3 SaaS?
Published: 2020-07-22 07:07:16

Are you looking for instant TYPO3 website development without prior knowledge of TYPO3 development or Coding skills? We got you!

Well  TYPO3 SaaS is a very easy, budget-friendly, and convenient option for people with little to no TYPO3 website-building or marketing experience. With   TYPO3 SaaS launching and promoting a TYPO3 website online just got a lot easier with an instant click and launch option.

Wondering how   TYPO3 SaaS works? Let’s dive in!

- TYPO3 SaaS - TYPO3 Website Builder 
- What is the concept of  TYPO3 SaaS?
- Introducing Click n Launch TYPO3 Website Builder
- Benefits of  TYPO3 SaaS
- Professional Features for Your Website
- Cost-Effective TYPO3 Solution
- How to make your own TYPO3 website in Minutes?
- How to buy Premium  TYPO3 SaaS?
- How will  TYPO3 SaaS help the  Customers?

Read the complete blog at - https://t3terminal.com/blog/build-typo3-website-with-typo3-saas/
Underestanding Types of Quotes In JavaScript and Their Uses.
Tags: beginners, codenewbie, javascript, webdev
Published: 2020-07-22 06:11:01

This article could be very useful to beginners or maybe even junior  developers that makes use of Javascript to write their codes.

Yeah, don't ask me if am a pro, cuz I am not.😄 I did better get started before I end up writing upto 200 lines in this short insight am about to reveal to someone today.

Alright so, I would love to say that they are three types of quotes, oh yeah atleast for now, incase you happen to know any other one, pls kindly drop as a comment.

These quotes includes:
° Double quotes i.e ""
• single quote i.e ''
And lastly, we have,
Guess ? It out☺️, eerhm don't worry it's right below.

•Backticks ``
Permit me to share d this short story before I continue.
The main reason why I decided to share this article was because of the last type of quote mentioned herein - the backticks.
When I started learning programming, I never took cognizance of it. It was actually a knowledge, I passed by but am happy that I have across it and eventually learnt it's functionality and scope.

Alright, I think I have to continue now. Okay, so basically the double quotes and single quotes are used to enclose strings in Javascript. Both does the same work actually. For example, the variable name is assigned with a string, Kenechukwu and it's enclosed with a single quote.
![single quote Javascript code](https://dev-to-uploads.s3.amazonaws.com/i/c2tlqj5jjcynql4xp8gs.PNG)

This is exactly the same with the same string enclosed with a double quote as seen below. Both of them will produce the same outcome.
![string with double quotes in Javascript](https://dev-to-uploads.s3.amazonaws.com/i/gws3b6tispcolzmzr5z0.PNG)

And then lastly, we will talk about the backticks, which are used to embed a strings with  Javascript variables as seen below.
![Screenshot of basic Javascript code](https://dev-to-uploads.s3.amazonaws.com/i/bafcz7fa4x1iyhfieivo.PNG)

Yeah, don't forget I told you this is gonna be a short article. If they are more quotes used in Javascript that are no here, pls feel free to comment.

I am just a dude revising and sharing my Javascript knowledge.

Thank you for reading!
Best YouTube channels for Web Development
Tags: webdev, react, html, node
Published: 2020-07-22 06:05:39

Hello! These are my personal favourite youtube channels to learn full stack web development. Although numbered, this list is not in order of preference and all of them are equally great :)

#**1. Net Ninja**#
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fv2ijj2jrcvrcq2g2u9c.png)

Shaun's channel has premium quality courses for free! Be it React, Node.js, Vue or Firebase he has covered it all. There are categorised playlists for all topics and he covers everything from absolute basics without skipping anything. Sometimes you'd wonder how am I not paying anything for these courses. Definitely check out this channel!
[Net Ninja YouTube Channel](https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg)

#**2. Web Dev Simplified**#
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j0eeq7435v0od4cjkvrs.jpg)

This channel does exactly what it says. Simplifies the web for you! Kyle has a complete full stack course for free on his channel. There are plenty of short videos explaining different topics in a crystal clear manner. I personally watched his channel to learn topics like authentication and react hooks which were easy to grasp.
[Web Dev Simplified YouTube Channel](https://www.youtube.com/channel/UCFbNIlppjAuEX4znoulh0Cw)

#**3. Programming With Mosh**#
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6hzfrvhqcqq83lptk8et.jpg)

Mosh is hands down one of the best teachers I ever had. I learnt React and Node.js from his premium course and not even for once I was lost. He also makes us write code using the best practices which is really beneficial. The way he explains is unique. He could even make a 10 year old understand what React is! He uses animations to make difficult concepts easy. I highly recommend his premium courses.
[Programming With Mosh YouTube Channel](https://www.youtube.com/user/programmingwithmosh)

#**4. Brad Traversy**#
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dxthgphamqaxc0ii4xxp.png)

How can this list be complete without Brad! One of my first teachers in web dev, I have learnt all the basics of web development from him. He also has paid courses on Udemy which are worth checking out. Apart from development, he also makes videos on other skills like freelancing and life lessons on dealing with impostor syndrome and mental health. He has been a huge inspiration for all the web developers out there and I hope his channel continues to grow. 
[Brad Traversy YouTube Channel](https://www.youtube.com/user/TechGuyWeb)


There are plenty of other channels who make great content for the community. These are just my favourite ones. Please feel free to share your favourite channels!
Best DevOps Automation Tools and Technologies
Tags: devops, devopsautomationtool, technology
Published: 2020-07-22 13:34:02

---
title: Best DevOps Automation Tools and Technologies
published: True
date: 2020-07-22 05:46:58 UTC
tags: DevOps,DevOpsAutomationTool, technology 
canonical_url: https://www.botreetechnologies.com/blog/best-devops-automation-tools-and-technologies
---

![DevOps Automation Tools](https://www.botreetechnologies.com/blog/wp-content/uploads/2020/07/best-devops-automation-tools.jpg)

The processes at your company or business can hold significant importance on how your business will thrive. These days, [technology can help you automate your business processes](https://www.softvire.com.au/how-you-can-manage-your-business-with-software/) to bring speedy delivery of applications and services to your clients. Many companies today, no matter how big it is, start to depend on DevOps to make things faster and more efficient.

DevOps is a coined term from development and operation, making a buzz in the tech world today. Combination of your company’s philosophies, practices, and [adoption of programmable software development](https://www.botreetechnologies.com/web-application-development), DevOps can help produce a better result.  [DevOps development service](https://www.botreetechnologies.com/devops-consulting-services) promotes better communication and collaboration within teams and organizations. Leveraging on DevOps allows your company or business to develop and improve products much faster than usual or traditional development methods.

These days, there is a massive availability of DevOps tools and technologies you can use to help you with your automation processes. To help you decide on which tools you can use for your DevOps requirement, here is a list of some of the best in the market that you can consider.

[Also Read: 5 DevOps Services Trends to watch in 2020](https://www.botreetechnologies.com/blog/devops-services-trends)

The post [Best DevOps Automation Tools and Technologies](https://www.botreetechnologies.com/blog/best-devops-automation-tools-and-technologies) appeared first on [BoTree Technologies](https://www.botreetechnologies.com/blog).
How to use multiple GitHub accounts on single machine
Tags: github, git, opensource, githunt
Published: 2020-07-22 05:41:37

Most of us have multiple (mostly two) GitHub accounts, personal and work account. You need to have the ability to push and pull to multiple accounts. This post is about how to setup and use them on a single machine using HTTPS or SSH.

**Note**: The instructions below have all been executed on macOS and should work fine on all **Unix** based operating systems.

**Read the full blog here**: [https://jogendra.dev/how-to-use-multiple-github-accounts-on-single-machine](https://jogendra.dev/how-to-use-multiple-github-accounts-on-single-machine)
Ecto's Repo.insert
Tags: elixir, ecto, phoenix
Published: 2020-07-22 05:23:43

If you have default values set in your database, then `Repo.insert` will not return its value. 

To return the value, you have to pass `Repo.insert(returning: true)`

If you dont want to do `returning: true` you can set default return value in your schema.

```
schema "rooms" do
  field :enable_chat, :boolean, default: false
end
```

Then when you do insert, it will return the default `false`