This file contains 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
#include <stdio.h> | |
void bubble_sort(int a[], int n) { | |
int i = 0, j = 0, tmp; | |
for (i = 0; i < n; i++) { // loop n times - 1 per element | |
for (j = 0; j < n - i - 1; j++) { // last i elements are sorted already | |
if (a[j] > a[j + 1]) { // swop if order is broken | |
tmp = a[j]; | |
a[j] = a[j + 1]; | |
a[j + 1] = tmp; | |
} |
This file contains 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
ReactDOM.render(React.createElement( | |
'h1', | |
null, | |
'Hello World!' | |
), document.getElementById('root')); |
This file contains 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
ReactDOM.render( | |
<h3>Hello World!</h3> | |
,document.getElementById('root') | |
); |
This file contains 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
const element=<h3>Hello World!</h3>; |
This file contains 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 ReactDOM from 'react-dom'; | |
import './index.css'; | |
import Hello from './App' | |
import registrationServiceWorker from './registrationServiceWorker'; | |
ReactDOM.render('Hello', document.getElementById('root')); | |
registrationServiceWorker(); |
This file contains 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, { Component } from 'react'; | |
import './App.css'; | |
class Hello extends Component { | |
render() { | |
return ( | |
<h3>Hello World!</h3> | |
); | |
} | |
} |
This file contains 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 { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { FormsModule } from '@angular/forms'; | |
import { AppModule } from './app/component'; | |
import { DemoComponent } from './components/demo/demo.component'; | |
@NgModule({ | |
declarations: [ | |
AppComponent, | |
DemoComponent |
This file contains 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
<app-demo></app-demo> |
This file contains 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
<h1>{{ message }}</h1> | |
<form> | |
<div> | |
<label for="message">essage: </label> | |
<input type="text" [(ngModel)]="message" name="message"> | |
</div> | |
</form> |
This file contains 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 { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-demo', | |
templateUrl: './demo.component.html', | |
styleUrls: './demo.component.scss' | |
}) | |
export class DemoComponent implements OnInit { | |
message: string, |
NewerOlder