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
import UIKit | |
func simpleAlert(_ controller: UIViewController, message: String) { | |
let alertController = UIAlertController(title: "경고", message: message, preferredStyle: .alert) | |
let alertAction = UIAlertAction(title: "확인", style: .default, handler: nil) | |
alertController.addAction(alertAction) | |
controller.present(alertController, animated: true, completion: nil) | |
} |
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
<?php | |
header('Content-Type: text/html; charset=utf-8'); | |
$seq = $_POST['seq']; | |
include "initializeDB.php"; | |
$sql = "delete from messages where seq='$seq'"; | |
if($mysqli->query($sql)) { |
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
// ===== Array ===== | |
var evenNumbers: [Int] = [2, 4, 6, 8] | |
// let evenNumbers: Array<Int> = [2, 4, 6, 8] | |
// let keyword는 immutable | |
evenNumbers.append(10) | |
evenNumbers += [12, 14, 16] | |
evenNumbers.append(contentsOf: [18, 20]) |
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 lang="ko"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
.image-container { | |
position: relative; |
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
let currentIdx = 1 | |
export function add() { | |
const $ul = document.getElementById("todo-list") | |
const $li = document.createElement("li") | |
$li.textContent = `할 일 ${currentIdx++}` | |
$ul.appendChild($li) | |
} |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Snake Game</title> | |
</head> | |
<body> | |
<canvas id="game-canvas" width="400" height="400"></canvas> |
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 com.example.awsboard.util; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
/** | |
* 페이지네이션을 위한 숫자 리스트 생성기 | |
* |
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 com.example.awsboard.web; | |
import com.example.awsboard.config.auth.LoginUser; | |
import com.example.awsboard.config.auth.dto.SessionUser; | |
import com.example.awsboard.service.posts.MidiService; | |
import com.example.awsboard.util.TimidityRunner; | |
import com.example.awsboard.web.dto.midi.MidiPublicResponseDTO; | |
import com.example.awsboard.web.dto.midi.MidiRequestDTO; | |
import com.example.awsboard.web.dto.midi.MidiResponseDTO; | |
import lombok.RequiredArgsConstructor; |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>IntersecionObserver: infinite scroll example</title> | |
<style> | |
body { | |
padding: 30px; | |
background-color: gray; | |
} |
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
import java.io.*; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
public class TimidityRunner { | |
// 여기로 보낼 때 루트 패스 포함해서 보냄. | |
public static File convertMidiToMp3(String midiPath) throws IOException { | |
Integer lastIndexOfDot = midiPath.lastIndexOf("."); |