teleren/devto huggingface dataset:
One of the best Mobile App Development Company in USA
Tags: mobile, ios, android, app
Published: 2023-05-28 17:53:24

Looking to hire an accountable IT partner for building your brand’s digital architecture? Zazz is a thriving [mobile app development company](**https://www.zazz.io/**) in the USA specializing in high-end technologies such as AR app development, VR app development, IoT app development, and custom software consulting. Known for offering a limitless array of services, we have come a long way with our glorious span in the industry.
Based in the United States, we are a team of 275+ developers who are best-in-industry with a dedication that gets the job done. If you are willing to create a mobile application with an entirely unique idea, then you can consult our team of business analysts with a flair for market research and audience behavior analysis. Our methodology for software & app development is more discrete than usual SDLC processes.
To get started with an app design and development project with us, you don’t need any prior understanding of the technologies you are interested in. In fact, our expert tech professionals will consult you on the right selection of technologies that work suitably with your project and your budget for digital transformation.
Graph Types in NetworkX
Tags: networkx, apacheag
Published: 2023-05-28 17:35:58

NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. It provides data structures and methods for storing graphs. 
Graphs are basically of four types:
1. Graph: This a **undirected graph**, with possible self-loops but no parallel edges.

```
G = nx.Graph()

```
2. DiGraph: This a **directed graph**, with possible self-loops but no parallel edges.

```
G = nx.DiGraph()

```
3. MultiGraph: This a **undirected graph**, with possible self-loops and also parallel edges.

```
G = nx.MultiGraph()

```
4. MultiDiGraph: This a **directed graph**, with possible self-loops and also parallel edges.

```
G = nx.MultiDiGraph()

```

## Graph Views
For some algorithms it is convenient to temporarily morph a graph to exclude some nodes or edges. NetworkX provides a easier way to accomplish this using **Graph Views**. This is a view of a graph as SubGraph, Reverse, Directed or Undirected. The graph created using view is a read only graph object.
```
view = nx.reverse_view(G)
```
This creates a view of the original graph but edges reversed.

```
def filter_node(node):
    return node != 5

view = nx.subgraph_view(G, filter_node=filter_node)
view.nodes()

```
This creates a view of the original graph but it will not contain nodes which do satisfy the condition in filter_node.
Rails 基礎 Part 05 -- create の単体テストを追加する
Tags: ruby, rails, rspec, factorybot
Published: 2023-05-28 14:58:10


## why

最初の単体テストを作るのに時間がかかった。
続きを一気に書く。

---

## テスト実行結果の詳細を見せるための設定

これを入れると、どのテストが通ったのか表示される。
これを入れなければ、. (ドット)の数でしか通ったテストはわからない。

```ruby
.rspec
```

```ruby
--require rails_helper
--format documentation
--color
```

---
---

# create

create は、レスポンスではなくデータベースをテストする。

## 参考

https://qiita.com/kagesumi3m/items/10244978273ffffa9b92

## rspec

1. let で bank_transaction を

```ruby
describe BankTransactionsController do

  let (:request_params) {
    { 
      bank_transaction: {
        account_number: 111,
        amount: 222,
        description: 333,
      }
    }
  }

  context 'ログインしているとき' do
      before do
        FactoryBot.create(:bank_transaction)
      end

      it '1つの取引データの金額が取得できること' do
        # ....
      end

      it '取引データが作成できること' do
        post :create, params: request_params

        created_bank_transaction = BankTransaction.last

        expect(created_bank_transaction.account_number).to eq '111'
        expect(created_bank_transaction.amount).to eq 222
        expect(created_bank_transaction.description).to eq '333'
        
      end

      after do
        BankTransaction.destroy_all
      end
  end
end

```

---

## 失敗した時（わざと変えている）

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hqx0wnaqw4wx1du1q4s.png)

## 成功した時

```ruby
rspec spec/controllers/bank_transactions_controller_spec.rb

BankTransactionsController
  ログインしているとき
    1つの取引データの金額が取得できること
    取引データが作成できること

Finished in 0.07932 seconds (files took 1.68 seconds to load)
2 examples, 0 failures
```
Classes More Than 5 Students | LeetCode | MSSQL
Tags: leetcode, beginners, codenewbie, mssql
Published: 2023-05-28 17:29:00

## The Problem

The problem involves the `Courses` table with the following structure:

| student (PK) | class (PK) |
|--------------|------------|
| varchar      | varchar    |

Each row of this table indicates the name of a student and the class in which they are enrolled. We are asked to write an SQL query to report all the classes that have at least five students.

## Explanation

Here's an example for better understanding:

Input:

`Courses` table:

| student | class    |
|---------|----------|
| A       | Math     |
| B       | English  |
| C       | Math     |
| D       | Biology  |
| E       | Math     |
| F       | Computer |
| G       | Math     |
| H       | Math     |
| I       | Math     |

Output:

| class |
|-------|
| Math  |

Only Math class has at least 5 students.

## The Solution

We will explore three different SQL solutions to this problem, examining their differences, strengths, and weaknesses.

### Source Code 1

The first solution uses a straightforward `GROUP BY` clause to count the number of students per class, then the `HAVING` clause to filter the classes with at least 5 students.

```sql
SELECT class
FROM Courses
GROUP BY class
HAVING COUNT(student) >= 5
```

This solution has a runtime of 960ms, outperforming 86.50% of other submissions.

![solution1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a5ecv7p250u04jxcnuie.png)

### Source Code 2

The second solution employs a Window Function `COUNT` with `OVER` clause. This calculates the count of students in each class, creates a new column "counter" and then, selects the classes where "counter" is at least 5.

```sql
WITH class_count AS (
  SELECT DISTINCT
    class,
    COUNT(student) OVER (PARTITION BY class) [counter]
  FROM Courses
)
SELECT class
FROM class_count
WHERE counter >= 5
```

This solution has a runtime of 1022ms, beating 74.27% of other submissions.

![solution2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uj9hhpopa17gj5grzifi.png)

### Source Code 3

The third solution is quite similar to the second one. The only difference is it uses a subquery instead of a Common Table Expression (CTE).

```sql
SELECT c.class
FROM
(
  SELECT DISTINCT
    class,
    COUNT(student) OVER (PARTITION BY class) [counter]
  FROM Courses
) [c]
WHERE c.counter >= 5
```

This solution has a runtime of 1151ms, beating 49.46% of other submissions.

![solution3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7cvglg58skcp9fro2adm.png)

## Conclusion

All three solutions provide the correct output but with slight performance differences. Based on the runtimes, we can rank the solutions from best to worst in terms of performance: Source Code 1 > Source Code 2 > Source Code 3.

You can find the original problem at [LeetCode](https://leetcode.com/problems/classes-more-than-5-students/description/).

For more insightful solutions and tech-related content, connect with me on my [Beacons page](https://beacons.ai/ranggakd).

{% embed https://beacons.ai/ranggakd %}
Property Landing Page Design Using Figma + Auto Layout | Figma Tutorial
Tags: figma, beginners, webdev, tutorial
Published: 2023-05-28 17:19:31

{% youtube 2f8HJ8xkI54 %}
The tutorial video "Property Landing Page Design Using Figma" is a great resource for anyone looking to create a professional-looking landing page for a real estate website. The video walks you through the entire process of designing a landing page using Figma, a popular design tool used by many professionals in the industry.

The video starts by introducing Figma and explaining its basic features. It then goes on to teach you how to create a new project and set up your artboards. The instructor then guides you through the process of designing the layout of the landing page, choosing the appropriate fonts and colors, and adding images and other design elements.

One of the most valuable aspects of this tutorial video is that it provides detailed explanations of the design decisions made by the instructor. This helps viewers understand why certain design choices were made and how they can apply these principles to their own projects.

Overall, the "Property Landing Page Design Using Figma" tutorial video is a valuable resource for anyone looking to improve their design skills and create a professional-looking landing page for a real estate website. The clear and concise explanations, combined with the step-by-step instructions, make it easy for viewers to follow along and create their own landing page designs.

Please, if you love it, support us with Like & Subscribe.🙏🙏❤️❤️

Download File :
https://www.figma.com/community/file/1244694377551258064/Property-Landigpage-Design

Let's be friends and connect
📩 Subscribe:https://shorturl.at/BCTV8
📷 Instagram: https://www.instagram.com/soudemy/
📱 Behance: https://www.behance.net/soudemy
🐦 Twitter: https://twitter.com/SoudemyAcademy

In the comments, you can say what design you want so that we can prepare the video for you.

#figma #figmadesign #figmatutorial #tutorial #figmatips
Cities Tracker App with Python
Tags: python, programming, webdev, api
Published: 2023-05-28 17:10:03

Hey what's going, this is Amir from Bek Brace channel.
Today, I have got an interesting application build walkthrough for you, where we are going to build a CLI application to find two cities in 2 different (or not) countries, and check the distance between them and also how much time would it take you if you would go from Point A to Point B by: Walking, Airplane and Bus. 

This is the tutorial:
{%youtube GuZoJ4zCj5o%}

The code begins by importing the necessary libraries: inquirer for user input, geopy for geocoding and distance calculation, and simple_chalk for colorful output. These libraries enhance the functionality and visual experience of our distance calculator.

Next, we declare variables to store emojis representing different modes of transportation. We have a walking emoji, a bus emoji, and an airplane emoji. These emojis will be displayed alongside the calculated distances.

We then prompt the user to enter the names of the first and second cities along with their respective countries. We use the inquirer library to create interactive prompts and store the user's input.

After receiving the city and country names, we utilize the geopy library to obtain the latitude and longitude coordinates for both locations. This is achieved by using the geocode function from the Nominatim geocoder, which takes the city and country names as input and returns the corresponding coordinates.

With the coordinates available, we proceed to calculate the distances between the two locations using the distance function from the geopy library. In this code, we calculate the distances for walking, bus travel, and airplane travel. However, it's important to note that the bus and airplane distances are currently calculated using the same formula as the walking distance. To obtain accurate distances for these modes of transport, additional information and formulas specific to buses and airplanes would be required.

Next, we calculate the estimated time required for each mode of transportation. We assume a walking speed of 5 km/h, a bus speed of 60 km/h, and an airplane speed of 800 km/h. By dividing the distances by their respective speeds, we can estimate the time taken for each mode of transportation.

Finally, we print the results to the console using colorful output. The distances, along with the corresponding travel times, are displayed for each mode of transportation.

Conclusion:
In this blog post, we explored a Python code snippet that enables the calculation of distances between two cities and countries. By utilizing the inquirer, geopy, and simple_chalk libraries, we created an interactive and visually appealing distance calculator. This code can be a starting point for developing more sophisticated travel calculators or incorporating additional features to improve accuracy. Feel free to modify and enhance the code to suit your specific requirements.

Hope you will enjoy the video.
You will find the source code and other stuff in the description.
Cheers.
Amir.
Alternatives to the Turing test.
Published: 2023-05-28 13:40:03

1. The Lovelace 2.0 test: Created by Mark O. Riedl in 2014. The Lovelace 2.0 Test of creativity as an alternative to the Turing Test as a means of determining whether an agent is intelligent. This test builds off prior tests of creativity and additionally provides a means of directly comparing the relative intelligence of different agents.

2. The reverse Turing test: Invented Henry S. Baird and a few other researchers in 2002. This test exploit the gap in ability between human and machine vision systems to craft a family of automatic challenges that tell human and machine users apart via graphical interfaces including Internet browsers

3. The Visual Turing test: First created by Donald Geman (and others) in 2014. In this test an operator-assisted device that produces a stochastic sequence of binary questions from a given test image. The query engine proposes a question; the operator either provides the correct answer or rejects the question as ambiguous; the engine proposes the next question (“just-in-time truthing”). The test is then administered to the computer-vision system, one question at a time. After the system’s answer is recorded, the system is provided the correct answer and the next question.

4. The Winograd Schema Challenge: created in 2012 by Hector J. Levesque and his colleague. we present an alternative to the Turing Test that has some conceptual and practical advantages. A Winograd schema is a pair of sentences that differ only in one or
two words and that contain a referential ambiguity that is resolved in opposite directions in the two sentences. This test is designed so that the correct answer is obvious to the human reader, but cannot easily be found using selectional restrictions or statistical techniques over text corpora.
Deep Learning for Fruit Recognition: Classifying Over 100 Unique Fruits
Tags: python, cnn, deeplearning, tensorflow
Published: 2023-05-28 16:46:00

🍎🍌🍓 For CNN and deep learning enthusiasts! 🍊🍇🍍
🚀 In this in-depth tutorial, we explain, step-by-step , the process of building a convolutional neural network (CNN) model tailored specifically for fruit classification. 🌱🍎
The process will describe the model training, choosing the rights layers and filters, training , and running a fresh test image to check our result.
You are welcome to subscribe for the channel and follow our next videos
If you are interested in learning modern Computer Vision course with deep dive with TensorFlow , Keras and Pytorch , you can find it here  : http://bit.ly/3HeDy1V
Perfect course for every computer vision enthusiastic

Before we continue , I actually recommend this book for deep learning based on Tensorflow and Keras : https://amzn.to/3STWZ2N

Check out our tutorial here : https://youtu.be/sJoboLm8X-I

The code is in my Repo. I will leave a link in the video description.

Enjoy
Eran

#Python #Cnn #TensorFlow #deeplearning #neuralnetworks #imageclassification #convolutionalneuralnetworks
C# Namespace Fever
Tags: csharp, dotnet
Published: 2023-05-28 16:39:32

Alright... I'm done chopping my code into microscopic namespaces. There's just no point. All it does is force a bunch of `using` statements all over the code (both in the project itself and in any project consuming it as a library).

The most common place I see this unhealthy obsession is in your typical ASP.NET app. Devs feel this compulsion to make a namespace for every _kind_ of component.

```csharp
namespace MyApp.Web.Controllers;
namespace MyApp.Web.Models;
namespace MyApp.Web.Services;
namespace MyApp.Web.Utils;
```

And this is a _kind_ representation. I've even seen projects isolate `Models.Request` from `Models.Response`. Personally, I do not think this is necessary or helpful. In my more recent endeavors, I've settled on just using `MyApp.Web` and stopping there. It gets rid of a ton of useless `using` statements, and all the identifiers I need are now properly visible. I still find it acceptable to put the other whole layers into separate namespaces (`MyApp.Domain`, `MyApp.Repository`, etc.).

I fell prey to this in [Jawbone](https://github.com/ObviousPiranha/Jawbone). I think there is just something alluring about "being as cool as the .NET base classes". Hey, .NET has a namespace for its collections, so I should have a namespace for my collections! There's just one problem, though: .NET is huge, and my library is not. When you reach a certain size, it makes sense to gently categorize various components. Also, if code exists in distinct projects, having a different namespace makes sense.

So, I've taken the first steps to wrangling this mess. I am eliminating the `Piranha.Jawbone.Tools` and `Piranha.Jawbone.Collections` namespaces. In my mind, there are only two scenarios that justify a new namespace:

1. Strongly distinct domains: I am keeping namespaces such as `Piranha.Jawbone.Sqlite` and `Piranha.Jawbone.Sdl`. Those are _highly cohesive domains_ that could arguably even be spun off into their own libraries if the need arose. They revolve around major native components and have clear delineation.
2. Isolation of extensions on common datatypes: if I want to introduce extensions for common types like `string` or `DateTime` or whatever, I don't want those extensions flooding devs' autocomplete. It's polite to let them opt in by `using Piranha.Jawbone.Extensions`. They should not pay that price just for `using Piranah.Jawbone`. Meanwhile, for new datatypes introduced by Jawbone itself, the extensions just sit in the `Piranha.Jawbone` namespace.

Already, I am enjoying the drastic reduction in `using` statements.
Newbie in react - java - etc. Has Some questions.
Tags: react, java, beginners, codenewbie
Published: 2023-05-28 16:17:51

Hi, I'm a coding newbie, and I have some questions that I could not find answers to on the internet. So please, if you can, help me.
Sorry for the bad English btw.

So, first question :

1. Can I make a react.js web app project( in this case, ToDoList) and export it to exe platforms I can install and use on my PC?

2. Next question I have is: can I make an Android app with Eclipse and Java but not use any Android SDKs? Because I have a really bad PC so I can'really install a chunky file like SDK on it and expect it to run😂. And if it's possible, HOW?

3. Third and last question, where can I learn PHP and backend web development for free, I know YouTube and code academy, etc But what'the best one?

Sorry if my questions are dumb and funny but I need to know❤️
Thx again dev.to
Methods of reading database Tables
Tags: apacheage, database, postgres, agedb
Published: 2023-05-28 15:56:08

In this post, Two typical access methods, sequential scan and B-tree index scan, are outlined here:

## `✔️ Sequential scan:`
All tuples in all pages are sequentially read by scanning all line pointers in each page. show below-

![Sequential Scan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yavrvf6vpdpkqjxrlvt4.png)
## `✔️ B-tree index scan:`
An index file contains index tuples, each of which is composed of **an index key** and a TID pointing to the target heap tuple. <br>
If the index tuple with the key that you are looking for has been found, PostgreSQL reads the desired heap tuple using the obtained TID value. <br>
For example, In below image , TID value of the obtained index tuple is ‘(block = 7, Offset = 2)’. It means that the target heap tuple is 2nd tuple in the 7th page within the table, so PostgreSQL can read the desired heap tuple without unnecessary scanning in the pages.

![B-tree index scan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6ymg5v2tleuxpzq4yvu.png)
## `✔️ References:`

1. https://age.apache.org/ 
2. https://github.com/apache/age
3. https://www.interdb.jp/pg/index.html
Don't miss out on the new features in SQL Server 16.x
Tags: sql, database, datascience, sqlserver
Published: 2023-05-28 15:46:52

The latest version of SQL Server has some exciting updates as well as some very useful new features. Today I would like to look at `GREATEST` and `LEAST`, two opposite functions for getting the maximum and minimum values in a list.

## GREATEST & LEAST
They respectively return the maximum and minimum values from the list of values. There are some restrictions: the list must contain at least one value; the maximum number of values in the list is **254**.
Both functions do not support some data types, for example, `cursor, geometry, geography, image, table, ntext, text, xml`.

## Syntax

```sql
GREATEST(value1, value2,…)
```

```sql
LEAST(value1, value2,…)
```
Input parameters can be, for instance, variables, column names, functions, and any combination of arithmetic, and string operators.

## Return data type
The functions return the data type with the highest precedence. If all values in the list are of the same type, it will be returned by the functions. If not, they will try to convert them. As a result, it is important that all values in the list be convertible.

## Examples

- Constant numbers: the scale = 4 because it is determined by the scale of 4.7890 (the highest precedence data type).

```sql
SELECT GREATEST(4.7890, '5.1', N'3');

Output:
-------
 5.1000
```

```sql
SELECT LEAST(4.7890, '5.1', N'3');

Output:
-------
 3.0000
```

- Strings

```sql
SELECT GREATEST('John Smith', 'Anna Black', N'Bob Low');

Output:
----------
John Smith
```

```sql
SELECT LEAST('John Smith', 'Anna Black', N'Bob Low');

Output:
----------
Anna Black
```

- Combination of variables, table column and constant

```sql
CREATE TABLE Currency (
    Currency_Name VARCHAR(3),
    Currency_Rate DECIMAL(10,4)
    );

INSERT INTO Currency
VALUES ('USD', 0.82),
    ('USD', 0.8101),
    ('USD', 0.8058);
GO

DECLARE @Default_Rate DECIMAL(10, 4) = 0.8195;

SELECT Currency_Name,
    Currency_Rate,
    GREATEST(Currency_Rate, 0.8000, @Default_Rate) AS GreatestRate,
    LEAST(Currency_Rate, 0.8000, @Default_Rate) AS LeastRate
FROM Currency;
GO

Output:
Currency_Name Currency_Rate GreatestRate LeastRate   
------------- ------------- ------------ ------------
USD                   .8200        .8200        .8000
USD                   .8101        .8195        .8000
USD                   .8058        .8195        .8000
```
dbForge Edge Review 2023: Will this Save You from Mixed SQL Database Headaches?
Tags: database, databasetools, dbforge, dbforgeedge
Published: 2023-05-28 15:15:00

In this review, we’ll take a deep dive into the features and functionalities of dbForge Edge - a suite of comprehensive database IDEs - https://dbdeveloper.medium.com/dbforge-edge-review-2023-will-this-save-you-from-mixed-sql-database-headaches-26c90751cb78


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c95ti28d1z05g4dstwnn.png)