๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ
![[Java] ๊ฐ์ฒด๋ ์์์ ์ต์์ ์์](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdOMj76%2FbtrRVvgDTSQ%2F3H9PzXoPks59JCoATEALK0%2Fimg.png)
[Java] ๊ฐ์ฒด๋ ์์์ ์ต์์ ์์
์ํผ ํด๋์ค People๊ณผ ์๋ธ ํด๋์ค Student (1) ์ํผ ํด๋์ค People public class People { private String name; private String phoneNumber; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } } (2) ์๋ธ ํด๋์ค Student public class Student ext..
![[๋ฆฌํฉํฐ๋ง 2ํ] 11.8 ์์ฑ์๋ฅผ ํฉํฐ๋ฆฌ ํจ์๋ก ๋ฐ๊พธ๊ธฐ](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcymgRF%2FbtrRQjuOuf7%2FgBi1wk6AmHzvKKB4wCXyQ1%2Fimg.png)
[๋ฆฌํฉํฐ๋ง 2ํ] 11.8 ์์ฑ์๋ฅผ ํฉํฐ๋ฆฌ ํจ์๋ก ๋ฐ๊พธ๊ธฐ
์ฐธ๊ณ : ํฉํ ๋ฆฌ ํจ์๋? https://ui.toast.com/posts/ko_20160905 ์๋ฐ์คํฌ๋ฆฝํธ์์ ํฉํ ๋ฆฌ ํจ์๋ ๋ฌด์์ธ๊ฐ? ํจ์์ ๊ฐ์ฒด๋ฅผ ๋ฐฐ์ฐ์ง ์๊ณ ์๋ ์๋ฐ์คํฌ๋ฆฝํธ ํ๋ก๊ทธ๋๋จธ๋ก์ ๋ ๋์๊ฐ ์ ์์ ๊ฒ์ด๋ฉฐ, ์ด ๋ ๊ฐ์ง๊ฐ ํจ๊ป ์ฌ์ฉ๋๋ ๊ฒฝ์ฐ ์กฐํฉ์ด๋ผ ๋ถ๋ฆฌ๋ ๊ฐ๋ ฅํ ๊ฐ์ฒด ํจ๋ฌ๋ค์์ ์์ํ๋๋ฐ ํ์๋ก ํ๋ ui.toast.com https://tpgns.github.io/2018/04/08/javaScript-factory-function-with-es6/ ES6+์ ํฉํ ๋ฆฌ ํจ์ - mido ์ด ๊ธ์ Eric Elliott ์ด medium์์ ์ฐ์ฌํ๋ Composing Software ์๋ฆฌ์ฆ๋ฅผ ๋ฒ์ญํ ๊ฒ์ ๋๋ค. [์๋ฌธ๋ณด๊ธฐ] Smoke Art Cubes to Smoke — MattysFlicks..
![[Node.js] (1) ์ฒซ ์์, Node ์๋ฒ ์์ฑ](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FETBQS%2FbtrRRYbzFh6%2FNaDPJEzxaOWbz0MkaSYokk%2Fimg.png)
[Node.js] (1) ์ฒซ ์์, Node ์๋ฒ ์์ฑ
๋ฏธ๋ฆฌ๋ณด๊ธฐ const http = require('http'); const server = http.createServer((req, res) => { console.log(req); }); server.listen(3000); ์ค๋น : ํ๋ก์ ํธ, ๊ณต์ ํํ์ด์ง ์ค๋ช ์ https://nodejs.dev/en/learn/ Introduction to Node.js Getting started guide to Node.js, the server-side JavaScript runtime environment. Node.js is built on top of the Google Chrome V8 JavaScript engine, and it's mainly used to create web servers - b..
[mac] mac hosts ํ์ผ ์์ ๋ฐ E325: ATTENTION Found a swap file by the name
https://am05307.tistory.com/143 ๋ฆฌ๋ ์ค | E325: ATTENTION Found a swap file by the name ".hosts.swp" 1. ์ด์์ํฉ : ๋ฆฌ๋ ์ค์์ hosts ํ์ผ ํธ์งํ๋ ค๊ณ vim /etc/hosts ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ์ ๋ ํ์ ๋ ํด๋น ๋ฌธ๊ตฌ๋ธ. ์ฐพ์๋ณด๋ ํธ์ง์ค์ด๋ ์ํ๋ก ์ฐฝ์ ๋ซ์์ ์์ ์ ์ฅ ํ์ผ์ด ์๊ธด๊ฑฐ๊ณ , ์์ ์ ์ฅ๋ ํ์ผ am05307.tistory.com https://dream-reverseengineer.tistory.com/entry/vivim-Found-a-swap-file-by-the-name-2%EA%B0%80%EC%A7%80-%ED%95%B4%EA%B2%B0-%EB%B0%A9%EB%B2%95 [vi/vim] Found a swa..
![[Spine, js] Math.atan ํ์ฉ](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbwFDxh%2FbtrRHBhDsQb%2FTsQyciIpBE0wWNaotSfw4k%2Fimg.png)
[Spine, js] Math.atan ํ์ฉ
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan https://www.cuemath.com/trigonometry/arctan/ ์ผ๊ฐ๋ฒ์์ arctan ์ ์ญ ํ์ ํธ ํจ์๋ฅผ ๋ํ๋ ๋๋ค. ์ญ์ผ๊ฐ ํจ์๋ ์ผ๋ฐ์ ์ผ๋ก ์ ๋์ฌ - arc๋ฅผ ๋๋ฐํฉ๋๋ค. ์ํ์ ์ผ๋ก ์ฐ๋ฆฌ๋ arctan ๋๋ ์ญํ์ ํธ ํจ์๋ฅผ tan -1 x ๋๋ arctan(x)๋ก ๋ํ๋ ๋๋ค. ์ํฌํ ๊ณต์ ์์์ ๋ ผ์ํ ๋ฐ์ ๊ฐ์ด arctan์ ๊ธฐ๋ณธ ๊ณต์์ arctan(์์ง/๋ฐ๋ฉด) = θ๋ก ์ฃผ์ด์ง๋ฉฐ, ์ฌ๊ธฐ์ θ๋ ๋น๋ณ๊ณผ ์ง๊ฐ ์ผ๊ฐํ์ ๋ฐ๋ฉด ์ฌ์ด์ ๊ฐ๋์ ๋๋ค. ๊ฐ๋ θ์ ๊ฐ์ ๊ฐ๋ ๋๋ ๋ผ๋์์ผ๋ก ์ฐพ๊ธฐ ์ํด arctan์ ๋ํด ์ด ๊ณต์์ ์ฌ..
[Git ๊น ์์คํธ๋ฆฌ] ์์คํธ๋ฆฌ ๊ณต์ ๋ฉ๋ด์ผ ์ ์ฃผํ ์์
git reset HEAD --hard dev ๋ธ๋์น์์ qa๋ก ๋ด๊ฐ ๊ฐ๋ฐํ ๋ถ๋ถ๋ง ์ฒด๋ฆฌํฝํด์ผํ ๊ฒ์ ์ค์๋ก ๋ค๋ฅธ ๋ถ์ ๊ฐ๋ฐ ์ปค๋ฐ์ ์ฒด๋ฆฌํฝํ์ฌ์ ๊ณค๋์ ๊ฒช์ ๋ปํ์๋ค. git reset HEAD --hard ๋ก ์ด์ ์ฉกํ๊ฒ ๋จ์์๋ ๊ฒ๋ค ๋ค ๋ ๋ ค๋ฒ๋ฆฌ๊ณ ํ๋ฒ ๋ git pull ํ๊ณ ์ ์์ ์ผ๋ก ์ฒด๋ฆฌํฝ ์์ ๊ฐ์ ์ฌ๊ฑด์ ๊ณ๊ธฐ๋ก, ์ง์ฅ์์-์จ-git ์ธํ๋ฐ ๊ฐ์๋ฅผ ์ ์ฃผํํด๋ณด๋๋ก ํ๋ค. https://support.atlassian.com/bitbucket-cloud/docs/tutorial-learn-bitbucket-with-sourcetree/ Tutorial: Learn Bitbucket with Sourcetree | Bitbucket Cloud | Atlassian Support Want to mast..
![ํ
์คํธ ์๋ํ ํ๋ ์์ํฌ Mocha ๊ณต์ ๋ฉ๋ด์ผ ๋ฐ๋ผํ๊ธฐ (2)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fczbt1t%2FbtrPYCQgJxr%2FL7jvLqi0YtsaZbpGokOZMK%2Fimg.png)
ํ ์คํธ ์๋ํ ํ๋ ์์ํฌ Mocha ๊ณต์ ๋ฉ๋ด์ผ ๋ฐ๋ผํ๊ธฐ (2)
1. chai mocha ๊ณตํ์์ chai ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ์ฒํ๋ฏ๋ก, ํด๋น ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ ์ฉํด์ mocha + chai assert style ์์ ๋ฅผ ์์ฑํด๋ณด๊ฒ ๋ค. 2. chai ์ค์น Installation - Chai Installation Chai is available for both node.js and the browser using any test framework you like. There are also a number of other tools that include Chai. Node.js Package is available through npm: Recommend adding it to package.json devDependencies using www.chaijs.com ์๋ ๋ช ..
![ํ
์คํธ ํ๋ ์์ํฌ Jest ๋ฉ์๋ ์ ๋ฆฌ](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcHBLHN%2FbtrPZaTIJPh%2FazdpMO2tXjFQKPYcvsx3Wk%2Fimg.png)
ํ ์คํธ ํ๋ ์์ํฌ Jest ๋ฉ์๋ ์ ๋ฆฌ
toBe const fn = { add: (num1, num2) => num1 + num2, } module.exports = fn; const fn = require('./fn'); test('์ฒซ๋ฒ์งธ ํ ์คํธ์ ๋๋ค!', () => { expect(1).toBe(1); }); test('์ด๊ฒ์ ํ์ดํ๋ค', () => { expect('ํ์ดํ').toBe('ํ์ดํ'); }); //์ฑ๊ณต ์ผ์ด์ค test('fn.add(2,3) = 5', () => { expect(fn.add(2, 3)).toBe(5); }); //์คํจ ์ผ์ด์ค test('fn.add(2,3) =! 7', () => { expect(fn.add(2, 3)).toBe(7); }); toEqual๊ณผ toS..
![ํ
์คํธ ์๋ํ ํ๋ ์์ํฌ Mocha ๊ณต์ ๋ฉ๋ด์ผ ๋ฐ๋ผํ๊ธฐ (1)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FooPLW%2FbtrPSZ5xfMs%2FnkEgnyOvpwBMQl8dQHJXJ1%2Fimg.png)
ํ ์คํธ ์๋ํ ํ๋ ์์ํฌ Mocha ๊ณต์ ๋ฉ๋ด์ผ ๋ฐ๋ผํ๊ธฐ (1)
Mocha - the fun, simple, flexible JavaScript test framework Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct te mochajs.org ํ์ฌ์์ ํ ์คํธ ํ๋ ์์ํฌ ์ค jest์ mocha ์ค mocha๋ฅผ ์ฑํํ๋ ์ชฝ์ผ๋ก ๊ธฐ์ธ์ฌ์ง๊ณ ์๋ ๊ฒ ๊ฐ์์ mocha ๊ณต..
![Array.CreateInstance ๋ฉ์๋](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FrQDrS%2FbtrN4EJqimo%2FUOk5tMAWXqxBIvPaHkKKc1%2Fimg.png)
Array.CreateInstance ๋ฉ์๋
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { Array myArr1 = Array.CreateInstance(typeof(int),10); Console.Write($"myArr1.GetLowerBound(0) : {myArr1.GetLowerBound(0)} "); //0 Console.Write($"myArr1.GetUpperBound(0) : {myArr1.GetUpperBound(0)} "); //9 Con..