Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
import { Component } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { DataService } from './service/data.service'; | |
interface Post { | |
userId: number; | |
id: number; | |
title: string; | |
body: string; | |
} |
ngOnInit() { | |
this.service.cryptoData().subscribe((res) => { | |
this.result = res; | |
this.coinPrice = this.result.data.coins.map((coins: any) => coins.price); | |
this.coinName = this.result.data.coins.map((coins: any) => coins.name); | |
console.log(this.coinPrice); | |
console.log(this.coinName); | |
this.chart = new Chart('canvas', { | |
type: 'bar', |
import { Component } from '@angular/core'; | |
import Chart from 'chart.js/auto'; | |
import { ChartService } from './service/chart.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
}) | |
export class AppComponent { |
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpHeaders } from '@angular/common/http'; | |
import { environment } from 'src/environments/environment'; | |
const httpOptions = { | |
headers: new HttpHeaders({ | |
'Content-Type': 'application/json', | |
'X-My-Custom-Header': `${environment.API_KEY}`, | |
'Access-Control-Allow-Origin': '*', | |
}), |
runtime: python27 | |
api_version: 1 | |
threadsafe: true | |
handlers: | |
- url: / | |
static_files: dist/[project-name]/index.html | |
upload: dist/[project-name]/index.html | |
- url: / | |
static_dir: dist/[project-name] | |
skip_files: |
/* ********** Online / Offline Detection ********** */ | |
// Request a small image at an interval to determine status | |
// ** Get a 1x1 pixel image here: http://www.1x1px.me/ | |
// ** Use this code with an HTML element with id="status" | |
const checkOnlineStatus = async () => { | |
try { | |
const online = await fetch("/1pixel.png"); | |
return online.status >= 200 && online.status < 300; // either true or false |
```java | |
import java.util.Scanner; | |
public class HelloWorld { | |
public static void main(String[] args) { | |
// Creates a reader instance which takes | |
// input from standard input - keyboard | |
Scanner reader = new Scanner(System.in); |
/** @type {import("snowpack").SnowpackUserConfig } */ | |
export default { | |
mount: { | |
/* ... */ | |
public: '/', | |
src: '/dist' | |
}, | |
plugins: [ | |
/* ... */ | |
], |
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import App from "./App"; | |
const rootElement = document.getElementById("root"); | |
const root = ReactDOM.createRoot(rootElement); | |
root.render(<App />); |