Skip to content

Instantly share code, notes, and snippets.

View olegchir's full-sized avatar

Oleg Chirukhin olegchir

View GitHub Profile
public static Object sum(Object args) {
//Вначале есть нода, в которой ничего нет
Node result = new Node();
result.childList = new ArrayList<>();
result.numberList = new ArrayList<>();
//В ходе развертки всегда остается пара
while (args instanceof Pair) {
//Берем голову
Object firstArg = PairUtils.first(args);
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
[b]О компании[/b]
«Сбербанк-Технологии» — одна из самых молодых ИТ-компаний в России.[br]
В основе работы — многолетняя история Сбербанка, команда опытных менеджеров, талантливые разработчики и широкий спектр задач.
[b]Условия[/b]
[list]
[*] Работа в стабильной компании, развивающейся вместе с Группой компаний Сбербанк
[*] Амбициозные проекты
@olegchir
olegchir / jenkins-plugins-batch-install.md
Created March 16, 2017 09:10 — forked from hgomez/jenkins-plugins-batch-install.md
Mass install/update of Jenkins Plugins

Scripted Jenkins Plugins install

Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure.

Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) :

Create a file containing plugins to be installed (or updated), ie iplugins :

If WScript.Arguments.Count >= 1 Then
ReDim arr(WScript.Arguments.Count-1)
For i = 0 To WScript.Arguments.Count-1
Arg = WScript.Arguments(i)
If InStr(Arg, " ") > 0 Then Arg = """" & Arg & """"
arr(i) = Arg
Next
RunCmd = Join(arr)
CreateObject("Wscript.Shell").Run RunCmd, 0, True
STARTUPINFO si;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
ZeroMemory( &pi, sizeof(pi) );
// Spawn creates a cmd.exe window. CreateProcess doesn't.
//if ( _spawnl( _P_WAIT, szFileNameBAT, szFileNameBAT, NULL ) ) {
if ( !CreateProcess( szFileNameBAT, szFileNameBAT, NULL, NULL, false,