import React from 'react';
import { createRoot } from 'react-dom/client';
const App = ()=> <h1>React 18</h1>
const root = createRoot( document.getElementById("root") );
root.render( <App /> );
Angular 14 was released in June 2022 and includes various new features that will assist to reduce code complexity, make it more type-safe, decrease needless code size, and be more supporting in raising errors/warnings if something wrong occurs in templates.
Below are the hottest features:
1# Standalone Components/Pipes/Directive
import { Component } from "@angular/core";
@Component({
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Employees" : [ | |
{ | |
"userId":"rirani", | |
"jobTitleName":"Developer", | |
"firstName":"Romin", | |
"lastName":"Irani", | |
"preferredFullName":"Romin Irani", | |
"employeeCode":"E1", | |
"region":"CA", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "articles": [ | |
{ | |
"source": { id: "techcrunch", name: "TechCrunch" }, | |
author: "Brian Heater", | |
title: "Smartphone shipments jumped 27% globally in Q1", | |
description: "More good news from a smartphone market currently rebounding from the far reaching impacts of the pandemic. New numbers from Canalys put global shipments for Q1 2021 at 27% above where they were the same time last year. The industry was hit early and hit hard…", | |
url: "https://techcrunch.com/2021/04/29/smartphone-shipments-jumped-27-globally-in-q1/", | |
urlToImage: "https://techcrunch.com/wp-content/uploads/2021/03/GettyImages-1209693436.jpg?w=667", | |
publishedAt: "2021-04-29T14:07:15Z", | |
content: "More good news from a smartphone market currently rebounding from the far reaching impacts of the pandemic. New numbers from Canalys put global shipments for Q1 2021 at 27% above where they were the … [+1484 chars]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core'; | |
import {Observable} from 'rxjs/Observable'; | |
import 'rxjs/add/observable/fromEvent'; | |
@Component({ | |
selector: 'app', | |
template: ` | |
<p> | |
App works! | |
<button #btn> Click </button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
import urllib.request | |
import json | |
import webbrowser | |
API_KEY = '' | |
class NewsPanel1(wx.Panel): | |
def __init__(self, parent): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.calculator { | |
border: 1px solid #ccc; | |
border-radius: 5px; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
width: 400px; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import axios from 'axios'; | |
class FileUploadForm extends React.Component { | |
UPLOAD_ENDPOINT = 'http://127.0.0.1:8000/upload.php'; | |
constructor(props) { | |
super(props); | |
this.state ={ | |
file:null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import axios from 'axios'; | |
class FileUploadForm extends React.Component { | |
UPLOAD_ENDPOINT = 'http://127.0.0.1:8000/upload.php'; | |
constructor(props) { | |
super(props); | |
this.state ={ | |
file:null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: application/json; charset=utf-8'); | |
header("Access-Control-Allow-Origin: *"); | |
header("Access-Control-Allow-Methods: PUT, GET, POST"); | |
$response = array(); | |
$upload_dir = 'uploads/'; | |
$server_url = 'http://127.0.0.1:8000'; |
NewerOlder