跟随,学习,进步

Stack Abuse

Stack Abuse features News, articles, and ideas for software engineers and web developers.

https://stackabuse.com
转到作者网站

How to Copy Objects in JavaScript

Introduction A very common task in programming, regardless of language, is to copy (or clone) an object by value, as opposed to copying by reference. The difference is that when copying by value, you then have two unrelated objects with the same value or data. Copying by reference means that


Introduction to the Python Calendar Module

Introduction Python has an built-in module named Calendar that contains useful classes and functions to support a variety of calendar operations. By default, the Calendar module follows the Gregorian calendar, where Monday is the first day (0) of the week and Sunday is the last day of the week (6)


Python for NLP: Introduction to the TextBlob Library

Introduction This is the seventh article in my series of articles on Python for NLP. In my previous article, I explained how to perform topic modeling using Latent Dirichlet Allocation and Non-Negative Matrix factorization. We used the Scikit-Learn library to perform topic modeling. In this article, we will explore TextBlob


How to fix: "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED" on Mac and Linux

SSH, or Secure Shell, is a very common way to securely access remote machines, typically via the command line. It aims at ensuring that your connection, and therefore all data passed, is free from eavesdropping. Because of this, there are quite a few checks built-in to the popular SSH clients,


Java: Read a File into an ArrayList

Introduction There are many ways to go about Reading and Writing Files in Java. We typically have some data in memory, on which we perform operations, and then persist in a file. However, if we want to change that information, we need to put the contents of the file back


Introduction to the Python lxml Library

lxml is a Python library which allows for easy handling of XML and HTML files, and can also be used for web scraping. There are a lot of off-the-shelf XML parsers out there, but for better results, developers sometimes prefer to write their own XML and HTML parsers. This is


Python for NLP: Topic Modeling

This is the sixth article in my series of articles on Python for NLP. In my previous article, I talked about how to perform sentiment analysis of Twitter data using Python's Scikit-Learn library. In this article, we will study topic modeling, which is another very important application of NLP. We


Securing Spring Boot Web Applications

This article applies to sites created with the Spring Boot framework. We will be discussing the following four methods to add additional layers of security to Spring Boot apps: Preventing SQL Injection using Parameterized Queries URL Parameter Input Validation Form Field Input Validation Output Encoding to Prevent Reflected XSS Attacks


The try-with-resources Statement in Java

Introduction try-with-resources is one of the several try statements in Java, aimed to relieve developers of the obligation to release resources used in a try block. It was initially introduced in Java 7 and the whole idea behind it was that the developer doesn't need to worry about resource management


Spring Cloud: Routing with Zuul and Gateway

Overview In this article, we'll introduce you to routing your applications via Netflix's Zuul and Spring Cloud Gateway. In a typical microservice architecture we have many small applications running on different hosts and ports. The problem in this type of architecture is how clients (Web Applications in browsers, Mobile apps,


Python for NLP: Sentiment Analysis with Scikit-Learn

This is the fifth article in the series of articles on NLP for Python. In my previous article, I explained how Python's spaCy library can be used to perform parts of speech tagging and named entity recognition. In this article, I will demonstrate how to do sentiment analysis using Twitter


Getting Started with Selenium and Python

Introduction Web Browser Automation is gaining popularity, and many frameworks/tools have arose to offer automation services to developers. Web Browser Automation is often used for testing purposes in development and production environments, though it's also often used for web scraping data from public sources, analysis, and data processing. Really,


Sorting Algorithms in Python

Introduction Sometimes data we store or retrieve in an application can have little or no order. We may have to rearrange the data to correctly process it or efficiently use it. Over the years, computer scientists have created many sorting algorithms to organize data. In this article we'll have a


Sorting Algorithms in Java

Introduction Sorting data means arranging it in a certain order, often in an array-like data structure. You can use various ordering criteria, common ones being sorting numbers from least to greatest or vice-versa, or sorting strings lexicographically. You can even define your own criteria, and we'll go into practical ways


Working with PostgreSQL in Python

Introduction PostgreSQL is one of the most advanced and widely used relational database management systems. It's extremely popular for many reasons, a few of which include it being open source, its extensibility, and its ability to handle many different types of applications and varying loads. With Python, you can easily


Python for NLP: Parts of Speech Tagging and Named Entity Recognition

This is the 4th article in my series of articles on Python for NLP. In my previous article, I explained how the spaCy library can be used to perform tasks like vocabulary and phrase matching. In this article, we will study parts of speech tagging and named entity recognition in


Commenting Python Code

Programming reflects your way of thinking in order to describe the single steps that you took to solve a problem using a computer. Commenting your code helps explain your thought process, and helps you and others to understand later on the intention of your code. This allows you to more


Spring Boot Profiles for DEV and PROD Environments

This article applies to sites created with the Spring Boot framework, using Apache Maven as the build tool. In order to demonstrate how profiles work, we'll visit an example using Google Analytics and Google Tag Manager for tracking site metrics. I use this method for my website, Initial Commit, which


Basic AI Concepts: A* Search Algorithm

Introduction Artificial intelligence in its core strives to solve problems of enormous combinatorial complexity. Over the years, these problems were boiled down to search problems. A path search problem is a computational problem where you have to find a path from point A to point B. In our case, we'll


Python for NLP: Vocabulary and Phrase Matching with SpaCy

This is the third article in this series of articles on Python for Natural Language Processing. In the previous article, we saw how Python's NLTK and spaCy libraries can be used to perform simple NLP tasks such as tokenization, stemming and lemmatization. We also saw how to perform parts of