three.js 모듈중 ttf 로더를 사용 했을 경우 nuxt build error 가 발생하였다.
opentype.module.js 내부에서 nodejs 의 ‘fs’ 라는 모듈을 사용하는데 nuxt 에서 이 키워드가 충돌 되나 보다. nuxt config 에서 해당 키워드를 지워주면 에러가 사라진다.
three.js 모듈중 ttf 로더를 사용 했을 경우 nuxt build error 가 발생하였다.
opentype.module.js 내부에서 nodejs 의 ‘fs’ 라는 모듈을 사용하는데 nuxt 에서 이 키워드가 충돌 되나 보다. nuxt config 에서 해당 키워드를 지워주면 에러가 사라진다.
Creating a generative AI platform requires a combination of knowledge in machine learning, software development, and domain-specific expertise depending on the type of content you want to generate (e.g., images, text, music, etc.). Here’s a general roadmap of the knowledge areas and some resources to get you started:
Lastly, remember that the field of AI and machine learning is vast and constantly evolving. It’s essential to stay curious and continue learning.
ChatGPT
Plastics are typically challenging to reassemble or reuse through chemical processes for several reasons:
While chemical recycling techniques are continually improving, they still face significant challenges in terms of efficiency, cost-effectiveness, and scalability. Mechanical recycling, such as melting and reshaping plastics, remains a more common and economically viable method for reusing plastics. Innovations in recycling technologies are ongoing, and researchers are exploring ways to make plastics more recyclable and environmentally friendly.
ChatGPT
Yes, plastic is typically derived from petroleum, which is a fossil fuel. The process of making plastic from petroleum involves several chemical steps, and it is called petrochemical production. Here’s a simplified overview of how plastic is produced from oil:
It’s important to note that not all plastics are made from petroleum. Some plastics can be produced from alternative feedstocks, such as natural gas or renewable resources like biomass. These alternative feedstocks can help reduce the environmental impact of plastic production and lessen dependence on fossil fuels. However, petroleum-based plastics are still the most common and widely used types of plastics.
ChatGPT
Research and studies related to plastic reuse and reassembly are ongoing in various fields, including materials science, chemistry, and engineering. These efforts aim to develop more sustainable methods for recycling and reusing plastics, reduce environmental impacts, and minimize plastic waste. Here are some areas of research and recent developments in the field of plastic reuse and reassembly:
It’s important to note that while significant progress has been made in plastic reuse and recycling, challenges remain, including economic viability, scalability, and consumer behavior. The development and adoption of more sustainable practices and technologies are ongoing efforts, and the effectiveness of these solutions will continue to evolve over time.
안드로이드 앱에 내가 만든 THREE.JS 뷰어를 로드 해야할 일이 생겼다.
threejs 캔버스가 들어간 HTML파일을 준비하고 다음과 같이 로드 해주면 된다. 단, 안드로이드 웹 앱에서 자바스크립트를 실행하려면 다음과 같은 설정이 필요하다.
webView.addJavascriptInterface(this, "android");
webView.loadUrl("javascript:android.onData(functionThatReturnsSomething)");
https://v2.nuxt.com/docs/configuration-glossary/configuration-target/
nuxt (vue) 를 정적 사이트 ( index.html ) 형태로 빌드 하고 싶다면 다음의 옵션을 조정하면 된다.
// nuxt.config.js
export defulat {
target: "static", // server 를 바꾼다.
ssr: false, // true
...
}
+ 추가사항 ) nuxt 는 SSR 이기 때문에 각 모듈을 렌더링 타임에 link 하는 방식으로 동작하여 완벽한 방식은 아니다
따라서 컴팩트한 html 을 원할 경우 SSR 이 아닌 다른 Front end 프레임워크 ( vue, flutter 등.. ) 을 사용하는게 좋다.

class Test {
constructor() {
this.func1 = () => {
// use keyword 'this' on the event handler
}
}
func2() {
// doesn't use keyword 'this' on the event handler
}
}
The differences between `func1` and `func2` in the provided JavaScript code relate to how they handle the context of the `this` keyword. Let’s break down the differences step by step.
1. **Arrow Function vs Regular Function:** `func1` is defined using an arrow function (`() => { … }`), whereas `func2` is defined using a regular function (`function() { … }`). Arrow functions capture the surrounding context, including the value of `this`, while regular functions have their own `this` binding that is determined by how the function is called.
2. **Binding of `this`:** In `func1`, since an arrow function is used, the value of `this` inside `func1` will refer to the instance of the `Test` class where `func1` is defined. This means that no matter where `func1` is called, the `this` context remains the same as the instance of the class. Arrow functions don’t have their own `this` context; they inherit it from their enclosing function (or in this case, the constructor). In `func2`, since a regular function is used, the value of `this` will depend on how `func2` is called. If `func2` is called as a method of the `Test` instance (`testInstance.func2()`), then `this` will refer to the instance. However, if `func2` is extracted and called in a different context (e.g., as a standalone function), the value of `this` can change, possibly leading to errors or unintended behavior.
3. **Usage in Event Handlers:** If you intend to use these functions as event handlers, `func1` might be more convenient. Since it’s an arrow function, it retains the instance context, ensuring that you can use the `this` keyword inside the event handler to refer to the instance of the class. On the other hand, if you use `func2` as an event handler, the value of `this` might change based on how the event is triggered, potentially leading to unexpected results or errors.
In summary, the key difference between `func1` and `func2` lies in how they handle the `this` keyword, with `func1` using an arrow function to maintain the instance context and `func2` relying on the standard function’s `this` binding, which can be influenced by how it’s called.
웹 페이지 상에 보여지는 부분만 캡쳐하는 것이 아닌 포함하는 웹페이지 전체영역을 한번에 캡쳐하는 방법이 있다.
이 방법은 크롬, 엣지에서만 사용 할수 있다.
방법은 다음과 같다.
토스 주식창에서 배당주 검색을 하다가 시티즌 파이낸셜이란 회사를 발견 했다.
금융 주식같은데 올해 상반기 재무실적을 보면 살짝 줄어들고 있는걸 확인했는데 반대로 주식은
작년 초반에 비해 무려 40%가량 떨어진 가격에서 횡보 하고 있는 것으로 보인다.
무엇때문에 떨어지다 다시 오르고 있는 걸까?
초이스 스탁에 내용을 살펴보니 해당 업종 독점이 상당한 것으로 보인다. 최근에 미국에서 뱅크런 사건이 연이어 터지고 있다는 뉴스를 많이 접하는데 그래서 그런걸까? 경쟁사들이 알아서 떨어져 나가 주니 나머지 재무가 탄탄한 은행들이 반사이익을 보고 있는 게 아닐까 싶다.
총 자산을 연단위로 봤을때 자산이 늘어나고 있어서 꽤 괜찮아 보이는데 금융쪽은 지식이 전혀 없어서 이게 들어가는게 맞는지 모르겠다. 해당 주식에 대한 토스 주식이나 각 사이트에 적혀있는 의견은 적극 구매라 이번달 월급이 들어오면 살짝 담가볼까 싶다.
여태까지 구입한 주식들이 거의 기술주 여서 다른 종목도 한번 경험해 보는 것도 나쁘지 않을 것 같다. 물론 내가 보기에 현재 상태가 매력적으로 보이기도 하고.. 여전히 분석에 대한 사이트는 전무해서 감으로 계속 해나가지 싶다.
// 클립보드로 내용 복사
// window.navigator.clipboard.writeText( [string] )
window.navigator.clipboard.writeText( 'content what you want' ).then( () => {
console.log( 'copy done' );
} );
// HTML 요소 내용 복사
// HTML document 내용 생략
<body>
<textarea id="myTextArea"/>
</body>
<script>
const myTextArea = document.getElementById( 'myTextArea' );
window.navigator.clipboard.writeText( myTextArea.value ).then( () => {
alert('copy done');
});
</script>
...
https://curryyou.tistory.com/480
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard