text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using JPB.RemoteAdmin.Client.Native;
using JPB.RemoteAdmin.Client.WpfUi.ViewModel.MainWindow;
using JPB.RemoteAdmin.Common.Messages;
using JPB.WPFBase.MVVM.DelegateCommand;
using JPB.WPFBase.MVVM.ViewModel;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Controls;

namespace JPB.RemoteAdmin.Client.WpfUi.ViewModel
{
    public class FileInfoViewModel : AsyncViewModelBase
    {
        private readonly SingelClientViewModel _singelClientViewModel;

        public FileInfoViewModel(FileInfoMessage info, SingelClientViewModel singelClientViewModel)
            : this()
        {
            _singelClientViewModel = singelClientViewModel;
            Self = info;
            CheckForExistingContent();
        }

        public void CheckForExistingContent()
        {
            if (_singelClientViewModel == null)
                return;

            base.SimpleWork(() =>
            {
                var combine = Path.Combine(this._singelClientViewModel.ClientInstance.GetTargetDir(), Path.GetFileName(Self.Path));
                if (Self.Type == FileType.File)
                {
                    if (File.Exists(combine))
                    {
                        PathToTarget = combine;
                    }
                }
                else if(Self.Type == FileType.Directory)
                {
                    if (Directory.Exists(combine))
                    {
                        PathToTarget = combine;
                    }
                }
            });
        }

        public FileInfoViewModel()
        {
            FileInfoMessages = new ThreadSaveObservableCollection<FileInfoViewModel>();
            ExecuteProcessCommand = new DelegateCommand(ExecuteExecuteProcess, CanExecuteExecuteProcess);
            RemoveProcessCommand = new DelegateCommand(ExecuteRemoveProcessCommand);
            LoadCommand = new DelegateCommand(ExecuteLoad, CanExecuteLoad);
        }

        public FileInfoViewModel(IEnumerable<FileInfoViewModel> sub)
            : this()
        {
            FileInfoMessages = new ThreadSaveObservableCollection<FileInfoViewModel>(sub);
        }

        private string _pathToTarget;

        public string PathToTarget
        {
            get { return _pathToTarget; }
            set
            {
                _pathToTarget = value;
                SendPropertyChanged(() => PathToTarget);
            }
        }

        ImageSource _icon;

        public ImageSource Icon
        {
            get
            {
                if (_icon != null)
                    return _icon;

                using (var memstream = new MemoryStream(Self.Icon))
                {
                    var mp = new BitmapImage();
                    mp.BeginInit();
                    mp.StreamSource = memstream;

                    mp.EndInit();
                    _icon = mp;
                }
                return _icon;
            }
        }

        public FileInfoMessage Self { get; set; }
        public ThreadSaveObservableCollection<FileInfoViewModel> FileInfoMessages { get; private set; }
        public DelegateCommand LoadCommand { get; private set; }

        public DelegateCommand RemoveProcessCommand { get; private set; }

        private async void ExecuteRemoveProcessCommand(object sender)
        {
            this._singelClientViewModel.ClientInstance.RemoveProcess(Self.Path);
        }

        public DelegateCommand ExecuteProcessCommand { get; private set; }

        public async void ExecuteExecuteProcess(object sender)
        {
            this._singelClientViewModel.ClientInstance.StartRemoteProcess(Self.Path);
        }

        public bool CanExecuteExecuteProcess(object sender)
        {
            return true;
        }

        private int _processOfLoading;

        public int ProcessOfLoading
        {
            get { return _processOfLoading; }
            set
            {
                _processOfLoading = value;
                ThreadSaveAction(() =>
                {
                    SendPropertyChanged(() => ProcessOfLoading);
                });
            }
        }

        private bool _isExpanded;

        public bool IsExpanded
        {
            get { return _isExpanded; }
            set
            {
                if (value && !_isExpanded)
                {
                    if (LoadCommand.CanExecute(this))
                        LoadCommand.Execute(this);
                }
                _isExpanded = value;
                SendPropertyChanged(() => IsExpanded);
            }
        }

        private void ExecuteLoad(object sender)
        {
            FileInfoMessages.Clear();

            base.SimpleWork(() =>
            {
                if (Self.Type == FileType.File)
                {
                    PathToTarget = this._singelClientViewModel.ClientInstance.PullFileOrDirectory(Self.Path, Self.Size, s =>
                    {
                        ProcessOfLoading = s;
                    });
                }
                else
                {
                    var fileInfoMessages = this._singelClientViewModel.ClientInstance.GetDirs(Self.Path).Select(s => new FileInfoViewModel(s, _singelClientViewModel));
                    _singelClientViewModel.FileSystemViewModel.CurrentRoot = this;
                    base.ThreadSaveAction(() =>
                    {
                        foreach (var fileInfoViewModel in fileInfoMessages)
                        {
                            this.FileInfoMessages.Add(fileInfoViewModel);
                        }
                    });
                }
            });
        }

        public bool CanExecuteLoad(object sender)
        {
            return _singelClientViewModel != null && Self.Path != DBNull.Value.ToString() && !FileInfoMessages.Any();
        }
    }
}


text:
package engine

import (
	"strings"

	"github.com/go-errors/errors"

	"github.com/kainoaseto/infantry/clients"
	"github.com/kainoaseto/infantry/environment"
	"github.com/kainoaseto/infantry/logger"
)

/*
 * Anything marked with "RO" will have a default that is grabbed from an environment variable and the setting is
 * exists simply for accessiblity
 */
type (
	ServerSettings struct {
		Port        string // Port that the service will be accesible on
		Environment string // RO: The name of the environment that this will will live in
		Cluster     string // RO: The name of the service cluster that this will live in
		App         string // RO: The name of the service
	}

	Kernel struct {
		Server  ServerSettings // Server Settings defined above to be set before server creation
		Env     EnvManager     // Environment manager to handle all things with the env variables
		Clients ClientManager  // Client manager for all external communication with known services
		Logger  LoggingManager // LoggingManager that handles all things logging related
	}
)

func (k *Kernel) NewKernel() (*Kernel, error) {

}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.logging.log4j.core.layout;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.MarkerManager;
import org.apache.logging.log4j.ThreadContext;
import org.apache.logging.log4j.core.BasicConfigurationFactory;
import org.apache.logging.log4j.core.Layout;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.ConfigurationFactory;
import org.apache.logging.log4j.core.impl.Log4jLogEvent;
import org.apache.logging.log4j.core.lookup.MainMapLookup;
import org.apache.logging.log4j.message.SimpleMessage;
import org.apache.logging.log4j.util.Strings;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.*;

/**
 *
 */
public class PatternLayoutTest {
    static ConfigurationFactory cf = new BasicConfigurationFactory();
    static String msgPattern = "%m%n";
    static String OUTPUT_FILE = "target/output/PatternParser";
    static final String regexPattern = "%replace{%logger %msg}{\\.}{/}";
    static String WITNESS_FILE = "witness/PatternParser";

    public static void cleanupClass() {
        ConfigurationFactory.removeConfigurationFactory(cf);
    }

    @BeforeClass
    public static void setupClass() {
        ConfigurationFactory.setConfigurationFactory(cf);
        final LoggerContext ctx = LoggerContext.getContext();
        ctx.reconfigure();
    }

    LoggerContext ctx = LoggerContext.getContext();

    Logger root = ctx.getLogger("");

    @After
    public void after() {
        ThreadContext.clearMap();
    }

    @Test
    public void testHeaderFooterJavaLookup() throws Exception {
        // % does not work here.
        final String pattern = "%d{UNIX} MyApp%n${java:version}%n${java:runtime}%n${java:vm}%n${java:os}%n${java:hw}";
        final PatternLayout layout = PatternLayout.newBuilder().withConfiguration(ctx.getConfiguration())
                .withHeader("Header: " + pattern).withFooter("Footer: " + pattern).build();
        final byte[] header = layout.getHeader();
        assertNotNull("No header", header);
        final String headerStr = new String(header);
        assertTrue(headerStr, headerStr.contains("Header: "));
        assertTrue(headerStr, headerStr.contains("Java version "));
        assertTrue(headerStr, headerStr.contains("(build "));
        assertTrue(headerStr, headerStr.contains(" from "));
        assertTrue(headerStr, headerStr.contains(" architecture: "));
        //
        final byte[] footer = layout.getFooter();
        assertNotNull("No footer", footer);
        final String footerStr = new String(footer);
        assertTrue(footerStr, footerStr.contains("Footer: "));
        assertTrue(footerStr, footerStr.contains("Java version "));
        assertTrue(footerStr, footerStr.contains("(build "));
        assertTrue(footerStr, footerStr.contains(" from "));
        assertTrue(footerStr, footerStr.contains(" architecture: "));
    }

    /**
     * Tests LOG4J2-962.
     */
    @Test
    public void testHeaderFooterMainLookup() {
        MainMapLookup.setMainArguments("value0", "value1", "value2");
        final PatternLayout layout = PatternLayout.newBuilder().withConfiguration(ctx.getConfiguration())
                .withHeader("${main:0}").withFooter("${main:2}").build();
        final byte[] header = layout.getHeader();
        assertNotNull("No header", header);
        final String headerStr = new String(header);
        assertTrue(headerStr, headerStr.contains("value0"));
        //
        final byte[] footer = layout.getFooter();
        assertNotNull("No footer", footer);
        final String footerStr = new String(footer);
        assertTrue(footerStr, footerStr.contains("value2"));
    }

    @Test
    public void testHeaderFooterThreadContext() throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("%d{UNIX} %m")
                .withConfiguration(ctx.getConfiguration()).withHeader("${ctx:header}").withFooter("${ctx:footer}")
                .build();
        ThreadContext.put("header", "Hello world Header");
        ThreadContext.put("footer", "Hello world Footer");
        final byte[] header = layout.getHeader();
        assertNotNull("No header", header);
        assertTrue("expected \"Hello world Header\", actual " + Strings.dquote(new String(header)),
                new String(header).equals(new String("Hello world Header")));
    }

    private void testMdcPattern(final String patternStr, final String expectedStr, final boolean useThreadContext)
            throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern(patternStr)
                .withConfiguration(ctx.getConfiguration()).build();
        if (useThreadContext) {
            ThreadContext.put("key1", "value1");
            ThreadContext.put("key2", "value2");
        }
        final LogEvent event = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello")).build();
        final byte[] result = layout.toByteArray(event);
        assertEquals(expectedStr, new String(result));
    }

    @Test
    public void testMdcPattern1() throws Exception {
        testMdcPattern("%m : %X", "Hello : {}", false);
    }

    @Test
    public void testMdcPattern2() throws Exception {
        testMdcPattern("%m : %X{key1}", "Hello : value1", true);
    }

    @Test
    public void testMdcPattern3() throws Exception {
        testMdcPattern("%m : %X{key2}", "Hello : value2", true);
    }

    @Test
    public void testMdcPattern4() throws Exception {
        testMdcPattern("%m : %X{key3}", "Hello : ", true);
    }

    @Test
    public void testMdcPattern5() throws Exception {
        testMdcPattern("%m : %X{key1}, %X{key2}, %X{key3}", "Hello : value1, value2, ", true);
    }

    @Test
    public void testRegex() throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern(regexPattern)
                .withConfiguration(ctx.getConfiguration()).build();
        final LogEvent event = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world!")).build();
        final byte[] result = layout.toByteArray(event);
        assertEquals("org/apache/logging/log4j/core/layout/PatternLayoutTest Hello, world!", new String(result));
    }

    @Test
    public void testRegexEmptyMarker() throws Exception {
        // replace "[]" with the empty string
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("[%logger]%replace{[%marker]}{\\[\\]}{} %msg")
                .withConfiguration(ctx.getConfiguration()).build();
        // Not empty marker
        final LogEvent event1 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMarker(MarkerManager.getMarker("TestMarker")) //
                .setMessage(new SimpleMessage("Hello, world!")).build();
        final byte[] result1 = layout.toByteArray(event1);
        assertEquals("[org.apache.logging.log4j.core.layout.PatternLayoutTest][TestMarker] Hello, world!", new String(result1));
        // empty marker
        final LogEvent event2 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world!")).build();
        final byte[] result2 = layout.toByteArray(event2);
        assertEquals("[org.apache.logging.log4j.core.layout.PatternLayoutTest] Hello, world!", new String(result2));
    }

    @Test
    public void testEqualsEmptyMarker() throws Exception {
        // replace "[]" with the empty string
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("[%logger]%equals{[%marker]}{[]}{} %msg")
                .withConfiguration(ctx.getConfiguration()).build();
        // Not empty marker
        final LogEvent event1 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMarker(MarkerManager.getMarker("TestMarker")) //
                .setMessage(new SimpleMessage("Hello, world!")).build();
        final byte[] result1 = layout.toByteArray(event1);
        assertEquals("[org.apache.logging.log4j.core.layout.PatternLayoutTest][TestMarker] Hello, world!", new String(result1));
        // empty marker
        final LogEvent event2 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world!")).build();
        final byte[] result2 = layout.toByteArray(event2);
        assertEquals("[org.apache.logging.log4j.core.layout.PatternLayoutTest] Hello, world!", new String(result2));
    }

    @Test
    public void testSpecialChars() throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("\\\\%level\\t%msg\\n\\t%logger\\r\\n\\f")
                .withConfiguration(ctx.getConfiguration()).build();
        final LogEvent event = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world!")).build();
        final byte[] result = layout.toByteArray(event);
        assertEquals("\\INFO\tHello, world!\n\torg.apache.logging.log4j.core.layout.PatternLayoutTest\r\n\f",
                new String(result));
    }

    @Test
    public void testUnixTime() throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("%d{UNIX} %m")
                .withConfiguration(ctx.getConfiguration()).build();
        final LogEvent event1 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world 1!")).build();
        final byte[] result1 = layout.toByteArray(event1);
        assertEquals(event1.getTimeMillis() / 1000 + " Hello, world 1!", new String(result1));
        // System.out.println("event1=" + event1.getTimeMillis() / 1000);
        final LogEvent event2 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world 2!")).build();
        final byte[] result2 = layout.toByteArray(event2);
        assertEquals(event2.getTimeMillis() / 1000 + " Hello, world 2!", new String(result2));
        // System.out.println("event2=" + event2.getTimeMillis() / 1000);
    }

    @SuppressWarnings("unused")
    private void testUnixTime(final String pattern) throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern(pattern + " %m")
                .withConfiguration(ctx.getConfiguration()).build();
        final LogEvent event1 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world 1!")).build();
        final byte[] result1 = layout.toByteArray(event1);
        assertEquals(event1.getTimeMillis() + " Hello, world 1!", new String(result1));
        // System.out.println("event1=" + event1.getMillis());
        final LogEvent event2 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world 2!")).build();
        final byte[] result2 = layout.toByteArray(event2);
        assertEquals(event2.getTimeMillis() + " Hello, world 2!", new String(result2));
        // System.out.println("event2=" + event2.getMillis());
    }

    @Test
    public void testUnixTimeMillis() throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("%d{UNIX_MILLIS} %m")
                .withConfiguration(ctx.getConfiguration()).build();
        final LogEvent event1 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world 1!")).build();
        final byte[] result1 = layout.toByteArray(event1);
        assertEquals(event1.getTimeMillis() + " Hello, world 1!", new String(result1));
        // System.out.println("event1=" + event1.getTimeMillis());
        final LogEvent event2 = Log4jLogEvent.newBuilder() //
                .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger") //
                .setLevel(Level.INFO) //
                .setMessage(new SimpleMessage("Hello, world 2!")).build();
        final byte[] result2 = layout.toByteArray(event2);
        assertEquals(event2.getTimeMillis() + " Hello, world 2!", new String(result2));
        // System.out.println("event2=" + event2.getTimeMillis());
    }

    @Test
    public void testUsePlatformDefaultIfNoCharset() throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("%m")
                .withConfiguration(ctx.getConfiguration()).build();
        assertEquals(Charset.defaultCharset(), layout.getCharset());
    }

    @Test
    public void testUseSpecifiedCharsetIfExists() throws Exception {
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("%m")
                .withConfiguration(ctx.getConfiguration()).withCharset(StandardCharsets.UTF_8).build();
        assertEquals(StandardCharsets.UTF_8, layout.getCharset());
    }

}


text:
  # Define an array with b i n g o in it
  # return a random letter from the array, plus a random number between 1 and 100

# Check the called column for the number called.
  # Iterate through each array: to see if the called number is in the column

# If the number is in the column, replace with an 'x'
  # Replace number with x

# Display a column to the console
  # puts each row to the console

# Display the board to the console (prettily)
  #fill in the outline here

# Initial Solution

class BingoBoard

  def initialize(board)
    @bingo_board = board
    @columns=["B", "I", "N", "G", "O"]
  end

  def call
    number=Random.new
    @letter=@columns.sample
    @num=number.rand(1..100)
    puts @letter + @num.to_s

  end

  def check

    case @letter
    when "B"
      @letter=0
    when "I"
      @letter=1
    when "N"
      @letter=2
    when "G"
      @letter=3
    when "O"
      @letter=4
    end

    @bingo_board.each do |row|
      if row[@letter]==@num
        row[@letter]="X"
      end
    end
    @bingo_board.each {|row| p row}
  end

end

# Refactored Solution
class BingoBoard

  def initialize(board)
    @bingo_board = board
    @columns={"B" => 0, "I" => 1, "N" => 2, "G" => 3, "O" => 4}
  end

  def call
    number=Random.new
    letter_array=@columns.keys
    @letter=letter_array.sample
    @num=number.rand(1..100)
    puts @letter + @num.to_s
  end

  def check
    @bingo_board.each do |row|
      if row[@columns[@letter]]==@num
        row[@columns[@letter]]="X"
      end
    end
    @bingo_board.each {|row| p row}
  end

end

#DRIVER CODE (I.E. METHOD CALLS) GO BELOW THIS LINE
board = [[47, 44, 71, 8, 88],
        [22, 69, 75, 65, 73],
        [83, 85, 97, 89, 57],
        [25, 31, 96, 68, 51],
        [75, 70, 54, 80, 83]]

new_game = BingoBoard.new(board)

#Reflection
=begin
How difficult was pseudocoding this challenge? What do you think of your pseudocoding style?
Pseudocoding was difficult, but not as difficult as it could have been. Honestly, the way the challenge is set up made it more difficult. Each larger step was in there, and it threw me off a bit. I think my pseudocoding style is improving though.

What are the benefits of using a class for this challenge?
You can save the variables such as letter and number across methods much easier with a class. Without a class, each method would have to accept strange arguments, and would just be a mess overall.

How can you access coordinates in a nested array?
The normal way is to write an array access as normal, but after you add the first key, add the key of the inner array. For example, if your array is [1, 2, 3, [4, 5]]. You access the 4 in this array by typing array[3][0]. The inner array occupies the third spot of the outer array.

What methods did you use to access and modify the array?
I used a simple .each loop to look at every inner array, and then use an if loop to examine each array. If the right spot of the array had the right value, we changed that value to "X".

How did you determine what should be an instance variable versus a local variable?
Instance variables are the ones that you want to access across different methods. My local variables, on the other hand, were ones I only needed to use within each method.

What do you feel is most improved in your refactored solution?
  The biggest improvement in my refactored solution replacing the "BINGO" array with a hash. In the new solution I can find the right array key without using that cumbersome case when statement. This way I can use the hash values to access the correct values in the arrays.
=end


text:
neupy.algorithms.linear.lms module
==================================

.. automodule:: neupy.algorithms.linear.lms
    :members:
    :undoc-members:
    :show-inheritance:


text:
function() {
  return build.call(this, this._styles.concat(key));
}


text:
<!DOCTYPE html>
<html>
<head>
  <title></title>

  <script>
    //RESPONSIVR_LABELS = ['Ресайз'];
    //RESPONSIVR_RANDOMIZR = false;
    //RESPONSIVR_MANUAL_START = true;
  </script>
  <link rel="stylesheet" href="libs/normalize.css"/>
  <script src="dist/responsivr.min.js"></script>

  <style>
    html, body {
      height: 100%;
      margin: 0;
      overflow: hidden;
    }
  </style>
</head>
<body>

<iframe frameborder="0" width="100%" height="100%" id="site"></iframe>

<script>
  function searchToObject (search) {
    var request = {},
        pairs = search.substring(search.indexOf('?') + 1).split('&');

    for (var i = 0; i < pairs.length; i++) {
      var pair = pairs[i].split('=');
      var value = decodeURIComponent(pair[1].replace(/\+/g, ' '));
      request[decodeURIComponent(pair[0])] = value !== 'false' ? value !== 'true' ? value : true : false;
    }

    return request;
  };

  document.getElementById('site').src = searchToObject(location.search).url;
</script>

</body>
</html>


text:
/* Variable arguments <stdarg.h>

   This file is part of the Public Domain C Library (PDCLib).
   Permission is granted to use, modify, and / or redistribute at will.
*/

#ifndef _PDCLIB_STDARG_H
#define _PDCLIB_STDARG_H _PDCLIB_STDARG_H
#include "_PDCLIB_aux.h"
#include "_PDCLIB_config.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef _PDCLIB_va_list va_list;

#define va_arg( ap, type )    _PDCLIB_va_arg( ap, type )
#define va_copy( dest, src )  _PDCLIB_va_copy( dest, src )
#define va_end( ap )          _PDCLIB_va_end( ap )
#define va_start( ap, parmN ) _PDCLIB_va_start( ap, parmN )

#ifdef __cplusplus
}
#endif

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Base.TextAppearance.AppCompat.Button">
        <item name="android:textSize">@dimen/abc_text_size_button_material</item>
        <item name="android:textAllCaps">true</item>
        <item name="android:textColor">?android:textColorPrimary</item>
    </style>
    <style name="Base.Theme.AppCompat" parent="Base.V14.Theme.AppCompat">
        <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
        <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
        <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
        <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
        <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
    </style>
    <style name="Base.Theme.AppCompat.Dialog" parent="Base.V14.Theme.AppCompat.Dialog">
        <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
        <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
        <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
        <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
        <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
    </style>
    <style name="Base.Theme.AppCompat.Light" parent="Base.V14.Theme.AppCompat.Light">
        <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
        <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
        <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
        <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
        <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
    </style>
    <style name="Base.Theme.AppCompat.Light.Dialog" parent="Base.V14.Theme.AppCompat.Light.Dialog">
        <item name="android:actionModeCutDrawable">?actionModeCutDrawable</item>
        <item name="android:actionModeCopyDrawable">?actionModeCopyDrawable</item>
        <item name="android:actionModePasteDrawable">?actionModePasteDrawable</item>
        <item name="android:actionModeSelectAllDrawable">?actionModeSelectAllDrawable</item>
        <item name="android:actionModeShareDrawable">?actionModeShareDrawable</item>
    </style>
    <style name="Base.V14.Theme.AppCompat" parent="Base.V11.Theme.AppCompat"/>
    <style name="Base.V14.Theme.AppCompat.Dialog" parent="Base.V11.Theme.AppCompat.Dialog"/>
    <style name="Base.V14.Theme.AppCompat.Light" parent="Base.V11.Theme.AppCompat.Light"/>
    <style name="Base.V14.Theme.AppCompat.Light.Dialog" parent="Base.V11.Theme.AppCompat.Light.Dialog"/>
</resources>


text:
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.http.server.jetty;

import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.function.Function;
import java.util.function.Supplier;

/**
 * A simplified {@link ConcurrentMap} using reference-equality to compare keys (similarly to {@link java.util.IdentityHashMap})
 *
 * @author bjorncs
 */
class SimpleConcurrentIdentityHashMap<K, V> {

    private final ConcurrentMap<IdentityKey<K>, V> wrappedMap = new ConcurrentHashMap<>();

    Optional<V> get(K key) { return Optional.ofNullable(wrappedMap.get(identityKey(key))); }

    Optional<V> remove(K key) { return Optional.ofNullable(wrappedMap.remove(identityKey(key))); }

    Optional<V> put(K key, V value) { return Optional.ofNullable(wrappedMap.put(identityKey(key), value)); }

    V computeIfAbsent(K key, Supplier<V> supplier) {
        return wrappedMap.computeIfAbsent(identityKey(key), ignored -> supplier.get());
    }

    V computeIfAbsent(K key, Function<K, V> factory) {
        return wrappedMap.computeIfAbsent(identityKey(key), k -> factory.apply(k.instance));
    }

    private static <K> IdentityKey<K> identityKey(K key) { return IdentityKey.of(key); }

    private static class IdentityKey<K> {
        final K instance;

        IdentityKey(K instance) { this.instance = instance; }

        static <K> IdentityKey<K> of(K instance) { return new IdentityKey<>(instance); }

        @Override public int hashCode() { return System.identityHashCode(instance); }

        @Override
        public boolean equals(Object obj) {
            if (this == obj) return true;
            if (!(obj instanceof IdentityKey<?>)) return false;
            IdentityKey<?> other = (IdentityKey<?>) obj;
            return this.instance == other.instance;
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using MathSite.Common.Crypto;
using MathSite.Db.DataSeeding.Seeders;
using MathSite.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;

namespace MathSite.Db.DataSeeding
{
    /// <inheritdoc />
    public class DataSeeder : IDataSeeder
    {
        private readonly MathSiteDbContext _context;
        private readonly ILogger _logger;
        private readonly IPasswordsManager _passwordHasher;

        /// <summary>
        ///     Создается Data Seeder
        /// </summary>
        /// <param name="context">Контекст базы сайта</param>
        /// <param name="logger">Логгер</param>
        /// <param name="passwordHasher">Парольный хэшировщик</param>
        public DataSeeder(MathSiteDbContext context, ILogger<IDataSeeder> logger, IPasswordsManager passwordHasher)
        {
            _context = context;
            _logger = logger;
            _passwordHasher = passwordHasher;
        }

        private bool DatabaseMigrated => !_context.Database.GetPendingMigrations().Any();

        private bool DatabaseExists
        {
            get
            {
                try
                {
                    _context.Set<Person>().Find(Guid.NewGuid());
                    return true;
                }
                catch
                {
                    return false;
                }
            }
        }

        private int PendingMigrationsCount => _context.Database.GetPendingMigrations().Count();

        /// <inheritdoc />
        public void Seed()
        {
            var seeders = GetSeeders();

            if (!DatabaseExists)
            {
                _logger.LogError("Database wasn't created, seeding skipped!");
                _logger.LogError("You need create or even migrate database first!");
                throw new ApplicationException("Database wasn't created");
            }

            if (!DatabaseMigrated)
            {
                _logger.LogError(
                    $"Database wasn't migrated, seeding skipped! (There's {PendingMigrationsCount} pending migrations!)");
                _logger.LogError("You need migrate database first!");
                return;
            }

            _logger.LogInformation("Trying to seed data.");
            foreach (var seeder in seeders)
                if (seeder.CanSeed)
                {
                    _logger.LogInformation($"Trying seed {seeder.SeedingObjectName}");
                    using (seeder)
                    {
                        seeder.Seed();
                    }
                    _logger.LogInformation($"Seeding {seeder.SeedingObjectName} complete!");
                }
                else
                {
                    _logger.LogInformation($"Seeding {seeder.SeedingObjectName} skipped!");
                }
            _logger.LogInformation("Seeding Done! Continue start server...");
        }

        private IEnumerable<ISeeder> GetSeeders()
        {
            return new List<ISeeder>
            {
                new SiteSettingsSeeder(_logger, _context),
                new GroupTypeSeeder(_logger, _context),
                new GroupSeeder(_logger, _context),
                new PersonSeeder(_logger, _context),
                new DirectorySeeder(_logger, _context),
                new FileSeeder(_logger, _context),
                new UserSeeder(_logger, _context, _passwordHasher),
                new RightSeeder(_logger, _context),
                new GroupRightsSeeder(_logger, _context),
                new PostSettingsSeeder(_logger, _context),
                new PostTypeSeeder(_logger, _context),
                new PostSeoSettingsSeeder(_logger, _context),
                new PostSeeder(_logger, _context),
                new CommentSeeder(_logger, _context),
                new PostGroupsAllowedSeeder(_logger, _context),
                new PostRatingSeeder(_logger, _context),
                new PostUserAllowedSeeder(_logger, _context),
                new PostOwnerSeeder(_logger, _context),
                new UsersToGroupsSeeder(_logger, _context),
                new UserRightsSeeder(_logger, _context),
                new UserSettingsSeeder(_logger, _context),
                new CategorySeeder(_logger, _context),
                new PostCategorySeeder(_logger, _context),
                new PostAttachmentSeeder(_logger, _context),
                new KeywordSeeder(_logger, _context),
                new PostKeywordsSeeder(_logger, _context)
            };
        }
    }
}


text:
from typing import List

class Solution:
    def canPlaceFlowers(self, flowerbed: List[int], n: int) -> bool:
        num_spots = 0
        index = 0
        while index < len(flowerbed):
            if flowerbed[index] == 0:
                # last position
                if index == len(flowerbed) - 1:
                    num_spots += 1
                    index += 1
                # current is zero and next is also zero
                elif flowerbed[index + 1] == 0:
                    num_spots += 1
                    index += 2
                # current is zero and next is 1. must be 010
                else:
                    index += 3
            else:
                # 10
                index += 2
        return num_spots >= n


text:
package io.lumify.mapping.column;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.lumify.core.util.LumifyLogger;
import io.lumify.core.util.LumifyLoggerFactory;
import io.lumify.mapping.DocumentMapping;
import io.lumify.mapping.MappingState;
import io.lumify.mapping.column.ColumnRelationshipMapping.RelationshipDef;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import org.securegraph.Authorizations;
import org.securegraph.EdgeBuilder;
import org.securegraph.Graph;
import org.securegraph.Vertex;
import org.securegraph.VertexBuilder;
import org.securegraph.Visibility;

/**
 * Base class for Columnar document mappings.
 */
public abstract class AbstractColumnDocumentMapping implements DocumentMapping {
    /**
     * The logger.
     */
    private static final LumifyLogger LOGGER = LumifyLoggerFactory.getLogger(AbstractColumnDocumentMapping.class);

    /**
     * The entity mappings for this CSV.
     */
    private final Set<EntityMapping> entityMappings;

    /**
     * The relationship mappings for this CSV.
     */
    private final List<ColumnRelationshipMapping> relationshipMappings;

    /**
     * Create a new AbstractColumnDocumentMapping.
     *
     * @param entities      the entity mappings
     * @param relationships the relationship mappings
     */
    protected AbstractColumnDocumentMapping(final Map<String, ColumnEntityMapping> entities, final List<ColumnRelationshipMapping> relationships) {
        checkNotNull(entities, "At least one entity mapping must be provided.");
        checkArgument(!entities.isEmpty(), "At least one entity mapping must be provided.");
        Set<EntityMapping> myEntities = new HashSet<>();
        for (Map.Entry<String, ColumnEntityMapping> entry : entities.entrySet()) {
            myEntities.add(new EntityMapping(entry.getKey(), entry.getValue()));
        }
        this.entityMappings = Collections.unmodifiableSet(myEntities);
        List<ColumnRelationshipMapping> myRels = new ArrayList<>();
        if (relationships != null) {
            myRels.addAll(relationships);
        }
        this.relationshipMappings = Collections.unmodifiableList(myRels);
    }

    @JsonProperty("entities")
    public final Map<String, ColumnEntityMapping> getEntities() {
        Map<String, ColumnEntityMapping> map = new HashMap<>();
        for (EntityMapping tm : entityMappings) {
            map.put(tm.getKey(), tm.getMapping());
        }
        return Collections.unmodifiableMap(map);
    }

    @JsonProperty("relationships")
    public final List<ColumnRelationshipMapping> getRelationships() {
        return relationshipMappings;
    }

    /**
     * Get an Iterable that returns the rows of the input document
     * that will be processed.
     *
     * @param input the input document
     * @return an Iterable over the rows of the input document
     */
    protected abstract Iterable<Row> getRows(final InputStream input);

    @Override
    public void mapDocument(final InputStream inputDoc, final MappingState state, final String vertexIdPrefix) {
        Graph graph = state.getGraph();
        Visibility visibility = state.getData().getVisibility();
        Authorizations auths = state.getAuthorizations();

        for (Row row : getRows(inputDoc)) {
            Map<String, Vertex> entityMap;
            List<Vertex> newVertices;
            boolean skipLine;
            if (!row.isEmpty()) {
                entityMap = new HashMap<>();
                newVertices = new ArrayList<>();
                skipLine = false;
                for (EntityMapping entityMapping : entityMappings) {
                    String hash = entityMapping.getMapping().getVertexHash(row);
                    Vertex vertex = state.getVertex(hash);
                    if (vertex == null) {
                        try {
                            String vertexId = String.format("%s%s", vertexIdPrefix, hash);
                            VertexBuilder builder = graph.prepareVertex(vertexId, visibility);
                            entityMapping.getMapping().createVertex(row, builder, state);
                            vertex = builder.save(auths);
                            newVertices.add(vertex);
                            graph.flush();
                            state.createHasEntityEdge(vertex);
                            state.cacheVertex(hash, vertex);
                            state.addVertexToWorkspaceIfNeeded(vertex);
                        } catch (Exception e) {
                            LOGGER.debug("Error processing entity during mapping", e);
                            if (entityMapping.getMapping().isRequired()) {
                                LOGGER.info(String.format("Unable to map required entity, skipping row %d", row.getRowNumber()));
                                skipLine = true;
                                break;
                            }
                        }
                    }
                    entityMap.put(entityMapping.getKey(), vertex);
                }
                // if all required entities were found, process relationships
                if (!skipLine) {
                    for (ColumnRelationshipMapping edgeMapping : relationshipMappings) {
                        try {
                            RelationshipDef relDef = edgeMapping.defineRelationship(entityMap, row);
                            String edgeId = String.format("%s_%s_%s", relDef.getSource().getId(), relDef.getLabel(), relDef.getTarget().getId());
                            EdgeBuilder builder = graph.prepareEdge(edgeId, relDef.getSource(), relDef.getTarget(), relDef.getLabel(), visibility);
                            state.getData().setVisibilityJsonOnElement(builder);
                            builder.save(auths);
                        } catch (Exception ex) {
                            throw new LumifyColumnMappingException(row, edgeMapping, ex);
                        }
                    }
                } else {
                    // if line is skipped, remove any previously created vertices
                    for (Vertex v : newVertices) {
                        graph.removeVertex(v, auths);
                        state.removeVertex(v);
                    }
                }
                graph.flush();
            }
        }
    }

    private static class EntityMapping {
        private final String key;
        private final ColumnEntityMapping mapping;

        public EntityMapping(String key, ColumnEntityMapping mapping) {
            this.key = key;
            this.mapping = mapping;
        }

        public String getKey() {
            return key;
        }

        public ColumnEntityMapping getMapping() {
            return mapping;
        }
    }

    public interface Row {
        /**
         * Get the value of the requested column.
         * @param col the column index
         * @return the value of the column
         */
        String get(final int col);

        /**
         * @return the number of columns in this row
         */
        int getColumnCount();

        /**
         * @return true if this row is isEmpty
         */
        boolean isEmpty();

        /**
         * @return the row number of this row within the overall document
         */
        long getRowNumber();
    }

    protected static class RowIterable implements Iterable<Row> {
        private Iterator<Row> iterator;

        public RowIterable(final Iterator<Row> iter) {
            this.iterator = iter;
        }

        @Override
        public Iterator<Row> iterator() {
            return iterator;
        }
    }
}


text:
#divLookups {
    height: 530px;
    width: 1100px;
}

span {
    color: #404040 !important;
}

    span.label {
        display: inline-block;
        width: 130px;
        font-weight: bold;
        float: left;
        font: 10pt Segoe UI;
        text-align: left;
        font-weight: bold;
    }

    span.data {
        display: inline-block;
        float: left;
        width: auto;
        font-family: Consolas, courier new;
        font-size: 10pt;
    }

.table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}
.table tbody tr {
    cursor: pointer;
}

.table td {
    color: black;
}

.formtitle {
    padding: 3px;
    font-weight: bold;
}

input {
    padding: 4px;
    margin: 2px;
}

label {
    cursor: pointer;
}

td {
    font: 9pt Segoe UI, arial, sans-serif;
}
@media all and (max-width:992px) {
    .table {
        zoom: 80%;
    }
}
td { word-wrap:break-word;}
th { word-wrap:break-word;}

.secure {
    background-image:url(/content/images/LockUnlock.jpg);
    background-repeat:no-repeat;
    width:18px;
    height:24px;
    display:inline-block;
}
.secure.locked {
    background-position:right;
}
.secure.unlocked {
    background-position:left;
}


text:
Fadecandy: Server Configuration
===============================

The Fadecandy Server is configured with a JSON object. There is a default configuration built-in, which you can see by running `fcserver -h`. A copy of this configuration is also included as [examples/config/default.json](https://github.com/scanlime/fadecandy/blob/master/examples/config/default.json).

A new configuration file can be given to `fcserver` on the command line. You can use one of the examples as a starting point. Typically the default configuration will work for any single-controller setup. If you're using multiple controllers or there are other options you want to tweak, you'll want to create an fcserver configuration file for your project.

Parts of the JSON config format are shared with the network protocols. For example, color correction data and device information are stored in a common format. Some parts of the JSON configuration file can be modified at runtime.

Top-level Object
----------------

The configuration file is a JSON object. By default, it looks like this:

```
{
    "listen": ["127.0.0.1", 7890],
    "verbose": true,

    "color": {
        "gamma": 2.5,
        "whitepoint": [1.0, 1.0, 1.0]
    },

    "devices": [
        {
            "type": "fadecandy",
            "map": [
                [ 0, 0, 0, 512 ]
            ]
        }
    ]
}
```

Name     | Summary
-------- | -------------------------------------------------------
listen   | What address and port should the server listen on?
verbose  | Does the server log anything except errors to the console?
color    | Default global color correction settings
devices  | List of configured devices

Listen
------

By default, fcserver listens on port 7890 on the local (loopback) interface. This server will not be reachable by other computers on your network, only by programs on the same computer.

The "listen" configuration key must be a JSON array of the form [**host**, **port**], where **port** is a number and **host** is either a string or *null*. If the host is *null*, fcserver listens on all network interfaces and it's reachable from other computers

*Warning:* Do not run fcserver on an untrusted network. It has no built-in security provisions, so anyone on your network will have control of fcserver. Additionally, bugs in fcserver may compromise the security of your computer.

Color
-----

The "color" configuration key is a JSON object containing color correction data. This color correction data can also be changed at runtime by both the OPC and WebSocket interfaces. If instead of an object "color" is null, a linear (identity mapped) color table is used.

The default color configuration is:

```
"color": {
    "gamma": 2.5,
    "whitepoint": [0.98, 1.0, 1.0]
    "linearSlope": 1.0,
    "linearCutoff": 0.0
},
```

Supported keys in the "color" object are:

Name         | Description
------------ | -----------------------------------------------------------------
gamma        | Exponent for the nonlinear portion of the brightness curve
whitepoint   | Vector of [red, green, blue] values to multiply by colors prior to gamma correction
linearSlope  | Slope (output / input) of the linear section of the brightness curve
linearCutoff | Y (output) coordinate of intersection between linear and nonlinear curves

By default, brightness curves are entirely nonlinear. By setting linearCutoff to a nonzero value, though, a linear area may be defined at the bottom of the brightness curve.

The linear section, near zero, avoids creating very low output values that will cause distracting flicker when dithered. This isn't a problem when the LEDs are viewed indirectly such that the flicker is below the threshold of perception, but in cases where the flicker is a problem this linear section can eliminate it entierly at the cost of some dynamic range. To enable the linear section, set linearCutoff to some nonzero value. A good starting point is 1/256.0, correspnding to the lowest 8-bit PWM level.

Devices
-------

The JSON configuration file is a dictionary which contains global configuration and an array of device objects.

For each device, a dictionary includes device properties as well as a mapping table with commands which wire outputs to their corresponding OPC inputs. The map is a list of objects which act as mapping commands.

Fadecandy Devices
-----------------

Supported mapping objects for Fadecandy devices:

* [ *OPC Channel*, *First OPC Pixel*, *First output pixel*, *Pixel count* ]
    * Map a contiguous range of pixels from the specified OPC channel to the current device
    * For Fadecandy devices, output pixels are numbered from 0 through 511. Strand 1 begins at index 0, strand 2 begins at index 64, etc.
* [ *OPC Channel*, *First OPC Pixel*, *First output pixel*, *Pixel count*, *Color channels* ]
    * As above, but the mapping between color channels and WS2811 output channels can be changed.
    * The "Color channels" must be a 3-letter string, where each letter corresponds to one of the WS2811 outputs.
    * Each letter can be "r", "g", or "b" to choose the red, green, or blue channel respectively, or "l" to use the average luminosity.

Other settings for Fadecandy devices:

Name         | Values               | Default | Description
------------ | -------------------- | ------- | --------------------------------------------
led          | true / false / null  | null    | Is the LED on, off, or under automatic control?
dither       | true / false         | true    | Is dithering enabled?
interpolate  | true / false         | true    | Is inter-frame interpolation enabled?

The following example config file supports two Fadecandy devices with distinct serial numbers. They both receive data from OPC channel #0. The first 512 pixels map to the first Fadecandy device. The next 64 pixels map to the entire first strand of the second Fadecandy device, and the next 32 pixels map to the beginning of the third strand with the color channels in Blue, Green, Red order.

    {
        "listen": ["127.0.0.1", 7890],
        "verbose": true,

        "color": {
            "gamma": 2.5,
            "whitepoint": [0.98, 1.0, 1.0]
        },

        "devices": [
            {
                "type": "fadecandy",
                "serial": "FFFFFFFFFFFF00180017200214134D44",
                "led": false,
                "map": [
                    [ 0, 0, 0, 512 ]
                ]
            },
            {
                "type": "fadecandy",
                "serial": "FFFFFFFFFFFF0021003B200314134D44",
                "map": [
                    [ 0, 512, 0, 64 ],
                    [ 0, 576, 128, 32, "bgr" ]
                ]
            }
        ]
    }

Using Open Pixel Control with DMX
---------------------------------

The Fadecandy server is designed to make it easy to drive all your lighting via Open Pixel Control, even when you're using a mixture of addressable LED strips and DMX devices.

For DMX, `fcserver` supports the common [Enttec DMX USB Pro adapter](http://www.enttec.com/index.php?main_menu=Products&pn=70304). This device attaches over USB, has inputs and outputs for one DMX universe, and it has an LED indicator. With Fadecandy, the LED will flash any time we process a new frame of video.

The Enttec adapter uses an FTDI FT245 USB FIFO chip internally. For the smoothest USB performance and the simplest configuration, we do not use FTDI's serial port emulation driver. Instead, we talk directly to the FTDI chip using libusb. On Linux this happens without any special consideration. On Mac OS, libusb does not support detaching existing drivers from a device. If you've installed the official FTDI driver, you can temporarily unload it until your next reboot by running:

    sudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver

Enttec DMX devices can be configured in the same way as a Fadecandy device. For example:

    {
            "listen": [null, 7890],
            "verbose": true,

            "devices": [
                    {
                            "type": "fadecandy",
                            "map": [
                                    [ 0, 0, 0, 512 ]
                            ]
                    },
                    {
                            "type": "enttec",
                            "serial": "EN075577",
                            "map": [
                                    [ 0, 0, "r", 1 ],
                                    [ 0, 0, "g", 2 ],
                                    [ 0, 0, "b", 3 ],
                                    [ 0, 1, "l", 4 ]
                            ]
                    }
            ]
    }

Enttec DMX devices use a different format for their mapping objects:

* [ *OPC Channel*, *OPC Pixel*, *Pixel Color*, *DMX Channel* ]
    * Map a single OPC pixel to a single DMX channel
    * The "Pixel color" can be "r", "g", or "b" to sample a single color channel from the pixel, or "l" to use an average luminosity.
    * DMX channels are numbered from 1 to 512.
* [ *Value*, *DMX Channel* ]
    * Map a constant value to a DMX channel; good for configuration modes


text:
class AddUserIdIndexToOpmlImportJobStates < ActiveRecord::Migration[5.2]
  def change
    add_index :opml_import_job_states, [:user_id], name: 'index_opml_import_job_states_on_user_id'
  end
end


text:
function obj=setClasses(obj,c)
% obj=setClasses(obj,classes) : set the list of class IDs associated with this classifier
%   classes should be a column vector of IDs

obj.classes = c;


text:
@echo off
echo ------------------------------------------------------------------------
echo Create Git Repository
echo ------------------------------------------------------------------------
git init
git remote add origin ssh://%USERNAME%@pm.dev.booklan.de/var/git/repos/%CD%.git


text:
/**
 * @fileoverview Main script for a generated page of documentation. This
 * script will initliaze the auto-complete search box and load the initial
 * state of the side nav list.
 */

goog.module('dossier.main');

const Index = goog.require('proto.dossier.Index');
const app = goog.require('dossier.app');
const browser = goog.require('goog.labs.userAgent.browser');
const engine = goog.require('goog.labs.userAgent.engine');
const nav = goog.require('dossier.nav');
const page = goog.require('dossier.page');
const search = goog.require('dossier.search');

if (engine.isWebKit() && !browser.isChrome() && !browser.isOpera()) {
  // Tag the browser as webkit (not blink) so we can avoid some ugly
  // transitions in CSS
  document.documentElement.classList.add('webkit');
}

if ('serviceWorker' in navigator) {
  navigator.serviceWorker.register(page.getBasePath() + 'serviceworker.js')
      .catch(err => console.error('ServiceWorker registration failed: ' + err));
}

document.addEventListener('readystatechange', (e) => {
  if (document.readyState === 'complete') {
    const typeIndex = new Index(/** @type {!Array} */(goog.global['TYPES']));
    app.run(
        typeIndex,
        search.createSearchBox(typeIndex),
        nav.createNavDrawer(typeIndex, page.getCurrentFile(), page.getBasePath()));
  }
});


text:
var config;

function Config(xhr) {
    function loadPreferences(xhr) {
       var parser = new DOMParser();
       var doc = parser.parseFromString(xhr.responseText, "application/xml");

       var preferences = doc.getElementsByTagName("preference");
       return Array.prototype.slice.call(preferences);
    }

    this.xhr = xhr;
    this.preferences = loadPreferences(this.xhr);
}

function readConfig(success, error) {
    var xhr;

    if(typeof config != 'undefined') {
        success(config);
    }

    function fail(msg) {
        console.error(msg);

        if(error) {
            error(msg);
        }
    }

    var xhrStatusChangeHandler = function() {
        if (xhr.readyState == 4) {
            if (xhr.status == 200 || xhr.status == 304 || xhr.status === 0 /* file:// */) {
                config = new Config(xhr);
                success(config);
            }
            else {
                fail('[Browser][cordova.js][xhrStatusChangeHandler] Could not XHR config.xml: ' + xhr.statusText);
            }
        }
    };

    xhr = new XMLHttpRequest();
    xhr.addEventListener("load", xhrStatusChangeHandler);

    try {
        xhr.open("get", "/config.xml", true);
        xhr.send();
    } catch(e) {
        fail('[Browser][cordova.js][readConfig] Could not XHR config.xml: ' + JSON.stringify(e));
    }
}

/**
 * Reads a preference value from config.xml.
 * Returns preference value or undefined if it does not exist.
 * @param {String} preferenceName Preference name to read */
Config.prototype.getPreferenceValue = function getPreferenceValue(preferenceName) {
    var preferenceItem = this.preferences && this.preferences.filter(function(item) {
        return item.attributes.name && item.attributes.name.value === preferenceName;
    });

    if(preferenceItem && preferenceItem[0] && preferenceItem[0].attributes && preferenceItem[0].attributes.value) {
        return preferenceItem[0].attributes.value.value;
    }
};

exports.readConfig = readConfig;


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">

    <!-- 根目录'/'对应页面 -->
    <mvc:view-controller path="/" view-name="/index.jsp"/>

    <!-- Jsp视图 -->
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="order" value="1"/>
        <property name="prefix" value="/WEB-INF/jsp"/>
        <property name="suffix" value=""/>
        <property name="contentType" value="text/html; charset=utf-8"/>
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
    </bean>

</beans>


text:
class FlyBehaviour:
    def fly(self):
        raise NotImplementedError()

class FlyWithWings(FlyBehaviour):
    def fly(self):
        print("I'm flying!")

class FlyNoWay(FlyBehaviour):
    def fly(self):
        print("I can't fly.")

class FlyRocketPowered(FlyBehaviour):
    def fly(self):
        print("I'm flying with a rocket!")


text:
package org.nd4j.autodiff.samediff;
import lombok.Getter;
import org.nd4j.linalg.exception.ND4JIllegalArgumentException;

/**
 * SDIndex is the {@link SameDiff}
 * equivalent to {@link org.nd4j.linalg.indexing.INDArrayIndex}
 * it uses {@link org.nd4j.linalg.api.ops.impl.shape.StridedSlice} underneath to obtain varying elements.
 * It also supports {@link SDVariable} inputs allowing for graph definitions of
 * indexing operations.
 *
 * @author Alex Black
 * @author Adam Gibson
 */
@Getter
public class SDIndex {

    /**
     * Index types include the following:
     * 1. all: get all elements of this dimension
     * 2. point: get only elements at the particular point in this dimension
     * 3. interval: get only elements from a begin point to an end point in the interval
     * 4. point input: dynamic version of point
     * 5. interval input: dynamic version of interval
     */
    public enum IndexType {
        ALL,
        POINT,
        INTERVAL,
        //inputs aren't integers/longs but SDVariables
        POINT_INPUT,
        INTERVAL_INPUT
    }

    private IndexType indexType = IndexType.ALL;
    private long pointIndex;

    private SDVariable pointVar;

    private boolean pointKeepDim;
    private Long intervalBegin = null;
    private Long intervalEnd = null;

    private SDVariable intervalInputBegin = null;
    private SDVariable intervalInputEnd = null;
    private SDVariable intervalStrideInput = null;

    private Long intervalStrides = 1l;

    private boolean inclusive = false;

    private SDVariable inclusiveInput = null;

    public SDIndex(){}

    /**
     * Represents all the elements in along this dimension.
     * @return
     */
    public static SDIndex all(){
        return new SDIndex();
    }

    /**
     * Represents all elements at a singular point in this dimension (think row or column)
     * Note this is the SDVariable version. For static please use {@link #point(long)}
     * @param i the input index
     * @return
     */
    public static SDIndex point(SDVariable i) {
        return point(i,false);
    }

    /**
     * Represents all elements at a singular point in this dimension (think row or column)
     * This is a static index
     * @param i the input index
     * @return
     */
    public static SDIndex point(long i) {
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.POINT;
        sdIndex.pointIndex = i;
        sdIndex.pointKeepDim = false;
        return sdIndex;
    }

    /**
     * Represents all elements at a singular point in this dimension (think row or column)
     * This is a dynamic index
     * @param i the input index
     * @return
     */
    public static SDIndex point(SDVariable i, boolean keepDim) {
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.POINT_INPUT;
        sdIndex.pointVar = i;
        sdIndex.pointKeepDim = keepDim;
        return sdIndex;
    }

    /**
     * Represents all elements at a singular point in this dimension (think row or column)
     * This is a static index
     * @param i the input index
     * @return
     */
    public static SDIndex point(long i, boolean keepDim) {
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.POINT;
        sdIndex.pointIndex = i;
        sdIndex.pointKeepDim = keepDim;
        return sdIndex;
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are dynamic indices.
     * @param begin the begin index
     * @param end the end index
     * @return
     */
    public static SDIndex interval(SDVariable begin, SDVariable end) {
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.INTERVAL_INPUT;
        sdIndex.intervalInputBegin = begin;
        sdIndex.intervalInputEnd = end;
        sdIndex.inclusiveInput = begin.getSameDiff().constant(0);
        return sdIndex;
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param end the end index
     * @return
     */
    public static SDIndex interval(Long begin, Long end) {
        return interval(begin,end,false);
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param end the end index
     * @return
     */
    public static SDIndex interval(Long begin, Long end,Boolean inclusive) {
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.INTERVAL;
        if(begin != null) {
            sdIndex.intervalBegin = begin.longValue();
        }
        if(end != null) {
            sdIndex.intervalEnd = end.longValue();
        }

        if(inclusive != null) {
            sdIndex.inclusive = inclusive;
        } else {
            sdIndex.inclusive = false;
        }

        return sdIndex;
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param end the end index
     * @return
     */
    public static SDIndex interval(Integer begin, Integer end) {
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.INTERVAL;
        if(begin != null) {
            sdIndex.intervalBegin = begin.longValue();
        }
        if(end != null){
            sdIndex.intervalEnd = end.longValue();
        }

        sdIndex.inclusive = false;

        return sdIndex;
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param strides the stride to increment by to end
     * @param end the end index
     * @return
     */
    public static SDIndex interval(Long begin, Long strides, Long end) {
        if(strides == 0){
            throw new ND4JIllegalArgumentException("Invalid index : strides can not be 0.");
        }
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.INTERVAL;
        sdIndex.intervalBegin = begin;
        sdIndex.intervalEnd = end;
        sdIndex.intervalStrides = strides;
        sdIndex.inclusive  = false;
        return sdIndex;
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param strides the stride to increment by to end
     * @param end the end index
     * @param inclusive whether the index is inclusive or not
     * @return
     */
    public static SDIndex interval(Long begin, Long strides, Long end,Boolean inclusive) {
        if(strides == 0) {
            throw new ND4JIllegalArgumentException("Invalid index : strides can not be 0.");
        }

        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.INTERVAL;
        sdIndex.intervalBegin = begin;
        sdIndex.intervalEnd = end;
        sdIndex.intervalStrides = strides;
        if(inclusive != null) {
            sdIndex.inclusive = inclusive;
        } else {
            sdIndex.inclusive = false;
        }
        return sdIndex;
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param strides the stride to increment by to end
     * @param end the end index
     * @return
     */
    public static SDIndex interval(Integer begin, Integer strides, Integer end) {
        return interval(begin.longValue(),strides.longValue(),end.longValue());
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param strides the stride to increment by to end
     * @param end the end index
     * @return
     */
    public static SDIndex interval(SDVariable begin, SDVariable strides, SDVariable end) {
      return interval(begin,strides,end,begin.getSameDiff().constant(false));
    }

    /**
     *  Represents all elements begin to end (think get row from beginning to end)
     *  Note these are static indices.
     * @param begin the begin index
     * @param strides the stride to increment by to end
     * @param end the end index
     * @return
     */
    public static SDIndex interval(SDVariable begin, SDVariable strides, SDVariable end,SDVariable inclusive) {
        SDIndex sdIndex = new SDIndex();
        sdIndex.indexType = IndexType.INTERVAL_INPUT;
        if(begin != null) {
            sdIndex.intervalInputBegin = begin;
        }

        if(end != null) {
            sdIndex.intervalInputEnd = end;
        }

        if(strides != null) {
            sdIndex.intervalStrideInput = strides;
        }

        if(inclusive != null) {
            sdIndex.inclusiveInput = inclusive;
        } else {
            sdIndex.inclusiveInput = begin.getSameDiff().constant(false);
        }

        return sdIndex;
    }
}


text:
// this file was created by SCC 2019 and is largely a derived work from the
// original java class/interface

package org.orekit.models;

import org.orekit.models.AtmosphericRefractionModel;

public class PythonAtmosphericRefractionModel implements AtmosphericRefractionModel {

    private static final long serialVersionUID = -6933430021018867767L;

    /** Part of JCC Python interface to object */
    private long pythonObject;

    /** Part of JCC Python interface to object */
    public void pythonExtension(long pythonObject)
    {
        this.pythonObject = pythonObject;
    }

    /** Part of JCC Python interface to object */
    public long pythonExtension()
    {
        return this.pythonObject;
    }

    /** Part of JCC Python interface to object */
    public void finalize()
            throws Throwable
    {
        pythonDecRef();
    }

    /** Part of JCC Python interface to object */
    public native void pythonDecRef();

    /**
     * Compute the refraction angle from the true (geometrical) elevation.
     * Extension point for Python.
     *
     * @param trueElevation true elevation (rad)
     * @return refraction angle (rad)
     */
    @Override
    public native double getRefraction(double trueElevation);
}


text:
import asyncio

from demonhunter import DemonHunter
from demonhunter.nodes.honeypots.telnet import TelnetHoneypot, MicrosoftTelnet
from demonhunter.nodes.honeypots.vnc import VNCHoneypot
from demonhunter.nodes.honeypots.http import HTTPHoneypot, Apache

loop = asyncio.get_event_loop()
hp = DemonHunter(loop)

vnc = VNCHoneypot(interfaces=["0.0.0.0"])
hp.add_honeypot(vnc)

telnet = TelnetHoneypot(port=23, handler=MicrosoftTelnet, interfaces=["0.0.0.0"])
hp.add_honeypot(telnet)

http = HTTPHoneypot(handler=Apache, www_folder="/var/fakewww/", interfaces=["0.0.0.0"])
hp.add_honeypot(http)

hp.start()

try:
    # Run The Loop
	loop.run_forever()
except KeyboardInterrupt:
	hp.stop()
	print("\nServer Closed")

loop.close()


text:
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/transparentback"
    android:tileMode="repeat" />


text:
.jqplot-loading {
    background: url(../../Morpheus/images/loading-blue.gif) no-repeat center center white;
    position: absolute;
    z-index: 10;
}

.jqplot-target {
    position: relative;
    color: #333;
    font-size: 1em;
}

.jqplot-axis {
    font-size: 0.75em;
}

.jqplot-xaxis {
    margin-top: 10px;
}

.jqplot-yaxis {
    margin-right: 10px;
}

.jqplot-y2axis,
.jqplot-y3axis {
    margin: 0 3px 0 7px;
}

.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick {
    position: absolute;
}

.jqplot-xaxis-tick {
    top: 0;
    left: 15px;
    vertical-align: top;
}

.jqplot-yaxis-tick {
    right: 0;
    top: 15px;
    text-align: right;
}

.jqplot-yaxis-tick.jqplot-breakTick {
    right: -20px;
    margin-right: 0;
    padding: 1px 5px 1px 5px;
    z-index: 2;
    font-size: 1.5em;
}

.jqplot-xaxis-label {
    margin-top: 10px;
    font-size: 11pt;
    position: absolute;
}

.jqplot-yaxis-label {
    margin-right: 10px;
    font-size: 11pt;
    position: absolute;
}

.jqplot-title {
    top: 0;
    left: 0;
    padding-bottom: 0.5em;
    font-size: 1.2em;
}

/**
 * ROW EVOLUTION POPUP
 */

.rowevolution {
    position: relative;
    overflow: hidden;
    text-align: left;
}

.rowevolution h2 {
    font-size: 16px;
    margin: 0;
    padding: 0;
    border: none;
}

.rowevolution .metrics-container {
    padding: 11px 0 5px 0;
}

.rowevolution table.metrics {
    border-spacing: 0;
}

.multirowevolution table.metrics {
    margin-bottom: 12px;
}

.rowevolution table.metrics,
.multirowevolution table.metrics {
    /* prevent select for shift-click on metric toggles */
    user-select: none; /* CSS3 */
    -moz-user-select: none; /* Gecko (Firefox) */
    -khtml-user-select: none; /* Webkit (Safari, Chrome) */
}

.rowevolution table.metrics tr {
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.rowevolution table.metrics td {
    vertical-align: middle;
    text-align: left;
    margin: 0;
    padding: 4px 0;
    cursor: pointer;
}

.rowevolution table.metrics td.sparkline {
    width: 120px;
}

.multirowevolution table.metrics td.sparkline {
    padding-top: 15px;
}

/** IE7 does not support inline image data, which is needed for spark lines */
*+html .multirowevolution table.metrics td.sparkline,
*+html .rowevolution table.metrics td.sparkline {
    display: none;
}

.rowevolution table.metrics td.text {
    font-size: 13px;
    line-height: 18px;
    color: #7E7363;
    font-weight: bold;
}

.multirowevolution table.metrics td.text {
    padding-top: 8px;
}

.rowevolution table.metrics td.text span.details {
    font-weight: normal;
    color: #444;
}

.rowevolution table.metrics td.text span.change {
    display: block;
    float: left;
    padding-left: 15px;
}

.rowevolution table.metrics td.text span.good {
    color: #008000;
}

.rowevolution table.metrics td.text span.bad {
    color: #f00;
}

.rowevolution-documentation {
    font-size: 12px;
    margin: 2px 0 5px 0;
    padding: 5px 0 5px 23px;
    color: #888;
    background: url(../../Morpheus/images/help.png) no-repeat left center;
}

.rowevolution .metric-selectbox,
.rowevolution .compare-container {
    padding: 15px 0 5px 0;
}

.rowevolution .metric-selectbox select {
    font-size: 13px;
    color: #444;
    margin: 8px 0 0 0;
    padding: 0;
}

a.rowevolution-startmulti {
    font-size: 12px;
    color: #7E7363;
    font-weight: bold;
    text-decoration: none;
}

a.rowevolution-startmulti:hover {
    color: #444;
}

/**
 * SERIES PICKER FOR CHARTS
 */

.jqplot-seriespicker {
    display: block;
    position: absolute;
    z-index: 9;
    width: 24px;
    height: 16px;
    margin-top: 3px;
    background: url(../../Morpheus/images/chart_line_edit.png) no-repeat center center;
    overflow: hidden;
    text-indent: -999px;
}

.jqplot-seriespicker-popover {
    display: block;
    position: absolute;
    z-index: 1010; /* must be above ui dialog */
    margin-top: -2px;
    background: url(../../Morpheus/images/chart_line_edit.png) no-repeat 7px 4px #f7f7f7;
    font-size: 11px;
    font-weight: normal;
    border: 1px solid #e4e5e4;
    padding: 6px 9px;
    border-radius: 4px;
    -moz-box-shadow: 1px 1px 2px #666;
    -webkit-box-shadow: 1px 1px 2px #666;
    box-shadow: 1px 1px 2px #666;
}

.jqplot-seriespicker-popover p {
    margin: 0;
    padding: 0 4px 0 0;
    line-height: 15px;
    vertical-align: middle;
}

.jqplot-seriespicker-popover p.headline {
    font-weight: bold;
    font-size: 12px;
    padding: 0 0 6px 22px;
    color: #7E7363;
}

.jqplot-seriespicker-popover p.headline.recordsToPlot {
    padding: 8px 0 3px 0;
}

.jqplot-seriespicker-popover.alignright p.headline {
    padding: 0 22px 6px 0;
}

.jqplot-seriespicker-popover input.select {
    margin-right: 8px;
    min-height: 5px;
}

.jqplot-seriespicker-popover p.pickColumn,
.jqplot-seriespicker-popover p.pickRow {
    cursor: pointer;
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GM.Utility
{
	/// <summary>
	/// Utilities for double.
	/// </summary>
	public static class DoubleUtility
	{
		/// <summary>
		/// Determines whether all the texts in the provided collection represent a valid double.
		/// </summary>
		/// <param name="texts">A collection of texts.</param>
		public static bool AreDoubles(IEnumerable<string> texts)
		{
			return texts.All(t => IsDouble(t));
		}

		/// <summary>
		/// Gets only the decimal part of this double.
		/// <para>If the value is negative, the returned value will also be negative (except if the returned value is zero, then the information about the sign is lost).</para>
		/// </summary>
		/// <param name="value">The double value.</param>
		public static double GetDecimals(this double value)
		{
			decimal decimalValue = Convert.ToDecimal(value);
			decimal decimals = decimalValue.GetDecimals();
			return decimal.ToDouble(decimals);
		}

		/// <summary>
		/// Gets only the decimal part of this double, rounded to the specified number of decimals.
		/// <para>If the value is negative, the returned value will also be negative (except if the returned value is zero, then the information about the sign is lost).</para>
		/// </summary>
		/// <param name="value">The double value.</param>
		/// <param name="decimalCount">Number of decimals to round to.</param>
		public static double GetDecimals(this double value, int decimalCount)
		{
			decimal decimalValue = Convert.ToDecimal(value);
			decimal decimals = decimalValue.GetDecimals(decimalCount);
			return decimal.ToDouble(decimals);
		}

		/// <summary>
		/// Gets the specified number of decimals from the decimal part of this double as an integer.
		/// <para>If the decimal part is below 0.1, the zeros at the beginning will be omitted.</para>
		/// <para>If the value is negative, the returned value will also be negative (except if the returned value is zero, then the information about the sign is lost).</para>
		/// </summary>
		/// <param name="value">The double value.</param>
		/// <param name="decimalCount">Number of decimals to get.</param>
		/// <param name="round">Determines whether or not it should round the number in case the decimalCount parameter is lower than the decimals in the value.</param>
		public static int GetDecimalPart(this double value, int decimalCount, bool round)
		{
			decimal decimalValue = Convert.ToDecimal(value);
			return decimalValue.GetDecimalPart(decimalCount, round);
		}

		/// <summary>
		/// Gets the whole decimal part of this double as an integer.
		/// <para>If the value is negative, the returned value will also be negative (except if the returned value is zero, then the information about the sign is lost).</para>
		/// </summary>
		/// <param name="value">The double value.</param>
		public static int GetDecimalPart(this double value)
		{
			decimal decimalValue = Convert.ToDecimal(value);
			return decimalValue.GetDecimalPart();
		}

		/// <summary>
		/// Determines whether the provided text represents a valid double.
		/// </summary>
		/// <param name="text">The text.</param>
		public static bool IsDouble(string text)
		{
			return double.TryParse(text, out double value);
		}

		/// <summary>
		/// Converts a collection of string representations of doubles to actual doubles.
		/// </summary>
		/// <param name="texts">A collection of texts to parse.</param>
		public static IEnumerable<double> Parse(IEnumerable<string> texts)
		{
			return texts.Select(t => double.Parse(t));
		}

		/// <summary>
		/// Converts a collection of string representations of doubles to actual doubles. Sets zero if a text is invalid.
		/// </summary>
		/// <param name="texts">A collection of texts to parse.</param>
		public static IEnumerable<double> Parse0(IEnumerable<string> texts)
		{
			return texts.Select(t => Parse0(t));
		}

		/// <summary>
		/// Parses the provided text to a double. Returns zero if it is invalid.
		/// </summary>
		/// <param name="text">The text to parse.</param>
		public static double Parse0(string text)
		{
			return ParseNullable(text) ?? 0;
		}

		/// <summary>
		/// Converts a collection of string representations of doubles to actual doubles. Sets null if a text is invalid.
		/// </summary>
		/// <param name="texts">A collection of texts to parse.</param>
		public static IEnumerable<double?> ParseNullable(IEnumerable<string> texts)
		{
			return texts.Select(t => ParseNullable(t));
		}

		/// <summary>
		/// Parses the provided text to a double. Returns null if it is invalid.
		/// </summary>
		/// <param name="text">The text to parse.</param>
		public static double? ParseNullable(string text)
		{
			if(double.TryParse(text, out double value)) {
				return value;
			}
			return null;
		}
	}
}


text:
var menudata={children:[
{text:"Main Page",url:"index.html"},
{text:"Classes",url:"annotated.html",children:[
{text:"Class List",url:"annotated.html"},
{text:"Class Index",url:"classes.html"},
{text:"Class Hierarchy",url:"hierarchy.html"},
{text:"Class Members",url:"functions.html",children:[
{text:"All",url:"functions.html",children:[
{text:"a",url:"functions.html#index_a"},
{text:"b",url:"functions_b.html#index_b"},
{text:"c",url:"functions_c.html#index_c"},
{text:"d",url:"functions_d.html#index_d"},
{text:"e",url:"functions_e.html#index_e"},
{text:"f",url:"functions_f.html#index_f"},
{text:"g",url:"functions_g.html#index_g"},
{text:"h",url:"functions_h.html#index_h"},
{text:"i",url:"functions_i.html#index_i"},
{text:"k",url:"functions_k.html#index_k"},
{text:"l",url:"functions_l.html#index_l"},
{text:"m",url:"functions_m.html#index_m"},
{text:"n",url:"functions_n.html#index_n"},
{text:"o",url:"functions_o.html#index_o"},
{text:"p",url:"functions_p.html#index_p"},
{text:"r",url:"functions_r.html#index_r"},
{text:"s",url:"functions_s.html#index_s"},
{text:"t",url:"functions_t.html#index_t"},
{text:"u",url:"functions_u.html#index_u"},
{text:"v",url:"functions_v.html#index_v"},
{text:"w",url:"functions_w.html#index_w"},
{text:"x",url:"functions_x.html#index_x"},
{text:"z",url:"functions_z.html#index_z"},
{text:"~",url:"functions_0x7e.html#index_0x7e"}]},
{text:"Functions",url:"functions_func.html",children:[
{text:"a",url:"functions_func.html#index_a"},
{text:"b",url:"functions_func_b.html#index_b"},
{text:"c",url:"functions_func_c.html#index_c"},
{text:"d",url:"functions_func_d.html#index_d"},
{text:"e",url:"functions_func_e.html#index_e"},
{text:"f",url:"functions_func_f.html#index_f"},
{text:"g",url:"functions_func_g.html#index_g"},
{text:"h",url:"functions_func_h.html#index_h"},
{text:"i",url:"functions_func_i.html#index_i"},
{text:"k",url:"functions_func_k.html#index_k"},
{text:"l",url:"functions_func_l.html#index_l"},
{text:"m",url:"functions_func_m.html#index_m"},
{text:"n",url:"functions_func_n.html#index_n"},
{text:"o",url:"functions_func_o.html#index_o"},
{text:"p",url:"functions_func_p.html#index_p"},
{text:"r",url:"functions_func_r.html#index_r"},
{text:"s",url:"functions_func_s.html#index_s"},
{text:"t",url:"functions_func_t.html#index_t"},
{text:"u",url:"functions_func_u.html#index_u"},
{text:"v",url:"functions_func_v.html#index_v"},
{text:"~",url:"functions_func_0x7e.html#index_0x7e"}]},
{text:"Variables",url:"functions_vars.html",children:[
{text:"a",url:"functions_vars.html#index_a"},
{text:"b",url:"functions_vars_b.html#index_b"},
{text:"c",url:"functions_vars_c.html#index_c"},
{text:"d",url:"functions_vars_d.html#index_d"},
{text:"e",url:"functions_vars_e.html#index_e"},
{text:"f",url:"functions_vars_f.html#index_f"},
{text:"g",url:"functions_vars_g.html#index_g"},
{text:"h",url:"functions_vars_h.html#index_h"},
{text:"i",url:"functions_vars_i.html#index_i"},
{text:"k",url:"functions_vars_k.html#index_k"},
{text:"l",url:"functions_vars_l.html#index_l"},
{text:"m",url:"functions_vars_m.html#index_m"},
{text:"n",url:"functions_vars_n.html#index_n"},
{text:"o",url:"functions_vars_o.html#index_o"},
{text:"p",url:"functions_vars_p.html#index_p"},
{text:"r",url:"functions_vars_r.html#index_r"},
{text:"s",url:"functions_vars_s.html#index_s"},
{text:"t",url:"functions_vars_t.html#index_t"},
{text:"u",url:"functions_vars_u.html#index_u"},
{text:"v",url:"functions_vars_v.html#index_v"},
{text:"w",url:"functions_vars_w.html#index_w"},
{text:"z",url:"functions_vars_z.html#index_z"}]},
{text:"Typedefs",url:"functions_type.html",children:[
{text:"v",url:"functions_type.html#index_v"}]},
{text:"Enumerations",url:"functions_enum.html"},
{text:"Enumerator",url:"functions_eval.html"}]}]},
{text:"Files",url:"files.html",children:[
{text:"File List",url:"files.html"},
{text:"File Members",url:"globals.html",children:[
{text:"All",url:"globals.html"},
{text:"Functions",url:"globals_func.html"},
{text:"Typedefs",url:"globals_type.html"},
{text:"Enumerations",url:"globals_enum.html"},
{text:"Macros",url:"globals_defs.html"}]}]}]}


text:
#include "sim/debug.hh"

#include <string>
#include <vector>

#include "base/debug.hh"
#include "cpu/pc_event.hh"
#include "sim/eventq.hh"
#include "sim/global_event.hh"
#include "sim/kernel_workload.hh"
#include "sim/sim_events.hh"
#include "sim/sim_exit.hh"
#include "sim/system.hh"

namespace gem5
{

//
// Debug event: place a breakpoint on the process function and
// schedule the event to break at a particular cycle
//
struct DebugBreakEvent : public GlobalEvent
{
    DebugBreakEvent(Tick when);
    void process();     // process event
    virtual const char *description() const;
};

//
// constructor: schedule at specified time
//
DebugBreakEvent::DebugBreakEvent(Tick when)
    : GlobalEvent(when, Debug_Break_Pri, AutoDelete)
{
}

//
// handle debug event: set debugger breakpoint on this function
//
void
DebugBreakEvent::process()
{
    debug::breakpoint();
}

const char *
DebugBreakEvent::description() const
{
    return "debug breakpoint";
}

//
// handy function to schedule DebugBreakEvent on main event queue
// (callable from debugger)
//
void
schedBreak(Tick when)
{
    new DebugBreakEvent(when);
    warn("need to stop all queues");
}

void
schedRelBreak(Tick delta)
{
    schedBreak(curTick() + delta);
}

///
/// Function to cause the simulator to take a checkpoint from the debugger
///
void
takeCheckpoint(Tick when)
{
    if (!when)
        when = curTick() + 1;
    exitSimLoop("checkpoint", 0, when, 0);
}

void
eventqDump()
{
    for (uint32_t i = 0; i < numMainEventQueues; ++i) {
        mainEventQueue[i]->dump();
    }
}

int remote_gdb_base_port = 7000;

int
getRemoteGDBPort()
{
    return remote_gdb_base_port;
}

// Set remote GDB base port.  0 means disable remote GDB.
// Callable from python.
void
setRemoteGDBPort(int port)
{
    remote_gdb_base_port = port;
}

} // namespace gem5


text:
@interface CKLAppDelegate : UIResponder <UIApplicationDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>

@property (strong, nonatomic) UIWindow *window;

@end


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Lichenologist 28(5): 411 (1996)

#### Original name
Myeloconis guyanensis P. M. McCarthy & Elix

### Remarks
null


text:
select sum(lo_revenue), d_year, p_brand
from lineorder
join dim_date
 on lo_orderdatekey = d_datekey
join part
on lo_partkey = p_partkey join supplier
on lo_suppkey = s_suppkey
where  p_category = 'MFGR#12'
and s_region = 'AMERICA'
group by d_year, p_brand
order by d_year, p_brand;


text:
// Disable autolinking for unit tests.
#if !defined(BOOST_ALL_NO_LIB)
#define BOOST_ALL_NO_LIB 1
#endif // !defined(BOOST_ALL_NO_LIB)

// Test that header file is self-contained.
#include <boost/asio/ip/basic_resolver_query.hpp>

#include "../unit_test.hpp"

BOOST_ASIO_TEST_SUITE
(
  "ip/basic_resolver_query",
  BOOST_ASIO_TEST_CASE(null_test)
)


text:
layout: page
title: Hero Chrome Technologies Award Ceremony
date: 2016-05-24
author: Anthony Galvan
tags: weekly links, java
status: published
summary: Donec eu ante sit amet lectus ultricies blandit. Vivamus.
banner: images/banner/leisure-04.jpg
booking:
  startDate: 08/28/2018
  endDate: 08/29/2018
  ctyhocn: SAVGWHX
  groupCode: HCTAC
published: true
---
Sed et augue nec velit viverra venenatis. Cras non lacus volutpat, euismod nisi scelerisque, fermentum leo. Pellentesque nisl tortor, iaculis in tincidunt quis, maximus at eros. Sed quis venenatis neque, ut sodales dolor. Praesent in lacus et ligula tincidunt cursus dictum a purus. Nulla facilisi. Sed viverra fringilla odio. Ut nec convallis velit, in lacinia ipsum. Donec rhoncus tortor vitae feugiat bibendum. Suspendisse potenti. Donec nec quam sit amet est elementum faucibus.

* Maecenas at diam rhoncus, mattis tellus id, commodo risus
* Duis facilisis nunc a lorem consectetur venenatis
* Nam tincidunt eros eget turpis tincidunt varius.

Morbi ullamcorper laoreet leo, vel blandit ligula pellentesque porta. Aliquam porttitor massa felis, eu molestie nunc ullamcorper vel. Aenean commodo, augue et placerat venenatis, sem velit auctor quam, consectetur commodo libero diam sed est. Nulla porttitor quis enim in dictum. Vivamus posuere massa a vehicula faucibus. Nulla iaculis aliquet nisl ut placerat. Nam dui felis, gravida fermentum tellus nec, convallis tincidunt ex. Suspendisse finibus odio ac nunc posuere, at elementum turpis euismod.
Sed et diam pulvinar, hendrerit arcu in, fermentum purus. Proin mauris lectus, dapibus eu convallis at, egestas viverra diam. Nunc placerat feugiat turpis a consequat. Donec suscipit arcu id porttitor aliquet. Proin sit amet tellus fringilla, dapibus urna at, lacinia libero. Nunc consequat blandit lacinia. Aenean at nunc sed felis scelerisque lobortis in at turpis. Mauris luctus enim ligula, sit amet sodales augue suscipit ut. Sed eros sem, suscipit a viverra ac, aliquam non felis. Etiam malesuada dignissim leo. Aenean commodo rhoncus libero, sed tempor lorem facilisis sit amet. In hac habitasse platea dictumst.