1. Queue in Array

#include <stdio.h>
#include <stdlib.h>

#define SIZE 10000
#define INF		99999

int queue[SIZE];
int front = 0;
int rear = 0;

void push(int data) {
	if (rear >= SIZE - 1) {
		printf("Queue Overflow !!");
		return;
	}
	queue[rear++] = data;
}

int pop() {
	if (front == rear) {
		printf("Queue Underflow !!");
		return -INF;
	}

	return queue[front++];
}

void show() {
	printf("Front Of Queue \n");
	for (int i = front; i < rear; i++) {
		printf("%d \n", queue[i]);
	}
	printf("Rear Of Queue \n");
}

int main() {
	push(2);
	push(1);
	push(5);
	push(7);
	push(6);
	pop();
	push(8);
	pop();
	push(3);
	show();
	system("pause");
}

 

2. Queue in LinkedList

#include <stdio.h>
#include <stdlib.h>

#define INF		99999

typedef struct {
	int data;
	struct Node *next;
}Node;

typedef struct {
	struct Node *front;
	struct Node *rear;
	int count;
} Queue;

void push(Queue *queue, int data) {
	Node *node = (Node*)malloc(sizeof(Node));
	node->data = data;
	node->next = NULL;

	if (queue->count == 0) {
		queue->front = node;
	}
	else {		  
		Node *rearNode = (Node*)malloc(sizeof(Node));
		rearNode = queue->rear;
		rearNode->next = node;
	}			  
	queue->rear = node;	
	queue->count++;
}

int pop(Queue *queue) {
	if (queue->count == 0) {
		printf("Queue underflow !! \n");
		return -INF;
	}

	Node *node = (Node*)malloc(sizeof(Node));
	node = queue->front;
	int data = node->data;
	queue->front = node->next;
	free(node);

	queue->count--;
	return data;
}

void show(Queue *queue) {
	if (queue->count == 0) {
		printf("No data in Queue !! \n");
		return -INF;
	}

	Node* cur = queue->front;

	printf("Front Of Queue \n");
	while (cur != NULL) {
		printf("%d \n", cur->data);
		cur = cur->next;
	}
	printf("Rear Of Queue \n");
}

int main() {
	Queue queue;
	queue.count = 0;
	queue.front = NULL;
	queue.rear = NULL;

	push(&queue, 2);
	push(&queue, 1);
	push(&queue, 5);
	push(&queue, 7);
	push(&queue, 6);
	pop(&queue);
	push(&queue, 8);
	pop(&queue);
	push(&queue, 3);
	show(&queue);
	system("pause");
	return 0;
}

 

be the happy Gosu.

woojja ))*

반응형
LIST

'ETC > C, C++' 카테고리의 다른 글

[C, C++] Queue in Array, Linked List  (0) 2021.10.20
[C, C++] Stack in Array, Lined List  (0) 2021.10.20
[C, C++] Sorted Doubly Linked List  (0) 2021.10.20
Posted by woojja
TAG C, Queue

댓글을 달아 주세요

 

1. Stack in Array

#include <stdio.h>
#include <stdlib.h> 

#define SIZE 10000
#define INF		99999

int stack[SIZE];
int top = -1;

void push(int data) {
	if (top == SIZE - 1) {
		printf("Stack Overflow !!");
		return;
	}
	stack[++top] = data;
}

int pop() {
	if (top == -1) {
		printf("Stack Underflow !!");
		return -INF;
	}

	return stack[top--];
}

void show() {
	printf("Top Of Stack \n");
	for (int i = top; i >= 0; i--) {
		printf("%d \n", stack[i]);
	}
	printf("Bottom Of Stack \n");
}


int main() {							  
	push(2);
	push(1);
	push(5);
	push(7);
	push(6);
	pop();
	push(8);
	pop();
	push(3);
	show();
	system("pause");
	return 0;
}

2. Stack in Lined List

#include <stdio.h>
#include <stdlib.h>	 
#define INF		99999

typedef struct {
	int data;
	struct Node* next;
} Node;

typedef struct {
	struct Node *top;
} Stack;
					   
void push(Stack *stack, int data) {
	Node* node = (Node*)malloc(sizeof(Node));	

	node->data = data;
	node->next = stack->top;

	stack->top = node;
}

int pop(Stack *stack) {
	if (stack->top == NULL) {
		printf("Stack Underflow !!\n");
		return -INF;
	}

	Node* top = (Node*)malloc(sizeof(Node));
	top = stack->top;
	stack->top = top->next;
	int data = top->data;
	free(top);
	return data;
	
}

void show(Stack *stack) {
	Node* cur = stack->top;

	printf("Top Of Stack \n");
	while (cur != NULL) {
		printf("%d \n", cur->data);
		cur = cur->next;
	}
	printf("Bottom Of Stack \n");
}

int main() {
	Stack stack;
	stack.top = NULL;

	push(&stack, 2);
	push(&stack, 1);
	push(&stack, 5);
	push(&stack, 7);
	push(&stack, 6);
	pop(&stack);
	push(&stack, 8);
	pop(&stack);
	push(&stack, 3);
	show(&stack);
	system("pause");
	return 0;
}

be the happy Gosu.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC > C, C++' 카테고리의 다른 글

[C, C++] Queue in Array, Linked List  (0) 2021.10.20
[C, C++] Stack in Array, Lined List  (0) 2021.10.20
[C, C++] Sorted Doubly Linked List  (0) 2021.10.20
Posted by woojja
TAG C, stack

댓글을 달아 주세요

#include <stdio.h>
#include <stdlib.h> 

typedef struct {
	int data;
	struct Node *prev;
	struct Node *next;
} Node;

Node *head, *tail;

void insert(int data) {
	Node* node = (Node*)malloc(sizeof(Node));
	node->data = data;

	Node* cur;
	cur = head->next;
	while (cur->data < data && cur != tail) {
		cur = cur->next;
	}

	Node* prev = cur->prev;

	prev->next = node;
	node->prev = prev;

	cur->prev = node;
	node->next = cur;
}

void removeFront() {
	Node* node = head->next;
	head->next = node->next;

	Node* next = node->next;
	next->prev = head;

	free(node);
}

void show() {
	Node* cur = head->next;
	while (cur != tail) {
		printf("%d \n", cur->data);
		cur = cur->next;
	}
}

int main(void) {
	head = (Node*)malloc(sizeof(Node));
	tail = (Node*)malloc(sizeof(Node));
	head->prev = head;
	head->next = tail;
	tail->prev = head;
	tail->next = tail;

	insert(4);
	insert(9);
	insert(3);
	insert(1);
	insert(8);
	insert(7);
	insert(6);
	insert(2);
	removeFront();
	show();

	system("pause");
	return 0;
}

 

be the happy Gosu.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC > C, C++' 카테고리의 다른 글

[C, C++] Queue in Array, Linked List  (0) 2021.10.20
[C, C++] Stack in Array, Lined List  (0) 2021.10.20
[C, C++] Sorted Doubly Linked List  (0) 2021.10.20
Posted by woojja

댓글을 달아 주세요

2021. 10. 6. 15:47

GPS Location 관련 자료를 찾다가 알게된 Site 입니다.

https://drfone.wondershare.net/

 

[Official]Dr.Fone - Mobile Solutions for All iOS & Android Users

"Rest assured as Dr.Fone enjoys the trust of millions of users worldwide and it has won critical acclaim from reputed media outlets such as PC World, Forbes, CNET, etc. "

drfone.wondershare.net

 

해당 사이트의 아래 페이지를 보니 집에 가만히 앉아서도 GPS 관련 Game 이나 App 을 사용할 수 있겠네요. ^^

https://drfone.wondershare.net/ad/ios-virtual-location.html?gclid=EAIaIQobChMI3srRnLyy8wIVArqWCh0QtgA0EAMYASAAEgJy3fD_BwE 

 

[Official]Dr.Fone - Virtual Location: Spoof/Change Location on iPhone in 1 Click

 

drfone.wondershare.net

 

행복한 고수되십시오.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC' 카테고리의 다른 글

[ETC] Virtual Location  (0) 2021.10.06
[ETC] Paypal 개인결제 링크 만들기  (0) 2021.09.28
[ETC] VisualStudio Error  (0) 2020.04.16
[ETC] File Signatures  (0) 2017.10.12
[ETC] YouTube image Size  (0) 2016.04.06
[ETC] LG UPlus 결제모듈 연동을 위한 서버설정.  (0) 2014.10.08
Posted by woojja

댓글을 달아 주세요

Paypal 개인 결제 링크 만드는 방법입니다.

 

https://ko.wikihow.com/%ED%8E%98%EC%9D%B4%ED%8C%94-%EA%B2%B0%EC%A0%9C-%EB%A7%81%ED%81%AC-%EB%A7%8C%EB%93%9C%EB%8A%94-%EB%B2%95

 

페이팔 결제 링크 만드는 법

이 글은 결제를 받기 위해서 친구나 고객(또는 소셜미디어 게시물)에게 보낼 페이팔 결제 링크를 만드는 방법에 대해 설명한다. 페이팔을 연다. 웹 브라우저에 https://www.paypal.com/ 을 검색한다.

ko.wikihow.com

 

하지만 국내에서는 법률문제로 인해 국내 사용자간 Paypal 결제를 사용할 수 없다네요.

 

행복한 고수되셔요.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC' 카테고리의 다른 글

[ETC] Virtual Location  (0) 2021.10.06
[ETC] Paypal 개인결제 링크 만들기  (0) 2021.09.28
[ETC] VisualStudio Error  (0) 2020.04.16
[ETC] File Signatures  (0) 2017.10.12
[ETC] YouTube image Size  (0) 2016.04.06
[ETC] LG UPlus 결제모듈 연동을 위한 서버설정.  (0) 2014.10.08
Posted by woojja

댓글을 달아 주세요

개발자에게 정말 유용한 Repository 입니다.

구현하고 싶은 코드를 찾아보세요. 

참 멋진 분들 많습니다.

 

https://github.com/danistefanovic/build-your-own-x

 

GitHub - danistefanovic/build-your-own-x: 🤓 Build your own (insert technology here)

🤓 Build your own (insert technology here). Contribute to danistefanovic/build-your-own-x development by creating an account on GitHub.

github.com

 

행복한 고수되십시오.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC > Free Resources' 카테고리의 다른 글

[Free Resources] Build-your-own-x  (0) 2021.08.23
[Free Resources] Awesome CS Courses  (0) 2021.08.23
Posted by woojja

댓글을 달아 주세요

강좌들을 잘 정리해 놓은 Github Repository 를 알게되었습니다.

이제 공부만?  하면 되는 거겠죠? ^^;

 

 

https://github.com/prakhar1989/awesome-courses

 

GitHub - prakhar1989/awesome-courses: List of awesome university courses for learning Computer Science!

:books: List of awesome university courses for learning Computer Science! - GitHub - prakhar1989/awesome-courses: List of awesome university courses for learning Computer Science!

github.com

 

행복한 고수되십시오.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC > Free Resources' 카테고리의 다른 글

[Free Resources] Build-your-own-x  (0) 2021.08.23
[Free Resources] Awesome CS Courses  (0) 2021.08.23
Posted by woojja

댓글을 달아 주세요

2020. 4. 16. 10:34

VisualStudio 오류를 확인하던 중 ASCII 값에 대한 내용을 기록으로 남깁니다. ^^

 

System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Microsoft.CodeAnalysis.FindUsages.DefinitionItem.Create(ImmutableArray`1 tags, ImmutableArray`1 displayParts, ImmutableArray`1 sourceSpans, ImmutableArray`1 nameDisplayParts, ImmutableDictionary`2 properties, Boolean displayIfNoReferences)&#x000D;&#x000A;   at Microsoft.CodeAnalysis.FindUsages.DefinitionItem.Create(ImmutableArray`1 tags, ImmutableArray`1 displayParts, ImmutableArray`1 sourceSpans, ImmutableArray`1 nameDisplayParts, Boolean displayIfNoReferences)&#x000D;&#x000A;   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.GoToDefinition.NamedDefinitionItemExtensions.TryGetNavigableDefinitionItem(NamedDefinitionItem namedDefinition, Project currentProject, IFilePathDefinitionItemProvider filePathDefinitionItemProvider, JoinableTaskContext joinableTaskContext, DefinitionItem&amp; definitionItem)&#x000D;&#x000A;   at Microsoft.CodeAnalysis.Editor.TypeScript.Features.GoToDefinition.TypeScriptGoToSymbolService.&lt;GetSymbolsAsync&gt;d__4.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.CodeAnalysis.Editor.NavigableSymbols.NavigableSymbolService.NavigableSymbolSource.&lt;GetNavigableSymbolAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.&lt;QueryNavigableSymbolAsync&gt;d__35.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.&lt;SetMouseCursorAndNavigableSpanHelperAsync&gt;d__33.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.&lt;SetMouseCursorAndNavigableSpanHelperAsync&gt;d__33.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.&lt;&gt;c__DisplayClass32_0.&lt;&lt;SetMouseCursorAndNavigableSpanAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.&lt;JoinAsync&gt;d__78.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask`1.&lt;JoinAsync&gt;d__3.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.&lt;SetMouseCursorAndNavigableSpanAsync&gt;d__32.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.&lt;CallExtensionPointAsync&gt;d__32.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
더보기
System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.CodeAnalysis.FindUsages.DefinitionItem.Create(ImmutableArray`1 tags, ImmutableArray`1 displayParts, ImmutableArray`1 sourceSpans, ImmutableArray`1 nameDisplayParts, ImmutableDictionary`2 properties, Boolean displayIfNoReferences)    at Microsoft.CodeAnalysis.FindUsages.DefinitionItem.Create(ImmutableArray`1 tags, ImmutableArray`1 displayParts, ImmutableArray`1 sourceSpans, ImmutableArray`1 nameDisplayParts, Boolean displayIfNoReferences)    at Microsoft.CodeAnalysis.Editor.TypeScript.Features.GoToDefinition.NamedDefinitionItemExtensions.TryGetNavigableDefinitionItem(NamedDefinitionItem namedDefinition, Project currentProject, IFilePathDefinitionItemProvider filePathDefinitionItemProvider, JoinableTaskContext joinableTaskContext, DefinitionItem& definitionItem)    at Microsoft.CodeAnalysis.Editor.TypeScript.Features.GoToDefinition.TypeScriptGoToSymbolService.<GetSymbolsAsync>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.CodeAnalysis.Editor.NavigableSymbols.NavigableSymbolService.NavigableSymbolSource.<GetNavigableSymbolAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<QueryNavigableSymbolAsync>d__35.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<SetMouseCursorAndNavigableSpanHelperAsync>d__33.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<SetMouseCursorAndNavigableSpanHelperAsync>d__33.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<>c__DisplayClass32_0.<<SetMouseCursorAndNavigableSpanAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Threading.JoinableTask.<JoinAsync>d__78.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Threading.JoinableTask`1.<JoinAsync>d__3.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<SetMouseCursorAndNavigableSpanAsync>d__32.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.<CallExtensionPointAsync>d__32.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

 

 

 

https://www.facebook.com/groups/MHVB.Net/permalink/1679882212162998/

 

보안 확인 필요

메뉴를 열려면 alt + / 키 조합을 누르세요

www.facebook.com

 

행복한 고수되셔요.

 

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC' 카테고리의 다른 글

[ETC] Virtual Location  (0) 2021.10.06
[ETC] Paypal 개인결제 링크 만들기  (0) 2021.09.28
[ETC] VisualStudio Error  (0) 2020.04.16
[ETC] File Signatures  (0) 2017.10.12
[ETC] YouTube image Size  (0) 2016.04.06
[ETC] LG UPlus 결제모듈 연동을 위한 서버설정.  (0) 2014.10.08
Posted by woojja

댓글을 달아 주세요

ls -l 명령어는 사용가능하지만 ll 명령어는 찾을 수 없다는 메세지를 뱉을 때는...

 

sudo nano ~/.bashrc 를 입력하여 

주석처리되어 있는 아래 구문의 주석을 제거해준다.

#alias ll='ls -l' 

#alias la='ls -A'

#alias l='ls -CF'

 

이보다 먼저

sudo nano .bash_profile

를 열어

export PATH=%PATH:/bin:/usr/local/bin:/usr/bin

가 추가되어 있는지 확인해 보는 것도 좋다.

 

 

행복한 고수되셔요.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC > Raspberry Pi' 카테고리의 다른 글

[Raspberry Pi] ll, la 명령어 활성하는 방법  (0) 2020.03.12
[Raspberry Pi] WiFi 설정  (0) 2020.03.11
[Raspberry Pi] Raspberry pi SSH 연결  (0) 2020.03.11
Posted by woojja

댓글을 달아 주세요

windows command 창에서 ipconfig 명령어와 같은 명령어로

ifconfig 와  iwconfig 가 있다.

 

raspberry pi 의 기본 wifi 는 wlan0 으로 설정되어 있다.

 

sudo raspi-config 를 통해 wifi 설정이 가능하며

wifi 설정 이전에 국가 코드를 입력하는 화면이 나타나며

오류가 발생할 수 있으므로 기본 GB (영국) 을 수정하지 않았다.

SSID 명과 비밀번호를 입력하면 설정이 끝난다.

 

아래 명령을 통해 주변의 AccessPoint 를 검색하는 것도 가능하다.

sudo iwlist wlan0 scan

 

SSID 를 알고 있는 경우 아래와 같이 입력하여 지정가능하다.

sudo wpa_passphrase ssid password

==> sudo wpa_passphrase WoojjaAccessPoint WoojjaPassword

 

iwconfig 나 ifconfig 명령을 통해서 wlan0 이 설정되어 있는지 확인한다.

하지만 AccessPoint 가 숨김처리 되어 있다면 위 그림과 같이 연결되지 않을 수 있다.

 

이런 경우 아래 명령을 통해 해당 파일을 열어 

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

 

다음과 같이 추가할 구문이 있다.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
        ssid="WoojjaAccessPoint_SSID"
        #psk="WoojjaPassword"
        psk=98698b6c797140f3bWoojjaPassword53c04c5ed47948796e4920
}


==> 

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
        ssid="WoojjaAccessPoint_SSID"
        scan_ssid=1
        mode=0
        proto=WPA2
        pairwise=TKIP
        group=TKIP
        key_mgmt=WPA-PSK
        #psk="WoojjaPassword"
        psk=98698b6c797140f3bWoojjaPassword53c04c5ed47948796e4920
}

sudo reboot 명령을 실행하여  Reboot 한다.

 

잘 안되는 경우 해당 wlan0 내렸다가 올리는 명령어도 존재한다.

sudo ifconfig wlan0 down

sudo ifconfig wlan0 up

 

 

 

아래 글을 참고했습니다. 고맙습니다.

https://webnautes.tistory.com/903

 

Raspberry Pi 3 에서 무선랜(WiFi) 설정하는 방법

Raspberry Pi 3에 내장된 무선랜(WiFi)를 사용하기 위해 필요한 설정 방법에 대해서 다룹니다. 1. raspi-config를 사용시 문제점 2. 커맨드 명령으로 WiFi 연결 설정 및 테스트 3. 두 장소 이상에서 무선랜(WIFI)..

webnautes.tistory.com

 

행복한 고수되셔요.

 

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형
LIST

'ETC > Raspberry Pi' 카테고리의 다른 글

[Raspberry Pi] ll, la 명령어 활성하는 방법  (0) 2020.03.12
[Raspberry Pi] WiFi 설정  (0) 2020.03.11
[Raspberry Pi] Raspberry pi SSH 연결  (0) 2020.03.11
Posted by woojja

댓글을 달아 주세요

반응형