teleren/devto huggingface dataset:
Bug Fix Error : dyld[24691]: Library not loaded (Gara-gara Upgrade Brew)
Tags: php, brew, errors
Published: 2023-06-26 03:17:42

Mengatasi error seperti dibawah ini

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

Lakukan command dibawah ini

```
$ brew doctor                                                                                              ‹ruby-2.7.6›
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  php@7.0
  php@7.1
  php@7.2
  php@7.3
  php@7.4

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/node/cppgc/common.h
  /usr/local/include/node/js_native_api.h
  /usr/local/include/node/js_native_api_types.h
  /usr/local/include/node/libplatform/libplatform-export.h
  /usr/local/include/node/libplatform/libplatform.h
. . . .
```

Kemudian eksekusi command dibawah ini

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

Lalu lakukan `brew cleanup`

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

Install ulang


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

Dan install versi PHP berikut

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

Lakukan command dibawah ini

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

Lalu cek

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

Done

Sumber : https://medium.com/macoclock/how-to-install-multiple-php-versions-on-macos-1f290c32cd63
osdc-assigment11-unittest
Tags: osdc, python, github, git
Published: 2023-06-12 20:58:51

In last session we learned about Unit test on process and function code we build.

Unit testing is a critical aspect of software development as it helps identify and fix bugs early in the development process. By writing unit tests, we can verify the behavior and functionality of individual units of code, such as functions or methods, in isolation.

we over on many important examples and syntax code in presentation : 
1. [Testing Demo](https://code-maven.com/slides/python/testing-demo)
2. [Testing with PyTest](https://code-maven.com/slides/python/pytest)

I chose to do a unit test on a repo that I had already built CI on
But because it's just an API
There was meaningful to build a test on.
So I chose code that this API is based on from another repo.
My repo that i build on PR is [university-domains-list](https://github.com/Hipo/university-domains-list)
One example of my test- Testing with Multiple Country Scopes:

```
def test_multiple_country_scopes(self):
    source_data = [...]  # Sample source data
    filtered_output = country_filter(source_data, ["China", "France"])
    expected_output = [...]  # Expected filtered output for China and France
    self.assertEqual(filtered_output, expected_output)
```
my PR that I send to author:
> HI .
This PR was sent as part of course OSDC taught by: @szabgab.
I add file test to your code filter.py.
I think this tests can help your project when in further- you change the code or maybe add more features.
I see your project and project API that base on your code and it very intersting.
I wonder that was in your list json universities and colleges from Israel(my country :))
Nice job!


Conclusion
In this unit test, I have explored the process of writing unit tests for Project [university-domains-list](https://github.com/Hipo/university-domains-list) country_filter function. I have covered different scenarios, including single country scopes, multiple country scopes, non-existent country scopes, empty source data, and empty country scopes. By writing these tests, I can ensure the correctness and robustness of the function, catching any potential bugs or issues early on.

Unit testing is an essential practice in software development, enabling us to build reliable and maintainable code. By investing time and effort into writing comprehensive unit tests, we can increase confidence in our codebase and streamline the development process.

I hope I have convinced you why you should test your next project
A little secret - it's very easy but much more important.

Hope to hear soon
Zohar.
Started an OpenSource project
Tags: webdev, beginners, javascript, opensource
Published: 2023-06-26 01:31:25

### Started project called SocioPedia
I wanted to learn MERN stack and so I started watching Youtube videos, I stubbled upon a video that develop Social media application. I followed process and developed project ([REPO](https://github.com/rawasaditya/SocioPedia)).
After completing project I felt that I can continue developing project further more and created issues to deal with bug and new enhancements, mean while I got lot of comments on issues and lot of people where interested to contribute :)

![Open source social media application](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2dbhw3e4rm1ha58h2op.png)


### What did I learn
- Express server
- Mongooes
- Material UI
- Formik (I was skeptic using formik before but after trying it I loved it)
- yup
- GITHUB actions
- Open Source contributions  

I am going to continue contributing to  this project and looking for more contributors. Do knock yourself out with [Issues](https://github.com/rawasaditya/SocioPedia/issues). Create some more issues and contribute
Thanks
New 64-bit IDE for VB6 developers,Twinbasic VisualFreebasic
Tags: vb6, x64, vba
Published: 2023-06-26 01:30:36

New 64-bit IDE for VB6 developers,Twinbasic VisualFreebasic

From about 1998, after more than 20 years, someone finally imitated the VB6 design pattern, the simplest code, visual form design. The generated software is basically an EXE without lazy, compile-generated speed of a few milliseconds to a few seconds time.
VisualFreebasic

VisualFreebasic
https://www.freebasic.net/forum/viewtopic.php?t=28522

twinbasic:
https://github.com/twinbasic/
https://www.vbforums.com/showthread.php?900178-twinBASIC-programming-Beta-releases

https://twinbasic.com/preview.html
Welcome to my Blog!
Tags: beginners, programming, codenewbie, webdev
Published: 2023-06-26 01:16:08

Hello and welcome to my inaugural blog post! I’m going to be honest, I’ve never really had a great relationship with writing and certainly never thought I would start my own blog. I really enjoy reading and love to appreciate the written word of others, but I’ve always struggled to find my own voice with it. Most attempts result in hours of staring at the same few sentences, mulling over phrasing and questioning which direction to go in (much like I’m currently doing, lol). I’m hoping this blog can serve as a kind of training ground for me to practice my writing while simultaneously providing an outlet to discuss something that I’ve recently taken a huge interest in; software development and tech!

Full disclosure, I’m a total coding newbie. I’ve just finished my fourth week of a software engineering bootcamp and I had very minimal exposure to coding before starting the program. Prior to making this career shift I was working, very unhappily, as an accountant. I’m not here to speak badly of accounting as a profession, but it was certainly not for me. I felt that my professional routine had become too cyclical. Similar reports, filings, and data entry month after month. I found myself becoming very disengaged from my work and wanted to find something that sparked my interest more intensely. After speaking with some friends who had transitioned into the tech industry later in life, I felt that software engineering might be a great fit. The work sounded thought provoking and deeply engaging, having to apply logical methods for solving problems or building new features. I took a basic Intro to Python course on Codecademy and I was hooked!        

After deciding that this was to be my new path, I enrolled in the Flatiron School software engineering bootcamp. To say that starting this program felt like diving into the deep end would be an absolute understatement. The pace at which we’re learning is intense! Luckily, I have some really great instructors and classmates who have made this seemingly impossible amount of information digestible. While the feeling of being overwhelmed by information can be pretty uncomfortable, those moments of clarity when a new idea or concept finally clicks are so rewarding and exciting! 

That’s what I’d like to express and share with this blog, the conceptual breakthroughs that have helped me along the way in my journey to becoming a software engineer. So far in just the first few weeks we’ve dove into HTML, CSS, JavaScript, and a bit of React. I’m honestly rather shocked at how much I’ve learned and retained in just a few weeks. In this blog I’ll attempt to chronicle some of the revelations I’ve had that have helped me along the way. Hopefully they will help you out as well! With that, my next blog post will be discussing the usefulness of my new best friend… console.log()!
vb6 Pass structure data without copying,DataType by Pointer
Published: 2023-06-26 01:02:17

This is taught to me by a Chinese tech expert named *ABC, he is my master

 `Dim PP As UserInfoPtr, U1 As UserInfo
    U1.ID = 135
    U1.v = 1
    U1.UserName = "TOM"
    
    Dim ClassA As New Class1
    ClassA.SubInClass1 VarPtr(U1)

    MsgBox "Data changeed?UserInfo.V=" & U1.v & "," & U1.UserName`
FROM :[https://www.vbforums.com/showthread.php?900445-vb6-Pass-structure-data-without-copying-DataType-by-Pointer](https://www.vbforums.com/showthread.php?900445-vb6-Pass-structure-data-without-copying-DataType-by-Pointer)

Dynamic UDT TypeLibs
[url]https://www.vbforums.com/showthread.php?899136-Dynamic-UDT-TypeLibs[/url]
C++, Pass function to algorithm vs Lambda expression
Tags: customobject, lambda, passfunction, algorithms
Published: 2023-06-26 00:47:02

If we need to use standard functions with custom objects (our defined struct or class) before C++11, we can only pass functions to algorithms.

```cpp
struct City {
    string name;
    double population;
};
// compare City by population
bool cmpfnc(const City& a, const City& b) {
    return a.population < b.population;
}
// then we can use it
vector<City> vCity = { {"city 1", 140000}, {"city 2", 100000},{"city 3", 700000},{"city 4", 500000} };
sort(vCity.begin(), vCity.end(), cmpfnc); //pass cmpfnc function  to standard stl sort
for (auto c : vCity) {
     cout << "City name: " << c.name << " population: " << c.population << endl;
}
```
from C++11, Lambda expression makes it simple

```cpp
vector<City> vCity = { {"city 1", 140000}, {"city 2", 100000},{"city 3", 700000},{"city 4", 500000} };
//lambda expression
sort(vCity.begin(), vCity.end(), [](const City& a, const City& b) {return a.population < b.population; });
for (auto c : vCity) {
   cout << "City name: " << c.name << " population: " << c.population << endl;
}
```
But sometimes, I also forget the ";" in the code of a lambda expression `[](const City& a, const City& b) {return a.population < b.population;}` so don't forget it.
FaceLink: Discover, Connect, and Unleash the Power of Recognition
Published: 2023-06-26 00:41:40

Introduction:
In today's interconnected world, the power of facial recognition technology has opened up new possibilities for connecting and discovering information about individuals. FaceLink, an innovative software application, takes advantage of this technology to bring facial recognition capabilities to your fingertips. With FaceLink, you can effortlessly link faces to their online presence, providing a seamless way to connect and discover more about individuals in an instant.

Facilitating Effortless Connections:
FaceLink leverages advanced facial recognition algorithms to enable users to upload an image and quickly search for matches across various online platforms and social media networks. Whether you're looking to identify a celebrity, find information about a person, or explore their digital footprint, FaceLink simplifies the process by providing accurate and efficient results. With just a few clicks, you can uncover hidden connections and delve deeper into the lives of individuals.

User-Friendly Interface:
FaceLink's intuitive user interface makes it easy to upload images, initiate searches, and view the search outcomes. The software displays the match percentage, giving you an idea of the accuracy of the results. Additionally, it provides URLs to webpages where the person has been found, allowing you to navigate directly to those pages and gain further insights or explore relevant content effortlessly.

Wide Range of Applications:
FaceLink offers a multitude of applications, both for personal use and professional investigations. For social media researchers, it becomes a valuable tool for gathering information. Background checks can be streamlined with FaceLink, offering an efficient way to verify identities and investigate further. Moreover, the software caters to the curiosity of individuals by providing a means to satisfy their intrigue about a particular face. FaceLink's reliable and robust performance ensures that users can trust the results it provides.
 KNOW MORE AT https://github.com/technicalhayden/FaceLink

INSTALL NOW [](https://github.com/technicalhayden/FaceLink)
Removing Elements From An Array
Tags: javascript, beginners, codenewbie, learning
Published: 2023-06-25 19:43:10

There are multiple ways an element can be removed from an array. We're going to discuss how to destructively and non destructively remove elements. It is crucial to think of how the code should run. 

#Destructively 

There are two ways that elements can be added to an array with a destructive method. The reason they are called Destructive is because when used in a function they will change the original array with the passed in information. 

`.shift()` removes the **first** element in an array

`.pop()` removes the **last** element in an array


The two methods are similar in these ways:

1. They do **not** take any arguments
2. They remove a single element
3. They return the element that is removed


##Nondestructively

This method works similar as the spread operator(...) if we don't add any arguments it will return a copy of the original array with all elements intact. Then removes an element without mutating the original array. 

`.slice()`

We are able to add one-two arguments:

1. First, is the index where the slice should begin
2. Second, is the index where the slice should end

```
const snacks = ['Chips', 'Pretzels', 'M&Ms', 'Fruit', 'Veggies'];
const healthy = snacks.slice(3, 4);
```

In the example above we are creating a new variable and assigning pieces of the original array without mutating the original array. 

Some great resources are linked below. 

[W3Schools](https://www.w3schools.com/js/js_array_methods.asp)
[Mozilla](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)
[React](https://react.dev/learn/updating-arrays-in-state#updating-arrays-without-mutation)
Connect Python with MySQL database ( mysql-connector )
Tags: python, database, mysql
Published: 2023-06-25 23:10:21

Training my english !!!
Hello, my name is Lucas. I be writing this artigle for sharing an code for connect python with database MySQL.

For connecting python in database mysql, we require install an library ( mysql-connector ). For install this library, you can write in your concolse the command(using PIP):


```
pip install mysql-connector-python
```

1. With library instaling, we can initialize the create code for connection. In your VSCode, create an file with name "app.py";
2. In your file "app.py" import the library ( mysql-connector ) writing the this line:
```
import mysql.connector
```
3. In your file "app.py" write the code with data the connectio MySQL

```
mydb = mysql.connector.connect(
	host='',
	user='',
	password='',
	database=''
)

```

- `host`: the host of connection in database MySQL;
- `user`: username of connection in database;
- `password`: password of connection in database;
- `database`: name of your database

For finality the code, we have to write the line of conection:

```
con = mydb.cursor()
```
Your code should look like this:

```
import mysql.connector

mydb = mysql.connector.connect(
	host='',
	user='',
	password='',
	database=''
)

con = mydb.cursor()

```
Network Config
Published: 2023-06-25 22:20:30

**Swtich(1):**

en
conf t

// HostName
hostname S1

// Vlan Names

vlan 15
name Sales
exit
vlan 25
name Research
exit
vlan 35
name Servers
exit
vlan 88
name Mgt
exit
vlan 98
name Native
exit

// Allowed vlans, and native vlan
int range g0/1-2
switchport mode trunk
switchport trunk native vlan 98
switchport trunk allowed vlan 15,25,35,88,98
exit

// Access switchports with vlans
int <f0/5>; - Different by Switch
switchport mode access
switchport access vlan <15> - Different by Switch: (Pc1-15, Pc2-25, PcAdmin- 88, Servers-35)
exit

// Shutdown unused switchports
int range <f0/1-4, f0/6-24> - Different by Switch
shutdown
exit

// The management interface vlan 88 with an ip address
int v88
ip address <192.168.88.11 255.255.255.0> - Different by Switch: (Find IP in table Switches)
exit

// Use the planned R1 address 192.168.88.1 as the default gateway
ip default-gateway 192.168.88.1

exit 
write

----------------------------------
	
**Router(1/3):**

en
conf t

// HostName
hostname R1

// Configure interfaces:

// R1 -> S1 interface - Diff(R3)
int g0/0 - Diff(R3)
no shutdown
exit

// R1 -> S1 vlans interfaces - Diff(R3)

int g0/0.15 - Diff(R3)
encapsulation dot1Q 15
ip address 192.168.15.1 255.255.255.0 - Diff(R3)
exit

int g0/0.25 - Diff(R3)
encapsulation dot1Q 25
ip address 192.168.25.1 255.255.255.0 - Diff(R3)
exit

int g0/0.35 - Diff(R3)
encapsulation dot1Q 35
ip address 192.168.35.1 255.255.255.0 - Diff(R3)
exit

int g0/0.88 - Diff(R3)
encapsulation dot1Q 88
ip address 192.168.88.1 255.255.255.0 - Diff(R3)
exit

int g0/0.98 - Diff(R3)
encapsulation dot1Q 98 native
ip address 192.168.98.1 255.255.255.0 - Diff(R3)
exit

// R1 -> R2 vlans interfaces - Diff(R3)

int s0/0/0 - Diff(R3)
ip address 192.168.5.1 255.255.255.252 - Diff(R3)
no shutdown
clock rate 2000000 - Only For specified interfaces
exit;

// Configure RIP dynamic routing - Diff(3)
router rip
version 2
network 192.168.15.0
network 192.168.25.0
network 192.168.35.0
network 192.168.88.0
network 192.168.98.0
network 192.168.5.0 - Diff(3)
exit


// Configure DHCP pool - Only R1

ip dhcp pool POOL15
network 192.168.15.0 255.255.255.0
default-router  192.168.15.1
dns-server 192.168.35.253
exit

ip dhcp pool POOL25
network 192.168.25.0 255.255.255.0
default-router  192.168.25.1
dns-server 192.168.35.253


exit 
write

----------------------------------

**Router(2):**

en
conf t

// HostName
hostname R2

// Configure interfaces:

int s0/0/0
ip address 192.168.5.2 255.255.255.252 
no shutdown
exit;

int s0/0/1
ip address 192.168.5.5 255.255.255.252 
no shutdown
clock rate 128000 - Only For specified interfaces
exit;

int s0/1/0
ip address 209.165.201.66 255.255.255.0 
no shutdown
exit;

// Configure RIP dynamic routing

router rip
version 2
network 192.168.5.0
network 192.168.5.4
default-information originate 
exit 
ip route 0.0.0.0 0.0.0.0 s0/1/0


exit 
write
Postgres SQL for Dummies: Foreign Data Wrappers (Part 4)
Tags: database, apache, apacheage, postgres
Published: 2023-06-25 20:58:54

In this part 4 of the series, we will be discussing the Foreign Data Wrappers support in Postgres. It is certainly a very interesting feature.

Before getting to the the FDWs lets first discuss a bit about the SQL/MED feature of SQL which is used by FDWs. In SQL/MED, a table on a remote server is called a foreign table, and FDWs allows managing foreign tables just like local tables. You need to install the extensions and then you can access remote tables just like local tables using a select query. But how does this work exactly? Lets find out:

1. The analyzer/analyser creates the query tree of the input SQL.
2. The planner is responsible for connecting to the remote server. 
3. An optional cost estimate check can also be done by planner if we turn on the *use_remote_estimate* option. 
4. Plan text statement is created from SQL text known as *deparsing*.
5. The plan text is sent by the executor to the remote server and its results is also received by the executor. 

It should be noted that for optimization, depending on the type of query some operations might be performed locally such as part of ORDER_BY and some part of aggregate functions.
Postgres SQL for Dummies: The Architecture (Part 2)
Tags: database, apache, apacheag, postgres
Published: 2023-06-25 19:48:09

Link to prev: [Link] (https://dev.to/ksheroz/postgres-sql-for-dummies-database-cluster-databases-and-tables-h2n)
In the second in a series post, we will try to explore the Architecture of Postgres which can be primarily divided in two sub Architectures: 

1. The Process Architecture
2. The Memory Architecture

## The Process architecture
Postgres essentially works as a client-server application with multi-process support. The master of all the processes is the server process itself henceforth is was called postmaster before. It is the parent process. It starts up by allotting shared memory, launching background processes, and waiting for client connection requests. It manages the entire database cluster. Its also responsible for spinning up the backend processes for clients. After the server process we can divide the rest of the processes in two types as I like to remember them: 

1. Backend processes
2. Background processes: Background writer, checkpointer, etc.

### Backend processes
Backend processes handle all the queries and statements from connected clients. Each connection has its own backend process. 

### Background processes
The background processes have specific tasks and they are 7 in total. You can read up further on them but here I'll just mention a few to give you an idea. Background writer writes dirty pages to persistent storages such as SSD. Checkpointer as the name suggests checkpoints. Achiever logs the archiving logs and so on. TCP connection is used for connection with client and only one database can utilize the background processes and it needs to be specified by the client first.

## The Memory Architecture
Postgres has two types of memories: The local memory and the global or shared memory. Local memory is allocated to each backend process whereas Shared Memory is used by all the server processes. 

The local memory is allocated by the backend processes for its own use and are divided into sub-areas for different purposes, such as work memory and maintenance work memory while the shared memory is allocated the server itself and is allocated by the server at startup. Shared memory is also divided into sub-areas for storing pages, commit logs, etc. 

The memory of Heap Tables can be read either as a Sequential Scan or a more complex but efficient B-tree index scan.