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
private void processOthers(Set<PosixFilePermission> perms, byte b) { | |
if ((b & 0b1) != 0) | |
perms.add(PosixFilePermission.OTHERS_EXECUTE); | |
if ((b & 0b10) != 0) | |
perms.add(PosixFilePermission.OTHERS_WRITE); | |
if ((b & 0b100) != 0) | |
perms.add(PosixFilePermission.OTHERS_READ); | |
} |
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
cmake_minimum_required(VERSION 2.8) | |
set (PROJECT server) | |
project (${PROJECT}) | |
include_directories(include) | |
AUX_SOURCE_DIRECTORY(src SRC1) | |
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=gnu++11") | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") | |
add_executable (${PROJECT} ${SRC1} ${CMAKE_C_FLAGS}) |
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
cmake_minimum_required(VERSION 3.6) | |
project(test-app) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -openmp -fopenmp") | |
set(SOURCE_FILES main.cpp easylogging++.h) | |
add_executable(test-app ${SOURCE_FILES}) |
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 {NgModule} from '@angular/core'; | |
import {AppComponent} from './app.component'; | |
import {DEBUG, INFO, LoggingConfiguration} from './shared/utils/logging.service'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ |
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
image: weboaks/node-karma-protractor-chrome:xvfb | |
cache: | |
key: "$CI_COMMIT_REF_NAME" | |
paths: | |
- node_modules/ | |
before_script: | |
- npm install |
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
describe('Person class', () => { | |
it('should provide full name', () => { | |
const person = new Person('John', 'Smith'); | |
expect(person.fullName).toBeTruthy(); | |
expect(person.fullName).toEqual('John Smith') | |
}); | |
}); |
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 kotlinx.coroutines.delay | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.runBlocking | |
import java.util.concurrent.Executors | |
import java.util.concurrent.atomic.AtomicInteger | |
import kotlin.concurrent.thread | |
import kotlin.system.measureTimeMillis | |
val n = 100 | |
val delay = 1000L |
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
sudo sh -c 'for bin in /opt/jdk-12.0.1/bin/*; do update-alternatives --install /usr/bin/$(basename $bin) $(basename $bin) $bin 100; done' | |
sudo sh -c 'for bin in /opt/jdk-12.0.1/bin/*; do update-alternatives --set $(basename $bin) $bin; done' |
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
<span>Total users: {{ (users$ | async).length }}</span> | |
<div *ngFor="let user of users$ | async"> | |
{{ user.firstName }} {{ user.lastName }} | |
</div> |
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 { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; | |
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
import { TasksService } from '../tasks.service'; | |
import { Location } from '@angular/common'; | |
interface TaskForm { | |
name: string; | |
description: string; | |
} |
OlderNewer