๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

LeetCode ๐Ÿ”๏ธ/Binary

191. Number of 1 Bits

Today, I solved the Number of 1 Bits from Leetcode. Description: In this question, we are gonna work on changing the binary number to decimal numbers. There are two methods to solve this problem in Python: Solution1: The first solution, we are gonna divide the number to see the first bit is 1 or 0. For example, 17 is 10001. 10001 % 2 = 1 Now, keep moving to the right! 1000 % 2 = 0 100 % 2 = 0 10..

Web Programming ๐ŸŒ/Database ๐Ÿ‘ฉ๐Ÿป‍๐ŸŒพ

Postgresql SELECT & DELETE

This is the SELECT & DELETE commands in postgresql. Show the list of tables and owner. \d See the data of table. SELECT * FROM (table name); Delete a row with condition. DELETE FROM (schema).(table name) WHERE (table name).(column) = '(value)';

LeetCode ๐Ÿ”๏ธ/Binary

371. Sum of Two Integers

Today I soled the "Sum of Two Integers" Description: This question ask us how to get sum of the two integers without using sign "+" and "-." In example 2, a is 2 => 10 b is 3 => 11 a+b: 10 + 11 ----- 101 (which is 5) In binary number, 1 + 1 makes the carry "1" to the next slot. For carry "1", we are gonna use & a & b: 10 & 11 ----- 100(so move to left

Web Programming ๐ŸŒ/Back-End ๐Ÿฅท๐Ÿป

URL Redirection in PHP

Today, I learned about the URL Redirection in PHP. Manual redirect The simpest technique is to ask the visitor to follow a link to the new page, usually using an HTML anchor like: Please follow this link Using server-side scripting for redirection One can use the "header" function: header("HTTP/1.1 301 Moved Permanetly"); header("Location: https://www.example.com/"); exit(); Header() Example:

Web Programming ๐ŸŒ/Back-End ๐Ÿฅท๐Ÿป

Session with PHP

Today, I learned about the Session and header. Session A Session starts when you launch a website or web app and ends when you leave the website or close your browser window. Session allows you to maintain state information even when cllients disable cookies in their Web browsers. Session cookies contain information that is stored in a temporary memony location Session is known as transient cook..

Computer Science ๐ŸŒ‹/Git

Git Commands

Git Client Install(Git ํด๋ผ์ด์–ธํŠธ ์„ค์น˜) $ sudo apt install git Git Contribution Setting (Github์„œ๋ฒ„์— ์˜ฌ๋ฆด๋•Œ ์ž‘์„ฑ์ž) $ git config --global user.name "~" $ git config --global user.email "~@gmail.com" Set VScode as a default editor(VScode๋ฅผ ๊ธฐ๋ณธ ์—๋””ํ„ฐ๋กœ ์ง€์ •) $ git config --global croe.editor code-oss Set Root folder as a local storage (ํ•ด๋‹น ๋ฃจํŠธํด๋”๋ฅผ ๋กœ์ปฌ ์ €์žฅ์†Œ๋กœ ์ง€์ •) $ git init Command to check $ ls -a // sucess if you see .git D..

Web Programming ๐ŸŒ/Database ๐Ÿ‘ฉ๐Ÿป‍๐ŸŒพ

Login and Sign up System (PHP, SQL)

I made login and sign up page using PHP and MySQL. I skip the entire html code this time. Here is the method to pass the data to php files. Let's take a look at Sign up system first. Sign up I checked the email and password confirm first. For connecting this php file to our database we use the code: require_once("config.php"); So, we call the config.php for connecting current php file to databas..

Computer Science ๐ŸŒ‹/Network Programming ๐Ÿ›ฐ๏ธ

MAC Protocols (3)

Today, I learned about the CSMA collisions, "Taking turns" MAC protocols and Cable Internet. Compared to ALOHA, CSMA is more polite protocol algorithm. CSMA: Carrier Sense Multiple access CSMA: listen before transmit: If channel sensed idle: transmit entire frame. If channel sensed busy, defer transmission. In human analogy, "don't interrupt others!" Collision can still occur: Due to propagation..

Web Programming ๐ŸŒ/Database ๐Ÿ‘ฉ๐Ÿป‍๐ŸŒพ

Ubuntu Server, postgresql

Check the ubuntu server address and should have "~.pem" file Move to the library have .pem file Using file to enter Ubuntu server hosting on AWS. ssh -i "~.pem" ubuntu@(IP address) Enter Postgresql sudo -u (user) psql See the table [(user)=# \d Also, if you need to revise specific folder and using git. You need to move to the library. cd /var/www/html/ sudo git pull

Computer Science ๐ŸŒ‹/Network Programming ๐Ÿ›ฐ๏ธ

MAC Protocols (2)

Continue to previous review. An ideal multiple access protocol Given: broadcast channel of rate R bps Desiderata: When one node wants to transmit, it can send at rate R. When M nodes want to transmit, each can send at average rate R/M The protocol is fully decentralized: No special node to coordinate transmissions No synchronization of clocks, time slots No master node that represents a single p..

KB0129
'๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (9 Page)