Skip to content

Instantly share code, notes, and snippets.

@dongsub-joung
dongsub-joung / 백준 5397 키로거 rust
Last active January 8, 2024 22:12
키로거5397.rs
// 백준 5397 키로거 rust
// https://www.acmicpc.net/problem/5397
use std::io::{stdin, BufRead};
fn main() {
let std= stdin();
let mut buf= std.lock().lines();
let input= buf.next().unwrap().unwrap();
@dongsub-joung
dongsub-joung / notWorking.js
Created December 21, 2023 06:15
value is nohting?
function showComment(commentText) {
const comment = document.createElement("div");
comment.classList.add("comment");
const paragraph = document.createElement("p");
paragraph.textContent = commentText;
comment.appendChild(paragraph);
commentsList.appendChild(comment);
}
let response= await fetch('https://myapp-api.ngrok.dev/comment/all');
@dongsub-joung
dongsub-joung / err.dart
Created December 18, 2023 11:03
it's not work
Future<http.Response> fetch_comments() {
return http.get(Uri.parse('https://myapp-api.ngrok.dev/comment/all'));
}
// my_reponsed_value
Instance of '_Future<Response>' X infinity loop
// Json
[{"id":1,"body":"------WebKitFormBoundary5NTYRxVNbLpG3FiD\r\nContent-Disposition: form-data; name=\"body\"\r\n\r\nhi\r\n------WebKitFormBoundary5NTYRxVNbLpG3FiD--\r\n"},{"id":2,"body":"------WebKitFormBoundaryyfVAO70JOwG1deJs\r\nContent-Disposition: form-data; name=\"body\"\r\n\r\nrust\r\n------WebKitFormBoundaryyfVAO70JOwG1deJs--\r\n"}]
@dongsub-joung
dongsub-joung / err.dart
Created December 18, 2023 04:05
1.A value of type 'Future<dynamic>' can't be returned from the method 'showDilong' because it has a return type of 'Future<void> Function()?'.dart
import 'package:flutter/material.dart';
class ScreenComment extends StatelessWidget {
Future<void> Function()? showDilong(BuildContext context) {
final TextEditingController _textFieldController = TextEditingController();
return showDialog(
context: context,
builder: (context) {
@dongsub-joung
dongsub-joung / Tax.java
Last active July 9, 2023 23:59
정동섭
// 정동섭
import java.util.ArrayList;
import java.util.Scanner;
class TaxRate{
final static int INTEREST1= 6;
final static int INTEREST2= 15;
final static int INTEREST3= 24;
final static int INTEREST4= 35;
final static int INTEREST5= 38;
// 정동섭
import java.util.*;
public class Lottery {
final static int MAX_SIZE= 6;
int[] lottery_numbers;
Lottery(){
HashSet hashSet= new HashSet();
// 정동섭
import java.util.Random;
import java.util.Scanner;
public class Election {
static final int MAX_SIZE= 10;
String[] candidates= new String[MAX_SIZE];
int people;
Election(){
//정동섭
import java.util.Random;
import java.util.Scanner;
public class MyNumber {
private int birthday_yyyy;
private int birthday_mm;
private int birthday_dd;
private boolean sex;
@dongsub-joung
dongsub-joung / MultiplicationTable.java
Last active July 3, 2023 05:04
the MultiplicationTable print
// 정동섭
public class MultiplicationTable {
public static void main(String[] args) {
System.out.println("[구구단 출력]");
for (int first=1; first<=9; first++){
for (int sec=1; sec<=9; sec++){
System.out.print(String.format("%02d X %02d = %2d ", sec,first, first*sec));
}
System.out.println();
}