AstroNvim: An Aesthetic & Feature-rich Neovim Config

AstroNvim

AstroNvim is an aesthetic and feature-rich neovim config that is extensible and easy to use with a great set of plugins

🌟 Preview

Dashboard Preview Image Coding Preview Image Debugging Preview Image

✨ Features

⚡ Requirements

  • Nerd Fonts (Optional with manual intervention: See Documentation on customizing icons)
  • Neovim 0.8+ (Not including nightly)
  • Tree-sitter CLI (Note: This is only necessary if you want to use auto_install feature with Treesitter)
  • A clipboard tool is necessary for the integration with the system clipboard (see :help clipboard-tool for supported solutions)
  • Terminal with true color support (for the default theme, otherwise it is dependent on the theme you are using)
  • Optional Requirements:
    • ripgrep - live grep telescope search (<leader>fw)
    • lazygit - git ui toggle terminal (<leader>tl or <leader>gg)
    • go DiskUsage() - disk usage toggle terminal (<leader>tu)
    • bottom - process viewer toggle terminal (<leader>tt)
    • Python - python repl toggle terminal (<leader>tp)
    • Node - node repl toggle terminal (<leader>tn)

Note when using default theme: For MacOS, the default terminal does not have true color support. You will need to use iTerm2 or another terminal emulator that has true color support.

🛠️ Installation

Make a backup of your current nvim and shared folder

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak

Clone the repository

git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim

📦 Basic Setup

Install LSP

Enter :LspInstall followed by the name of the server you want to install
Example: :LspInstall pyright

Install language parser

Enter :TSInstall followed by the name of the language you want to install
Example: :TSInstall python

Install Debugger

Enter :DapInstall followed by the name of the debugger you want to install
Example: :DapInstall python

Manage plugins

Run :Lazy check to check for plugin updates

Run :Lazy update to apply any pending plugin updates

Run :Lazy clean to remove any disabled or unused plugins

Run :Lazy sync to update and clean plugins

Update AstroNvim

Run :AstroUpdate to get the latest updates from the repository
 

Update AstroNvim Packages

Run :AstroUpdatePackages (<leader>pa) to update both Neovim plugins and Mason packages

🗒️ Links

AstroNvim Documentation Core AstroNvim LUA API Documentation

📹 Videos

There have been some great review videos released by members of the community! Here are a few:

🚀 Contributing

If you plan to contribute, please check the contribution guidelines first.

⭐ Credits

Sincere appreciation to the following repositories, plugin authors and the entire neovim community out there that made the development of AstroNvim possible.


Download Details:

Author: AstroNvim
Source Code: https://github.com/AstroNvim/AstroNvim 
License: GPL-3.0 license

#vim #lua #neovim #ide #neovim #configuring 

AstroNvim: An Aesthetic & Feature-rich Neovim Config
Rupert  Beatty

Rupert Beatty

1675096080

AuroraEditor: A IDE Built By The Community, for The Community

Aurora Editor

Aurora Editor is a IDE built by the community, for the community, and written in Swift for the best native performance and feel for macOS.

It will support everything you could expect from an Xcode-inspired application, including deep integration with your selected git provider, project planning, and your favourite built in editor tools.

github-banner 

Motivation

Developers should be able to use an editor that feels snappy and fast.

Most comparable editors are built on Electron, This is a huge disadvantage because it utilize a lot of unneccecary system resources. Electron requires a Chromium instance to run. This can mean massive performance losses and high RAM usage even for small apps built on it. Additionally, the overall code footprint is much larger and animations are slower. More frames are lost and things like window resizing feels laggy. Native apps are smooth as butter and utilize system resources much more efficiently for better performance and reliability.

Xcode is a great native editor for developers on Mac, but unfortunately it doesn't support creating a multitude of projects in different programming languages, and this is where Aurora Editor comes in. Aurora Editor wants to give developers the possibility of creating their desired projects in their desired language on a editor that is native and gives a similar experience, performance and feel than that of Xcode on Mac.

Included Repositories

Logo

Version Control Kit

Logo

AE Extension Kit

Logo

SwiftTerm

Community

Join our community on Discord or Slack where we discuss and collaborate on all things of Aurora Editor. Don't be shy, jump right in and be part of the discussion!

Community Details

We would love to hear what kind of great ideas you as the community have. If you have an idea or a feature request for Aurora Editor feel free to add it to the Ideas Discussion.

If you created an awesome feature for Aurora Editor why not Show and tell, and celebrate with the community and developers of Aurora Editor.

When we have some awesome news or a big annoucement to make, we will be making it in the Annoucement Discussion. So stay tuned for any future annoucments.

Difference between AuroraEditor and CodeEdit

Please read https://github.com/AuroraEditor/AuroraEditor/discussions/286 to read about the difference between our projects.

Mental Health Awareness

We are aware how difficult and overwhelming it can be sometimes for developers when working on a big or small project. If you feel like you are getting overwhelmed when working on a certain feature or bug on Aurora Editor don't be afraid to let us know and we'll be able to help you out and takeover what you have been working on if you feel comfortable letting someone else do it. If you just feel the need to talk about certain issues feel free to talk about it in the Mental Health Channel or if just need advice on something ask in the Advice Channel.

Contributing

Be part of the next revolution in code editing by contributing to the project. This is a community-led effort, so we welcome as many contributors who can help! Please read the following for more information.

Editor Localization

We want users to feel comfortable using Aurora Editor in their own speaking language, help us by translating Aurora Editor for you and the rest of the community.

Translate Aurora Editor Now

Download Details:

Author: AuroraEditor
Source Code: https://github.com/AuroraEditor/AuroraEditor 
License: MIT license

#editor #macos #swift #ide 

AuroraEditor: A IDE Built By The Community, for The Community
Lawrence  Lesch

Lawrence Lesch

1673475660

A Framework Helps You Quickly Build Cloud Or Desktop IDE Products

OpenSumi

A framework helps you quickly build Cloud or Desktop IDE products.

perview

English | 简体中文

⚡️ Quick Start

$ yarn install
$ yarn run init
$ yarn run download-extension  # Optional
$ yarn run start

By default, the tools/workspace folder in the project would be opened, or you can run the project by specifying the directory in the following way:

$ MY_WORKSPACE={local_path} yarn run start

Usually, you may still encounter some system-level environment dependencies. You can visit Development Environment Preparation to see how to install the corresponding environment dependencies.

🌟 Getting Started

Here you can find some of our example projects and templates:

📕 Documentation

For complete documentation: opensumi.com

📍 ReleaseNotes & BreakingChanges

You can see all the releasenotes and breaking changes here: CHANGELOG.md.

🔥 Contributing

Read through our Contributing Guidelines to learn about our submission process, coding rules and more.

🙋‍♀️ Want to Help?

Want to report a bug, contribute some code, or improve documentation? Excellent! Read up on our Contributing Guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.

🧑‍💻 Needs some help?

Go to our issues or discussions to create a topic, it will be resolved as soon as we can.

Download Details:

Author: opensumi
Source Code: https://github.com/opensumi/core 
License: MIT license

#typescript #electron #editor #ide 

A Framework Helps You Quickly Build Cloud Or Desktop IDE Products
Nigel  Uys

Nigel Uys

1671709800

Let’s Check the PHP IDE!

Intro to CodeLobster IDE review

To start creating a project, every programmer needs some tools, that will make the coding faster and easier. Most developers prefer to have everything in one tool. That’s why most of us decided to go for IDE, which usually provides more than just a code editor.

IDE usually consists of many useful features, that help developers to stay focused instead of changing the windows every time they want to perform different actions. IDE consists of at least a code editor, debugging tool, and build automation tools, but those are just essentials. There are IDEs that have even version control systems and many many more.

What’s really important about a good IDE is that it should work for you, with your favorite programming language, and keep you focused. That’s why if you are a web developer and you simply don’t need additional compilers or interpreters. That’s why you should select the tool, that will work the best for your technology.

In this article, I’ll check the CodeLobster. It’s an integrated development environment dedicated to programmers, who are focused on developing full-features websites on PHP.

Let’s start!

What is CodeLobster?

CodeLobster is a free IDE. Its main goal is to simplify and speed up the process of developing PHP websites. CodeLobster is on the market for a long time now, and every year it gets lots of new enthusiasts.

CodeLobster is not limited just to PHP files. Developers can use this IDE to edit HTML, CSS, Javascript, and even Typescript files. A very common thing in building a PHP project is that files are often mixed, so they are not just pure PHP. CodeLobster does a great job here, by highlighting the content in a proper way, no matter what is the file extension.

CodeLobster uses the most updated documentation downloaded from official websites. That’s why it can provide contextual help for all supported programming languages. So you can always rely on this tool, and it won’t suggest you some outdated code.

The CodeLobster is also a very intuitive and user-friendly tool. It brings lots of useful features in one, well-organized space.

Now, let’s check how fast we can install CodeLobster on our machine.

How to install Lobster IDE?

CodeLobster is a multi-platform tool, which means that no matter which operating system you have, you can use this IDE.

Right now, let’s go through the CodeLobster installation on Windows step by step, to see how easy and intuitive this process is.

1.Download the Installer from CodeLobster official website CodeLobster

2.Start the installer, agree with the License Agreement and press Next

3.Choose installation location and go to the next step

4.Choose the start menu folder or select that you don’t want any shortcuts and press Next

5.Select file types that you’d like to open on double click, which is a pretty useful step, I never saw it in different tools. Press the Next button

6.Select the color scheme. You can choose from 11 different themes, patterned from other code editors, and go to the next step.

7.Next step is to select the language of the IDE. You can choose from 17 different languages. From very popular ones like English, Russian or Spanish to more rare languages like Hungarian or Slovak.

8.In the next step, you can select components that you’d like to install with CodeLobster, like Angular, CodeIgniter, Bootstrap or many more. When you decided what you need you can finally press the Install button.

9.Installation shouldn’t take more than a minute. And when it’s ready to press Finish and open the IDE.

It seems like the installation is very intuitive and fast. During the simple step-by-step process, we can decide on how the IDE will look like. Right now, let’s see what’s inside!

CodeLobster IDE features

As I already mentioned, CodeLobster is not just a code editor. It provides lots of helpful features, which main task is to speed up and simplify the coding. Let’s take a look at the features that CodeLobster provides.

multi-platform - it can be used on any operating system you wish, starting from Mac OS, through Windows 7, Windows 8, Windows 10, Linux, Ubuntu, Debian, and Fedora.

code highlighting & pair highlighting - as many different code editors, CodeLobster comes with code highlighting, so you won’t get confused. Another great thing is that CodeLobster will take care of closing tags, parentheses, or quotation marks. By highlighting them, you never have spent hours counting one by one to find an error.

intelligent auto-complete - CodeLobster comes with intelligent auto-complete feature. It automatically completes tags or attributes in your HTML code, properties, and values for CSS. In Javascript in auto-completes keywords, DOM elements, and their properties. CodeLobster is a PHP IDE that has also a very advanced PHP autocomplete.

This feature will make writing the next project much faster and definitely less buggy.

easy navigation - CodeLobster makes it easier to work with bigger files. It allows creating bookmarks that can be used to navigate between different places in the edited code file.

Another great option for navigation in CodeLobster is to open target files quickly pressing the name of the file with the CTRL button.

context & dynamic help - This feature helps you to get all information about any element of HTML code with one click in one place. For example to learn more about <div> element place the pointer on the element and press F1.

The default source about the elements is W3, but you can easily adjust it, to sources that you like the most.

Code collapsing - to make it even easier, while working with bigger files of code, you can easily collapse part of the file to make more space, and see on the screen what you need. To collapse the block of code, just press the - sign on the left.

commenting code - good code is code with comments, to let other developers know, what we actually created. That’s why it’s very important to have a code editor which allows us to create comments easily.

CodeLobster has the possibility to create code comments with lines and blocks. To add a comment you just need to select some text or code you’d like to comment, press Alt+C, or Edit/Comment Lines.

PHP debugger - debugging is very ofter a huge piece of coding. At least a few times per day we have to solve some problem and debug, to find which part of the code doesn’t work. That’s why if your IDE comes with a good debugger, you are a lucky one.

The PHP debugger in CodeLobster allows executing PHP scripts step by step moving through lines of code, one by one. You can add checkpoints, view the process of the work of loops, and monitor the values of variables while executing the script.

Those features are available in the free version, so we should definitely check what can we get in premium.

working with projects using FTP - in the CodeLobster premium version you can work with files that are actually on the server using a build-in FTP client. This is a great option to speed up the quick fixes and changes.

How does it work?

You self the file to edit, preview the results and then synchronize the changes, and voila, it works!

support for JS frameworks and libraries - even if you are a PHP developer sometimes you need to deal with the newest frontend frameworks to make UI. CodeLobster provides support for such libraries as jQuery, Node.js, AngularJS, BackboneJS, VueJS, and even MeteorJS in the premium version.

version control - working with CodeLobster you don’t have to leave your IDE to make a commit, so you can stay focused on what you actually do. The IDE has the possibility to connect with a version control system. In the free version, we can work with Git, but premium support also Mercurial and SVN.

PHP frameworks support - another great option coming with the paid version is support for PHP frameworks. You can find plugins for frameworks like CakePHP, CodeIgniter, Laravel, Phalcon, Smarty, Symphony, Twin, and Yii as plugins.

plugins for CMS - PHP CMSes are quite common, and there are a lot of projects on the internet on WordPress, Joomla, Drupal, or Magenta. To work with them more easy premium versions of CodeLobster bring plugins for each of them.

Every framework supported by premium CodeLobster can be downloaded and installed without disturbing you in coding.

How much does it cost?

A lot of PHP dedicated IDEs available on the market are rather expensive. That’s why knowing all the CodeLobster features, we may assume, this tool can cost a fortune. Happily, there is a positive surprise, because you can get CodeLobster for free.

Of course, there is a premium paid version, which right now costs $59.95 with a 25% discount. With the premium version, you can get about 10 advanced features, that will speed up your PHP coding. You can also get about 17 additional plugins to help you with using frameworks like AngularJS, Bootstrap, or WordPress.

The upgrade to the premium version is a good idea. Especially that for the price you get the possibility of activation on three different devices and one year of free updates. You can also buy additional years of updates for $19.95.

Free vs premium version

Let’s take a look, what we can get for free and paid version of CodeLobster IDE.

On the image below, you can see, what features are free, and which require an additional premium version, and which plugins will come with paid CodeLobster IDE.

Lobster IDE review summary

Let’s summarize, CodeLobster IDE is dedicated to PHP developers who are working daily on building websites. It is a free tool so everyone can try the basic version of CodeLobster IDE. And if you like, how it speeds up your coding, makes you focused on what you actually have to do, you can check out the professional version. It is definitely in a good price comparing to competitors.

CodeLobster seems to provide everything that developers need to work efficiently and create a good quality code. Rich code editor, PHP debugger, working with online files with built-in FTP client, version control system, multiple frameworks and CMS support, and many more. It’s also worth remembering about easy setup, and multiple languages support.

I hope the review was interesting, and you are ready to try out CodeLobster IDE, as I already did.

This is sponsored article and thanks for the CodeLobster company for providing as access to IDE for testing. More information about them you can find at CodeLobster IDE

Original article source at: https://www.blog.duomly.com/

#php #ide 

Let’s Check the PHP IDE!
Sheldon  Grant

Sheldon Grant

1671563580

How Does It Enable Faster Development? What is an IDE?

An IDE (integrated development environment) is a piece of software that provides new programmers with all the tools they need to develop, debug and manage applications. This includes code editors, source control systems, and more! In this article, you’ll learn about IDEs, which are an essential part of a developer’s toolkit.

Here are some benefits you might be looking for in an IDE:

  • A code editor that provides an interface for the management of source code.
  • A code editor that highlights syntax and allows you to easily edit, save and compile your programs.
  • Developing software is hard work. You want an IDE that helps you stay organized by letting you create projects, organize source files and even control your build process.
  • Developing software is also a social activity. You want to be able to share code with other programmers and collaborate online using an IDE.
  • An IDE can help you automate repetitive tasks like compiling and testing your software. You might also want to use an IDE’s advanced debugging features to find and fix bugs in your code.

What Is an IDE?

An IDE (which stands for Integrated Development Environment) is a software application that allows developers to write, debug and test code for multiple programming languages.

An IDE is an application that helps to facilitate software development. It offers a code editor, compiler, and debugger in one application, making programming easier. In addition, many IDEs also include features like syntax highlighting and code completion.

IDEs are popular among developers because they make coding faster and easier. By merging many different tasks into a single application, an IDE can help you be more productive and write better code. Additionally, IDEs often offer plugins that add features and flexibility, making them customizable to your needs. If you’re looking for a way to write code faster, then an IDE is your tool!

Editing Source Code

Programmers use an IDE to write code, which is a set of instructions that tell a computer what to do. We write code in a particular language, such as Java or Python. An IDE provides autocomplete for keywords in the language and features like syntax highlighting, which makes it easier to read the code.

Building Executables

To turn source code into an executable, we need a compiler. The compiler converts our code into machine code that can run on a specific platform.

An IDE typically includes the compiler for the language we’re using, as well as other tools necessary for development, such as debuggers and profilers.

Most compilers are designed to work with a specific IDE or editor. When we’re compiling from the command line, makefiles can provide instructions to the compiler about how to build the executable. Many programmers prefer using an IDE over makefiles because it provides all of the necessary tools in one place and eliminates incompatibility issues between different compilers and target platforms.

However, IDEs are not essential to programming and some developers prefer managing makefiles over more traditional IDEs.

Debugging and Testing

Integrated Development Environments are also tools that ease the debugging process. The IDE provides hints to prevent errors before compilation. Additionally, it may provide automated debugging, bug finders, breakpoints, or visual and interactive debugging features. An IDE can help with testing by providing tools such as a test terminal and profiler.

Why Do Developers Use IDEs?

When you code, there are a few different things that you need in order to be successful. You need the right tools, the right environment, and the right mindset. All of these factors are important, but perhaps none is more important than your choice of a development environment. Let’s discuss why using an IDE can help you write code faster and more efficiently.

IDEs provide many useful resources and shortcuts that can make development easier and faster. For example, they often include built-in debuggers, syntax checkers, and code generators. They often offer extensive support for collaboration, which can help speed up production by making it easier for multiple developers to work on the same project simultaneously.

Additionally, IDEs can detect errors in your code as you write it and provide real-time feedback to help you fix them quickly. Finally, they often include utilities for creating drivers and other special-purpose applications.

What Are the Advantages of Integrated Development Environments?

What can you expect to gain from all these features? Integrated Development Environments offer many benefits, but here’s the bottom line:

  • IDEs make development faster, easier, and more efficient.
  • IDEs provide many useful resources and shortcuts that would otherwise be manual processes.
  • Integrated Development Environments help speed up production by supporting collaboration.
  • IDEs can detect, correct, and warn of errors in code as you write it.
  • Many IDEs now have cloud-based versions, which makes it easier for developers to work remotely or on a laptop without installing an application.
  • Some IDEs allow the user to customize their own workspace in order to match their preferences and needs (i.e. for mobile app development).

What Are the Disadvantages of IDEs?

Although IDEs offer many benefits, they also have some disadvantages. For example:

  • A lot of IDEs are complex for beginners.
  • There are many different IDES specifically tailored to different types of programming languages, making the time investment of learning all that complexity a difficult choice.
  • Because an IDE does so much more than a regular text editor, it can consume more system resources during usage and slow your system down.
  • It’s hard to keep up with constant updates.

As you can see, the disadvantages of an IDE typically involve the need to manage the additional complexity they introduce. Whether that complexity adds enough value to make you more productive will be up to you and your development needs.

Types of IDEs

There are many different types of IDEs, depending on the code you’re creating. Multi-language IDEs and those customized for mobile or web apps are two divergent examples. There are also different IDES for specific languages like Python, Java, C#, and SQL.

Cloud-based IDEs allow you to use a familiar IDE setup on any device. Additionally, there are IDEs made by Apple and Microsoft specifically for development on those respective platforms.

What Are the Best Multi-Language IDEs?

One of the most popular IDE types is the multi-language IDE.

  • Visual Studio Code is a popular IDE widely used in web development and comes with broad language support. It also includes a rich marketplace of extensions you can add to the environment.
  • NetBeans is another open-source option that supports mobile apps, desktop apps, and web applications.
  • Komodo is a cross-platform IDE that has a premium option. It supports many languages, including Python, PHP, Perl, GoLang, Ruby, and C#.

What Are the Best Mobile Development IDEs?

Xcode 13 IDE interfaceXcode 13 IDE

There are a few different IDE options to choose from when it comes to mobile app development. The first decision you’ll need to make is which platform you plan to target with your app.

Even if you’ve settled on a specific platform, we recommend using an IDE that provides cross-platform support for multiple platforms for future flexibility. For example, Eclipse and IntelliJ IDEA both offer this capability.

Mobile app development is on the rise, and every organization should be building apps. In order to reach as many users as possible, you’ll need a cross-platform IDE to develop for all three major platforms (Android, iOS, and web).

  • Xcode is only used to develop Apple products (such as macOS, iOS, and watchOS devices), which use Swift, Objective-C, and C++ languages.
  • Android Studio is the official Android IDE created for Java and Kotlin coding; it offers great support for developing Android apps.
  • IntelliJ IDEA was created with intelligent coding in mind — it helps users stay focused on their work while providing powerful features.

What Are the Best Cloud-Based IDEs?

The Cloudanywhere IDE interface

Cloudanywhere IDE

Cloud-based IDEs give you the ability to code from anywhere. There are many different cloud-based IDEs, but some of the most popular ones include Cloud9 and CodeTasty. These two IDEs offer different capabilities

  • Cloud9 is a cloud-based IDE designed to support collaborative programming within teams.
  • Codeanywhere is focused on being a feature-complete replacement for
  • CodeTasty is designed to be a simple yet easy-to-use cloud IDE.

Specific-language IDEs

The PyCharm IDE interface

PyCharm, an IDE specifically for Python development

IDEs that are made for different languages help out with features specific to that language.

  • Java developers might want to use an IDE like Eclipse or IntelliJ.
  • Python developers might want to try PyCharm. This IDE offers excellent support for Python coders, complete with smart code completion, static analysis, on-the-fly error checking, and more.

There is an IDE for just about any language you need!

There are many different types of IDEs, but they all typically have the same features. For example, most IDEs include a text editor, compiler/interpreter, debugger and build system. Additionally, IDEs often have:

  • A project view that shows all the files in the project and their relative location
  • An outline view that shows the structure of the code in a tree-like format
  • A navigation bar that helps you quickly move around your codebase

Essential IDE Features

The IDE is one of the most important tools for developers. Since it’s a solution that brings all of the tools needed for software and application development under one roof, there is often a high personal cost to switching.

IDEs offer many benefits to developers, including the ability to automate tasks and integrate code environments with other relevant tools. They also provide a centralized location for all of the necessary development tools. This allows teams to work within one environment and write, test, and deploy code more effectively.

Code editor

The code editor is the most important feature of an IDE.

A code editor combines text editing, syntax highlighting, auto-complete, bracket matching, and syntax checking features to make writing code easier.

Visual navigation tools make the editing process much easier as they provide a map of the project’s structure that helps you quickly move around in your source files.

Code editing features make writing and editing code more efficient by visually representing the code in an intuitive way — coding is easier with these features because they help you see how the different parts of your program fit together.

It should be easy for programmers to use common Emacs and Vim key combinations, as these are familiar to many programmers. The IDE should also include editor emulation modes so that programmers accustomed to working with some other platform can still use the same key combos they’ve already learned.

Syntax highlighting

The IDE editor usually provides syntax highlighting, which is a feature that makes it easy to identify the different elements of a programming language. This is helpful when you are trying to write code or edit existing code.

Code completion

Code completion allows you to quickly enter commonly used code snippets by providing a list of possible completions for the current cursor position.

Intelligent code completion is an essential tool for programmers as it suggests possible completions for statements or expressions as they are typed.

Refactoring

Refactoring allows you to make changes to your code without breaking it. For example, you can rename a variable or method without affecting how the code works.

Version control

Version control allows you to track changes made to your code over time and merge changes from multiple developers working on the same project.

Debugging

Debugging features help you to find and fix errors in your code before releasing it into production.

Code analysis tools can help to find bugs, as well as source code refactoring tools that make it easier to update code without breaking it or introducing new bugs into the application.

Code linting

Linting is the process of catching errors, and many IDEs can do that based on a rudimentary schema of expected syntax.

A great IDE suggests fixes for errors in your code as auto-corrections. The IDE should suggest fixes based on programming language specifications. Automated corrections in an IDE can save a lot of manual work.

Code correction

IDEs suggest fixes based on the way the language works in real life. This can save a lot of time, but can also break projects if applied incorrectly.

Project awareness

IDEs provide a number of features that can help you with awareness of your project’s overall picture. For example, they can bundle code and assets together so that when you’re ready to publish, it’s all in one place.

They can also abstract the structure of your code and its libraries, which gives you a better understanding of how everything is connected. This granularity is important because it depends on your own skills: the more experienced you are, the more detailed information you’ll need about your project in order to work effectively.

Another helpful feature for developers is powerful search abilities to surface files, libraries, and assets from directories when starting or working on a project. This makes it easy to find what you need and speeds up the development process.

Environment awareness

In order to be an effective developer, it is important to be aware of the environment in which your code will run.

For example, you need to know what operating system and hardware platform your code will be used on. You also need to understand the dependencies that your code has on other libraries and software. In some cases, you may need to build your code specifically for a certain environment (such as a particular version of Windows or Linux).

An IDE can help manage different versions of tools. Integration of development workflow tools makes the IDE more powerful and efficient for developers.

An IDE typically manages the build process and helps ensure consistent results between builds. The compiler, linker, etc., are software building tools are used in conjunction with other build-related aspects of development such as packaging and deployment.

Your code-editing application should also offer some features that make the process of compiling and launching a debugger more convenient.

How to Find a Good IDE

When you’re just starting out in development, it can be tough to know which Integrated Development Environment (IDE) is right for you. With so many different options available, it can be hard to decide which one will make your coding experience the best. Here are a few tips to help you find the IDE that’s perfect for you:

  • First, think about what languages you want to use. Different IDEs support different languages, so make sure the IDE you choose supports the ones you’re most comfortable with.
  • Second, consider how comfortable you feel with using an IDE. Some IDEs can be quite overwhelming when you’re first starting out; if you’re not confident in your abilities yet, try a less complicated option until you feel more comfortable.
  • Finally, take the time to try out a few different IDEs before settling on one. Every developer has their own preferences, and chances are good that you won’t love every IDE out there. Try out a few until you find one that feels like home.

There are a few things you need to take into account.

  • How comfortable are you with the interface?
  • Is the IDE easy enough to use that you won’t get frustrated and give up?
  • Does it come with all the features you need?
  • Will it work with the language or languages you want to use?

One of the most important factors is how familiar you are with the interface. If it’s something that feels overwhelming or difficult to navigate, chances are you’re not going to stick with it for very long.

Look for an IDE that has a user-friendly interface and plenty of helpful tutorials if needed.

Another thing to consider is whether or not the IDE comes with all of the features you’ll need. While some IDEs offer more features than others, most have everything from code completion tools and syntax highlighting to debugging capabilities and version control integration. And of course, it’s important to make sure that your chosen IDE supports your desired programming language(s).

Check for specific features that are unique to a certain IDE. For example, if there’s one thing PyCharm does well, it’s Python development!

Use an IDE to Code Faster & Easier

An IDE makes coding more efficient by providing support for syntax highlighting, code completion, project management, and much more. By using an IDE, you can speed up your workflow and focus on the task at hand.

If you’re looking for a development environment because you want to write better code faster, consider signing up for a free SitePoint account. You’ll be able to access some of the SitePoint Premium library‘s most comprehensive coding resources even without a subscription.

Learn JavaScript with SitePoint

For example, Learn to Code with JavaScript is an excellent way to learn to code while also learning JavaScript. You’ll learn core development skills over 15 sections that are as comprehensive as they are breezy.

With access to a large collection of high-quality books and courses, you’ll be well on your way to becoming a proficient web developer.

Original article source at: https://www.sitepoint.com

#ide #development 

How Does It Enable Faster Development? What is an IDE?
Monty  Boehm

Monty Boehm

1669436220

How to Running Scala Application In Eclipse IDE Using Sbteclipse

This blog post will help you understand how to install and set up sbteclipse plugin for running Scala application in Eclipse IDE. First, let’s understand what is SBT. Wikipedia defines it as the “the de facto build tool for the Scala community, used by the Lift web framework and Play Framework.” It is essentially an an open source build tool for Scala and Java projects, similar to Java’s Maven or Ant.

Its main features are:
• Native support for compiling Scala code and integrating with many Scala test frameworks
• Build descriptions written in Scala using a DSL
• Dependency management using Ivy (which supports Maven-format repositories)
• Continuous compilation, testing, and deployment
• Integration with the Scala interpreter for rapid iteration and debugging
• Support for mixed Java/Scala projects

Sbteclipse however, is a plugin for sbt 0.13. In order to setup this plugin, one should have sbt installed first on their system.
Let us download sbt first.

Command: wget http://dl.bintray.com/sbt/rpm/sbt-0.13.8.rpm

command1-running-scala-application-in-eclipse

command2-running-scala-application-in-eclipse

Command:  sudo yum localinstall sbt-0.13.8.rpm

command3-running-scala-application-in-eclipse

command4-running-scala-application-in-eclipse

Command: wget http://dl.bintray.com/sbt/rpm/sbt-0.13.8.rpm

Now let’s check the sbt version.
Command: sbt –version

5-running-scala-application-in-eclipse

To import your project to Eclipse, you must add sbteclipse to your plugin definition file. You can use either the global one at ~/.sbt/plugins/plugins.sbt or the project-specific one at PROJECT_DIR/project/plugins.sbt:

Let’s add the plugin globally so that we need not add it in each project individually. The steps for this are:

Make a plugin directory inside .sbt/0.13/
Command: mkdir -p .sbt/0.13/plugins
Create a file plugins.sbt
Command: sudo gedit .sbt/0.13/plugins/plugins.sbt

6-running-scala-application-in-eclipse

In order to add the sbteclipse plugin, just add this setting to this file.

addSbtPlugin(“com.typesafe.sbteclipse” % “sbteclipse-plugin” % “4.0.0”)

7-running-scala-application-in-eclipse

Now the sbteclipse plugin is set.
Once the installation is complete, we will be able to use the additional command eclipse when we launch sbt.
These are the steps to run a project directly by sbt. We will next learn how to run the project in eclipse.
sbt package

mkdir helloworld
cd helloworld/
mkdir -p src/main/scala
sudo gedit src/main/scala/hello.scala

8-running-scala-application-in-eclipse

Put this code:

object Hello {

def main(args : Array[String]) = {
println(“Hello World”)
}
}

Create a build.sbt file inside the helloworld directory.

sudo gedit build.sbt

9-running-scala-application-in-eclipse

Below is a very basic sbt file, where you can add dependencies needed for your application.

sbt package

10-running-scala-application-in-eclipse

This will create the jar file to run this application. Now run this command in order to run your application.

Command: spark-submit –class “Hello” –master local[2] target/scala-2.10/hello-world_2.10-1.0.jar

11-running-scala-application-in-eclipse

Sbt eclipse

The command below will make the project eclipse compatible and you will be able to import this project in eclipse and run it successfully.
Command: sbt eclipse

12-running-scala-application-in-eclipse

Go to Scala IDE , File -> Import

13-running-scala-application-in-eclipse

Select root directory helloworld.

14-running-scala-application-in-eclipse

You can now see that you can import this project by clicking on Finish.

15-running-scala-application-in-eclipse

Now, let’s run it as Scala application.

16-running-scala-application-in-eclipse

Just FYI, when you are setting SparkConf, always remember to set Master as below.

17-running-scala-application-in-eclipse

Now you can run your application.

18-running-scala-application-in-eclipse

Got a question for us? Please mention it in the comments section and we will get back to you or you can also join our Scala Certification today..

Related Posts:

Apache Spark Vs Hadoop MapReduce

5 Reasons to Learn Apache Spark

Apache Kafka with Spark Streaming: Real-Time Analytics Redefined

Original article source at: https://www.edureka.co/

#scala #ide #application 

How to Running Scala Application In Eclipse IDE Using Sbteclipse

Una Guía Completa De Heroku Postgres

Recientemente estaba haciendo un análisis, y en este análisis quería tomar los datos de una base de datos remota. Anteriormente usé Azure, pero tuve que eliminar la base de datos después de aprender. De lo contrario, deducirán dinero de su saldo de Azure. Esta no es una buena experiencia para los estudiantes. Así que estoy buscando una base de datos gratuita en la que no tenga que preocuparme por el dinero. Luego me enteré de Heroku Postgres.

Heroku ofrece un plan gratuito para alojar la base de datos PostgreSQL. Esto es muy útil cuando es un principiante o desea una base de datos alojada rápidamente para experimentos. Si desea ampliar la capacidad de su base de datos, debe pagar una pequeña cantidad, incluso un estudiante puede permitírselo.

En este artículo, voy a explicar:

  • Cómo crear una base de datos usando Heroku.
  • Cómo obtener las credenciales para acceder a la base de datos.
  • Cómo crear una tabla en esta base de datos y ejecutar consultas.

Entonces, sin más preámbulos, comencemos.

Crear una base de datos en Heroku

Para crear una base de datos en Heroku, solo siga los pasos a continuación como se menciona:

Paso 1: Inicie sesión en Heroku

Simplemente vaya a https://www.heroku.com/. Si ya tiene una cuenta en Heroku, simplemente presione el botón Iniciar sesión . De lo contrario, presione el botón Registrarse y cree una nueva cuenta siguiendo las instrucciones.

HEROKU

La página de inicio de sesión de Heroku

Paso 2: crea una nueva aplicación

Después de iniciar sesión, debe crear una nueva aplicación. Puede dar cualquier nombre a esta aplicación, ya que esta aplicación solo se usa para acceder a la base de datos. Entonces, el nombre no importa.

crear nueva aplicación |  HEROKUTenemos que hacer clic en la opción 'Crear nueva aplicación'

 

Paso 3: agregue una base de datos PostgreSQL

Después de crear una aplicación, ábrala y vaya a la pestaña de recursos. Desde allí, debe buscar 'Heroku Postgres' en la sección de complementos. Después de eso, seleccione esa opción y actívela.

Base de datos PostgreSQL |  HEROKUHabilitación del complemento Heroku Postgres

Ahora ha creado con éxito una base de datos en Heroku.

Obtener las Credenciales

Ahora, para acceder a esta base de datos, tenemos que conocer las credenciales. Para ello, tenemos que hacer clic en el complemento Heroku Postgres. Después de eso, se nos lleva a otra ventana donde tenemos que ir a la pestaña 'Configuración'. Aquí encontraremos nuestras credenciales.

Obtener las Credenciales

Nota : elimino esta base de datos después de escribir este artículo por motivos de seguridad.

Agregar tabla en la base de datos

Ahora, es el momento de agregar datos a nuestra base de datos. Para ello, puede utilizar cualquier IDE de su elección. Estoy usando DataGrip , un IDE multiplataforma para bases de datos y SQL de Jetbrains. Lamentablemente, este software no es gratuito. Tienes que pagar por esto. Pero si eres estudiante, puedes obtenerlo suscribiéndote a Github Student Developer Pack . Si no tiene DataGrip, no se preocupe, también lo explicaré para el código de Visual Studio .

Conexión de la base de datos en DataGrip

Si tiene DataGrip, siga los pasos a continuación. Si no tiene DataGrip, simplemente desplácese hacia abajo y lea desde Conexión de la base de datos desde la Sección de código de Visual Studio :

Paso 1: Crear un proyecto

Al principio, tienes que crear un nuevo proyecto. Para ello, haga doble clic en el icono de DataGrip en el escritorio. Verá un cuadro de diálogo. Desde allí, haga clic en la opción Nuevo proyecto . Luego se le pide el nombre del proyecto. Asígnele un nombre como desee y haga clic en Aceptar. Se creará un nuevo proyecto.

base de datos en datagripCreando un proyecto

Paso 2: crear una fuente de datos

Después de crear un proyecto, debe crear una fuente de datos. Para ello, haga clic en el Explorador de base de datos en el lado izquierdo de la pantalla. Luego navegue a + -> Fuente de datos -> PostgreSQL. Puede ver un cuadro de diálogo que solicita las credenciales. Complete esos campos, haga clic en Aceptar y espere un momento. Si todo está bien, estará conectado a Heroku Postgres.

Creando una fuente de datos PostgreSQLTenemos que dar las credenciales aquí

Paso 3: agregar una tabla al esquema de la base de datos

Si está familiarizado con PostgreSQL, sabrá que ya existe un esquema disponible en la base de datos de PostgreSQL denominado Public. Vea la imagen de abajo.

El esquema de la base de datos pública

En el esquema público , también verá una carpeta llamada tablas . En esta carpeta crearemos nuestra tabla. Si hace clic derecho en esta carpeta, verá la opción Importar datos desde archivo . Haga clic en esta opción y seleccione el archivo desde el que desea importar la tabla. El formato de archivo debe estar en .csv , otros formatos de archivo no funcionarán.

Elegir la opción Importar datos desde archivo

Seleccionando el archivo .csv requerido

Después de seleccionar el archivo, puede ver un cuadro de diálogo que se muestra a continuación desde donde puede realizar algunos cambios según sus necesidades y presionar Importar. ¡Voila! Ha creado correctamente una base de datos en la base de datos Postgres de Heroku.

Conexión de la base de datos desde VS Code

Ahora estoy usando Visual Studio Code. Este IDE es gratuito para todos. Si desea conectar la base de datos Heroku Postgres en código VS, siga los pasos a continuación.

Paso 1: instale la extensión PostgreSQL en el código VS

Si ya está familiarizado con el código VS, ya sabrá que sin la extensión, el código VS no es nada. Entonces, para conectar la base de datos, tenemos que instalar la base de datos llamada PostgreSQL por Chris Kolkman. Vea la imagen a continuación.

La extensión PostgreSQL

Con solo escribir la publicación de la palabra clave , puede ver fácilmente que la extensión aparece en la parte superior del resultado de búsqueda. También puedes instalarlo haciendo clic en este enlace. Después de eso, reinicie el código VS y estará listo para comenzar.

Paso 2: Conexión a la base de datos

Ahora tienes que conectarte a la base de datos. Para esto, debe presionar Ctrl + Shift + P . abrirá la paleta de comandos del código VS. Aquí debe escribir Postgresql, esto mostrará el comando relacionado con la extensión PostgreSQL . Desde allí, debe seleccionar el comando PostgreSQL: Agregar conexión .

El comando Agregar conexión

Después de seleccionar este comando, se le solicitan las credenciales una por una, solo complete esos campos y presione Entrar. Aquí se solicita un campo adicional, el tipo de conexión: conexión segura o conexión estándar . En este caso, tienes que seleccionar Conexión segura . Si todo está bien, no ve ningún error y después de eso, está conectado con éxito a la base de datos.

Paso 3: Hacer una tabla en esta base de datos

Ahora debe hacer clic en PostgreSQL Explorer desde el panel izquierdo. Si la base de datos está conectada, verá algo como la imagen a continuación:

Haga clic con el botón derecho en la conexión y seleccione la opción Nueva consulta . Se abrirá un nuevo archivo en el lado derecho.

Seleccionando la opción Nueva Consulta

herokuSe crea un nuevo archivo llamado sin título-1 después de seleccionar la opción

Ahora en este archivo, podemos ejecutar cualquier consulta. Como queremos crear una tabla, ejecutemos una consulta que cree una tabla en el esquema de la base de datos pública . Simplemente escriba la consulta a continuación, selecciónela y ejecútela haciendo clic derecho sobre ella.

CREATE TABLE IF NOT EXISTS chocolate_database(
   ref INT,
   company TEXT,
   company_location TEXT,
   review_date INT,
   country_of_bean_origin TEXT,
   bar_name TEXT,
   cocoa_percent TEXT,
   ingredients TEXT,
   most_memorable_characteristic TEXT,
   rating NUMERIC
);

Si todo está bien, verás que se crea una tabla. Esta es una tabla de demostración. Intenta hacer el experimento para una mejor comprensión.

Ahora hay una cosa en la que enfrentas dificultades. En DataGrip, puede importar fácilmente los datos de un archivo haciendo clic derecho sobre él, pero este no es el caso. La extensión PostgreSQL no brinda esta funcionalidad aquí. Entonces, aquí debe usar la herramienta de línea de comandos psql . Para ello, abra el menú Inicio y busque psql. Obtendrá el resultado algo como la imagen de abajo.

herokuabriendo psql

Se le solicitan las credenciales después de abrir la herramienta de línea de comandos psql nuevamente una por una. Después de eso, da el siguiente comando:

copy chocolate_database FROM  DELIMITER  CSV HEADER

Vea la imagen de abajo para que quede más claro.

heroku

Si todo está bien, obtendrá una COPIA de salida. Si desea utilizar mi archivo, siga este enlace y descargue el archivo .csv.

No lo confunda con el comando de copia para psql y COPY en PostgreSQL. Necesita acceso de superusuario para ejecutar el comando COPY. Pero para copiar, no necesitas eso.

Conclusión de Heroku

¡Viva! Lo hiciste. Ahora puede acceder fácilmente a Heroku Postgres desde cualquier IDE. El proceso para conectarse a una base de datos remota es casi el mismo para todos los proveedores de bases de datos en la nube. Entonces, si comprende el proceso de conexión de una base de datos remota específica, no tendrá dificultades con las demás.

Eso es todo por ahora. Volveré de nuevo con otro artículo. hasta entonces, ¡estén atentos! 

Fuente: https://www.analyticsvidhya.com/blog/2022/06/a-comprehensive-guide-to-heroku-postgres/

#heroku #ide 

Una Guía Completa De Heroku Postgres
Rui  Silva

Rui Silva

1661228760

Um Guia Completo Para Heroku Postgres

Recentemente eu estava fazendo uma análise, e nesta análise, eu queria pegar os dados de um banco de dados remoto. Eu usava o Azure anteriormente, mas tive que excluir o banco de dados depois de aprender. Caso contrário, eles deduzirão dinheiro do seu saldo do Azure. Esta não é uma boa experiência para os alunos. Então, estou procurando um banco de dados gratuito no qual não precise me preocupar com o dinheiro. Então eu vim a conhecer o Heroku Postgres.

A Heroku oferece um plano gratuito para hospedar o banco de dados PostgreSQL. Isso é muito útil quando você é iniciante ou deseja um banco de dados hospedado rapidamente para experimentos. Se você quiser estender a capacidade do seu banco de dados, terá que pagar uma pequena quantia por isso, até mesmo um estudante pode pagar.

Neste artigo, vou explicar –

  • Como criar um banco de dados usando Heroku.
  • Como obter as credenciais para acessar o banco de dados.
  • Como criar uma tabela neste banco de dados e executar consultas.

Então, sem mais delongas, vamos começar.

Criando um banco de dados no Heroku

Para criar um banco de dados no Heroku, basta seguir os passos abaixo conforme mencionado:

Etapa 1: faça login no Heroku

Basta acessar https://www.heroku.com/. Se você já possui uma conta no Heroku, basta pressionar o botão Login . Caso contrário, pressione o botão Sign-up e crie uma nova conta seguindo as instruções.

HEROKU

A página de login do Heroku

Etapa 2: criar um novo aplicativo

Após o login, você deve criar um novo aplicativo. Você pode dar qualquer nome a este aplicativo, pois este aplicativo é usado apenas para acessar o banco de dados. Então, o nome não importa.

criar novo aplicativo |  HEROKUTemos que clicar na opção 'Criar novo aplicativo'

 

Etapa 3: adicionar um banco de dados PostgreSQL

Depois de criar um aplicativo, abra o aplicativo e vá para a guia de recursos. A partir daí, você deve procurar por 'Heroku Postgres' na seção de complementos. Depois disso, selecione essa opção e ative-a.

Banco de dados PostgreSQL |  HEROKUAtivando o complemento Heroku Postgres

Agora você criou com sucesso um banco de dados no Heroku.

Obtendo as credenciais

Agora para acessar esse banco de dados, temos que saber as credenciais. Para isso, temos que clicar no complemento Heroku Postgres. Depois disso, somos navegados para outra janela onde temos que ir para a guia 'Configurações'. Aqui encontraremos nossas credenciais.

Obtendo as credenciais

Nota : Eu excluo este banco de dados depois de escrever este artigo por motivos de segurança.

Adicionando Tabela no Banco de Dados

Agora, é hora de adicionar dados ao nosso banco de dados. Para isso, você pode usar qualquer IDE de sua escolha. Estou usando o DataGrip , um IDE multiplataforma para bancos de dados e SQL da Jetbrains. Infelizmente, este software não é gratuito. Você tem que pagar por isso. Mas se você é um estudante, pode obtê-lo assinando o Github Student Developer Pack . Se você não tiver o DataGrip, não se preocupe, vou explicar também para o código do Visual Studio .

Conectando o banco de dados no DataGrip

Se você tiver DataGrip, siga as etapas abaixo. Se você não tiver o DataGrip, basta rolar para baixo e ler em Conectando o banco de dados na seção de código do Visual Studio :

Etapa 1: criar um projeto

Primeiro, você precisa criar um novo projeto. Para isso, clique duas vezes no ícone DataGrip na área de trabalho. Você verá uma caixa de diálogo. A partir daí, clique na opção Novo Projeto . Em seguida, é solicitado o nome do projeto. Dê-lhe um nome como desejar e clique em OK. Um novo projeto será criado.

banco de dados em datagripCriando um projeto

Etapa 2: criar uma fonte de dados

Depois de criar um projeto, você precisa criar uma fonte de dados. Para isso, clique no Database Explorer do lado esquerdo da tela. Em seguida, navegue até + -> Fonte de dados -> PostgreSQL. Você pode ver uma caixa de diálogo solicitando credenciais. Preencha esses campos, clique em OK e aguarde um pouco. Se tudo estiver bem, você será conectado ao Heroku Postgres.

Criando uma fonte de dados PostgreSQLTemos que fornecer as credenciais aqui

Etapa 3: Adicionando Tabela ao Esquema do Banco de Dados

Se você estiver familiarizado com o PostgreSQL, saberá que já existe um esquema disponível no banco de dados PostgreSQL chamado Public. Veja a imagem abaixo.

O esquema de banco de dados público

No esquema Público , você também verá uma pasta chamada tabelas . Nesta pasta, vamos criar nossa tabela. Se você clicar com o botão direito do mouse nesta pasta, verá a opção Importar dados do arquivo . Clique nesta opção e selecione o arquivo do qual deseja importar a tabela. O formato do arquivo deve estar em .csv , outros formatos de arquivo não funcionarão.

Escolhendo a opção Importar dados do arquivo

Selecionando o arquivo .csv necessário

Depois de selecionar o arquivo, você pode ver uma caixa de diálogo que é mostrada abaixo, onde você pode fazer algumas alterações de acordo com suas necessidades e pressionar Importar. Voilá! Você criou com sucesso um banco de dados no banco de dados Heroku Postgres.

Conectando o banco de dados do VS Code

Agora estou usando o Visual Studio Code. Este IDE é gratuito para todos. Se você deseja conectar o banco de dados Heroku Postgres no código VS, siga as etapas abaixo.

Etapa 1: instalar a extensão PostgreSQL no código VS

Se você já está familiarizado com o código VS, já sabe que sem a extensão, o código VS não é nada. Então, para conectar o banco de dados, temos que instalar o banco de dados chamado PostgreSQL por Chris Kolkman. Veja a imagem abaixo.

A extensão PostgreSQL

Basta digitar a palavra-chave post , para ver facilmente que a extensão está no topo do resultado da pesquisa. Você também pode instalá-lo clicando neste link. Depois disso, reinicie o código VS e você está pronto para começar.

Etapa 2: Conectando-se ao banco de dados

Agora você precisa se conectar ao banco de dados. Para isso, você deve pressionar Ctrl + Shift + P . ele abrirá a paleta de comandos do código VS. Aqui você deve digitar Postgresql, isso exibirá o comando relacionado à extensão PostgreSQL . A partir daí, você deve selecionar o comando PostgreSQL: Add Connection .

O comando Adicionar conexão

Após selecionar este comando, você será solicitado as credenciais uma a uma, basta preencher esses campos e pressionar Enter. Um campo adicional é solicitado aqui, o tipo de conexão – Conexão Segura ou Conexão Padrão . Nesse caso, você deve selecionar Conexão segura . Se tudo estiver bem, você não verá nenhum erro e, depois disso, estará conectado com sucesso ao banco de dados.

Passo 3: Fazendo uma tabela neste banco de dados

Agora você precisa clicar no PostgreSQL Explorer no painel esquerdo. Se o banco de dados estiver conectado, você verá algo como a imagem abaixo:

Clique com o botão direito do mouse na conexão e selecione a opção Nova Consulta . Ele abrirá um novo arquivo no lado direito.

Selecionando a opção Nova Consulta

heróikuUm novo arquivo chamado untitled-1 é criado após selecionar a opção

Agora, neste arquivo, podemos executar qualquer consulta. Como queremos criar uma tabela, vamos executar uma consulta que cria uma tabela no esquema de banco de dados Público . Basta escrever a consulta abaixo, selecioná-la e executá-la clicando com o botão direito do mouse.

CREATE TABLE IF NOT EXISTS chocolate_database(
   ref INT,
   company TEXT,
   company_location TEXT,
   review_date INT,
   country_of_bean_origin TEXT,
   bar_name TEXT,
   cocoa_percent TEXT,
   ingredients TEXT,
   most_memorable_characteristic TEXT,
   rating NUMERIC
);

Se tudo estiver bem, você verá que uma tabela é criada. Esta é uma tabela de demonstração. Tente fazer o experimento para uma melhor compreensão.

Agora há uma coisa em que você enfrenta dificuldades. No DataGrip, você pode importar facilmente os dados de um arquivo clicando com o botão direito do mouse, mas aqui não é o caso. A extensão PostgreSQL não oferece essa funcionalidade aqui. Então, aqui você tem que usar a ferramenta de linha de comando psql . Para isso, abra o menu Iniciar e procure por psql. Você obterá o resultado algo como a imagem abaixo.

heróikuabrindo psql

As credenciais são solicitadas após abrir a ferramenta de linha de comando psql novamente, uma por uma. Após isso, dê o comando abaixo:

copy chocolate_database FROM  DELIMITER  CSV HEADER

Veja a imagem abaixo para ficar mais claro.

heróiku

Se tudo estiver bem, você receberá uma saída COPY . Se você quiser usar meu arquivo, siga este link e baixe o arquivo .csv.

Não confunda com o comando copy para psql e COPY no PostgreSQL. Você precisa de acesso de superusuário para executar o comando COPY. Mas para copiar, você não precisa disso.

Conclusão do Heroku

Viva! Você conseguiu. Agora você pode acessar facilmente o Heroku Postgres de qualquer IDE. O processo de conexão a um banco de dados remoto é quase o mesmo para todos os provedores de banco de dados em nuvem. Então, se você entender o processo de conectar um banco de dados remoto específico, não terá dificuldades com os outros.

Então, isso é tudo por enquanto. Voltarei com outro artigo. até lá, fique ligado! 

Fonte: https://www.analyticsvidhya.com/blog/2022/06/a-comprehensive-guide-to-heroku-postgres/

#heroku #ide 

Um Guia Completo Para Heroku Postgres
Hong  Nhung

Hong Nhung

1661225040

Hướng Dẫn Toàn Diện Về Heroku Postgres

Gần đây, tôi đang thực hiện một phân tích và trong phân tích này, tôi muốn lấy dữ liệu từ một cơ sở dữ liệu từ xa. Trước đây tôi đã sử dụng Azure, nhưng tôi đã phải xóa cơ sở dữ liệu sau khi học. Nếu không, họ sẽ trừ tiền từ số dư Azure của bạn. Đây không phải là một trải nghiệm tốt cho sinh viên. Vì vậy, tôi đang tìm kiếm một cơ sở dữ liệu miễn phí mà tôi không phải lo lắng về tiền bạc. Sau đó, tôi biết đến Heroku Postgres.

Heroku cung cấp gói miễn phí để lưu trữ cơ sở dữ liệu PostgreSQL. Điều này rất hữu ích khi bạn là người mới bắt đầu hoặc bạn muốn có một cơ sở dữ liệu được lưu trữ nhanh chóng cho các thử nghiệm. Nếu bạn muốn mở rộng dung lượng cơ sở dữ liệu của mình, bạn phải trả một số tiền nhỏ cho nó, ngay cả một sinh viên cũng có thể mua được.

Trong bài viết này, tôi sẽ giải thích -

  • Cách tạo cơ sở dữ liệu bằng Heroku.
  • Cách lấy thông tin đăng nhập để truy cập cơ sở dữ liệu.
  • Cách tạo bảng trong cơ sở dữ liệu này và chạy các truy vấn.

Vì vậy, không cần phải quảng cáo thêm, chúng ta hãy bắt đầu.

Tạo cơ sở dữ liệu trong Heroku

Để tạo cơ sở dữ liệu trong Heroku, chỉ cần làm theo các bước dưới đây như đã đề cập:

Bước 1: Đăng nhập vào Heroku

Chỉ cần truy cập https://www.heroku.com/. Nếu bạn đã có tài khoản trong Heroku, chỉ cần nhấn nút Đăng nhập . Nếu không, hãy nhấn nút Đăng ký và tạo tài khoản mới bằng cách làm theo hướng dẫn.

HEROKU

Trang đăng nhập của Heroku

Bước 2: Tạo ứng dụng mới

Sau khi đăng nhập, bạn phải tạo một ứng dụng mới. Bạn có thể đặt bất kỳ tên nào cho ứng dụng này vì ứng dụng này chỉ được sử dụng để truy cập cơ sở dữ liệu. Vì vậy, tên không quan trọng.

tạo ứng dụng mới |  HEROKUChúng tôi phải nhấp vào tùy chọn 'Tạo ứng dụng mới'

 

Bước 3: Thêm cơ sở dữ liệu PostgreSQL

Sau khi tạo ứng dụng, hãy mở ứng dụng và chuyển đến tab tài nguyên. Từ đó, bạn phải tìm kiếm 'Heroku Postgres' trong phần bổ trợ. Sau đó, chọn tùy chọn đó và kích hoạt nó.

Cơ sở dữ liệu PostgreSQL |  HEROKUBật tiện ích bổ sung Heroku Postgres

Bây giờ bạn đã tạo thành công cơ sở dữ liệu trong Heroku.

Nhận thông tin đăng nhập

Bây giờ để truy cập cơ sở dữ liệu này, chúng ta phải biết thông tin đăng nhập. Để làm được điều này, chúng ta phải nhấp vào tiện ích bổ sung Heroku Postgres. Sau đó, chúng tôi được điều hướng đến một cửa sổ khác, nơi chúng tôi phải chuyển đến tab 'Cài đặt'. Ở đây chúng tôi sẽ tìm thấy thông tin đăng nhập của chúng tôi.

Nhận thông tin đăng nhập

Lưu ý : Tôi xóa cơ sở dữ liệu này sau khi viết bài này vì mục đích bảo mật.

Thêm bảng vào cơ sở dữ liệu

Bây giờ, đã đến lúc thêm dữ liệu vào cơ sở dữ liệu của chúng tôi. Đối với điều này, bạn có thể sử dụng bất kỳ IDE nào mà bạn chọn. Tôi đang sử dụng DataGrip , một IDE đa nền tảng cho cơ sở dữ liệu và SQL của Jetbrains. Thật không may, phần mềm này không miễn phí. Bạn phải trả tiền cho điều này. Nhưng nếu bạn là sinh viên, bạn có thể nhận được nó bằng cách đăng ký Github Student Developer Pack . Nếu bạn không có DataGrip, đừng lo lắng, tôi cũng sẽ giải thích điều đó cho mã Visual Studio .

Kết nối cơ sở dữ liệu trong DataGrip

Nếu bạn có DataGrip, hãy làm theo các bước dưới đây. Nếu bạn không có DataGrip, chỉ cần cuộn xuống và đọc từ Kết nối cơ sở dữ liệu từ Phần mã Visual Studio :

Bước 1: Tạo dự án

Lúc đầu, bạn phải tạo một dự án mới. Để làm điều này, hãy nhấp đúp vào biểu tượng DataGrip trên màn hình nền. Bạn sẽ thấy một hộp thoại. Từ đó, nhấp vào tùy chọn Dự án mới . Sau đó, bạn được hỏi tên của dự án. Đặt tên cho nó như mong muốn của bạn và bấm OK. Một dự án mới sẽ được tạo.

cơ sở dữ liệu trong datagripTạo một dự án

Bước 2: Tạo nguồn dữ liệu

Sau khi tạo một dự án, bạn phải tạo một nguồn dữ liệu. Để làm điều này, hãy nhấp vào Trình khám phá cơ sở dữ liệu từ phía bên trái của màn hình. Sau đó, điều hướng đến + -> Nguồn dữ liệu -> PostgreSQL. Bạn có thể thấy một hộp thoại yêu cầu thông tin đăng nhập. Điền vào các trường đó, bấm OK và đợi một lúc. Nếu mọi thứ đều ổn, bạn sẽ được kết nối với Heroku Postgres.

Tạo nguồn dữ liệu PostgreSQLChúng ta phải cung cấp thông tin đăng nhập ở đây

Bước 3: Thêm bảng vào lược đồ cơ sở dữ liệu

Nếu bạn đã quen với PostgreSQL, bạn sẽ biết rằng đã có sẵn một lược đồ trong cơ sở dữ liệu PostgreSQL có tên là Public. Xem hình ảnh bên dưới.

Lược đồ cơ sở dữ liệu công khai

Trong lược đồ Công khai , bạn cũng sẽ thấy một thư mục có tên là các bảng . Trong thư mục này, chúng tôi sẽ tạo bảng của chúng tôi. Nếu bạn nhấp chuột phải vào thư mục này, bạn sẽ thấy tùy chọn Nhập dữ liệu từ tệp . Nhấp vào tùy chọn này và chọn tệp mà bạn muốn nhập bảng từ đó. Định dạng tệp phải ở dạng .csv , các định dạng tệp khác sẽ không hoạt động.

Chọn tùy chọn Nhập dữ liệu từ tệp

Chọn tệp .csv bắt buộc

Sau khi chọn tệp, bạn có thể thấy một hộp thoại được hiển thị bên dưới, từ đó bạn có thể thực hiện một số thay đổi theo nhu cầu của mình và nhấn Nhập. Thì đấy! Bạn đã tạo thành công cơ sở dữ liệu trong cơ sở dữ liệu Heroku Postgres.

Kết nối cơ sở dữ liệu từ VS Code

Bây giờ tôi đang sử dụng Visual Studio Code. IDE này miễn phí cho tất cả mọi người. Nếu bạn muốn kết nối cơ sở dữ liệu Heroku Postgres bằng mã VS, hãy làm theo các bước dưới đây.

Bước 1: Cài đặt tiện ích mở rộng PostgreSQL trong mã VS

Nếu bạn đã quen thuộc với mã VS, bạn sẽ biết rằng nếu không có phần mở rộng, mã VS không là gì cả. Vì vậy, để kết nối cơ sở dữ liệu, chúng ta phải cài đặt cơ sở dữ liệu có tên PostgreSQL của Chris Kolkman. Xem hình ảnh bên dưới.

Phần mở rộng PostgreSQL

Chỉ cần gõ bài đăng từ khóa , bạn có thể dễ dàng nhận thấy tiện ích mở rộng đang đứng đầu trong kết quả tìm kiếm. Bạn cũng có thể cài đặt nó bằng cách nhấp vào liên kết này . Sau đó, khởi động lại mã VS và bạn đã sẵn sàng.

Bước 2: Kết nối với cơ sở dữ liệu

Bây giờ bạn phải kết nối với cơ sở dữ liệu. Đối với điều này, bạn phải nhấn Ctrl + Shift + P. nó sẽ mở ra bảng lệnh của mã VS. Tại đây bạn phải gõ Postgresql, lệnh này sẽ hiển thị lệnh liên quan đến phần mở rộng PostgreSQL . Từ đó, bạn phải chọn lệnh PostgreSQL: Add Connection .

Lệnh Thêm kết nối

Sau khi chọn lệnh này, bạn sẽ được yêu cầu lần lượt các thông tin đăng nhập, chỉ cần điền vào các trường đó và nhấn Enter. Một trường bổ sung được hỏi ở đây, loại kết nối - Kết nối an toàn hoặc Kết nối tiêu chuẩn . Trong trường hợp này, bạn phải chọn Kết nối an toàn . Nếu mọi thứ đều ổn, bạn không thấy bất kỳ lỗi nào và sau đó, bạn đã kết nối thành công với cơ sở dữ liệu.

Bước 3: Lập bảng trong cơ sở dữ liệu này

Bây giờ bạn phải nhấp vào PostgreSQL Explorer từ khung bên trái. Nếu cơ sở dữ liệu được kết nối, bạn sẽ thấy một cái gì đó giống như hình ảnh bên dưới:

Nhấp chuột phải vào kết nối và chọn tùy chọn Truy vấn Mới . Nó sẽ mở một tệp mới ở phía bên phải.

Chọn tùy chọn Truy vấn mới

herokuMột tệp mới có tên là chưa có tiêu đề-1 được tạo sau khi chọn tùy chọn

Bây giờ trong tệp này, chúng tôi có thể chạy bất kỳ truy vấn nào. Khi chúng ta muốn tạo bảng, hãy chạy truy vấn tạo bảng trong lược đồ cơ sở dữ liệu Công khai . Chỉ cần viết truy vấn bên dưới, chọn nó và chạy nó bằng cách nhấp chuột phải vào nó.

CREATE TABLE IF NOT EXISTS chocolate_database(
   ref INT,
   company TEXT,
   company_location TEXT,
   review_date INT,
   country_of_bean_origin TEXT,
   bar_name TEXT,
   cocoa_percent TEXT,
   ingredients TEXT,
   most_memorable_characteristic TEXT,
   rating NUMERIC
);

Nếu mọi thứ đều ổn, bạn sẽ thấy rằng một bảng được tạo. Đây là một bảng demo. Hãy thử làm thí nghiệm để hiểu rõ hơn.

Bây giờ có một điều mà bạn phải đối mặt với khó khăn. Trong DataGrip, bạn có thể dễ dàng nhập dữ liệu từ tệp bằng cách nhấp chuột phải vào tệp, nhưng ở đây không phải như vậy. Phần mở rộng PostgreSQL không cung cấp chức năng này ở đây. Vì vậy, ở đây bạn phải sử dụng công cụ dòng lệnh psql . Đối với điều này, hãy mở menu Bắt đầu và tìm kiếm psql. Bạn sẽ nhận được kết quả giống như hình dưới đây.

herokumở psql

Bạn được yêu cầu cung cấp thông tin đăng nhập sau khi mở lại công cụ dòng lệnh psql lần lượt. Sau đó, đưa ra lệnh dưới đây:

copy chocolate_database FROM  DELIMITER  CSV HEADER

Xem hình ảnh dưới đây để làm rõ hơn.

heroku

Nếu mọi thứ đều ổn, bạn sẽ nhận được BẢN SAO đầu ra. Nếu bạn muốn sử dụng tệp của tôi, hãy nhấp vào liên kết này và tải xuống tệp .csv.

Đừng nhầm lẫn với lệnh sao chép psql và COPY trong PostgreSQL. Bạn cần quyền truy cập siêu người dùng để chạy lệnh COPY. Nhưng đối với bản sao, bạn không cần điều đó.

Kết luận cho Heroku

Tiếng hoan hô! Bạn đã thực hiện nó. Giờ đây, bạn có thể dễ dàng truy cập Heroku Postgres từ bất kỳ IDE nào. Quá trình kết nối với cơ sở dữ liệu từ xa gần giống nhau đối với tất cả các nhà cung cấp cơ sở dữ liệu đám mây. Vì vậy, nếu bạn hiểu quy trình kết nối một cơ sở dữ liệu từ xa cụ thể, bạn sẽ không gặp khó khăn với những cơ sở dữ liệu khác.

Vì vậy, đó là tất cả cho bây giờ. Tôi sẽ trở lại một lần nữa với một bài viết khác. cho đến lúc đó, hãy theo dõi! 

Nguồn: https://www.analyticsvidhya.com/blog/2022/06/a-comprehensive-guide-to-heroku-postgres/

#heroku #ide 

Hướng Dẫn Toàn Diện Về Heroku Postgres
许 志强

许 志强

1661225040

Heroku Postgres 综合指南

最近我在做一个分析,在这个分析中,我想从远程数据库中获取数据。之前用过Azure,但是学了之后不得不删除数据库。否则,他们将从您的 Azure 余额中扣除款项。这对学生来说不是一个好的体验。所以我正在寻找一个免费的数据库,我不必担心钱。然后我开始了解 Heroku Postgres。

Heroku 提供了托管 PostgreSQL 数据库的免费计划。当您是初学者或想要一个快速托管的数据库进行实验时,这非常有用。如果你想扩展你的数据库容量,你必须为此付出一点点,即使是学生也能负担得起。

在这篇文章中,我将解释——

  • 如何使用 Heroku 创建数据库。
  • 如何获取访问数据库的凭据。
  • 如何在此数据库中创建表并运行查询。

所以,事不宜迟,让我们开始吧。

在 Heroku 中创建数据库

要在 Heroku 中创建数据库,只需按照以下步骤操作:

第 1 步:登录 Heroku

只需访问 https://www.heroku.com/。如果您已经在 Heroku 中拥有帐户,只需按登录按钮。否则,请按注册按钮并按照说明创建一个新帐户。

HEROKU

Heroku 的登录页面

第 2 步:创建一个新应用程序

登录后,您必须创建一个新应用程序。你可以给这个应用程序起任何名字,因为这个应用程序只用于访问数据库。所以,名字并不重要。

创建新应用 |  HEROKU我们必须点击“创建新应用”选项

 

第 3 步:添加 PostgreSQL 数据库

创建应用程序后,打开应用程序并转到资源选项卡。从那里你必须在附加组件部分搜索“Heroku Postgres”。之后,选择该选项并启用它。

PostgreSQL 数据库 |  HEROKU启用 Heroku Postgres 插件

现在您已经在 Heroku 中成功创建了一个数据库。

获取凭证

现在要访问这个数据库,我们必须知道凭据。为此,我们必须点击 Heroku Postgres 插件。之后,我们将导航到另一个窗口,我们必须在其中转到“设置”选项卡。在这里,我们将找到我们的凭据。

获取凭证

注意:出于安全考虑,我在写完这篇文章后删除了这个数据库。

在数据库中添加表

现在,是时候将数据添加到我们的数据库了。为此,您可以使用您选择的任何 IDE。我正在使用DataGrip,这是 Jetbrains 的数据库和 SQL 的跨平台 IDE。不幸的是,这个软件不是免费的。你必须为此付出代价。但是如果你是学生,你可以通过订阅Github Student Developer Pack来获得它。如果您没有 DataGrip,请不要担心,我也会为Visual Studio 代码解释它。

在 DataGrip 中连接数据库

如果您有 DataGrip,请按照以下步骤操作。如果您没有 DataGrip,只需向下滚动并从 Visual Studio 代码部分的连接数据库中阅读:

第 1 步:创建项目

首先,您必须创建一个新项目。为此,双击桌面上的 DataGrip 图标。您将看到一个对话框。从那里,单击“新建项目”选项。然后你会被要求输入项目的名称。根据您的意愿为其命名,然后单击“确定”。将创建一个新项目。

datagrip 中的数据库创建项目

步骤 2:创建数据源

创建项目后,您必须创建数据源。为此,单击屏幕左侧的数据库资源管理器。然后导航到+ ->数据源-> PostgreSQL。您可以看到一个询问凭据的对话框。填写这些字段,单击确定并等待一段时间。如果一切正常,您将连接到 Heroku Postgres。

创建 PostgreSQL 数据源我们必须在此处提供凭据

第 3 步:将表添加到数据库模式

如果您熟悉 PostgreSQL,就会知道 PostgreSQL 数据库中已经有一个可用的模式,名为Public。见下图。

公共数据库架构

Public模式下,您还将看到一个名为tables的文件夹。在这个文件夹中,我们将创建我们的表。如果您右键单击此文件夹,您将看到“从文件导入数据”选项。单击此选项并选择要从中导入表的文件。文件格式必须为.csv,其他文件格式无效。

选择从文件导入数据选项

选择所需的 .csv 文件

选择文件后,您可以看到如下所示的对话框,您可以在其中根据需要进行一些更改,然后按导入。瞧!您成功地在 Heroku Postgres 数据库中创建了一个数据库。

从 VS Code 连接数据库

现在我正在使用 Visual Studio Code。这个 IDE 对所有人都是免费的。如果要在 VS 代码中连接 Heroku Postgres 数据库,请按照以下步骤操作。

第 1 步:在 VS 代码中安装 PostgreSQL 扩展

如果你已经熟悉 VS 代码,你就会知道,没有扩展,VS 代码什么都不是。因此,为了连接数据库,我们必须安装由Chris Kolkman命名为PostgreSQL的数据库。见下图。

PostgreSQL 扩展

只需输入关键字post,您就可以轻松地看到该扩展名在搜索结果的顶部。您也可以通过单击链接来安装它。之后,重新启动 VS 代码,就可以开始了。

第二步:连接数据库

现在您必须连接到数据库。为此,您必须按Ctrl + Shift + P。它将打开 VS 代码的命令面板。在这里你必须输入 Postgresql,这将显示与PostgreSQL扩展相关的命令。从那里,您必须选择PostgreSQL: Add Connection命令。

添加连接命令

选择此命令后,系统会要求您一一输入凭据,只需填写这些字段并按Enter。此处询问了一个附加字段,即连接类型——安全连接标准连接。在这种情况下,您必须选择Secure Connection。如果一切正常,您不会看到任何错误,之后您就成功连接到数据库。

第 3 步:在这个数据库中创建一个表

现在您必须从左侧窗格中单击PostgreSQL Explorer 。如果数据库已连接,您将看到如下图所示的内容:

右键单击连接并选择“新建查询”选项。它将在右侧打开一个新文件。

选择选项新查询

heroku选择选项后会创建一个名为 untitled-1 的新文件

现在在这个文件中,我们可以运行任何查询。由于我们要创建一个表,让我们运行一个查询,在公共数据库架构中创建一个表。只需编写以下查询,选择它并通过右键单击它来运行它。

CREATE TABLE IF NOT EXISTS chocolate_database(
   ref INT,
   company TEXT,
   company_location TEXT,
   review_date INT,
   country_of_bean_origin TEXT,
   bar_name TEXT,
   cocoa_percent TEXT,
   ingredients TEXT,
   most_memorable_characteristic TEXT,
   rating NUMERIC
);

如果一切正常,您将看到创建了一个表。这是一个演示表。尝试做实验以获得更好的理解。

现在有一件事你面临困难。在 DataGrip 中,您可以通过右键单击文件轻松地从文件中导入数据,但此处并非如此。PostgreSQL 扩展在这里没有提供这个功能。所以,在这里你必须使用psql 命令行工具。为此,打开开始菜单并搜索psql。您将得到类似于下图的结果。

heroku打开 psql

再次打开 psql 命令行工具后,系统会要求您提供凭据。之后,给出以下命令:

copy chocolate_database FROM  DELIMITER  CSV HEADER

请参阅下图以使其更清晰。

heroku

如果一切正常,您将获得输出 COPY 。如果您想使用我的文件,请点击链接并下载 .csv 文件。

不要与PostgreSQL中的 psql 和COPY的复制命令混淆。您需要超级用户访问权限才能运行 COPY 命令。但是对于副本,您不需要那个。

对 Heroku 的总结

欢呼!你做到了。现在,您可以从任何 IDE 轻松访问 Heroku Postgres。对于所有云数据库提供商,连接到远程数据库的过程几乎相同。因此,如果您了解连接特定远程数据库的过程,您就不会遇到其他问题。

所以,这就是现在的全部。我会带着另一篇文章再次回来。在那之前,敬请期待! 

资料来源:https ://www.analyticsvidhya.com/blog/2022/06/a-comprehensive-guide-to-heroku-postgres/

#heroku #ide 

Heroku Postgres 综合指南
伊藤  直子

伊藤 直子

1661221380

Heroku Postgres の総合ガイド

最近、分析を行っていましたが、この分析では、リモート データベースからデータを取得したいと考えていました。以前は Azure を使用していましたが、学習後にデータベースを削除する必要がありました。そうしないと、Azure の残高からお金が差し引かれます。これは学生にとって良い経験ではありません。そこで、お金を気にせずに使える無料のデータベースを探しています。その後、Heroku Postgres について知りました。

Heroku は、PostgreSQL データベースをホストするための無料プランを提供しています。これは、初心者の場合や、実験用にすばやくホストされたデータベースが必要な場合に非常に役立ちます。データベース容量を拡張したい場合は、少額の料金を支払う必要があり、学生でも余裕があります。

この記事では、説明します–

  • Heroku を使用してデータベースを作成する方法。
  • データベースにアクセスするための認証情報を取得する方法。
  • このデータベースにテーブルを作成し、クエリを実行する方法。

それでは、さっそく始めましょう。

Heroku でデータベースを作成する

Heroku でデータベースを作成するには、以下の手順に従ってください。

ステップ 1: Heroku にログインする

https://www.heroku.com/ にアクセスしてください。すでに Heroku にアカウントをお持ちの場合は、[ログイン] ボタンをクリックしてください。それ以外の場合は、[サインアップ] ボタンを押して、指示に従って新しいアカウントを作成してください。

ヘロク

Herokuのログインページ

ステップ 2: 新しいアプリを作成する

ログイン後、新しいアプリを作成する必要があります。このアプリはデータベースへのアクセスにのみ使用されるため、このアプリには任意の名前を付けることができます。だから、名前は関係ありません。

新しいアプリを作成 |  ヘロク「Create new app」オプションをクリックする必要があります

 

ステップ 3: PostgreSQL データベースを追加する

アプリを作成したら、アプリを開き、リソース タブに移動します。そこから、アドオン セクションで「Heroku Postgres」を検索する必要があります。その後、そのオプションを選択して有効にします。

PostgreSQL データベース |  ヘロクHeroku Postgres アドオンの有効化

これで、Heroku でデータベースが正常に作成されました。

資格情報の取得

このデータベースにアクセスするには、資格情報を知る必要があります。このためには、Heroku Postgres アドオンをクリックする必要があります。その後、「設定」タブに移動する必要がある別のウィンドウに移動します。ここで資格情報を見つけます。

資格情報の取得

: セキュリティ上の理由から、この記事を書いた後、このデータベースを削除します。

データベースにテーブルを追加する

次に、データベースにデータを追加します。これには、任意の IDE を使用できます。Jetbrains によるデータベースと SQL 用のクロスプラットフォーム IDE であるDataGripを使用しています。残念ながら、このソフトウェアは無料ではありません。あなたはこれを支払わなければなりません。ただし、学生の場合は、Github Student Developer Packにサブスクライブすることで入手できます。DataGrip をお持ちでない場合でも心配はいりません。Visual Studio コードについても説明します。

DataGrip でデータベースを接続する

DataGrip をお持ちの場合は、以下の手順に従ってください。DataGrip をお持ちでない場合は、下にスクロールして、Visual Studio コードセクションからデータベースを接続するをお読みください。

ステップ 1: プロジェクトを作成する

最初に、新しいプロジェクトを作成する必要があります。これには、デスクトップの DataGrip アイコンをダブルクリックします。ダイアログボックスが表示されます。そこから、[新しいプロジェクト] オプションをクリックします。次に、プロジェクトの名前を尋ねられます。任意の名前を付けて、[OK] をクリックします。新しいプロジェクトが作成されます。

データグリップのデータベースプロジェクトの作成

ステップ 2: データ ソースを作成する

プロジェクトを作成したら、データ ソースを作成する必要があります。このためには、画面の左側からデータベース エクスプローラーをクリックします。次に、+ ->データ ソース-> PostgreSQL に移動します。資格情報を求めるダイアログ ボックスが表示されます。これらのフィールドに入力し、[OK] をクリックして、しばらく待ちます。問題がなければ、Heroku Postgres に接続されます。

PostgreSQL データ ソースの作成ここで資格情報を提供する必要があります

ステップ 3: テーブルをデータベース スキーマに追加する

PostgreSQL に精通している場合は、 Publicという名前の PostgreSQL データベースで使用可能なスキーマが既に存在することをご存知でしょう。下の画像を参照してください。

パブリック データベース スキーマ

Publicスキーマの下には、tablesという名前のフォルダーも表示されます。このフォルダーに、テーブルを作成します。このフォルダを右クリックすると、[ファイルからデータをインポート] オプションが表示されます。このオプションをクリックして、テーブルをインポートするファイルを選択します。ファイル形式は.csvでなければなりません。他のファイル形式は機能しません。

[ファイルからデータをインポート] オプションの選択

必要な .csv ファイルの選択

ファイルを選択すると、以下に示すダイアログ ボックスが表示され、必要に応じて変更を加えて [インポート] を押すことができます。出来上がり!Heroku Postgres データベースにデータベースが正常に作成されました。

VS Code からデータベースを接続する

現在、Visual Studio Code を使用しています。この IDE は誰でも無料で使用できます。VS コードで Heroku Postgres データベースに接続する場合は、次の手順に従います。

ステップ 1: VS コードに PostgreSQL 拡張機能をインストールする

VS コードに精通している場合は、拡張機能がなければ VS コードに意味がないことを既にご存じでしょう。したがって、データベースを接続するには、 Chris KolkmanによるPostgreSQLという名前のデータベースをインストールする必要があります。下の画像を参照してください。

PostgreSQL 拡張機能

キーワードpostを入力するだけで、拡張機能が検索結果の上位に表示されることが簡単にわかります。このリンクをクリックしてインストールすることもできます。その後、VS コードを再起動すると準備完了です。

ステップ 2: データベースへの接続

次に、データベースに接続する必要があります。このためには、Ctrl + Shift + Pを押す必要があります。VS コードのコマンド パレットが開きます。ここで Postgresql と入力する必要があります。これにより、PostgreSQL拡張機能に関連するコマンドが表示されます。そこから、PostgreSQL: Add Connectionコマンドを選択する必要があります。

接続の追加コマンド

このコマンドを選択すると、資格情報を 1 つずつ入力するよう求められます。これらのフィールドに入力してEnter キーを押すだけです。ここで追加のフィールドとして、接続タイプ – Secure ConnectionまたはStandard Connectionを尋ねられます。この場合、Secure Connectionを選択する必要があります。すべてが正常であれば、エラーは表示されず、その後はデータベースに正常に接続されています。

ステップ 3: このデータベースにテーブルを作成する

ここで、左側のペインからPostgreSQL Explorerをクリックする必要があります。データベースが接続されている場合は、次の画像のように表示されます。

接続を右クリックし、[新しいクエリ] オプションを選択します。右側に新しいファイルが開きます。

オプションの選択 New Query

ヒロクオプションを選択すると、untitled-1 という名前の新しいファイルが作成されます。

このファイルでは、任意のクエリを実行できます。テーブルを作成したいので、パブリックデータベース スキーマにテーブルを作成するクエリを実行しましょう。以下のクエリを記述して選択し、右クリックして実行します。

CREATE TABLE IF NOT EXISTS chocolate_database(
   ref INT,
   company TEXT,
   company_location TEXT,
   review_date INT,
   country_of_bean_origin TEXT,
   bar_name TEXT,
   cocoa_percent TEXT,
   ingredients TEXT,
   most_memorable_characteristic TEXT,
   rating NUMERIC
);

問題がなければ、テーブルが作成されていることがわかります。これはデモテーブルです。理解を深めるために実験をしてみてください。

今、あなたが困難に直面していることが一つあります。DataGrip では、ファイルを右クリックしてファイルからデータを簡単にインポートできますが、ここではそうではありません。PostgreSQL 拡張機能は、ここではこの機能を提供しません。したがって、ここではpsql コマンドラインツールを使用する必要があります。これには、[スタート] メニューを開き、 psqlを検索します。下の画像のような結果が得られます。

ヒロクpsqlを開く

psql コマンドライン ツールを 1 つずつ開くと、資格情報の入力を求められます。その後、以下のコマンドを入力します。

copy chocolate_database FROM  DELIMITER  CSV HEADER

より明確にするために、下の画像を参照してください。

ヒロク

すべてがうまくいけば、出力 COPY が得られます。私のファイルを使用する場合は、このリンクをたどって .csv ファイルをダウンロードしてください。

psql のコピーコマンドとPostgreSQLのCOPYを混同しないでください。COPY コマンドを実行するには、スーパーユーザー アクセスが必要です。しかし、コピーの場合、それは必要ありません。

Herokuへの結論

万歳!やった。どの IDE からでも Heroku Postgres に簡単にアクセスできるようになりました。リモート データベースに接続するプロセスは、すべてのクラウド データベース プロバイダーでほぼ同じです。そのため、特定のリモート データベースに接続するプロセスを理解していれば、他のデータベースで問題に直面することはありません。

というわけで、今のところは以上です。別の記事でまた戻ってきます。それまで、お楽しみに! 

ソース: https://www.analyticsvidhya.com/blog/2022/06/a-comprehensive-guide-to-heroku-postgres/

#heroku #ide 

Heroku Postgres の総合ガイド
Thierry  Perret

Thierry Perret

1661221320

Un Guide Complet Sur Heroku Postgres

Récemment, je faisais une analyse, et dans cette analyse, je voulais prendre les données d'une base de données distante. J'utilisais auparavant Azure, mais j'ai dû supprimer la base de données après avoir appris. Sinon, ils déduiront de l'argent de votre solde Azure. Ce n'est pas une bonne expérience pour les étudiants. Je recherche donc une base de données gratuite dans laquelle je n'ai pas à me soucier de l'argent. Puis j'ai découvert Heroku Postgres.

Heroku propose un plan gratuit pour l'hébergement de la base de données PostgreSQL. Ceci est très utile lorsque vous êtes débutant ou que vous souhaitez une base de données hébergée rapidement pour des expériences. Si vous souhaitez étendre la capacité de votre base de données, vous devez payer un petit montant, même un étudiant peut se le permettre.

Dans cet article, je vais vous expliquer -

  • Comment créer une base de données avec Heroku.
  • Comment obtenir les informations d'identification pour accéder à la base de données.
  • Comment créer une table dans cette base de données et exécuter des requêtes.

Alors, sans plus tarder, commençons.

Créer une base de données dans Heroku

Pour créer une base de données dans Heroku, suivez simplement les étapes ci-dessous comme indiqué :

Étape 1 : Connectez-vous à Heroku

Allez simplement sur https://www.heroku.com/. Si vous avez déjà un compte dans Heroku, appuyez simplement sur le bouton Connexion . Sinon, appuyez sur le bouton Inscription et créez un nouveau compte en suivant les instructions.

HEROKU

La page de connexion de Heroku

Étape 2 : Créer une nouvelle application

Après vous être connecté, vous devez créer une nouvelle application. Vous pouvez donner n'importe quel nom à cette application car cette application n'est utilisée que pour accéder à la base de données. Donc, le nom n'a pas d'importance.

créer une nouvelle application |  HEROKUNous devons cliquer sur l'option "Créer une nouvelle application"

 

Étape 3 : Ajouter une base de données PostgreSQL

Après avoir créé une application, ouvrez l'application et accédez à l'onglet des ressources. À partir de là, vous devez rechercher « Heroku Postgres » dans la section des modules complémentaires. Après cela, sélectionnez cette option et activez-la.

Base de données PostgreSQL |  HEROKUActivation du module complémentaire Heroku Postgres

Vous avez maintenant créé avec succès une base de données dans Heroku.

Obtenir les identifiants

Maintenant, pour accéder à cette base de données, nous devons connaître les informations d'identification. Pour cela, nous devons cliquer sur le module complémentaire Heroku Postgres. Après cela, nous sommes dirigés vers une autre fenêtre où nous devons aller dans l'onglet "Paramètres". Ici, nous trouverons nos références.

Obtenir les identifiants

Note : Je supprime cette base de données après avoir écrit cet article pour des raisons de sécurité.

Ajouter une table dans la base de données

Il est maintenant temps d'ajouter des données à notre base de données. Pour cela, vous pouvez utiliser n'importe quel IDE de votre choix. J'utilise DataGrip , un IDE multiplateforme pour les bases de données et SQL de Jetbrains. Malheureusement, ce logiciel n'est pas gratuit. Vous devez payer pour cela. Mais si vous êtes étudiant, vous pouvez l'obtenir en vous abonnant au Github Student Developer Pack . Si vous n'avez pas DataGrip, ne vous inquiétez pas, je l'expliquerai également pour le code Visual Studio .

Connexion de la base de données dans DataGrip

Si vous avez DataGrip, suivez les étapes ci-dessous. Si vous n'avez pas DataGrip, faites simplement défiler vers le bas et lisez Connexion de la base de données à partir de la section Visual Studio Code :

Étape 1 : Créer un projet

Dans un premier temps, vous devez créer un nouveau projet. Pour cela, double-cliquez sur l'icône DataGrip sur le bureau. Vous verrez une boîte de dialogue. De là, cliquez sur l' option Nouveau projet . Ensuite, on vous demande le nom du projet. Donnez-lui un nom comme vous le souhaitez et cliquez sur OK. Un nouveau projet sera créé.

base de données dans datagripCréer un projet

Étape 2 : Créer une source de données

Après avoir créé un projet, vous devez créer une source de données. Pour cela, cliquez sur l' explorateur de base de données sur le côté gauche de l'écran. Ensuite, accédez à + -> Source de données -> PostgreSQL. Vous pouvez voir une boîte de dialogue demandant des informations d'identification. Remplissez ces champs, cliquez sur OK et attendez un moment. Si tout va bien, vous serez connecté à Heroku Postgres.

Création d'une source de données PostgreSQLNous devons donner les informations d'identification ici

Étape 3 : Ajouter une table au schéma de la base de données

Si vous êtes familier avec PostgreSQL, vous saurez qu'il existe déjà un schéma disponible dans la base de données PostgreSQL nommé Public. Voir l'image ci-dessous.

Le schéma de la base de données publique

Sous le schéma Public , vous verrez également un dossier nommé tables . Dans ce dossier, nous allons créer notre table. Si vous faites un clic droit sur ce dossier, vous verrez l' option Importer des données à partir d'un fichier . Cliquez sur cette option et sélectionnez le fichier à partir duquel vous souhaitez importer le tableau. Le format de fichier doit être en .csv , les autres formats de fichiers ne fonctionneront pas.

Choisir l'option Importer des données à partir d'un fichier

Sélection du fichier .csv requis

Après avoir sélectionné le fichier, vous pouvez voir une boîte de dialogue illustrée ci-dessous à partir de laquelle vous pouvez apporter des modifications en fonction de vos besoins et appuyer sur Importer. Voila ! Vous avez créé avec succès une base de données dans la base de données Heroku Postgres.

Connexion de la base de données à partir de VS Code

Maintenant, j'utilise Visual Studio Code. Cet IDE est gratuit pour tout le monde. Si vous souhaitez connecter la base de données Heroku Postgres en code VS, suivez les étapes ci-dessous.

Étape 1 : Installer l'extension PostgreSQL dans le code VS

Si vous connaissez déjà le code VS, vous saurez déjà que sans l'extension, le code VS n'est rien. Donc, pour connecter la base de données, nous devons installer la base de données nommée PostgreSQL par Chris Kolkman. Voir l'image ci-dessous.

L'extension PostgreSQL

En tapant simplement le mot-clé post , vous pouvez facilement voir que l'extension arrive en haut des résultats de la recherche. Vous pouvez également l'installer en cliquant sur ce lien. Après cela, redémarrez le code VS et vous êtes prêt à partir.

Étape 2 : Connexion à la base de données

Vous devez maintenant vous connecter à la base de données. Pour cela, vous devez appuyer sur Ctrl + Maj + P . cela ouvrira la palette de commandes du code VS. Ici, vous devez taper Postgresql, cela affichera la commande liée à l' extension PostgreSQL . À partir de là, vous devez sélectionner la commande PostgreSQL : Ajouter une connexion .

La commande Ajouter une connexion

Après avoir sélectionné cette commande, les informations d'identification vous sont demandées une par une, remplissez simplement ces champs et appuyez sur Entrée. Un champ supplémentaire est demandé ici, le type de connexion - Connexion sécurisée ou Connexion standard . Dans ce cas, vous devez sélectionner Connexion sécurisée . Si tout va bien, vous ne voyez aucune erreur et après cela, vous êtes connecté avec succès à la base de données.

Etape 3 : Créer une table dans cette base de données

Vous devez maintenant cliquer sur l' explorateur PostgreSQL dans le volet de gauche. Si la base de données est connectée, vous verrez quelque chose comme l'image ci-dessous :

Cliquez avec le bouton droit sur la connexion et sélectionnez l' option Nouvelle requête . Il ouvrira un nouveau fichier sur le côté droit.

Sélection de l'option Nouvelle requête

herokuUn nouveau fichier nommé sans titre-1 est créé après avoir sélectionné l'option

Maintenant, dans ce fichier, nous pouvons exécuter n'importe quelle requête. Comme nous voulons créer une table, exécutons une requête qui crée une table dans le schéma de la base de données publique . Écrivez simplement la requête ci-dessous, sélectionnez-la et exécutez-la en cliquant dessus avec le bouton droit de la souris.

CREATE TABLE IF NOT EXISTS chocolate_database(   ref INT,   company TEXT,   company_location TEXT,   review_date INT,   country_of_bean_origin TEXT,   bar_name TEXT,   cocoa_percent TEXT,   ingredients TEXT,   most_memorable_characteristic TEXT,   rating NUMERIC);

Si tout va bien, vous verrez qu'une table est créée. Ceci est une table de démonstration. Essayez de faire l'expérience pour mieux comprendre.

Maintenant, il y a une chose dans laquelle vous rencontrez des difficultés. Dans DataGrip, vous pouvez facilement importer les données d'un fichier en faisant un clic droit dessus, mais ici ce n'est pas le cas. L'extension PostgreSQL ne donne pas cette fonctionnalité ici. Donc, ici, vous devez utiliser l' outil de ligne de commande psql . Pour cela, ouvrez le menu Démarrer et recherchez psql. Vous obtiendrez le résultat quelque chose comme l'image ci-dessous.

herokuouvrir psql

Les informations d'identification vous sont demandées après avoir rouvert l'outil de ligne de commande psql un par un. Après cela, donnez la commande ci-dessous :

copy chocolate_database FROM  DELIMITER  CSV HEADER

Voir l'image ci-dessous pour le rendre plus clair.

heroku

Si tout va bien, vous obtiendrez une sortie COPY . Si vous souhaitez utiliser mon fichier, suivez ce lien et téléchargez le fichier .csv.

Ne confondez pas avec la commande copy pour psql et COPY dans PostgreSQL. Vous avez besoin d'un accès superutilisateur pour exécuter la commande COPY. Mais pour la copie, vous n'en avez pas besoin.

Conclusion à Heroku

Hourra! Tu l'as fait. Vous pouvez désormais accéder facilement à Heroku Postgres depuis n'importe quel IDE. Le processus de connexion à une base de données distante est presque le même pour tous les fournisseurs de bases de données cloud. Ainsi, si vous comprenez le processus de connexion d'une base de données distante spécifique, vous ne rencontrez pas de difficultés avec les autres.

Donc, c'est tout pour le moment. Je reviendrai avec un autre article. jusque-là, restez à l'écoute! 

Source : https://www.analyticsvidhya.com/blog/2022/06/a-comprehensive-guide-to-heroku-postgres/

#heroku #ide 

Un Guide Complet Sur Heroku Postgres

A Comprehensive Guide to Heroku Postgres

Recently I was doing an analysis, and in this analysis, I wanted to take the data from a remote database. I previously used Azure, but I had to delete the database after learning. Otherwise, they will deduct money from your Azure balance. This is not a good experience for students. So I am searching for a free database in which I don’t have to worry about the money. Then I came to know about Heroku Postgres.

Heroku offers a free plan for hosting the PostgreSQL database. This is so helpful when you are a beginner or you want a quickly hosted database for experiments. If you want to extend your database capacity, you have to pay a little amount for it, even a student can afford it.

In this article, I am going to explain –

  • How to create a database using Heroku.
  • How to get the credentials for accessing the database.
  • How to create a table in this database and run queries.

So, without further ado, let’s get started.

See more at: https://www.analyticsvidhya.com/blog/2022/06/a-comprehensive-guide-to-heroku-postgres/

#heroku #ide 

A Comprehensive Guide to Heroku Postgres

Julietta.jl: An IDE for Julia

Julietta - An IDE for Julia

Julietta is an integrated developement environment (IDE) for the programming language Julia. It is written in Julia using Gtk.jl. In its current form Julietta is a prototype and should not be used for real developement as several thing are not yet implemented (and due to several bugs).

window

Installation

Currently it is a lot complicated to get Julietta running. Here is a list of instructions:

Furthermore Julietta requires the following Julia packages to be installed: REPLCompletions, Winston

The complicated part is not the installation of the Julia packages (using Pkg.clone) but the installation of the dependencies. Under linux this should be most simple as the libraries Gtk+ and GtkSourceView are part of the distributions package manager.

Running Julietta

julia -F PATH_To_Julietta/src/run_julietta.jl

Download Details:

Author: tknopp
Source Code: https://github.com/tknopp/Julietta.jl 

#julia #ide 

Julietta.jl: An IDE for Julia

LiteIDE: A Simple, Open Source, Cross-platform Go IDE

LiteIDE X

Introduction

LiteIDE is a simple, open source, cross-platform Go IDE.

Features

Core features

  • System environment management
  • MIME type management
  • Configurable build commands
  • Support files search replace and revert
  • Quick open file, symbol and commands
  • Plug-in system
  • Integrated terminal

Advanced code editor

  • Code editor supports Golang, Markdown and Golang Present
  • Rapid code navigation tools
  • Syntax highlighting and color scheme
  • Code completion
  • Code folding
  • Display save revision
  • Reload file by internal diff way

Golang support

  • Support Go1.18 go.work
  • Support Go1.11 Go modules
  • Support Go1.5 Go vendor
  • Support Go1 GOPATH
  • Golang build environment management
  • Compile and test using standard Golang tools
  • Custom GOPATH support system, IDE and project
  • Custom project build configuration
  • Golang package browser
  • Golang class view and outline
  • Golang doc search and api index
  • Source code navigation and information tips
  • Source code find usages
  • Source code refactoring and revert
  • Integrated gocode clone of nsf/gocode
  • Integrated gomodifytags
  • Support source query tools guru
  • Debug with GDB and Delve

Supported Systems

  • Windows x86 (32-bit or 64-bit)
  • Linux x86 (32-bit or 64-bit)
  • MacOS X10.6 or higher (64-bit)
  • FreeBSD 9.2 or higher (32-bit or 64-bit)
  • OpenBSD 5.6 or higher (64-bit)

Latest Release Supported Platform Details

  • Windows
    • liteide-latest.windows-qt5.zip -> WindowsXP, Windows 7 8 10
    • liteide-latest.windows-qt4.zip -> WindowsXP, Windows 7
  • macOS
    • liteide-latest.macosx-qt5.zip -> macOS 10.8 or higher
  • Linux x64
    • liteide-latest.linux-64-qt4.tar.bz2 -> Linux (64 bit) build on ubuntu 16.04
    • liteide-latest.linux-64-qt5.tar.bz2 -> Linux (64 bit) build on ubuntu 16.04
  • Linux x32
    • liteide-latest.linux-32-qt4.tar.bz2 -> Linux (32 bit) build on ubuntu 16.04
    • liteide-latest.linux-32-qt5.tar.bz2 -> Linux (32 bit) build on ubuntu 16.04
  • ArchLinux
    • liteide-latest.archlinux-pkgbuild.zip -> ArchLinux (64 bit) PKGBUILD

LiteIDE Command Line

liteide [files|folder] [--select-env id] [--local-setting] [--user-setting] [--reset-setting]

--select-env [system|win32|cross-linux64|...]     select init environment id
--local-setting   force use local setting
--user-setting    force use user setting
--reset-setting   reset current setting ( clear setting file)    

Update liteide tools for support new Golang Version

go get -u github.com/visualfc/gotools
go get -u github.com/visualfc/gocode

Windows/Linux: copy GOPATH/bin gotools and gocode to liteide/bin
MacOS: copy GOPATH/bin gotools and gocode to LiteIDE.app/Contents/MacOS

Documents

Links

New Home Page

Author: Visualfc
Source Code: https://github.com/visualfc/liteide 
License: LGPL-2.1 license

#go #golang #qt #ide 

LiteIDE: A Simple, Open Source, Cross-platform Go IDE