model-viewer의 github submodule (크로노스 그룹 gltf 모델 패키지) 업데이트 시도 할때 제목의 오류가 발생하면서 작업이 취소 되는 상황이 발생하여 찾아보다 해결방법을 발견하여 게시함
요약 ) github에서 RSA SSH키를 업데이트 하였으니 오류가 난다면 아래 방법으로 known hosts 파일을 업데이트 할것
다른 이런저런 정보는 발견하면 추가함
model-viewer의 github submodule (크로노스 그룹 gltf 모델 패키지) 업데이트 시도 할때 제목의 오류가 발생하면서 작업이 취소 되는 상황이 발생하여 찾아보다 해결방법을 발견하여 게시함
요약 ) github에서 RSA SSH키를 업데이트 하였으니 오류가 난다면 아래 방법으로 known hosts 파일을 업데이트 할것
다른 이런저런 정보는 발견하면 추가함
Javascript 에서 url 또는 path 로 표현된 파일을 인자로 받았을 때 이미지인지 아닌지 확인
// use Regexp
function isImage( fileName ) {
const regexp = /(\.jpg|\.jpeg|\.png)$/i;
return regexp.text( fileName );
}
console.log( isImage( 'test.png' ) ); // true
console.log( isImage( 'test.txt' ) ); // false
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.