Skip to content

Instantly share code, notes, and snippets.

View khex's full-sized avatar

Oleksii Kholiavko khex

View GitHub Profile
@khex
khex / seo.service.ts
Created April 8, 2017 13:19 — forked from kaaboeld/seo.service.ts
Example working service for adding meta tags to <head/> for angular2-universal. Based on http://blog.devcross.net/2016/04/17/angular-2-universal-seo-friendly-website/
import {Injectable,Inject,ElementRef, Renderer} from '@angular/core';
//import { DOCUMENT } from '@angular/platform/common_dom';
import {DOCUMENT} from '@angular/platform-browser';
@Injectable()
export class SeoService {
private _r: Renderer;
private _el: ElementRef;
private _document: any;
/**
package com.tasks6.rle;
public class Application {
public static void main( String[] args ) {
if (args != null) {
// порожній рядок або початок з пробілу >> ""
if (args[0].equal("") || args[0].charAt(0) == ' ') {
System.out.println("");
}
/**
* en.wikipedia.org/wiki/Fisher–Yates_shuffle
*/
function shuffleArray(textList) {
var array = textList.split(';')
var answ = array[0];
var answIndex, tempValue, rndIndex;
var currIndex = (array[4] === '-') ? 4 : 5;
// While there remain elements to shuffle...
/**
* en.wikipedia.org/wiki/Fisher–Yates_shuffle
*/
function shuffleArray(array) {
var answ = array[0];
var answIndex, tempValue, rndIndex;
var currIndex = (array[4] === '-') ? 4 : 5;
// While there remain elements to shuffle...
while (0 !== currIndex) {