text:
package com.maddyhome.idea.copyright.ui;

import com.intellij.ide.DataManager;
import com.intellij.ide.util.scopeChooser.PackageSetChooserCombo;
import com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.newEditor.OptionsEditor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.LabeledComponent;
import com.intellij.openapi.util.Comparing;
import com.intellij.packageDependencies.DefaultScopesProvider;
import com.intellij.packageDependencies.DependencyValidationManager;
import com.intellij.psi.search.scope.packageSet.CustomScopesProviderEx;
import com.intellij.psi.search.scope.packageSet.NamedScope;
import com.intellij.psi.search.scope.packageSet.NamedScopesHolder;
import com.intellij.ui.HyperlinkLabel;
import com.intellij.ui.JBColor;
import com.intellij.ui.ListCellRendererWrapper;
import com.intellij.ui.ToolbarDecorator;
import com.intellij.ui.components.editors.JBComboBoxTableCellEditorComponent;
import com.intellij.ui.table.TableView;
import com.intellij.util.Function;
import com.intellij.util.ui.*;
import com.maddyhome.idea.copyright.CopyrightManager;
import com.maddyhome.idea.copyright.CopyrightProfile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
import java.util.*;
import java.util.List;

public class ProjectSettingsPanel {
  private final Project myProject;
  private final CopyrightProfilesPanel myProfilesModel;
  private final CopyrightManager myManager;

  private final TableView<ScopeSetting> myScopeMappingTable;
  private final ListTableModel<ScopeSetting> myScopeMappingModel;
  private final JComboBox myProfilesComboBox = new JComboBox();

  private final HyperlinkLabel myScopesLink = new HyperlinkLabel();

  public ProjectSettingsPanel(Project project, CopyrightProfilesPanel profilesModel) {
    myProject = project;
    myProfilesModel = profilesModel;
    myProfilesModel.addItemsChangeListener(new Runnable() {
      public void run() {
        final Object selectedItem = myProfilesComboBox.getSelectedItem();
        reloadCopyrightProfiles();
        myProfilesComboBox.setSelectedItem(selectedItem);
        final ArrayList<ScopeSetting> toRemove = new ArrayList<ScopeSetting>();
        for (ScopeSetting setting : myScopeMappingModel.getItems()) {
          if (setting.getProfile() == null) {
            toRemove.add(setting);
          }
        }
        for (ScopeSetting setting : toRemove) {
          myScopeMappingModel.removeRow(myScopeMappingModel.indexOf(setting));
        }
      }
    });
    myManager = CopyrightManager.getInstance(project);

    ColumnInfo[] columns = {new ScopeColumn(), new SettingColumn()};
    myScopeMappingModel = new ListTableModel<ScopeSetting>(columns, new ArrayList<ScopeSetting>(), 0);
    myScopeMappingTable = new TableView<ScopeSetting>(myScopeMappingModel);

    reloadCopyrightProfiles();
    myProfilesComboBox.setRenderer(new ListCellRendererWrapper<CopyrightProfile>() {
      @Override
      public void customize(JList list, CopyrightProfile value, int index, boolean selected, boolean hasFocus) {
        if (value == null) {
          setText("No copyright");
        }
        else {
          setText(value.getName());
        }
      }
    });

    myScopesLink.setVisible(!myProject.isDefault());
    myScopesLink.setHyperlinkText("Select Scopes to add new scopes or modify existing ones");
    myScopesLink.addHyperlinkListener(new HyperlinkListener() {
      public void hyperlinkUpdate(final HyperlinkEvent e) {
        if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          final DataContext dataContext = DataManager.getInstance().getDataContextFromFocus().getResult();
          final OptionsEditor optionsEditor = OptionsEditor.KEY.getData(dataContext);
          if (optionsEditor != null) {
            Configurable configurable = optionsEditor.findConfigurableById(ScopeChooserConfigurable.PROJECT_SCOPES);
            if (configurable != null) {
              optionsEditor.clearSearchAndSelect(configurable);
            }
          }
        }
      }
    });
  }

  public void reloadCopyrightProfiles() {
    final DefaultComboBoxModel boxModel = (DefaultComboBoxModel)myProfilesComboBox.getModel();
    boxModel.removeAllElements();
    boxModel.addElement(null);
    for (CopyrightProfile profile : myProfilesModel.getAllProfiles().values()) {
      boxModel.addElement(profile);
    }
  }

  public JComponent getMainComponent() {
    final JPanel panel = new JPanel(new BorderLayout(0, 10));
    final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
    component.setText("Default &project copyright:");
    component.setLabelLocation(BorderLayout.WEST);
    component.setComponent(myProfilesComboBox);
    panel.add(component, BorderLayout.NORTH);
    ElementProducer<ScopeSetting> producer = new ElementProducer<ScopeSetting>() {
      @Override
      public ScopeSetting createElement() {
        return new ScopeSetting(DefaultScopesProvider.getAllScope(), myProfilesModel.getAllProfiles().values().iterator().next());
      }

      @Override
      public boolean canCreateElement() {
        return !myProfilesModel.getAllProfiles().isEmpty();
      }
    };
    ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myScopeMappingTable, producer);
    panel.add(decorator.createPanel(), BorderLayout.CENTER);
    panel.add(myScopesLink, BorderLayout.SOUTH);
    return panel;
  }

  public boolean isModified() {
    final CopyrightProfile defaultCopyright = myManager.getDefaultCopyright();
    final Object selected = myProfilesComboBox.getSelectedItem();
    if (defaultCopyright != selected) {
      if (selected == null) return true;
      if (defaultCopyright == null) return true;
      if (!defaultCopyright.equals(selected)) return true;
    }
    final Map<String, String> map = myManager.getCopyrightsMapping();
    if (map.size() != myScopeMappingModel.getItems().size()) return true;
    final Iterator<String> iterator = map.keySet().iterator();
    for (ScopeSetting setting : myScopeMappingModel.getItems()) {
      final NamedScope scope = setting.getScope();
      if (!iterator.hasNext()) return true;
      final String scopeName = iterator.next();
      if (scope == null || !Comparing.strEqual(scopeName, scope.getName())) return true;
      final String profileName = map.get(scope.getName());
      if (profileName == null) return true;
      if (!profileName.equals(setting.getProfileName())) return true;
    }
    return false;
  }

  public void apply() {
    Collection<CopyrightProfile> profiles = new ArrayList<CopyrightProfile>(myManager.getCopyrights());
    myManager.clearCopyrights();
    for (CopyrightProfile profile : profiles) {
      myManager.addCopyright(profile);
    }
    final List<ScopeSetting> settingList = myScopeMappingModel.getItems();
    for (ScopeSetting scopeSetting : settingList) {
      myManager.mapCopyright(scopeSetting.getScope().getName(), scopeSetting.getProfileName());
    }
    myManager.setDefaultCopyright((CopyrightProfile)myProfilesComboBox.getSelectedItem());
  }

  public void reset() {
    myProfilesComboBox.setSelectedItem(myManager.getDefaultCopyright());
    final List<ScopeSetting> mappings = new ArrayList<ScopeSetting>();
    final Map<String, String> copyrights = myManager.getCopyrightsMapping();
    final DependencyValidationManager manager = DependencyValidationManager.getInstance(myProject);
    final Set<String> scopes2Unmap = new HashSet<String>();
    for (final String scopeName : copyrights.keySet()) {
      final NamedScope scope = manager.getScope(scopeName);
      if (scope != null) {
        mappings.add(new ScopeSetting(scope, copyrights.get(scopeName)));
      }
      else {
        scopes2Unmap.add(scopeName);
      }
    }
    for (String scopeName : scopes2Unmap) {
      myManager.unmapCopyright(scopeName);
    }
    myScopeMappingModel.setItems(mappings);
  }

  private class ScopeSetting {
    private NamedScope myScope;
    private CopyrightProfile myProfile;
    private String myProfileName;

    private ScopeSetting(NamedScope scope, CopyrightProfile profile) {
      myScope = scope;
      myProfile = profile;
      if (myProfile != null) {
        myProfileName = myProfile.getName();
      }
    }

    public ScopeSetting(NamedScope scope, String profile) {
      myScope = scope;
      myProfileName = profile;
    }

    public CopyrightProfile getProfile() {
      if (myProfileName != null) {
        myProfile = myProfilesModel.getAllProfiles().get(getProfileName());
      }
      return myProfile;
    }

    public void setProfile(@NotNull CopyrightProfile profile) {
      myProfile = profile;
      myProfileName = profile.getName();
    }

    public NamedScope getScope() {
      return myScope;
    }

    public void setScope(NamedScope scope) {
      myScope = scope;
    }

    public String getProfileName() {
      return myProfile != null ? myProfile.getName() : myProfileName;
    }
  }

  private class SettingColumn extends MyColumnInfo<CopyrightProfile> {
    private SettingColumn() {
      super("Copyright");
    }

    public TableCellRenderer getRenderer(final ScopeSetting scopeSetting) {
      return new DefaultTableCellRenderer() {
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
          final Component rendererComponent = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
          if (!isSelected) {
            final CopyrightProfile profile = myProfilesModel.getAllProfiles().get(scopeSetting.getProfileName());
            setForeground(profile == null ? JBColor.RED : UIUtil.getTableForeground());
          }
          setText(scopeSetting.getProfileName());
          return rendererComponent;
        }
      };
    }

    public TableCellEditor getEditor(final ScopeSetting scopeSetting) {
      return new AbstractTableCellEditor() {
        private final JBComboBoxTableCellEditorComponent myProfilesChooser = new JBComboBoxTableCellEditorComponent();

        public Object getCellEditorValue() {
          return myProfilesChooser.getEditorValue();
        }

        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
          final List<CopyrightProfile> copyrights = new ArrayList<CopyrightProfile>(myProfilesModel.getAllProfiles().values());
          Collections.sort(copyrights, new Comparator<CopyrightProfile>() {
            @Override
            public int compare(CopyrightProfile o1, CopyrightProfile o2) {
              return o1.getName().compareToIgnoreCase(o2.getName());
            }
          });
          myProfilesChooser.setCell(table, row, column);
          myProfilesChooser.setOptions(copyrights.toArray());
          myProfilesChooser.setDefaultValue(scopeSetting.getProfile());
          myProfilesChooser.setToString(new Function<Object, String>() {
            @Override
            public String fun(Object o) {
              return ((CopyrightProfile)o).getName();
            }
          });
          return myProfilesChooser;
        }
      };
    }

    public CopyrightProfile valueOf(final ScopeSetting object) {
      return object.getProfile();
    }

    public void setValue(final ScopeSetting scopeSetting, final CopyrightProfile copyrightProfile) {
      if (copyrightProfile != null) {
        scopeSetting.setProfile(copyrightProfile);
      }
    }
  }

  private class ScopeColumn extends MyColumnInfo<NamedScope> {
    private ScopeColumn() {
      super("Scope");
    }

    public TableCellRenderer getRenderer(final ScopeSetting mapping) {
      return new DefaultTableCellRenderer() {
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
          super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
          if (value == null) {
            setText("");
          }
          else {
            final String scopeName = ((NamedScope)value).getName();
            if (!isSelected) {
              final NamedScope scope = NamedScopesHolder.getScope(myProject, scopeName);
              if (scope == null) setForeground(JBColor.RED);
            }
            setText(scopeName);
          }
          return this;
        }
      };
    }

    public TableCellEditor getEditor(final ScopeSetting mapping) {
      return new AbstractTableCellEditor() {
        private PackageSetChooserCombo myScopeChooser;

        @Nullable
        public Object getCellEditorValue() {
          return myScopeChooser.getSelectedScope();
        }

        public Component getTableCellEditorComponent(final JTable table, Object value, boolean isSelected, int row, int column) {
          myScopeChooser = new PackageSetChooserCombo(myProject, value == null ? null : ((NamedScope)value).getName(), false, false){
            @Override
            protected NamedScope[] createModel() {
              final NamedScope[] model = super.createModel();
              final ArrayList<NamedScope> filteredScopes = new ArrayList<NamedScope>(Arrays.asList(model));
              CustomScopesProviderEx.filterNoSettingsScopes(myProject, filteredScopes);
              return filteredScopes.toArray(new NamedScope[filteredScopes.size()]);
            }
          };

          ((JBComboBoxTableCellEditorComponent)myScopeChooser.getChildComponent()).setCell(table, row, column);
          return myScopeChooser;
        }
      };
    }

    public NamedScope valueOf(final ScopeSetting mapping) {
      return mapping.getScope();
    }

    public void setValue(final ScopeSetting mapping, final NamedScope set) {
      mapping.setScope(set);
    }
  }

  private static abstract class MyColumnInfo<T> extends ColumnInfo<ScopeSetting, T> {
    protected MyColumnInfo(final String name) {
      super(name);
    }

    @Override
    public boolean isCellEditable(final ScopeSetting item) {
      return true;
    }
  }
}


text:
PATH=$PATH:/usr/share/Modules/bin/:/home/qon/alice/alibuild
export ALIBUILD_WORK_DIR="$HOME/alice/sw"
eval "`alienv shell-helper`"
alienv load O2/latest

o2-sim -n 1

export ROOT_INCLUDE_PATH=$ROOT_INCLUDE_PATH:/home/qon/alice/GPU/Common/:/home/qon/alice/GPU/GPUTracking/Base:/home/qon/alice/GPU/GPUTracking/SliceTracker:/home/qon/alice/GPU/GPUTracking/Merger:/home/qon/alice/GPU/GPUTracking/TRDTracking
root -l -q -b createGeo.C+

redpajama_set_name: RedPajamaGithub


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

namespace devenvWebProxyAuthentication
{
    public sealed class LogSingleton : ILogger
    {
        private static readonly LogSingleton _logSingleton = new LogSingleton();
        private ILogger _logger = null;

        public static LogSingleton GetInstance
        {
            get
            {
                return _logSingleton;
            }
            private set {}
        }

        public void SetLogger(ILogger logger)
        {
            _logger = logger;
        }

        public void BeginFunction(string functionName)
        {
            if (_logger != null)
            {
                _logger.BeginFunction(functionName);
            }
        }

        public void EndFunction(string functionName)
        {
            if (_logger != null)
            {
                _logger.EndFunction(functionName);
            }
        }

        public void Message(string message)
        {
            if (_logger != null)
            {
                _logger.Message(message);
            }
        }

        public void Warning(string warning)
        {
            if (_logger != null)
            {
                _logger.Warning(warning);
            }
        }

        public void Exception(Exception exception)
        {
            if (_logger != null)
            {
                _logger.Exception(exception);
            }
        }
    }
}


text:
<?php
namespace Trojanbox\EventManager\EventManagerInterface;

interface EventInterface {

}


text:
<?php

namespace Igniter\Flame\Cart\Exceptions;

use RuntimeException;

class CartAlreadyStoredException extends RuntimeException
{
}


text:
export declare const UP_ARROW: number;
export declare const DOWN_ARROW: number;
export declare const RIGHT_ARROW: number;
export declare const LEFT_ARROW: number;
export declare const PAGE_UP: number;
export declare const PAGE_DOWN: number;
export declare const HOME: number;
export declare const END: number;
export declare const ENTER: number;
export declare const SPACE: number;
export declare const TAB: number;
export declare const ESCAPE: number;
export declare const BACKSPACE: number;
export declare const DELETE: number;


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S15.1.3.3_A5.4;
 * @section: 15.1.3.3;
 * @assertion: The length property of encodeURI is 1;
 * @description: encodeURI.length === 1;
*/

//CHECK#1
if (encodeURI.length !== 1) {
  $ERROR('#1: encodeURI.length === 1. Actual: ' + (encodeURI.length));
}


text:
'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
	errorHandler = require('./errors.server.controller'),
	Photo = mongoose.model('Photo'),
	Comment = mongoose.model('Comment'),
	_ = require('lodash');

/**
 * Create a Photo
 */
exports.create = function(req, res) {
  //console.log(req.body);
  //console.log(req.files);
  //console.log('User info: ' +req.user.username);
  var photo = new Photo(req.body);
  photo.user = req.user;
  photo.priv = req.user.priv;
  //photo.user.displayName = req.user.username;
  //photo.user.username = req.user.username;
  photo.likes.push(req.user._id);
  console.log(photo.user);
  if(req.files.image) {
    photo.image =req.files.image.path.substring(7);
    //console.log(photo.image);
  }  else
    photo.image='default.jpg';
  photo.save(function(err) {
    if (err) {
      return res.status(400).send({
	message: errorHandler.getErrorMessage(err)
      });
    } else {
      res.redirect('/#!/photos/'+photo._id); // redirection to '/'jsonp(photo);
    }
  });
};

/**
 * Show the current Photo
 */
exports.read = function(req, res) {

  var photo = req.photo;
  console.log(photo);
  console.log("yooooo");
  //  photo = _.extend(photo , req.body);
  photo.views += 1;
  photo.save(function(err) {
    if (err) {
      console.log('Problem'+err);
      return res.status(400).send({
	message: errorHandler.getErrorMessage(err)
      });
    } else
      res.jsonp(photo);
  });
};

/**
 * Update a Photo
 */
exports.update = function(req, res) {
	var photo = req.photo ;

	photo = _.extend(photo , req.body);

	photo.save(function(err) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.jsonp(photo);
		}
	});
};

/**
 * Delete an Photo
 */
exports.delete = function(req, res) {
	var photo = req.photo ;

	photo.remove(function(err) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.jsonp(photo);
		}
	});
};

/**
 * List of Photos
 */
exports.list = function(req, res) {
	Photo.find().sort('-created').populate('user', 'displayName').exec(function(err, photos) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.jsonp(photos);
		}
	});
};
/**
 * Likes a photo
 */
exports.like = function(req, res) {
  var user = req.user;
  var containsValue = false;
  console.log(req.photo.likes);

  // Determine if user is already in
  for(var i=0; i<req.photo.likes.length; i++) {
    console.log('Comparing ' + req.photo.likes[i] + ' to ' + req.user._id + ' is ' + req.photo.likes[i].equals(req.user._id));
    if(req.photo.likes[i].equals(req.user._id)) {
      containsValue = true;
    }
  }
  if(!containsValue) {
	req.photo.likes.push(req.user._id);
  }
  req.photo.save(function(err) {
    if (err) {
      return res.status(400).send({
		message: errorHandler.getErrorMessage(err)
      });
    } else {
      res.jsonp(req.photo);
	 }
  });
};

/**
 * Photo middleware
 */
exports.photoByID = function(req, res, next, id) {
  console.log('finding by id:'+id);
	Photo.findById(id).populate('user', 'displayName').exec(function(err, photo) {
	  if (err) return next(err);
	  if (! photo) return next(new Error('Failed to load Photo ' + id));
	  req.photo = photo;
	  next();
	});
};

/**
 * Photo authorization middleware
 */
exports.hasAuthorization = function(req, res, next) {
	if (req.photo.user.id !== req.user.id) {
		return res.status(403).send('User is not authorized');
	}
	next();
};


text:
function(detect_code_compiled code macro msg)
    message(STATUS "Detecting ${msg}")
    check_cxx_source_compiles("${code}" "${macro}" FAIL_REGEX "warning")
    if(${macro})
        message(STATUS "Detecting ${msg} - supported")
    else()
        message(STATUS "Detecting ${msg} - not supported")
    endif()
endfunction(detect_code_compiled)

include(CheckIncludeFileCXX)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(CMakeDetermineCompileFeatures)
include(CheckCXXSourceCompiles)
include(CMakeFindDependencyMacro)

if(NOT PostgreSQL_FOUND)
    if(POLICY CMP0074)
        cmake_policy(PUSH)
        # CMP0074 is `OLD` by `cmake_minimum_required(VERSION 3.7)`,
        # sets `NEW` to enable support CMake variable `PostgreSQL_ROOT`.
        cmake_policy(SET CMP0074 NEW)
    endif()

    find_package(PostgreSQL REQUIRED)

    if(POLICY CMP0074)
        cmake_policy(POP)
    endif()
endif()

check_function_exists("poll" PQXX_HAVE_POLL)

set(CMAKE_REQUIRED_LIBRARIES pq)

cmake_determine_compile_features(CXX)
cmake_policy(SET CMP0057 NEW)

# check_cxx_source_compiles requires CMAKE_REQUIRED_DEFINITIONS to specify
# compiling arguments.
# Wordaround: Push CMAKE_REQUIRED_DEFINITIONS
if(CMAKE_REQUIRED_DEFINITIONS)
    set(def "${CMAKE_REQUIRED_DEFINITIONS}")
endif()
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION})
set(CMAKE_REQUIRED_QUIET ON)

try_compile(
	PQXX_HAVE_GCC_PURE
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/gcc_pure.cxx)
try_compile(
	PQXX_HAVE_GCC_VISIBILITY
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/gcc_visibility.cxx)
try_compile(
	PQXX_HAVE_LIKELY
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/likely.cxx)
try_compile(
	PQXX_HAVE_CXA_DEMANGLE
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/cxa_demangle.cxx)
try_compile(
	PQXX_HAVE_CONCEPTS
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/concepts.cxx)
try_compile(
	PQXX_HAVE_SPAN
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/span.cxx)
try_compile(
	PQXX_HAVE_MULTIDIMENSIONAL_SUBSCRIPT
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/multidim-subscript.cxx)
try_compile(
	PQXX_HAVE_CHARCONV_FLOAT
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/charconv_float.cxx)
try_compile(
	PQXX_HAVE_CHARCONV_INT
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/charconv_int.cxx)
try_compile(
	PQXX_HAVE_PATH
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/fs.cxx)
try_compile(
	PQXX_HAVE_THREAD_LOCAL
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/thread_local.cxx)
try_compile(
	PQXX_HAVE_SLEEP_FOR
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/sleep_for.cxx)
try_compile(
	PQXX_HAVE_STRERROR_R
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/strerror_r.cxx)
try_compile(
	PQXX_HAVE_STRERROR_S
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/strerror_s.cxx)
try_compile(
	PQXX_HAVE_YEAR_MONTH_DAY
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/year_month_day.cxx)
try_compile(
	PQXX_HAVE_CMP
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/cmp.cxx)
try_compile(
	PQXX_HAVE_UNREACHABLE
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/unreachable.cxx)

try_compile(
	need_fslib
	${PROJECT_BINARY_DIR}
	SOURCES ${PROJECT_SOURCE_DIR}/config-tests/need_fslib.cxx)
if(!need_fslib)
    # TODO: This may work for gcc 8, but some clang versions may need -lc++fs.
    link_libraries(stdc++fs)
endif()

# check_cxx_source_compiles requires CMAKE_REQUIRED_DEFINITIONS to specify
# compiling arguments.
# Workaround: Pop CMAKE_REQUIRED_DEFINITIONS
if(def)
    set(CMAKE_REQUIRED_DEFINITIONS ${def})
    unset(def CACHE)
else()
    unset(CMAKE_REQUIRED_DEFINITIONS CACHE)
endif()
set(CMAKE_REQUIRED_QUIET OFF)

set(AC_CONFIG_H_IN "${PROJECT_SOURCE_DIR}/include/pqxx/config.h.in")
set(CM_CONFIG_H_IN "${PROJECT_BINARY_DIR}/include/pqxx/config_cmake.h.in")
set(CM_CONFIG_PUB "${PROJECT_BINARY_DIR}/include/pqxx/config-public-compiler.h")
set(CM_CONFIG_INT "${PROJECT_BINARY_DIR}/include/pqxx/config-internal-compiler.h")
set(CM_CONFIG_PQ "${PROJECT_BINARY_DIR}/include/pqxx/config-internal-libpq.h")
message(STATUS "Generating config.h")
file(WRITE "${CM_CONFIG_H_IN}" "")
file(STRINGS "${AC_CONFIG_H_IN}" lines)
foreach(line ${lines})
    string(REGEX REPLACE "^#undef" "#cmakedefine" l "${line}")
    file(APPEND "${CM_CONFIG_H_IN}" "${l}\n")
endforeach()
configure_file("${CM_CONFIG_H_IN}" "${CM_CONFIG_INT}" @ONLY)
configure_file("${CM_CONFIG_H_IN}" "${CM_CONFIG_PUB}" @ONLY)
configure_file("${CM_CONFIG_H_IN}" "${CM_CONFIG_PQ}" @ONLY)
message(STATUS "Generating config.h - done")


text:
typedef NSDictionary*(^SyncRequestParameterCallback)();
typedef bool(^SyncCheckItemCompleteCallback)(NSDictionary* data);
typedef void (^SyncCheckCompleteCallback)(bool success);
typedef void (^SyncRequestCompleteCallback)(NSDictionary* data);

typedef void (^SyncSaveCompleteCallback)(bool success);
#endif
@class SyncRequest;
@class SyncCheckItem;
@interface SyncService : NSObject
SYNTHESIZE_SINGLETON_FOR_INTERFACE(SyncService);
-(void)removeRegisterWithGroupid:(NSString*)groupid;
-(void)registerResourceUpdateCheck:(NSString*)urlkey requestParameterCallback:(SyncRequestParameterCallback)requestParameterCallback checkItemCompleteCallback:(SyncCheckItemCompleteCallback)checkItemCompleteCallback groupid:(NSString*)groupid;

-(void)registerCurrentResourceUpdateCheck:(NSString*)urlkey requestParameterCallback:(SyncRequestParameterCallback)requestParameterCallback checkItemCompleteCallback:(SyncCheckItemCompleteCallback)checkItemCompleteCallback;

-(bool)checkResourceUpdate:(SyncCheckCompleteCallback)complete;
-(bool)checkResourceUpdate:(SyncCheckCompleteCallback)complete syncDataRequests:(NSMutableArray*)syncDataRequests;
-(bool)checkResourceUpdateWithGroupids:(NSArray*)groupids complete:(SyncCheckCompleteCallback)complete;
-(void)continueCheckNext;
-(void)networkRequestResourceWithCheck:(NSString*)urlkey requestParameterCallback:(SyncRequestParameterCallback)requestParameterCallback requestCompleteCallback:(void (^)(NSDictionary* data,bool write))requestCompleteCallback;
-(void)networkRequestResource:(NSString*)urlkey requestParameterCallback:(SyncRequestParameterCallback)requestParameterCallback requestCompleteCallback:(SyncRequestCompleteCallback)requestCompleteCallback parse:(id<NetServiceParseDelegate>)parse;

-(void)fileSystemRequestResource:(NSString*)urlkey requestCompleteCallback:(SyncRequestCompleteCallback)requestCompleteCallback;
-(void)fileSystemRequestUserData:(NSString*)urlkey requestCompleteCallback:(SyncRequestCompleteCallback)requestCompleteCallback;
-(void)fileSystemSaveUserData:(NSString*)urlkey data:(NSDictionary*)data saveCompleteCallback:(SyncSaveCompleteCallback)saveCompleteCallback;
-(bool)fileSystemExistUserData:(NSString*)urlkey;
@end
@interface SyncCheckItem : NSObject
@property(nonatomic,strong)NSString* groupid;
@property(nonatomic,strong)SyncRequest* request;
@property(nonatomic,strong)SyncCheckItemCompleteCallback itemCompleteCallback;
-(id)initWithUrlkey:(NSString*)urlkey requestParameterCallback:(SyncRequestParameterCallback)requestParameterCallback;
@end

@interface SyncRequest : NSObject
@property(nonatomic,strong)NSString* urlkey;
@property(nonatomic,assign,readonly)bool load;
@property(nonatomic,strong)SyncRequestParameterCallback requestParameterCallback;
@property(nonatomic,strong,readonly)NSString* filekey;
-(id)initWithUrlkey:(NSString*)urlkey requestParameterCallback:(SyncRequestParameterCallback)requestParameterCallback;
-(void)setSyncUrlkey:(NSString*)syncUrlkey;
@end


text:
namespace v8 {
namespace internal {
namespace wasm {
namespace test_run_wasm_exceptions {

WASM_EXEC_TEST(TryCatchThrow) {
  TestSignatures sigs;
  EXPERIMENTAL_FLAG_SCOPE(eh);
  WasmRunner<uint32_t, uint32_t> r(execution_tier);
  uint32_t except = r.builder().AddException(sigs.v_v());
  constexpr uint32_t kResult0 = 23;
  constexpr uint32_t kResult1 = 42;

  // Build the main test function.
  BUILD(r, WASM_TRY_CATCH_T(kWasmI32,
                            WASM_STMTS(WASM_I32V(kResult1),
                                       WASM_IF(WASM_I32_EQZ(WASM_GET_LOCAL(0)),
                                               WASM_THROW(except))),
                            WASM_STMTS(WASM_DROP, WASM_I32V(kResult0))));

  // Need to call through JS to allow for creation of stack traces.
  r.CheckCallViaJS(kResult0, 0);
  r.CheckCallViaJS(kResult1, 1);
}

WASM_EXEC_TEST(TryCatchCallDirect) {
  TestSignatures sigs;
  EXPERIMENTAL_FLAG_SCOPE(eh);
  WasmRunner<uint32_t, uint32_t> r(execution_tier);
  uint32_t except = r.builder().AddException(sigs.v_v());
  constexpr uint32_t kResult0 = 23;
  constexpr uint32_t kResult1 = 42;

  // Build a throwing helper function.
  WasmFunctionCompiler& throw_func = r.NewFunction(sigs.i_ii());
  BUILD(throw_func, WASM_THROW(except));

  // Build the main test function.
  BUILD(r, WASM_TRY_CATCH_T(
               kWasmI32,
               WASM_STMTS(WASM_I32V(kResult1),
                          WASM_IF(WASM_I32_EQZ(WASM_GET_LOCAL(0)),
                                  WASM_STMTS(WASM_CALL_FUNCTION(
                                                 throw_func.function_index(),
                                                 WASM_I32V(7), WASM_I32V(9)),
                                             WASM_DROP))),
               WASM_STMTS(WASM_DROP, WASM_I32V(kResult0))));

  // Need to call through JS to allow for creation of stack traces.
  r.CheckCallViaJS(kResult0, 0);
  r.CheckCallViaJS(kResult1, 1);
}

WASM_EXEC_TEST(TryCatchCallIndirect) {
  TestSignatures sigs;
  EXPERIMENTAL_FLAG_SCOPE(eh);
  WasmRunner<uint32_t, uint32_t> r(execution_tier);
  uint32_t except = r.builder().AddException(sigs.v_v());
  constexpr uint32_t kResult0 = 23;
  constexpr uint32_t kResult1 = 42;

  // Build a throwing helper function.
  WasmFunctionCompiler& throw_func = r.NewFunction(sigs.i_ii());
  BUILD(throw_func, WASM_THROW(except));
  r.builder().AddSignature(sigs.i_ii());
  throw_func.SetSigIndex(0);

  // Add an indirect function table.
  uint16_t indirect_function_table[] = {
      static_cast<uint16_t>(throw_func.function_index())};
  r.builder().AddIndirectFunctionTable(indirect_function_table,
                                       arraysize(indirect_function_table));

  // Build the main test function.
  BUILD(r, WASM_TRY_CATCH_T(
               kWasmI32,
               WASM_STMTS(WASM_I32V(kResult1),
                          WASM_IF(WASM_I32_EQZ(WASM_GET_LOCAL(0)),
                                  WASM_STMTS(WASM_CALL_INDIRECT2(
                                                 0, WASM_GET_LOCAL(0),
                                                 WASM_I32V(7), WASM_I32V(9)),
                                             WASM_DROP))),
               WASM_STMTS(WASM_DROP, WASM_I32V(kResult0))));

  // Need to call through JS to allow for creation of stack traces.
  r.CheckCallViaJS(kResult0, 0);
  r.CheckCallViaJS(kResult1, 1);
}

WASM_EXEC_TEST(TryCatchCallExternal) {
  TestSignatures sigs;
  EXPERIMENTAL_FLAG_SCOPE(eh);
  HandleScope scope(CcTest::InitIsolateOnce());
  const char* source = "(function() { throw 'ball'; })";
  Handle<JSFunction> js_function =
      Handle<JSFunction>::cast(v8::Utils::OpenHandle(
          *v8::Local<v8::Function>::Cast(CompileRun(source))));
  ManuallyImportedJSFunction import = {sigs.i_ii(), js_function};
  WasmRunner<uint32_t, uint32_t> r(execution_tier, &import);
  constexpr uint32_t kResult0 = 23;
  constexpr uint32_t kResult1 = 42;
  constexpr uint32_t kJSFunc = 0;

  // Build the main test function.
  BUILD(r, WASM_TRY_CATCH_T(
               kWasmI32,
               WASM_STMTS(
                   WASM_I32V(kResult1),
                   WASM_IF(WASM_I32_EQZ(WASM_GET_LOCAL(0)),
                           WASM_STMTS(WASM_CALL_FUNCTION(kJSFunc, WASM_I32V(7),
                                                         WASM_I32V(9)),
                                      WASM_DROP))),
               WASM_STMTS(WASM_DROP, WASM_I32V(kResult0))));

  // Need to call through JS to allow for creation of stack traces.
  r.CheckCallViaJS(kResult0, 0);
  r.CheckCallViaJS(kResult1, 1);
}

WASM_EXEC_TEST(TryCatchTrapTypeError) {
  TestSignatures sigs;
  EXPERIMENTAL_FLAG_SCOPE(eh);
  HandleScope scope(CcTest::InitIsolateOnce());
  const char* source = "(function() { return 0; })";
  Handle<JSFunction> js_function =
      Handle<JSFunction>::cast(v8::Utils::OpenHandle(
          *v8::Local<v8::Function>::Cast(CompileRun(source))));
  // Make sure to use a signature incompatible with JS below.
  ManuallyImportedJSFunction import = {sigs.i_ll(), js_function};
  WasmRunner<uint32_t, uint32_t> r(execution_tier, &import);
  constexpr uint32_t kResult0 = 23;
  constexpr uint32_t kResult1 = 42;
  constexpr uint32_t kJSFunc = 0;

  // Build the main test function.
  BUILD(r, WASM_TRY_CATCH_T(
               kWasmI32,
               WASM_STMTS(
                   WASM_I32V(kResult1),
                   WASM_IF(WASM_I32_EQZ(WASM_GET_LOCAL(0)),
                           WASM_STMTS(WASM_CALL_FUNCTION(kJSFunc, WASM_I64V(7),
                                                         WASM_I64V(9)),
                                      WASM_DROP))),
               WASM_STMTS(WASM_DROP, WASM_I32V(kResult0))));

  // Need to call through JS to allow for creation of stack traces.
  r.CheckCallViaJS(kResult0, 0);
  r.CheckCallViaJS(kResult1, 1);
}

namespace {

// TODO(8729): The semantics of this are not yet specified and might change,
// this test aims at keeping semantics of various execution tiers consistent.
void TestTryCatchTrap(byte* code, size_t code_size,
                      ExecutionTier execution_tier) {
  TestSignatures sigs;
  EXPERIMENTAL_FLAG_SCOPE(eh);
  WasmRunner<uint32_t, uint32_t> r(execution_tier, nullptr, "main",
                                   kRuntimeExceptionSupport);
  r.builder().AddMemory(kWasmPageSize);
  constexpr uint32_t kResult0 = 23;
  constexpr uint32_t kResult1 = 42;

  // Build a trapping helper function.
  WasmFunctionCompiler& trap_func = r.NewFunction(sigs.i_ii());
  trap_func.Build(code, code + code_size);

  // Build the main test function.
  BUILD(r, WASM_TRY_CATCH_T(
               kWasmI32,
               WASM_STMTS(WASM_I32V(kResult1),
                          WASM_IF(WASM_I32_EQZ(WASM_GET_LOCAL(0)),
                                  WASM_STMTS(WASM_CALL_FUNCTION(
                                                 trap_func.function_index(),
                                                 WASM_I32V(7), WASM_I32V(9)),
                                             WASM_DROP))),
               WASM_STMTS(WASM_DROP, WASM_I32V(kResult0))));

  // Need to call through JS to allow for creation of stack traces.
  r.CheckCallViaJS(kResult0, 0);
  r.CheckCallViaJS(kResult1, 1);
}

}  // namespace

WASM_EXEC_TEST(TryCatchTrapUnreachable) {
  byte code[] = {WASM_UNREACHABLE};
  TestTryCatchTrap(code, arraysize(code), execution_tier);
}

WASM_EXEC_TEST(TryCatchTrapMemOutOfBounds) {
  byte code[] = {WASM_LOAD_MEM(MachineType::Int32(), WASM_I32V_1(-1))};
  TestTryCatchTrap(code, arraysize(code), execution_tier);
}

WASM_EXEC_TEST(TryCatchTrapDivByZero) {
  byte code[] = {WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_I32V_1(0))};
  TestTryCatchTrap(code, arraysize(code), execution_tier);
}

WASM_EXEC_TEST(TryCatchTrapRemByZero) {
  byte code[] = {WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_I32V_1(0))};
  TestTryCatchTrap(code, arraysize(code), execution_tier);
}

}  // namespace test_run_wasm_exceptions
}  // namespace wasm
}  // namespace internal
}  // namespace v8


text:
Marten **is** built on top of a relational database, so why not take advantage of those abilities
where they still add value? In this case, Marten allows for a special kind of "Searchable" column
that also adds a foreign key constraint to enforce referential integrity between document types.

One of our sample document types in Marten is the `Issue` class that has
a couple properties that link to the id's of related `User` documents:

<<< @/../src/Marten.Testing/Documents/Issue.cs#sample_Issue

If I want to enforce referential integrity between the `Issue` document and the `User` documents,
I can use this syntax shown below to configure Marten:

<<< @/../src/Marten.Testing/Examples/ForeignKeyExamples.cs#sample_configure-foreign-key

With the configuration above, Marten will make an `assignee_id` field in the database table and build a
foreign key constraint to the `User` document like so:

```sql
ALTER TABLE public.mt_doc_issue
ADD CONSTRAINT mt_doc_issue_assignee_id_fkey FOREIGN KEY (assignee_id)
REFERENCES public.mt_doc_user (id);

CREATE INDEX mt_doc_issue_idx_assignee_id ON public.mt_doc_issue ("assignee_id");
```

And some other things you probably want to know about how this works internally:

Marten is smart enough to order the "upsert" operations to make the dependent documents be updated last.
In the `Issue` referencing `User` example above, this means that if you create a new `User` and a new
`Issue` in the same session, when you call `IDocumentSession.SaveChanges()/SaveChangesAsync()`, Marten will know
to save the new user first so that the issue will not fail with referential integrity violations.

## Foreign Keys to non-Marten tables

Marten can also create a foreign key to tables that are not managed by Marten. Continuing the our sample
of `Issue`, we can create a foreign key from our `Issue` to our external bug tracking system:

<<< @/../src/Marten.Testing/Examples/ForeignKeyExamples.cs#sample_configure-external-foreign-key

With the configuration above, Marten will generate a foreign key constraint from the `Issue` to a table in the
`bug-tracker` schema called `bugs` on the `id` column.  The constraint would be defined as:

```sql
ALTER TABLE public.mt_doc_issue
ADD CONSTRAINT mt_doc_issue_bug_id_fkey FOREIGN KEY (bug_id)
REFERENCES bug-tracker.bugs (id);
```

## Cascading deletes

Marten can also cascade deletes on the foreign keys that it creates.  The `ForeignKeyDefinition` has a
`CascadeDeletes` property that indicates whether the foreign key should enable cascading deletes.  One way
to enable this is to use a configuration function like:

<<< @/../src/Marten.Testing/Examples/ForeignKeyExamples.cs#sample_cascade_deletes_with_config_func

## Configuring with Attributes

You can optionally configure properties or fields as foreign key relationships with the `[ForeignKey]` attribute:

<<< @/../src/Marten.Schema.Testing/configuring_foreign_key_fields_Tests.cs#sample_issue-with-fk-attribute


text:
<?php
/**
 * kerli-lite functions and definitions
 *
 * @package kerli-lite
 * @since kerli-lite 1.0
 */

$theme = wp_get_theme();
define ('KERLI_LITE_VERSION', $theme -> get('Version'));
define ('KERLI_LITE_AUTHOR_URI', $theme -> get('AuthorURI'));

// Set up the content width value based on the theme's design and stylesheet.
if ( ! isset( $content_width ) ) {
	$content_width = 780; /* pixels */
}

/**
 * Kerli lite setup.
 *
 * Sets up theme defaults and registers the various WordPress features that
 * Kerli lite supports.
 *
 * @uses load_theme_textdomain() For translation/localization support.
 * @uses add_editor_style() To add a Visual Editor stylesheet.
 * @uses add_theme_support() To add support for post thumbnails, automatic feed links,
 * 	custom background, and post formats.
 * @uses register_nav_menu() To add support for navigation menus.
 * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
 *
 * @since Kerli lite 1.0
 */

if ( ! function_exists( 'kerli_lite_setup' ) ) :

	function kerli_lite_setup() {

	// Translations can be filed in the /languages/ directory.
	load_theme_textdomain( 'kerli-lite', get_template_directory() . '/languages' );

	// Add default posts and comments RSS feed links to head.
	add_theme_support( 'automatic-feed-links' );

	// Let WordPress manage the document title.
	add_theme_support( 'title-tag' );

	// load theme options page
	require_once( trailingslashit( get_template_directory() ) . 'inc/theme-options.php' );

	/* Enable support for Post Thumbnails on posts and pages */
	add_theme_support( 'post-thumbnails' );
	add_image_size( 'kerli_lite_cp_small', 70, 53, true);

	/* Add callback for custom TinyMCE editor stylesheets. (editor-style.css) */
     add_editor_style(get_template_directory_uri() . '/editor-style.css');

	// This theme uses wp_nav_menu() in one location.
	register_nav_menus( array(
		'primary' => __( 'Primary Menu', 'kerli-lite' ),
	) );

	// Enable support for Post Formats.
	add_theme_support( 'post-formats', array( 'image', 'gallery', 'video', 'quote', 'audio' ) );

	// Setup the WordPress core custom background feature.
	add_theme_support( 'custom-background', apply_filters( 'kerli_lite_custom_background_args', array(
		'default-color' => 'f1f1f1',
		'default-image' => '',
	) ) );

	// Enable support for HTML5 markup.
	add_theme_support( 'html5', array(
		'comment-list',
		'search-form',
		'comment-form',
		'gallery',
		'caption',
	) );
}
endif; // kerli_lite_setup
add_action( 'after_setup_theme', 'kerli_lite_setup' );

/**
 * Enqueue scripts.
 */
function kerli_lite_scripts() {
	global $wp_styles;

	/*
	 * Adds JavaScript to pages with the comment form to support
	 * sites with threaded comments (when in use).
	 */
	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
		wp_enqueue_script( 'comment-reply' );

	// Adds JavaScript for handling the navigation menu hide-and-show behavior.
	wp_enqueue_script( 'kerli-lite-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140711', true );

	wp_enqueue_script('kerli-lite-global', get_template_directory_uri() . '/js/global.js', array(), '1.0', true );

}
add_action( 'wp_enqueue_scripts', 'kerli_lite_scripts' );

/**
 * Enqueue styles.
 */
function kerli_lite_css() {
	global $wp_styles;

	// Loads our main stylesheet.
	wp_enqueue_style( 'kerli-lite-style', get_stylesheet_uri(), '', KERLI_LITE_VERSION );

	wp_enqueue_style( 'kerli-lite-fonts', kerli_lite_fonts_url() );
}
add_action( 'wp_enqueue_scripts', 'kerli_lite_css' );

/**
 * Google fonts URL
 */
function kerli_lite_fonts_url() {

	$fonts_url = '';

	$locale = get_locale();
	$cyrillic_locales = array( 'ru_RU', 'mk_MK', 'ky_KY', 'bg_BG', 'sr_RS', 'uk', 'bel' );

	/* Translators: If there are characters in your language that are not
	 * supported by Lato, translate this to 'off'. Do not translate
	 * into your own language.
	 */
	$lato = _x( 'on', 'Lato font: on or off', 'kerli-lite' );

	/* Translators: If there are characters in your language that are not
	 * supported by Josefin Sans, translate this to 'off'. Do not translate
	 * into your own language.
	 */
	$josefin_sans = _x( 'on', 'Josefin Sans font: on or off', 'kerli-lite' );

	/* Translators: If there are characters in your language that are not
	 * supported by Open Sans, translate this to 'off'. Do not translate
	 * into your own language.
	 */
	$open_sans = _x( 'on', 'Open Sans font: on or off', 'kerli-lite' );

	if ( 'off' == $lato && 'off' == $josefin_sans && 'off' == $open_sans ) {
		return $fonts_url;
	}

	$font_families = array();

	if ( 'off' !== $lato ) {
		$font_families[] = 'Lato';
	}

	if ( 'off' !== $josefin_sans ) {
		$font_families[] = 'Josefin Sans';
	}

	if ( 'off' !== $open_sans ) {
		$font_families[] = 'Open Sans:300,400,700,400italic,700italic';
	}

	$query_args = array(
		'family' => urlencode( implode( '|', $font_families ) ),
		'subset' => urlencode( 'latin,latin-ext' ),
	);

	if ( in_array($locale, $cyrillic_locales) ) {
		$query_args['subset'] = urlencode( 'latin,latin-ext,cyrillic' );
	}

	$fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );

	return $fonts_url;
}

/* Add Admin stylesheet to the admin page */
      add_action( 'admin_enqueue_scripts', 'kerli_lite_load_admin_style' );
      function kerli_lite_load_admin_style() {
        wp_enqueue_style( 'kerli_lite_load_admin_style', get_template_directory_uri() . '/css/style-admin.css', false, '1.0.0' );
       }

/**
 * Excerpt
 */
add_filter( 'excerpt_length', 'kerli_lite_excerpt_length', 999 );

function kerli_lite_excerpt_length($length) {
	return 60;
}

// Excerpt Text [...]
add_filter('excerpt_more', 'kerli_lite_excerpt_more');

function kerli_lite_excerpt_more($more) {
   global $post;
   return '... ID) . '">' . __( 'Read more', 'kerli-lite' ) . ' »';
}

/**
 * Register Widget Areas / Sidebars
 *
 * @link http://codex.wordpress.org/Function_Reference/register_sidebar
 */
function kerli_lite_widgets_init() {
	register_sidebar( array(
		'name'          => __( 'Sidebar', 'kerli-lite' ),
		'id'            => 'sidebar-1',
		'description'   => '',
		'before_widget' => '',
		'after_widget'  => '',
		'before_title'  => '
',
		'after_title'   => '
',
	) );
}
add_action( 'widgets_init', 'kerli_lite_widgets_init' );

/** Load functions */
require get_template_directory() . '/inc/custom-header.php';
require get_template_directory() . '/inc/template-tags.php';
require get_template_directory() . '/inc/extras.php';

/** Theme customizer */
require_once( get_template_directory() . '/inc/kerli-customizer.php' );
require_once( get_template_directory() . '/inc/kerli-customization.php' );
require_once( get_template_directory() . '/inc/theme-options.php' );

/** Load Widgets and Widgetized Area */
require get_template_directory() . '/inc/kerli-widgets.php';

/* Load Jetpack compatibility file */
require get_template_directory() . '/inc/jetpack.php';

/* Print the attached image */
include (get_template_directory() . '/inc/image.php');


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<title>StormEngineC 1.2 API DOC Source: WebCLGLBufferItem.class.js</title>

	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

	<link type="text/css" rel="stylesheet" href="styles/site.stormenginec.css">

			StormEngineC 1.2 API DOC

					Classes

							ActionHelpers

							StormBufferObject

							StormCamera

							StormControllerFollow

							StormControllerPlayer

							StormControllerPlayerCar

							StormControllerTargetCam

							StormEngineC

							StormEngineC_PanelAnimationTimeline

							StormForceField

							StormGI

							StormGLContext

							StormGraph

							StormGrid

							StormGroupNodes

							StormLight

							StormLine

							StormLineSceneCollision

							StormM16

							StormMaterial

							StormNode

							StormPolarityPoint

							StormTriangleBox

							StormUtils

							StormV3

							StormVoxelizator

							WebCLGL

							WebCLGLBuffer

							WebCLGLBufferItem

							WebCLGLKernel

							WebCLGLKernelProgram

							WebCLGLUtils

							WebCLGLVertexFragmentProgram

							WebCLGLWork

					Global

							$M16

							$V3

Source: WebCLGLBufferItem.class.js

/**
* WebCLGLBuffer Object
* @class
* @constructor
* @property {WebGLTexture} textureData
* @property {Array<Float>} inData Original array
* @property {Int} [offset=0] offset of buffer
*/
WebCLGLBufferItem = function(gl, length, type, offset, linear, mode) {
	this.gl = gl;

	if(length.constructor === Array) {
		this.length = length[0]*length[1];
		this.W = length[0];
		this.H = length[1];
	} else {
		this.length = length;
		this.W = Math.ceil(Math.sqrt(this.length));
		this.H = this.W;
	}
	this.utils = new WebCLGLUtils();

	this.type = (type != undefined) ? type : 'FLOAT';
	this._supportFormat = this.gl.FLOAT;
	//this._supportFormat = this.gl.UNSIGNED_BYTE;

	this.offset = (offset != undefined) ? offset : 0;
	this.linear = (linear != undefined && linear == true) ? true : false;

	this.inData; // enqueueWriteBuffer user data

	this.mode = (mode != undefined) ? mode : "FRAGMENT"; // "FRAGMENT", "VERTEX", "VERTEX_INDEX", "VERTEX_FROM_KERNEL", "VERTEX_AND_FRAGMENT"

	// readPixel arrays
	this.outArray4Uint8ArrayX = new Uint8Array((this.W*this.H)*4);
	this.outArray4Uint8ArrayY = new Uint8Array((this.W*this.H)*4);
	this.outArray4Uint8ArrayZ = new Uint8Array((this.W*this.H)*4);
	this.outArray4Uint8ArrayW = new Uint8Array((this.W*this.H)*4);
	/*this.outArray4x4Uint8Array = new Uint8Array((this.W*this.H)*4*4);*/

	this.Packet4Uint8Array_Float = []; // [this.outArray4Uint8ArrayX]
	this.Float = []; // [unpack(this.outArray4Uint8ArrayX)]
	this.Packet4Uint8Array_Float4 = []; // [this.outArray4Uint8ArrayX, ..Y, ..Z, ..W]
	this.Float4 = []; // [unpack(this.outArray4Uint8ArrayX), unpack(..Y), unpack(..Z), unpack(..W)]

	// Create FrameBuffer & RenderBuffer
	this.rBuffer = this.gl.createRenderbuffer();
	this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, this.rBuffer);
	this.gl.renderbufferStorage(this.gl.RENDERBUFFER, this.gl.DEPTH_COMPONENT16, this.W, this.H);
	this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, null);

	this.fBuffer = this.gl.createFramebuffer();
	this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.fBuffer);
	this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER, this.gl.DEPTH_ATTACHMENT, this.gl.RENDERBUFFER, this.rBuffer);

	if(this.mode == "FRAGMENT" || this.mode == "VERTEX_FROM_KERNEL" || this.mode == "VERTEX_AND_FRAGMENT") {
		// Create WebGLTexture buffer
		this.textureData = this.createWebGLTextureBuffer();
	}
	if(this.mode == "VERTEX" || this.mode == "VERTEX_INDEX" || this.mode == "VERTEX_FROM_KERNEL" || this.mode == "VERTEX_AND_FRAGMENT") {
		// Create WebGL buffer
		this.vertexData0 = this.createWebGLBuffer();

		if(this.type == 'FLOAT4') {
			this.vertexData1 = this.createWebGLBuffer();
			this.vertexData2 = this.createWebGLBuffer();
			this.vertexData3 = this.createWebGLBuffer();
		}
	}
};

/**
* Create the WebGLTexture buffer
* @type Void
 */
WebCLGLBufferItem.prototype.createWebGLTextureBuffer = function() {
	this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);
	this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);

	var textureData = this.gl.createTexture();
	this.gl.bindTexture(this.gl.TEXTURE_2D, textureData);
	if(this.linear != undefined && this.linear == true) {
		this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.W,this.H, 0, this.gl.RGBA, this._supportFormat, null);
		this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
		this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR_MIPMAP_NEAREST);
		this.gl.generateMipmap(this.gl.TEXTURE_2D);
	} else {
		this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.W,this.H, 0, this.gl.RGBA, this._supportFormat, null);
		this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
		this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
		this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
		this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
	}

	return textureData;
};

/**
* Create the WebGL buffer
* @type Void
 */
WebCLGLBufferItem.prototype.createWebGLBuffer = function() {
	var vertexData = this.gl.createBuffer();

	return vertexData;
};

/**
* Write WebGLTexture buffer
* @param {Array|Float32Array|Uint8Array|WebGLTexture|HTMLImageElement} array
* @param {Bool} [flip=false]
* @type Void
 */
WebCLGLBufferItem.prototype.writeWebGLTextureBuffer = function(arr, flip) {
	this.inData = arr;

	if(arr instanceof WebGLTexture) this.textureData = arr;
	else {
		if(flip == false || flip == undefined)
			this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false);
		else
			this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, true);
		this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
		this.gl.bindTexture(this.gl.TEXTURE_2D, this.textureData);
		if(arr instanceof HTMLImageElement)  {
			this.inData = this.utils.getUint8ArrayFromHTMLImageElement(arr);
			//texImage2D(			target, 			level, 	internalformat, 	format, 		type, 			TexImageSource);
			if(this.type == 'FLOAT4') {
				this.gl.texImage2D(	this.gl.TEXTURE_2D, 0, 		this.gl.RGBA, 		this.gl.RGBA, 	this.gl.FLOAT, 	arr);
			}/* else if(this.type == 'INT4') {
				this.gl.texImage2D(	this.gl.TEXTURE_2D, 0, 		this.gl.RGBA, 		this.gl.RGBA, 	this.gl.UNSIGNED_BYTE, 	arr);
			}*/
		} else {
			//console.log("Write arr with length of "+arr.length+" in Buffer "+this.type+" with length of "+this.length+" (W: "+this.W+"; H: "+this.H+")");

			if(this.type == 'FLOAT4') {
				var arrt = new Float32Array((this.W*this.H)*4);
				for(var n=0; n < arr.length; n++) arrt[n] = arr[n];
				//texImage2D(			target, 			level, 	internalformat, 	width, height, border, 	format, 		type, 			pixels);
				if(arr instanceof Uint8Array) {
					this.gl.texImage2D(	this.gl.TEXTURE_2D, 0, 		this.gl.RGBA, 		this.W, this.H, 0, 	this.gl.RGBA, 	this.gl.FLOAT, 	arrt);
				} else if(arr instanceof Float32Array) {
					this.gl.texImage2D(this.gl.TEXTURE_2D, 	0, 		this.gl.RGBA, 		this.W, this.H, 0, 	this.gl.RGBA, 	this.gl.FLOAT, 	arrt);
				} else {
					this.gl.texImage2D(this.gl.TEXTURE_2D, 	0, 		this.gl.RGBA, 		this.W, this.H, 0, 	this.gl.RGBA, 	this.gl.FLOAT, 	arrt);
				}
			} else if(this.type == 'FLOAT') {
				var arrayTemp = new Float32Array(this.W*this.H*4);

				for(var n = 0, f = this.W*this.H; n < f; n++) {
					var idd = n*4;
					arrayTemp[idd] = arr[n];
					arrayTemp[idd+1] = 0.0;
					arrayTemp[idd+2] = 0.0;
					arrayTemp[idd+3] = 0.0;
				}
				arr = arrayTemp;
				this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.W, this.H, 0, this.gl.RGBA, this.gl.FLOAT, arr);
			}
		}
	}
	if(this.linear) this.gl.generateMipmap(this.gl.TEXTURE_2D);
};

/**
* Write WebGL buffer
* @param {Array|Float32Array|Uint8Array|WebGLTexture|HTMLImageElement} array
* @param {Bool} [flip=false]
* @type Void
 */
WebCLGLBufferItem.prototype.writeWebGLBuffer = function(arr, flip) {
	this.inData = arr;

	var makePack = (function(arrr, items) {
		var arOut = [];
		if(items > 1) {
			var arX = new Float32Array(arrr.length/4);
			var arY = new Float32Array(arrr.length/4);
			var arZ = new Float32Array(arrr.length/4);
			var arW = new Float32Array(arrr.length/4);

			for(var n = 0, f = arrr.length/4; n < f; n++) {
				var id = n*4;
				arX[n] = arrr[id];
				arY[n] = arrr[id+1];
				arZ[n] = arrr[id+2];
				arW[n] = arrr[id+3];
			}
			arOut.push(arX,arY,arZ,arW);
		} else {
			arOut.push(arrr);
		}

		var arOutUint = [];
		for(var i = 0, fi = arOut.length; i < fi; i++) {
			var arUint = new Uint8Array(arOut[i].length*4);

			for(var n = 0, f = arOut[i].length; n < f; n++) {
				var idd = n*4;
				var arrPack = this.utils.pack((arOut[i][n]+(((this.workAreaSize*2.0))/2))/((this.workAreaSize*2.0)));
				arUint[idd+0] = arrPack[0]*255;
				arUint[idd+1] = arrPack[1]*255;
				arUint[idd+2] = arrPack[2]*255;
				arUint[idd+3] = arrPack[3]*255;
			}
			arOutUint.push(arUint);
		}

		return arOutUint;
	}).bind(this);

	if(this.mode == "VERTEX_FROM_KERNEL") { // "VERTEX_FROM_KERNEL" PACKET ARRAY_BUFFER
		if(this.type == 'FLOAT') {
			var arPack = makePack(arr, 1);
			this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexData0);
			this.gl.bufferData(this.gl.ARRAY_BUFFER, new Uint8Array(arPack[0]), this.gl.DYNAMIC_DRAW);
		} else if(this.type == 'FLOAT4') {
			var arPack = makePack(arr, 4);
			this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexData0);
			this.gl.bufferData(this.gl.ARRAY_BUFFER, new Uint8Array(arPack[0]), this.gl.DYNAMIC_DRAW);

			this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexData1);
			this.gl.bufferData(this.gl.ARRAY_BUFFER, new Uint8Array(arPack[1]), this.gl.DYNAMIC_DRAW);

			this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexData2);
			this.gl.bufferData(this.gl.ARRAY_BUFFER, new Uint8Array(arPack[2]), this.gl.DYNAMIC_DRAW);

			this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexData3);
			this.gl.bufferData(this.gl.ARRAY_BUFFER, new Uint8Array(arPack[3]), this.gl.DYNAMIC_DRAW);
		}
	} else {
		if(this.mode == "VERTEX_INDEX") { // "VERTEX_INDEX" ELEMENT_ARRAY_BUFFER
			this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.vertexData0);
			this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(arr), this.gl.DYNAMIC_DRAW);
		} else { // "VERTEX" || "VERTEX_AND_FRAGMENT" ARRAY_BUFFER
			this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexData0);
			this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array(arr), this.gl.DYNAMIC_DRAW);
		}
	}
};

/**
* Remove this buffer
* @type Void
 */
WebCLGLBufferItem.prototype.remove = function() {
	this.gl.deleteRenderbuffer(this.rBuffer);
	this.gl.deleteFramebuffer(this.fBuffer);

	if(this.mode == "FRAGMENT" || this.mode == "VERTEX_FROM_KERNEL" || this.mode == "VERTEX_AND_FRAGMENT") {
		this.gl.deleteTexture(this.textureData);
	}

	if(this.mode == "VERTEX" || this.mode == "VERTEX_INDEX" || this.mode == "VERTEX_FROM_KERNEL" || this.mode == "VERTEX_AND_FRAGMENT") {
		this.gl.deleteBuffer(this.vertexData0);

		if(this.type == 'FLOAT4') {
			this.gl.deleteBuffer(this.vertexData1);
			this.gl.deleteBuffer(this.vertexData2);
			this.gl.deleteBuffer(this.vertexData3);
		}
	}
};

					StormEngineC 1.2 API DOC

		2010 Roberto Gonzalez. http://stormcolour.appspot.com

		Documentation generated by JSDoc 3.3.0-alpha2
		on Wed Nov 25 2015 23:11:11 GMT+0100 (CET) using the DocStrap template.


text:
"use strict";

var assert = require("assert");
var d3 = require("d3");
var _ = require("underscore");

var legend = require("./legend.js");
var ticktock = require("./ticktock.js");

// Build a streamgraph visualization of the given days in the given div.
// jqDiv must be a jQuery selector. The div will be emptied.
// orderedLeafCategories is an array of categories.
exports.makeViz = function(categories, days, jqDiv, orderedLeafCategories) {
    // V is the visualization object that we will return.
    var V = {};
    V.jqDiv = jqDiv;
    V.d3Div = d3.select(jqDiv[0]);

    jqDiv.empty();
    // Need at least a week's worth of data.
    if (days.length < 7) {
        jqDiv.append($(
            "
Need at least 7 days of data for this visualization.
"));
        return null;
    }
    // Copy skeleton from the template.
    jqDiv.append($("#streamgraph_template").children().clone());

    // Build legend.
    // TODO: Show items in the same order as orderedLeafCategories...
    var legendDiv = jqDiv.find("div.legend_container");
    V.legend = legend.makeViz(categories, legendDiv);

    // Dimensions.
    V.width = 730;
    V.height = 500;
    V.stackData = buildStackData(categories, orderedLeafCategories, days);

    V.x = d3.scale.linear()
        .domain([0, V.stackData[0].length - 1])
        .range([0, V.width]);

    V.y = d3.scale.linear()
        .domain([0, 604800])
        .range([V.height, 0]);

    V.area = d3.svg.area()
        .x(function(d) { return V.x(d.x); })
        .y0(function(d) { return V.y(d.y0); })
        .y1(function(d) { return V.y(d.y0 + d.y); });

    V.svg = V.d3Div.select("svg.main")
        .attr("width", V.width)
        .attr("height", V.height);

    V.layers = d3.layout.stack()(V.stackData);

    V.svg.selectAll("path")
        .data(V.layers)
        .enter().append("path")
        .attr("d", V.area)
        .style("fill", function(d) { return d[0].category.topLevel.color; })
        .on("mouseover", function(d) { streamgraphMouseover(V, d); })
        .on("mousemove", function(d) { streamgraphMousemove(V, d); });

    V.svg.on("mouseleave", function() { streamgraphMouseleave(V); });

    return V;
};

// Take categories and days and return an object suitable for
// d3.stack(). The returned object is a 2-dimensional array of objects that
// have x, y, y0, weekBegin, weekEnd and category properties.
var buildStackData = function(categories, orderedLeafCategories, days) {
    // Build layers array.
    var layers = [];
    var categIdToLayer = {};
    var categIdToSeconds = {};
    _.each(orderedLeafCategories, function(category) {
        var layer = [];
        layers.push(layer);
        categIdToLayer[category.id] = layer;
        categIdToSeconds[category.id] = 0;
    });
    var weekIndex = 0;
    var weekBegin = days[0][0].begin.clone();
    var weekEnd = days[6][days[6].length - 1].end.clone();
    var saveWeek = function() {
        var totalSeconds = 0;
        _.each(categIdToLayer, function(layer, categId) {
            totalSeconds += categIdToSeconds[categId];
            layer.push({
                "x": weekIndex,
                "y": categIdToSeconds[categId],
                "y0": 0,
                "weekBegin": weekBegin.clone(),
                "weekEnd": weekEnd.clone(),
                "category": categories.list[categId],
            });
        });
        // Sanity check that the time spent adds up to an entire week.
        var targetSeconds = ticktock.getSecondsInWeek(weekBegin);
        assert(totalSeconds == targetSeconds);
    };
    for (var i = 0; i < 7; i++) {
        exports.tallyEvents(days[i], 1, categIdToSeconds);
    }
    saveWeek();
    for(i = 7; i < days.length; i++) {
        weekIndex += 1;
        weekBegin.add(1, 'day');
        weekEnd.add(1, 'day');
        exports.tallyEvents(days[i - 7], -1, categIdToSeconds);
        exports.tallyEvents(days[i], 1, categIdToSeconds);
        saveWeek();
    }
    return layers;
};

// Add each event's duration in seconds, multiplied by coef, to the event's
// category in categIdToSeconds. Assumes categIdToSeconds has a property for
// every category.
exports.tallyEvents = function(events, coef, categIdToSeconds) {
    _.each(events, function(evnt) {
        assert(_.has(categIdToSeconds, evnt.category.id));
        assert(ticktock.durationSeconds(evnt) >= 0);
        categIdToSeconds[evnt.category.id] += ticktock.durationSeconds(evnt) * coef;
    });
};

// Update HUD.
var streamgraphMousemove = function(V, d) {
    var position = d3.mouse(V.svg.node());
    var weekIndex = Math.round(V.x.invert(position[0]));
    weekIndex = Math.max(weekIndex, 0);
    weekIndex = Math.min(weekIndex, d.length - 1);
    var datum = d[weekIndex];
    V.d3Div.select(".timespent").text(ticktock.humanizeSeconds(datum.y));
    V.d3Div.select(".perday").text(ticktock.humanizeSeconds(datum.y / 7.0));
    V.d3Div.select(".week_begin").text(datum.weekBegin.format("YYYY MMM D"));
    V.d3Div.select(".week_end").text(datum.weekEnd.format("YYYY MMM D"));
};

// Fade all layers except the one hovered over.
var streamgraphMouseover = function(V, d) {
    V.svg.selectAll("path")
        .style("opacity", 0.3);

    V.svg.selectAll("path")
        .filter(function(node) {
            return node[0].category.id == d[0].category.id; })
        .style("opacity", 1);

    var hud = V.d3Div.select(".hud_hover");
    hud.select(".category").text(d[0].category.name);
    hud.style("visibility", "visible");
};

// Unfade all layers.
var streamgraphMouseleave = function(V) {
    V.svg.selectAll("path")
        .style("opacity", 1);
    V.d3Div.select(".hud_hover").style("visibility", "hidden");
};


text:
/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @author Philip Nicolcev
 *
 * Color palette inspired by phpBB style "prosilver":
 * http://www.phpbb.com/
 */
@import url('global.css');
@import url('fonts.css');
@import url('print.css');
@import url('custom.css');

/* Firefox button padding fix */
#content #bbCodeContainer input::-moz-focus-inner, #content #logoutButton::-moz-focus-inner, #content #submitButton::-moz-focus-inner {
	border:0;
	padding:0;
}

/* Buttons */
#content #bbCodeContainer input, #content #logoutButton, #content #submitButton, #loginForm #loginButton {
	background-color:#F7F5F1;
	color:#333333;
	border: 1px solid #8a8a8a;
	background-image: linear-gradient(to bottom, #fafafa, #cdcdcd);
	background-image: -webkit-linear-gradient(top, #fafafa, #cdcdcd);
}
#content select, #loginForm select, #loginForm input, #content textarea {
	background-color:#FFF;
	color:#333333;
	border: 1px solid #ababab;
}

/* Status Icon */
#content #statusIconContainer {
	background: url('../img/loading-sprite.png') no-repeat 0px 0px;
}
#content #statusIconContainer.waiting {
	background-position: 0px -22px;
}
#content #statusIconContainer.retrying {
	background-position: 0px -44px;
}

/* Headers */
#loginContent h1 {
	color:#333333;
}
#content #headline {
	left: 0px;
	right: 0px;
	background: #0c95d9;
	color: white;
}
#content #onlineListContainer h3, #content #helpContainer h3, #content #settingsContainer h3 {
	background-color:#0c95d9;
	color:#fff;
	height: 25px;
}

/* Other Theme Elements */
.ajax-chat {
	background-color:#F9F9F9;
	color:#28313F;
}
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer {
	border-color: #ababab;
}
.ajax-chat .popup {
	background-color:#FFF;
	border: 1px solid #ababab;
	box-shadow: 2px 2px 2px #777;
}
#content #chatList .deleteSelected {
	border-width:1px;
	border-style:dotted;
}
#content #helpContainer #helpList table, #content #settingsContainer #settingsList table {
	border-collapse:collapse;
}
#loginContent a {
	color:#333333;
}
#loginContent input, #loginContent select {
	background-color:#FFF;
	color:#333333;
}
#loginContent #loginButton {
	background-color:#F7F5F1;
	color:#333333;
}
#loginContent #errorContainer {
	color:red;
}
#content #copyright, #content #copyright a {
	color: white;
}
#content a {
	color:#333333;
}
#content #chatList, #content #onlineListContainer, #content #helpContainer, #content #settingsContainer, #content #colorCodesContainer, #content #emoticonsContainer {
	background-color:#FFF;
}
#content #colorCodesContainer {
	box-shadow: 2px 2px 2px #777;
}
#content #colorCodesContainer a {
	border-color:black;
}
#content #optionsContainer input {
	background-color:transparent;
}
#content .rowEven, #helpList dl:nth-child(even), #settingsList dl:nth-child(even) {
	background-color:#eaf1f6;
}
#content .rowOdd, #helpList dl:nth-child(odd), #settingsList dl:nth-child(odd) {
	background-color:#e1eaf2;
}
#content #chatList .rowOdd.private {
	background-color:#F8D0D0;
}
#content #chatList .rowEven.private {
	background-color:#F8D9D0;
}
#content .guest {
	color:gray;
}
#content .user {
	color:#333333;
}
#content .customUser {
	color:#0c95d9;
}
#content .moderator {
	color:#00AA00;
}
#content .admin {
	color:#AA0000;
}
#content .chatBot {
	color:#D31141;
}
#content #chatList .chatBotErrorMessage {
	color:red;
}
#content #chatList a {
	color:#D31141;
}
#content #chatList .deleteSelected {
	border-color:red;
}


text:
from sqlalchemy import Column, Boolean, Integer, String

from db import Model

class Story(Model):
    __tablename__ = 'bookmark_stories'

    id = Column(Integer, primary_key=True)
    display_name = Column(String, length=255)
    vanity_name = Column(String, length=255)
    cover_url = Column(Strng, 1000)
    site_id = Column(Integer)
    author = Column(String, 255)
    source_url = Column(String, 1000)
    ongoing = Column(Boolean)


text:
(function ($) {
  $.extend($.summernote.lang, {
    'pt-BR': {
      font: {
        bold: 'Negrito',
        italic: 'Itálico',
        underline: 'Sublinhado',
        strikethrough: 'Riscado',
        clear: 'Remover estilo da fonte',
        height: 'Altura da linha',
        size: 'Tamanho da fonte'
      },
      image: {
        image: 'Imagem',
        insert: 'Inserir imagem',
        resizeFull: 'Resize Full',
        resizeHalf: 'Resize Half',
        resizeQuarter: 'Resize Quarter',
        floatLeft: 'Float Left',
        floatRight: 'Float Right',
        floatNone: 'Float None',
        dragImageHere: 'Arraste uma imagem para cá',
        selectFromFiles: 'Selecione a partir dos arquivos',
        url: 'URL da image'
      },
      link: {
        link: 'Link',
        insert: 'Inserir link',
        unlink: 'Remover link',
        edit: 'Editar',
        textToDisplay: 'Texto para exibir',
        url: 'Para qual URL esse link leva?',
	    	openInNewWindow: 'Abrir em uma nova janela'
      },
      video: {
        video: 'Vídeo',
        videoLink: 'Link para vídeo',
        insert: 'Inserir vídeo',
        url: 'URL do vídeo?',
        providers: '(YouTube, Vimeo, Vine, Instagram, ou DailyMotion)'
      },
      table: {
        table: 'Tabela'
      },
      hr: {
        insert: 'Inserir linha horizontal'
      },
      style: {
        style: 'Estilo',
        normal: 'Normal',
        blockquote: 'Citação',
        pre: 'Código',
        h1: 'Título 1',
        h2: 'Título 2',
        h3: 'Título 3',
        h4: 'Título 4',
        h5: 'Título 5',
        h6: 'Título 6'
      },
      lists: {
        unordered: 'Lista com marcadores',
        ordered: 'Lista numerada'
      },
      options: {
        help: 'Ajuda',
        fullscreen: 'Tela cheia',
        codeview: 'Ver código-fonte'
      },
      paragraph: {
        paragraph: 'Parágrafo',
        outdent: 'Menor tabulação',
        indent: 'Maior tabulação',
        left: 'Alinhar à esquerda',
        center: 'Alinhar ao centro',
        right: 'Alinha à direita',
        justify: 'Justificado'
      },
      color: {
        recent: 'Cor recente',
        more: 'Mais cores',
        background: 'Fundo',
        foreground: 'Fonte',
        transparent: 'Transparente',
        setTransparent: 'Fundo transparente',
        reset: 'Restaurar',
        resetToDefault: 'Restaurar padrão'
      },
      shortcut: {
        shortcuts: 'Atalhos do teclado',
        close: 'Fechar',
        textFormatting: 'Formatação de texto',
        action: 'Ação',
        paragraphFormatting: 'Formatação de parágrafo',
        documentStyle: 'Estilo de documento'
      },
      history: {
        undo: 'Desfazer',
        redo: 'Refazer'
      }
    }
  });
})(jQuery);


text:
package mil.army.usace.ehlschlaeger.digitalpopulations.tabletools;

import java.util.List;

import mil.army.usace.ehlschlaeger.rgik.core.CSVTable;
import mil.army.usace.ehlschlaeger.rgik.util.ObjectUtil;

/**
 * Extract a field from an array if it's within a range,
 * otherwise return null.
 *
 * @author William R. Zwicky
 */
public class RangeGetter implements ColumnGetter {
    protected int    colIdx;
    protected double min;
    protected double max;

    public RangeGetter(int columnIndex, double min, double max) {
        this.colIdx = columnIndex;
        this.min = min;
        this.max = max;
    }

    public String get(String[] row) {
        String field = row[colIdx];
        if (!ObjectUtil.isBlank(field)) {
            field = field.trim();
            double val = Double.parseDouble(field);
            if (val >= min && val <= max)
                return field;
        }
        return null;
    }

    public String get(List<String> row) {
        String field = row.get(colIdx);
        if (!ObjectUtil.isBlank(field)) {
            field = field.trim();
            double val = Double.parseDouble(field);
            if (val >= min && val <= max)
                return field;
        }
        return null;
    }

    public String get(CSVTable table, int row) {
        String field = table.getStringAt(row, colIdx);
        if (!ObjectUtil.isBlank(field)) {
            field = field.trim();
            double val = Double.parseDouble(field);
            if (val >= min && val <= max)
                return field;
        }
        return null;
    }
}


text:
<!doctype html>

  <meta charset="utf-8">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="generator" content="Polymer Starter Kit">
  <title>ClothApp</title>

  <meta name="theme-color" content="#c62828">

  <link rel="manifest" href="manifest.json">

  <meta name="msapplication-TileColor" content="#c62828">

  <meta name="mobile-web-app-capable" content="yes">
  <meta name="application-name" content="ClothApp">
  <link rel="icon" sizes="192x192" href="images/touch/chrome-touch-icon-192x192.png">

  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Polymer Starter Kit">
  <link rel="apple-touch-icon" href="images/touch/apple-touch-icon.png">

  <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">

  <link rel="stylesheet" href="styles/main.css">

  <link rel="import" href="elements/elements.html">

  <template is="dom-bind" id="app">

    <paper-drawer-panel id="paperDrawerPanel">

      <paper-scroll-header-panel drawer fixed>

        <paper-toolbar id="drawerToolbar">
          Menu
        </paper-toolbar>

        <home-side-menu></home-side-menu>

      </paper-scroll-header-panel>

      <paper-scroll-header-panel main id="headerPanelMain" condenses condensed-header-height="54" scroll-away-topbar>

        <paper-toolbar id="mainToolbar" class="medium-tall">

            <paper-icon-button id="paperToggle" icon="menu" paper-drawer-toggle style="color:grey"></paper-icon-button>
            <input></input>
            <iron-icon icon="search"></iron-icon>

          <paper-tabs attr-for-selected="data-route" selected="[[route]]" class="bottom self-end" style="width:100%; margin-left:0px; margin-right:0px" scrollable>
            <paper-tab data-route="most-recent-photos" selected>
              MOST RECENT
            </paper-tab>
            <paper-tab data-route="top-rated-photos" link>
              TOP RATED
            </paper-tab>
            <paper-tab data-route="popular-shops">
              POPULAR SHOPS
            </paper-tab>
          </paper-tabs>

        </paper-toolbar>

          <iron-pages attr-for-selected="data-route" selected="[[route]]">

              <most-recent-gallery id="mostRecentGallery"></most-recent-gallery>

                <paper-button
                  raised
                  class="redButton"
                  onclick="document.querySelector('#mostRecentGallery').loadMoreImages();"
                  style="padding-left: 30px; padding-right: 30px;">

                  <iron-icon icon="refresh"></iron-icon>
                  LOAD MORE...
                </paper-button>

              <top-rated-gallery id="topRatedGallery"></top-rated-gallery>

                <paper-button
                  raised
                  class="redButton"
                  onclick="document.querySelector('#topRatedGallery').loadMoreImages();"
                  style="padding-left: 30px; padding-right: 30px;">

                  <iron-icon icon="refresh"></iron-icon>
                  LOAD MORE...
                </paper-button>

              <popular-shops-gallery id="popularShopsGallery"></popular-shops-gallery>

                <paper-button
                  raised
                  class="redButton"
                  onclick="document.querySelector('#popularShopsGallery').loadMoreImages();"
                  style="padding-left: 30px; padding-right: 30px;">

                  <iron-icon icon="refresh"></iron-icon>
                  LOAD MORE...
                </paper-button>

          </iron-pages>

      </paper-scroll-header-panel>
    </paper-drawer-panel>

    <paper-toast id="toast">
      Ok
    </paper-toast>

  </template>

  <paper-dialog id="infoDialog" modal>

ClothApp

    <paper-dialog-scrollable>

    </paper-dialog-scrollable>

      <paper-button dialog-confirm>OK</paper-button>

  </paper-dialog>

  <paper-dialog id="loginDialog" modal>

Login

    <paper-dialog-scrollable>
      <paper-input id="loginUsername" label="Username" name="username" focused required></paper-input>
      <paper-input id="loginPassword" label="Password" name="password" type="password" required></paper-input>
    </paper-dialog-scrollable>

      <paper-button dialog-dismiss>Cancel</paper-button>
      <paper-button dialog-confirm onclick="submitLoginDialog();">Login</paper-button>

  </paper-dialog>

  <paper-dialog id="logoutDialog" modal>

Logout

    <paper-dialog-scrollable>

Do you really want to logout?

    </paper-dialog-scrollable>

      <paper-button dialog-dismiss>Cancel</paper-button>
      <paper-button dialog-confirm onclick="submitLogoutDialog();">Logout</paper-button>

  </paper-dialog>

  <paper-dialog id="signinDialog" modal>

Sign in

    <paper-dialog-scrollable>

Account Info

      <paper-input id="signinUsername" label="Username" name="username" focused required></paper-input>
      <paper-input id="signinPassword" label="Password" name="password" type="password" required></paper-input>
      <paper-input id="signinPasswordRepeat" label="Repeat Password" name="repeatPassword" type="password" required></paper-input>
      <paper-input id="signinEmail" label="Email" name="email" required></paper-input>

About You

      <paper-input id="signinFirstName" label="First Name" name="firstName" required></paper-input>
      <paper-input id="signinLastName" label="Last Name" name="lastName" required></paper-input>
      <paper-radio-group id="signinGender" selected="female" style="margin-top:10px; margin-bottom:0px;">
        <paper-radio-button name="female">Female</paper-radio-button>
        <paper-radio-button name="male">Male</paper-radio-button>
      </paper-radio-group>

      <vaadin-date-picker id="signinBirthday" label="Birthday" value="1990-01-01"></vaadin-date-picker>

    </paper-dialog-scrollable>

      <paper-button dialog-dismiss>Cancel</paper-button>
      <paper-button dialog-confirm onclick="submitSigninDialog();">Sign in</paper-button>

  </paper-dialog>


text:
using ProgrammersSpot.Business.Models.Users;

namespace ProgrammersSpot.Business.MVP.ViewModels
{
    public class ProgrammerDetailsViewModel
    {
        public RegularUser Programmer { get; set; }

        public RegularUser LoggedInUser { get; set; }
    }
}


text:
If you are migrating from earlier version (since 0.2.1) you should ensure:

* you upgrade the database:

    ```
    python manage.py db upgrade
    ```

* Please read the changelog descriptions. Particularly those for 0.2.1.

## 0.3.0

* Updated python module dependencies due to breakages preventing Flicket from initialising.
* Dropped usage of the deprecated flask-script in favour of flasks own CLI tool.
* Unsubscribe user feature was susceptible to CSS. This has been fixed.

## 0.2.6

* Upgraded to better attempt SQLite support out the box.

### Before Upgrading

* Make a copy of your config.py!

### Upgrading

You will need to update config.json and add the following values:

    "db_type": 1, "db_driver", null

The above text should be added between the curly brackets.

db_type: 1 = SQLite, 2 = PostgreSQL, 3 = Mysql

db_driver: This is the name of the driver used to connect to the database. For example this could be "pymysql".

## 0.2.5

* fixed bug when trying to close ticket.

## 0.2.4

* fixed bug when subscribing a non-existent user.

## 0.2.3

* Assigned notification email now states who was assigned in ticket title.
* File Uploads
    - Ticket / Post not created if file extension is not allowed.
    - Files created with uppercase characters now allowed. eg new_file.png or new_file.PNG
    - User is now presented with a list of valid file extensions if file is rejected.
* Added missing categories from flash messages.
* Trimmed requirements.txt so child dependencies not listed.
* Outstanding tickets email now has ticket links.
* Changed button reply / reply close layout because Ian.
* quote button colour change.
* can now disable user. **this requires database update**.

## 0.2.2

* Added favicon.
* My Tickets menu now dropdown with additional filters for tickets assigned to self or created by self.
* Fixed post quoting.
* Added date tracking of any changes to ticket (replies, edits, subscribing, assignined ...)
  so we can find those old tickets that have had no action.
* Subscribing / un-subscribing actions now tracked.
* allow admin / super_user to unsubscribe any user from ticket.

## 0.2.1

* now requires python =>3.6
* **When upgrading from 0.2.0, follow:**

    * Do database backup according to your database engine.

    * Backup `migrations/` directory.

    * Clean `migrations/` directory:

      This can be done using git using the following command.

      ```
      git clean -fdx migrations
      ```

      Otherwise use another method to delete all migration files prior to merging this version.
      The `migrations/versions` folder should only contain the following files:
      ```
      ../../flicket/migrations/versions/253ae54f5788_change_category_config_options.py
      ../../flicket/migrations/versions/36c91aa9b3b5_new_action_model.py
      ../../flicket/migrations/versions/70820003badd_add_logging_of_hours.py
      ../../flicket/migrations/versions/fe0f77ef3f46_migrations_before_source_code_control.py
      ../../flicket/migrations/versions/bcac6741b320_hours_scale_two_dp.py
      ```

        * Drop 'alembic_version' table:

      ```
      python manage.py shell
      >>> from application import db
      >>> db.engine.execute('DROP TABLE IF EXISTS alembic_version')
      <sqlalchemy.engine.result.ResultProxy object at 0x7fe5484034e0>
      >>> exit()
      ```

    * Stamp migration:

      ```
      python manage.py db stamp fe0f77ef3f46
      ```

    * Upgrade database:

      ```
      python manage.py db upgrade
      ```

    * update virtual env with latest module requirements

      ```
      pip install -r requirements.txt
      ```

* Migration scripts now under git revision control.
* New `FlicketAction` structure and updated `add_action()` function.
* Moved to bootstrap 4.
* Lots of UI changes as a result of change. Removed usage of html tables.
* Changed icon-set from glyphicons to font-awesome.
* Fixed a number of Flash message rendering issues introduced during locale implementation.
* Added carousel to front page showing all open high priority tickets.
* Added pie charts to front page showing overall ticket status for each department. Removed tables showing same data.
* Change category feature (user can put ticket into another "department / category").
* Added time tracking. Users can now see total hours spent per ticket.
* Can now login with username or email.
* Person replying to ticket no longer receives an email. Other subscribers still do.

## 0.2.0

* users can add subscriber other users to ticket so they receive notifications of tickets.
* user can reset password.
* when replying to ticket the priority level is set correctly. would previously always be set to low.
* can sort tickets using column headers (xdml).
* token expiration checked prior to login. fixes problems with auto-filling forms due to api authentication fails.
* admin can send test email.
* other minor tweaks and cosmetic changes. see commit history for more details.

## 0.1.9

* Expanded API functionality ... still work to be done during this release
* Fixed issue where field contents were not remembered after a search.
* Added command to send emails to users who have tickets not closed. This needs to be invoked from the command line
  using `python manage.py email_outstanding_tickets` using a (weekly? don't spam your users too much!") cron job or
  similar.
* Fixed user not being able to edit own ticket (replies were OK).
* The assignee can now close the ticket.
* Ticket priority can now be changed during reply. Submitting reply and close will overwrite selection to closed.
* Status changes now logged.
* Started documentation.
* Removed FAQ link from Flicket. Now controlled by documentation.
* Added markdown help and removed link to external reference.
* Documentation.

## 0.1.8

* Upgraded SQLAlchemy and Jinja2 due to security warnings.
* Updated wording of prompts in 'populate_database_with_junk.py'.
* Added admin setting so the page banner title can be changed from 'Flicket'.
* Merged pull request: https://github.com/evereux/flicket/pull/20
* Added ability to export tickets view as an excel file. Very project manager friendly, I believe.
* Added authentication method for nt machines. Requires pywin32 to be installed. If Flicket is running on an NT (
  windows) machine and pywin32 is installed it will try to authenticate the user on that machine if they aren't already
  registered. I will add LDAP authentication at some point soon when I can find a means to test (OpenLDAP hasn't worked
  for me.)
* Added a default group "super_user". super_users's can create departments and categories but can't access the
  administration settings or delete topics or posts.

  If you are migrating from any earlier version you should ensure:
    * you upgrade the database.
  ~~~
  python manage.py db migrate
  python manage.py db upgrade
  ~~~

      * add the user super_user to the groups in flicket_admin/groups/ groups page. You can use the admin
      configuration area to do this.

## 0.1.7

* Added view 'my_tickets'.
* Added links to ticket views filtered by department on main page.
* Refactored ticket views methods and placed in FlicketTicket model.
* Moved ticket creation and editing from views to own class.
* Total assigned now stored in users details and not calculated on the fly.

  If you are migrating from any earlier version you should ensure you upgrade the database.
  ~~~
  python manage.py db migrate
  python manage.py db upgrade
  ~~~

  Also, manually update your users total_posts count whilst site is offline. This can be done by
  running `python manage.py update_user_assigned`
* Added missing showmarkdown toggle to reply form.
* populate_database_with_junk.py now uses mimesis for random data generation.
* Change README to rst format and various wording changes.
* Added flask-babel support.
* Added French locale option. Thanks to SolvingCurves.

## 0.1.6a

* various bug fixes.
* user can now change status when replying to ticket.

## 0.1.5a

* Changed dependency from Flask-Misaka to the python library Markdown. This is because installing Flask-Misaka on
  Windows is too many hoops to jump through.

* A number of package updates made to requirements. See requirements.txt.

* The total number of posts is now stored in the user table instead of manually calculated. This is due to slow page
  loading times (users page) for large databases.

  If you are migrating from any earlier version you should ensure you upgrade the database. Also, manually update your
  users total_posts count whilst site is offline. This can be done by running `python manage.py update_user_posts`

* Some minor text updates to flash notifications.


text:
using System.Web;
using System.Web.Mvc;

namespace Mvc52Application
{
    public class FilterConfig
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());
        }
    }
}


text:
<?php

namespace ShopBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Feedback
 *
 * @ORM\Table(name="js_feedbacks")
 * @ORM\Entity(repositoryClass="ShopBundle\Entity\FeedbackRepository")
 */
class Feedback
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="UserBundle\Entity\User", inversedBy="feedbacks")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     */
    private $user;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="email", type="string", length=255)
     */
    private $email;

    /**
     * @var string
     *
     * @ORM\Column(name="phone", type="string", length=255)
     */
    private $phone;

    /**
     * @var string
     *
     * @ORM\Column(name="company", type="string", length=255)
     */
    private $company;

    /**
     * @var string
     *
     * @ORM\Column(name="message", type="text")
     */
    private $message;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Feedback
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set email
     *
     * @param string $email
     * @return Feedback
     */
    public function setEmail($email)
    {
        $this->email = $email;

        return $this;
    }

    /**
     * Get email
     *
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Set phone
     *
     * @param string $phone
     * @return Feedback
     */
    public function setPhone($phone)
    {
        $this->phone = $phone;

        return $this;
    }

    /**
     * Get phone
     *
     * @return string
     */
    public function getPhone()
    {
        return $this->phone;
    }

    /**
     * Set company
     *
     * @param string $company
     * @return Feedback
     */
    public function setCompany($company)
    {
        $this->company = $company;

        return $this;
    }

    /**
     * Get company
     *
     * @return string
     */
    public function getCompany()
    {
        return $this->company;
    }

    /**
     * Set message
     *
     * @param string $message
     * @return Feedback
     */
    public function setMessage($message)
    {
        $this->message = $message;

        return $this;
    }

    /**
     * Get message
     *
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Set user
     *
     * @param \UserBundle\Entity\User $user
     * @return Feedback
     */
    public function setUser(\UserBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \UserBundle\Entity\User
     */
    public function getUser()
    {
        return $this->user;
    }
}


text:
var x = {/* dangling */};
var x = {
  // dangling
};
var x = [/* dangling */];
function x() {
  /* dangling */
}
declare class Foo extends Qux<string> {/* dangling */}
export /* dangling */{};


text:
package cmd

import (
	"fmt"
	"github.com/bep/killswitch/condition"
	"github.com/bep/killswitch/core"
	"github.com/spf13/cobra"
)

var heartbeatScript string

var execCmd = &cobra.Command{
	Use:   "exec",
	Short: "Will kill your executable if your provided script exits with an error code",
	Long: `Will kill your executable if your provided script exits with an error code

The script (typically a shell script on *nix or a cmd- or bat-script on Windows) must exit with a non-0 exit-code
to signal that the application under watch should be killed.

See /testfiles for example scripts for both *nix and Windows.

If the script is not present on the PATH, the full path must be provided in name.
	`,
	RunE: func(cmd *cobra.Command, args []string) error {
		if len(executable) == 0 {
			return userError{"Must provide an executable to watch. Note that this must either in PATH or set as a full path."}
		}
		fmt.Printf("Starting %s with kill switch script %s ...\n", executable, heartbeatScript)
		conditional := condition.NewExecConditional(heartbeatScript)
		ctx := &core.Context{Executable: executable, Args: execArgs, Interval: interval}
		return core.Run(ctx, conditional)
	},
}

func init() {
	rootCmd.AddCommand(execCmd)

	execCmd.Flags().StringVarP(&heartbeatScript, "name", "n", "", "The name of the script to use as heartbeat script. If not on PATH, the full path must be provided.")
}


text:
<?php

declare(strict_types = 1);

namespace Saber\Data\IIntegral {

	use \Saber\Data\IReal;

	interface Module extends IReal\Module { }

}


text:
cliTools: Utilities for command-line interfaces and console scripts
###################################################################

.. automodule:: fontTools.misc.cliTools
   :inherited-members:
   :members:
   :undoc-members:


text:
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
package modularmachines.api.modules.components.process;

import javax.annotation.ParametersAreNonnullByDefault;

import mcp.MethodsReturnNonnullByDefault;


text:
class Environment:
    doc_dir = "./document/"
    query_dir = "./query/"
    query_file = "./query/query_about_SDR.txt"
    model_file = "./model/csj_50_skip.bin"
    content_poslist = [u"名詞"]
    idf_dir = "./Data/sa.txt/"


text:
import {BaseModel} from '../../basemodel'
import {UserInfo} from '../../userinfo';
//
export class BaseBar<T extends BaseModel> {
	//
	private _model: T;
	//
	constructor() {
	}
	public bind(s: T) {
		this._model = s;
	}
	protected get parent():T {
      return (this._model !== undefined) ? this._model : null;
  }
	protected get info(): UserInfo {
		return ((this._model !== undefined) && (this !== null)) ? this._model.userInfo : null;
	}
	public get is_connected(): boolean {
		return ((this.info !== undefined) && (this.info !== null)) ? this.info.is_connected : false;
	}
	public get is_notconnected(): boolean {
		return (!this.is_connected);
	}
	public get fullname(): string {
		return ((this.info !== undefined) && (this.info !== null)) ? this.info.fullname : null;
	}
	public get has_url(): boolean {
		return ((this.info !== undefined) && (this.info !== null)) ? this.info.has_url : false;
	}
	public get url(): string {
		return ((this.info !== undefined) && (this.info !== null)) ? this.info.url : null;
	}
	public logout(): void {
		if ((this.info !== undefined) && (this.info !== null)) {
			this.info.logout();
			this.info.navigate_to('home');
		}
	}
}// class BaseBar