This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wordCounter(rowMsg): | |
wordsList = [] # 문자열에서 단어단위로 쪼개어 저장. | |
result = {} # 갯수를 딕셔너리에 저장. | |
start = 0 # 문자열을 인덱스 단위로 카운트할떄 시작과 끝. | |
end = 0 | |
# 문자열의 마지막에 공백문자를 넣어준다. | |
if rowMsg[len(rowMsg) - 1] != ' ': | |
rowMsg += ' ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bubbleSort(input): | |
for start in range(len(input) - 1): | |
for end in range(len(input) - 1): | |
if input[end] > input[end + 1]: | |
input[end+1], input[end] = input[end], input[end+1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def Fibonacci(start1 = 0, start2 = 1, end = 10): | |
result = [] | |
result.append(start1) | |
result.append(start2) | |
for count in range(2, end): | |
result.append(result[count - 1] + result[count -2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset = "UTF-8"> | |
<title>Receive</title> | |
<style> | |
.block { | |
background-color: #FFE4E1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hufs.ces.image.button; | |
import java.awt.Color; | |
import java.awt.EventQueue; | |
import java.awt.GridLayout; | |
import java.awt.Image; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.image.BufferedImage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int who_is_first (int age1, int age2, int(*cmp)(int n1, int n2)); | |
int older_first (int age1, int age2); | |
int younger_first (int age1, int age2); | |
int main(void) { | |
int age1 = 20; | |
int age2 = 30; | |
int first; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This example is rewritten based on the example from */ | |
/* <http://www.coe.uncc.edu/~abw/parallel/pthreads/pthreads.html */ | |
/* It illustrates the idea of shared memory programming */ | |
/* oct-03-2000 */ | |
#include <pthread.h> | |
#include <stdio.h> | |
#define MAX 50 | |
#define BUFLEN 24 | |
#define MAX_COUNT 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from __future__ import division | |
import ui | |
import clipboard | |
from console import hud_alert | |
shows_result = False | |
def button_tapped(sender): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x, y=map(int,input().split(' '));print("MTWTFSSOUEHRAUNEDUITN"[([4,2,6,4,1,5,3,0,5,2,2,6][-x]+y)%7::7]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# function define | |
def LIS(A): | |
S = [1 for num in range(0, len(A))] | |
I = [num for num in range(0, len(A))] | |
length = 0 | |
for i in range(0, len(A)): | |
for j in range(0, i): | |
if(A[j] < A[i] and S[i] < S[j]+1): | |
S[i] = S[j]+1 | |
I[i] = j |
OlderNewer