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 "ViewController.h" | |
@implementation ViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// We configure the video player to play a remote video | |
NSURL *movieURL = [NSURL URLWithString:@"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"]; |
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 "AppDelegate.h" | |
#import <MediaPlayer/MediaPlayer.h> | |
@implementation AppDelegate | |
{ | |
BOOL _isFullScreen; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ |
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
export interface Drink { | |
name: string; | |
alcoholByVolume: number; | |
} |
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 { Module, OnModuleInit } from '@nestjs/common'; | |
import { DrinkService } from './drink.service'; | |
import { DiscoveryModule, DiscoveryService } from "@nestjs/core"; | |
import { DRINK_PROVIDER, DrinkProvider } from "./drink.provider"; | |
@Module({ | |
imports: [ | |
DiscoveryModule, | |
], |
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 { INestApplication } from '@nestjs/common'; | |
import { Test } from '@nestjs/testing'; | |
import { DrinkModule } from './drink.module'; | |
import { SpiritModule } from './spirit/spirit.module'; | |
import { BeerModule } from './beer/beer.module'; | |
import { DrinkService } from './drink.service'; | |
describe('DrinkService', () => { | |
let app: INestApplication; |
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 { Module } from '@nestjs/common'; | |
import { HttpModule } from './http/http.module'; | |
import { FooModule } from './foo/foo.module'; | |
@Module({ | |
imports: [ | |
HttpModule, | |
FooModule, // <- we'll make use of the "augmented" HttpService in this module | |
], |
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 { Module } from '@nestjs/common'; | |
import { SequelizeModule } from '@nestjs/sequelize'; | |
const logger = new Logger('SQL'); | |
@Module({ | |
imports: [ | |
SequelizeModule.forRoot({ | |
logging: (sql) => logger.log(sql), | |
dialect: 'mysql', |
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 { Controller, Get } from '@nestjs/common'; | |
import { AppService } from './app.service'; | |
@Controller() | |
export class AppController { | |
constructor( | |
private readonly appService: AppService, | |
) {} |
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 { Module, OnModuleInit } from '@nestjs/common'; | |
import { ElasticsearchModule as BaseElasticsearchModule, ElasticsearchService } from '@nestjs/elasticsearch'; | |
import { v4 as uuid }from 'uuid'; | |
@Module({ | |
imports: [ | |
BaseElasticsearchModule.register({ | |
node: 'http://localhost:9200', | |
generateRequestId: () => uuid(), | |
}), |
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 { Logger, Module, OnModuleInit } from '@nestjs/common'; | |
import { ElasticsearchModule as BaseElasticsearchModule, ElasticsearchService } from '@nestjs/elasticsearch'; | |
import { v4 as uuid }from 'uuid'; | |
@Module({ | |
imports: [ | |
BaseElasticsearchModule.register({ | |
node: 'http://localhost:9200', | |
generateRequestId: () => uuid(), | |
}), |
OlderNewer