code
stringlengths
4
1.01M
<?php namespace AdminBundle\Form; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; class CommentType extends AbstractType { /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('author') ->add('content') //->add('createAt') ->add('score') /*->add('product', EntityType::class, [ 'class' => 'AdminBundle\Entity\Product', 'choice_label' => 'title', // pour avoir un champ vide au départ : //'placeholder' => '', 'expanded' => true, 'multiple' => true ])*/ ; } /** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'AdminBundle\Entity\Comment' )); } /** * {@inheritdoc} */ public function getBlockPrefix() { return 'adminbundle_comment'; } }
#!/bin/bash PHP=php echo 'Copy the distributed YAML parameters to the required parameters.yml.' cp app/config/parameters.yml.pagoda app/config/parameters.yml echo 'Download the composer.phar file, so the vendors can be installed from the distributed composer.json.' if [ ! -f composer.phar ] then curl -s -O http://getcomposer.org/composer.phar fi echo 'Install the needed vendors for this application.' $PHP composer.phar install --prefer-source --no-progress --no-dev echo 'Dump the optimized autoloader classmap for performance reasons.' $PHP composer.phar dump-autoload --optimize
# MailMessageModel.From Property Additional header content Gets or sets the from address for this e-mail message. **Namespace:**&nbsp;<a href="N_iTin_Export_Model">iTin.Export.Model</a><br />**Assembly:**&nbsp;iTin.Export.Core (in iTin.Export.Core.dll) Version: 2.0.0.0 (2.0.0.0) ## Syntax **C#**<br /> ``` C# public MailMessageFromModel From { get; set; } ``` **VB**<br /> ``` VB Public Property From As MailMessageFromModel Get Set ``` #### Property Value Type: <a href="T_iTin_Export_Model_MailMessageFromModel">MailMessageFromModel</a><br />A <a href="T_iTin_Export_Model_MailMessageFromModel">MailMessageFromModel</a> that contains the from address information. ## Remarks **ITEE Object Element Usage**<br /> ``` XML <Message ...> <From/> ... </Message> ``` <strong>Compatibility table with native writers.</strong><table><tr><th>Comma-Separated Values<br /><a href="T_iTin_Export_Writers_CsvWriter">CsvWriter</a></th><th>Tab-Separated Values<br /><a href="T_iTin_Export_Writers_TsvWriter">TsvWriter</a></th><th>SQL Script<br /><a href="T_iTin_Export_Writers_SqlScriptWriter">SqlScriptWriter</a></th><th>XML Spreadsheet 2003<br /><a href="T_iTin_Export_Writers_Spreadsheet2003TabularWriter">Spreadsheet2003TabularWriter</a></th></tr><tr><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr></table> A <strong>`X`</strong> value indicates that the writer supports this element. ## Examples **XML**<br /> ``` XML <Behaviors> <Downdload LocalCopy="Yes"/> <TransformFile Execute="Yes" Indented="Yes" Save="Yes" Path="~\Output"/> <Mail Execute="Yes" Async="Yes" > <Server> <Credentials> <Credential SSL="Yes" Name="one" UserName="address@gmail.com" Password="pwd" Host="smtp.gmail.com"/> </Credentials> </Server> <Messages> <Message Credential="one" Send="Yes"> <From Address="emailaddress-one@gmail.com"/> <To Addresses="emailaddress-two@hotmail.com emailaddress-three@hotmail.com"/> <CC Addresses="emailaddress-four@hotmail.com emailaddress-five@hotmail.com"/> <Subject>New report</Subject> <Body>Hello, this is your report, sending from iTin.Export</Body> <Attachments> <Attachment Path="C:\Users\somefile.txt"/> <Attachment Path="C:\Users\Downloads\Photos Sample.zip"/> </Attachments> </Message> </Messages> </Mail> </Behaviors> ``` ## See Also #### Reference <a href="T_iTin_Export_Model_MailMessageModel">MailMessageModel Class</a><br /><a href="N_iTin_Export_Model">iTin.Export.Model Namespace</a><br />
#include "Common.h" #include "Core.h" #include "Event.h" #include "Message.h" #include "ProfilerServer.h" #include "EventDescriptionBoard.h" namespace Brofiler { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// struct MessageHeader { uint32 mark; uint32 length; static const uint32 MESSAGE_MARK = 0xB50FB50F; bool IsValid() const { return mark == MESSAGE_MARK; } MessageHeader() : mark(0), length(0) {} }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class MessageFactory { typedef IMessage* (*MessageCreateFunction)(InputDataStream& str); MessageCreateFunction factory[IMessage::COUNT]; template<class T> void RegisterMessage() { factory[T::GetMessageType()] = T::Create; } MessageFactory() { memset(&factory[0], 0, sizeof(MessageCreateFunction)); RegisterMessage<StartMessage>(); RegisterMessage<StopMessage>(); RegisterMessage<TurnSamplingMessage>(); for (uint32 msg = 0; msg < IMessage::COUNT; ++msg) { BRO_ASSERT(factory[msg] != nullptr, "Message is not registered to factory"); } } public: static MessageFactory& Get() { static MessageFactory instance; return instance; } IMessage* Create(InputDataStream& str) { MessageHeader header; str.Read(header); size_t length = str.Length(); int32 messageType = IMessage::COUNT; str >> messageType; BRO_VERIFY(0 <= messageType && messageType < IMessage::COUNT && factory[messageType] != nullptr, "Unknown message type!", return nullptr) IMessage* result = factory[messageType](str); if (header.length + str.Length() != length) { BRO_FAILED("Message Stream is corrupted! Invalid Protocol?") return nullptr; } return result; } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// OutputDataStream& operator<<(OutputDataStream& os, const DataResponse& val) { return os << val.version << (uint32)val.type; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// IMessage* IMessage::Create(InputDataStream& str) { MessageHeader header; while (str.Peek(header)) { if (header.IsValid()) { if (str.Length() < header.length + sizeof(MessageHeader)) break; // Not enough data yet return MessageFactory::Get().Create(str); } else { // Some garbage in the stream? str.Skip(1); } } return nullptr; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void StartMessage::Apply() { Core::Get().Activate(true); if (EventDescriptionBoard::Get().HasSamplingEvents()) { Core::Get().StartSampling(); } } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// IMessage* StartMessage::Create(InputDataStream&) { return new StartMessage(); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void StopMessage::Apply() { Core& core = Core::Get(); core.Activate(false); core.DumpFrames(); core.DumpSamplingData(); Server::Get().Send(DataResponse::NullFrame, OutputDataStream::Empty); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// IMessage* StopMessage::Create(InputDataStream&) { return new StopMessage(); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// IMessage* TurnSamplingMessage::Create(InputDataStream& stream) { TurnSamplingMessage* msg = new TurnSamplingMessage(); stream >> msg->index; stream >> msg->isSampling; return msg; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void TurnSamplingMessage::Apply() { EventDescriptionBoard::Get().SetSamplingFlag(index, isSampling != 0); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }
class RenameTemperatureProfileIdToBehaviorProfileId < ActiveRecord::Migration def change rename_column :testing_grounds, :temperature_profile_id, :behavior_profile_id end end
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.security.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.security.models.AdditionalWorkspacesProperties; import com.azure.resourcemanager.security.models.DataSource; import com.azure.resourcemanager.security.models.ExportData; import com.azure.resourcemanager.security.models.RecommendationConfigurationProperties; import com.azure.resourcemanager.security.models.SecuritySolutionStatus; import com.azure.resourcemanager.security.models.UnmaskedIpLoggingStatus; import com.azure.resourcemanager.security.models.UserDefinedResourcesProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; /** IoT Security solution configuration and resource information. */ @JsonFlatten @Fluent public class IoTSecuritySolutionModelInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTSecuritySolutionModelInner.class); /* * The resource location. */ @JsonProperty(value = "location") private String location; /* * Azure Resource Manager metadata containing createdBy and modifiedBy * information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Workspace resource ID */ @JsonProperty(value = "properties.workspace") private String workspace; /* * Resource display name. */ @JsonProperty(value = "properties.displayName") private String displayName; /* * Status of the IoT Security solution. */ @JsonProperty(value = "properties.status") private SecuritySolutionStatus status; /* * List of additional options for exporting to workspace data. */ @JsonProperty(value = "properties.export") private List<ExportData> export; /* * Disabled data sources. Disabling these data sources compromises the * system. */ @JsonProperty(value = "properties.disabledDataSources") private List<DataSource> disabledDataSources; /* * IoT Hub resource IDs */ @JsonProperty(value = "properties.iotHubs") private List<String> iotHubs; /* * Properties of the IoT Security solution's user defined resources. */ @JsonProperty(value = "properties.userDefinedResources") private UserDefinedResourcesProperties userDefinedResources; /* * List of resources that were automatically discovered as relevant to the * security solution. */ @JsonProperty(value = "properties.autoDiscoveredResources", access = JsonProperty.Access.WRITE_ONLY) private List<String> autoDiscoveredResources; /* * List of the configuration status for each recommendation type. */ @JsonProperty(value = "properties.recommendationsConfiguration") private List<RecommendationConfigurationProperties> recommendationsConfiguration; /* * Unmasked IP address logging status */ @JsonProperty(value = "properties.unmaskedIpLoggingStatus") private UnmaskedIpLoggingStatus unmaskedIpLoggingStatus; /* * List of additional workspaces */ @JsonProperty(value = "properties.additionalWorkspaces") private List<AdditionalWorkspacesProperties> additionalWorkspaces; /* * Resource tags */ @JsonProperty(value = "tags") private Map<String, String> tags; /** * Get the location property: The resource location. * * @return the location value. */ public String location() { return this.location; } /** * Set the location property: The resource location. * * @param location the location value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withLocation(String location) { this.location = location; return this; } /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } /** * Get the workspace property: Workspace resource ID. * * @return the workspace value. */ public String workspace() { return this.workspace; } /** * Set the workspace property: Workspace resource ID. * * @param workspace the workspace value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withWorkspace(String workspace) { this.workspace = workspace; return this; } /** * Get the displayName property: Resource display name. * * @return the displayName value. */ public String displayName() { return this.displayName; } /** * Set the displayName property: Resource display name. * * @param displayName the displayName value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withDisplayName(String displayName) { this.displayName = displayName; return this; } /** * Get the status property: Status of the IoT Security solution. * * @return the status value. */ public SecuritySolutionStatus status() { return this.status; } /** * Set the status property: Status of the IoT Security solution. * * @param status the status value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withStatus(SecuritySolutionStatus status) { this.status = status; return this; } /** * Get the export property: List of additional options for exporting to workspace data. * * @return the export value. */ public List<ExportData> export() { return this.export; } /** * Set the export property: List of additional options for exporting to workspace data. * * @param export the export value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withExport(List<ExportData> export) { this.export = export; return this; } /** * Get the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system. * * @return the disabledDataSources value. */ public List<DataSource> disabledDataSources() { return this.disabledDataSources; } /** * Set the disabledDataSources property: Disabled data sources. Disabling these data sources compromises the system. * * @param disabledDataSources the disabledDataSources value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withDisabledDataSources(List<DataSource> disabledDataSources) { this.disabledDataSources = disabledDataSources; return this; } /** * Get the iotHubs property: IoT Hub resource IDs. * * @return the iotHubs value. */ public List<String> iotHubs() { return this.iotHubs; } /** * Set the iotHubs property: IoT Hub resource IDs. * * @param iotHubs the iotHubs value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withIotHubs(List<String> iotHubs) { this.iotHubs = iotHubs; return this; } /** * Get the userDefinedResources property: Properties of the IoT Security solution's user defined resources. * * @return the userDefinedResources value. */ public UserDefinedResourcesProperties userDefinedResources() { return this.userDefinedResources; } /** * Set the userDefinedResources property: Properties of the IoT Security solution's user defined resources. * * @param userDefinedResources the userDefinedResources value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withUserDefinedResources(UserDefinedResourcesProperties userDefinedResources) { this.userDefinedResources = userDefinedResources; return this; } /** * Get the autoDiscoveredResources property: List of resources that were automatically discovered as relevant to the * security solution. * * @return the autoDiscoveredResources value. */ public List<String> autoDiscoveredResources() { return this.autoDiscoveredResources; } /** * Get the recommendationsConfiguration property: List of the configuration status for each recommendation type. * * @return the recommendationsConfiguration value. */ public List<RecommendationConfigurationProperties> recommendationsConfiguration() { return this.recommendationsConfiguration; } /** * Set the recommendationsConfiguration property: List of the configuration status for each recommendation type. * * @param recommendationsConfiguration the recommendationsConfiguration value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withRecommendationsConfiguration( List<RecommendationConfigurationProperties> recommendationsConfiguration) { this.recommendationsConfiguration = recommendationsConfiguration; return this; } /** * Get the unmaskedIpLoggingStatus property: Unmasked IP address logging status. * * @return the unmaskedIpLoggingStatus value. */ public UnmaskedIpLoggingStatus unmaskedIpLoggingStatus() { return this.unmaskedIpLoggingStatus; } /** * Set the unmaskedIpLoggingStatus property: Unmasked IP address logging status. * * @param unmaskedIpLoggingStatus the unmaskedIpLoggingStatus value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withUnmaskedIpLoggingStatus(UnmaskedIpLoggingStatus unmaskedIpLoggingStatus) { this.unmaskedIpLoggingStatus = unmaskedIpLoggingStatus; return this; } /** * Get the additionalWorkspaces property: List of additional workspaces. * * @return the additionalWorkspaces value. */ public List<AdditionalWorkspacesProperties> additionalWorkspaces() { return this.additionalWorkspaces; } /** * Set the additionalWorkspaces property: List of additional workspaces. * * @param additionalWorkspaces the additionalWorkspaces value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withAdditionalWorkspaces( List<AdditionalWorkspacesProperties> additionalWorkspaces) { this.additionalWorkspaces = additionalWorkspaces; return this; } /** * Get the tags property: Resource tags. * * @return the tags value. */ public Map<String, String> tags() { return this.tags; } /** * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the IoTSecuritySolutionModelInner object itself. */ public IoTSecuritySolutionModelInner withTags(Map<String, String> tags) { this.tags = tags; return this; } /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (userDefinedResources() != null) { userDefinedResources().validate(); } if (recommendationsConfiguration() != null) { recommendationsConfiguration().forEach(e -> e.validate()); } if (additionalWorkspaces() != null) { additionalWorkspaces().forEach(e -> e.validate()); } } }
'use strict'; function removeIndex(key, id, callback) { var client = this._; client.del(key + ':' + id + '@index', callback); } module.exports = removeIndex;
:: Execute a Ruby command with the current version @ setlocal EnableDelayedExpansion @ call "%~dp0common_vars.cmd" @ set PARAMS=%* :: If we are executing a Ruby script, search for the version inside the directory :: of this script instead of searching in the current directory @ if "%~1" == "ruby" ( set PARAMS= set SkipCount=1 for %%i in (%*) do @( if !SkipCount! leq 0 ( set PARAMS=!PARAMS! %%i ) else ( set /a SkipCount-=1 ) ) for %%i in (%PARAMS%) do @( set ARG=%%i if NOT "!ARG:~0,1!" == "-" ( if exist "!ARG!" ( for %%F in ("!ARG!") do @ set RBENV_SEARCH_DIR=%%~dpF break ) ) ) ) :: Retrieve current Ruby version @ for /f "usebackq tokens=*" %%i in (`%RBENV_ROOT%\libexec\rbenv_version.cmd --bare`) do @ set RUBY_VERSION=%%i @ if not defined RUBY_VERSION goto RubyVersionNotFound :: Compute path of current RUBY_VERSION @ set RUBY_PATH=%RBENV_VERSIONS%\%RUBY_VERSION% @ if not exist "%RUBY_PATH%" goto RubyVersionNotManaged :: Check if we called a script and if it exists in the current Ruby @ if not "%~1" == "ruby" ( if exist "%RBENV_SHIMS%\%~n1.cmd" ( if not exist "%RUBY_PATH%\bin\%~n1" goto ScriptNotInThisRubyVersion ) ) :: Compute how to call Ruby @ if "%RUBY_VERSION:~0,5%" == "jruby" ( if "%~1" == "" ( set COMMAND=jruby ) else if "%~1" == "jruby" ( set COMMAND=%PARAMS% ) else if exist "%RUBY_PATH%\bin\%~n1" ( set COMMAND=jruby -S %PARAMS% ) else ( set COMMAND=jruby %PARAMS% ) ) else ( if "%~1" == "" ( set COMMAND=ruby %PARAMS% ) else if exist "%RUBY_PATH%\bin\%~n1" ( set COMMAND=%PARAMS% ) else ( set COMMAND=ruby %PARAMS% ) ) :: Change current code page to 1252 as it is expected by Ruby @ for /f "usebackq tokens=2 delims=:" %%i in (`chcp`) do @ set CURRENTCP=%%i @ chcp 1252 > NUL :: Alter PATH and call our command @ set PATH=%RUBY_PATH%\bin;%PATH% @ call %COMMAND% @ set RETURN_VALUE=%ERRORLEVEL% :: Restore old code page @ chcp %CURRENTCP% > NUL :: Exit with return value @ exit /b %RETURN_VALUE% :RubyVersionNotFound @ echo(rbenv cannot determine the Ruby version to use. There are no valid global version nor '.ruby-version' file. @ exit /b 1 :RubyVersionNotManaged @ echo(Ruby %RUBY_VERSION% is not a version managed by rbenv. @ exit /b 1 :ScriptNotInThisRubyVersion @ echo(Ruby %RUBY_VERSION% does not contain a script '%~n1' @ exit /b 1
# String_PadLeft `String_PadLeft` returns a new string that right-aligns the characters in the `source` string by padding them on the left with a specified `paddingChar` Unicode character, for a specified total length. ```csharp String_PadLeft ( @source NVARCHAR (MAX), @totalWidth INT, @paddingChar NVARCHAR (1) ) RETURNS NVARCHAR (MAX) ``` ## Parameters - **source**: The source string. - **totalWidth**: The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters. - **paddingChar**: A Unicode padding character. ## Returns - A new string that is equivalent to the `source` string, but right-aligned and padded on the left with as many paddingChar characters as needed to create a length of `totalWidth`. - If `totalWidth` is less than the length of the `source` string, the method returns a reference to the existing instance. - If `totalWidth` is equal to the length of the `source` string, the method returns a new string that is identical to the `source` string. ## Example ```csharp SELECT SQLNET::String_PadLeft('This is a String.', 20, '.') SELECT SQLNET::String_PadLeft('This is a String.', 10, '.') ``` # String_PadLeft4k It is equivalent to `String_PadLeft` except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance. ```csharp String_PadLeft4k ( @source NVARCHAR (4000), @totalWidth INT, @paddingChar NVARCHAR (1) ) RETURNS NVARCHAR (4000) ``` ## Example ```csharp SELECT SQLNET::String_PadLeft4k('This is a String.', 20, '.') SELECT SQLNET::String_PadLeft4k('This is a String.', 10, '.') ```
{% extends template_base %} {% block title %}Reader's hall{% endblock %} {% block content %} <div class="row"> <div class="col-sm-7 col-md-6 col-md-offset-1"> <h3>Books by authors</h3> <div class="list-group"> {% for author, books in books_by_authors.items %} <div class="list-group-item"> <span class="badge">{{ books|length }}</span> <h4 class="list-group-item-heading">{{ author }}</h4> {% for book in books %} <p class="list-group-item-text">{{ book }}</p> {% endfor %} </div> {% endfor %} </div> </div> <div class="col-sm-5 col-md-4"> <h3>All authors</h3> <div class="list-group"> {% for author in all_authors %} <div class="list-group-item">{{ author }}</div> {% endfor %} </div> <h3>All books</h3> <div class="list-group"> {% for book in all_books %} <div class="list-group-item">{{ book }}</div> {% endfor %} </div> </div> </div> {% endblock %}
<!doctype html> <html lang="en"> <head> <title>Code coverage report for NASAPI/routes/schema.js</title> <meta charset="utf-8" /> <link rel="stylesheet" href="../../prettify.css" /> <link rel="stylesheet" href="../../base.css" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <style type='text/css'> .coverage-summary .sorter { background-image: url(../../sort-arrow-sprite.png); } </style> </head> <body> <div class='wrapper'> <div class='pad1'> <h1> <a href="../../index.html">all files</a> / <a href="index.html">NASAPI/routes/</a> schema.js </h1> <div class='clearfix'> <div class='fl pad1y space-right2'> <span class="strong">75% </span> <span class="quiet">Statements</span> <span class='fraction'>3/4</span> </div> <div class='fl pad1y space-right2'> <span class="strong">100% </span> <span class="quiet">Branches</span> <span class='fraction'>0/0</span> </div> <div class='fl pad1y space-right2'> <span class="strong">100% </span> <span class="quiet">Functions</span> <span class='fraction'>0/0</span> </div> <div class='fl pad1y space-right2'> <span class="strong">75% </span> <span class="quiet">Lines</span> <span class='fraction'>3/4</span> </div> </div> </div> <div class='status-line medium'></div> <pre><table class="coverage"> <tr><td class="line-count quiet">1 2 3 4 5 6 7 8 9 10 11</td><td class="line-coverage quiet"><span class="cline-any cline-yes">1×</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1×</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1×</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const schema = require('root/schema'); &nbsp; module.exports = { http: app =&gt; { app.get('/schema', (req, res) =&gt; { <span class="cstat-no" title="statement not covered" > res.json(schema);</span> }); }, ws: () =&gt; {} }; &nbsp;</pre></td></tr> </table></pre> <div class='push'></div><!-- for sticky footer --> </div><!-- /wrapper --> <div class='footer quiet pad2 space-top1 center small'> Code coverage generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Apr 23 2016 18:36:25 GMT+1000 (AEST) </div> </div> <script src="../../prettify.js"></script> <script> window.onload = function () { if (typeof prettyPrint === 'function') { prettyPrint(); } }; </script> <script src="../../sorter.js"></script> </body> </html>
# __init__.py: Yet Another Bayes Net library # Contact: Jacob Schreiber ( jmschreiber91@gmail.com ) """ For detailed documentation and examples, see the README. """ # Make our dependencies explicit so compiled Cython code won't segfault trying # to load them. import networkx, matplotlib.pyplot, scipy import numpy as np import os import pyximport # Adapted from Cython docs https://github.com/cython/cython/wiki/ # InstallingOnWindows#mingw--numpy--pyximport-at-runtime if os.name == 'nt': if 'CPATH' in os.environ: os.environ['CPATH'] = os.environ['CPATH'] + np.get_include() else: os.environ['CPATH'] = np.get_include() # XXX: we're assuming that MinGW is installed in C:\MinGW (default) if 'PATH' in os.environ: os.environ['PATH'] = os.environ['PATH'] + ';C:\MinGW\bin' else: os.environ['PATH'] = 'C:\MinGW\bin' mingw_setup_args = { 'options': { 'build_ext': { 'compiler': 'mingw32' } } } pyximport.install(setup_args=mingw_setup_args) elif os.name == 'posix': if 'CFLAGS' in os.environ: os.environ['CFLAGS'] = os.environ['CFLAGS'] + ' -I' + np.get_include() else: os.environ['CFLAGS'] = ' -I' + np.get_include() pyximport.install() from yabn import * __version__ = '0.1.0'
package ooo.purity.unwatermark.gui; import ooo.purity.unwatermark.Mode; import ooo.purity.unwatermark.ModeFactory; import ooo.purity.unwatermark.mode.MFSA; import javax.swing.*; import java.awt.*; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.ComponentEvent; import java.awt.event.ComponentListener; import java.awt.image.BufferedImage; import java.awt.print.PrinterException; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; class ViewFrame extends JFrame { private static final long serialVersionUID = -908237280313491890L; private final JFileChooser openChooser = new JFileChooser(); private final JFileChooser saveChooser = new JFileChooser(); private final ImagePanel imagePanel = new ImagePanel(); private final JScrollPane scrollPane = new JScrollPane(imagePanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); private final DefaultListModel<Document> listModel = new DefaultListModel<>(); final JList<Document> list = new JList<>(listModel); private class Document { private final File file; private BufferedImage image; private Mode mode = ModeFactory.create(MFSA.NAME); private Document(final File file) throws IOException { this.file = file; image = mode.apply(file); } private void show() { imagePanel.setName(file.getName()); imagePanel.setImage(image); imagePanel.setBounds(0, 0, scrollPane.getWidth() - scrollPane.getVerticalScrollBar().getWidth(), scrollPane.getHeight() - scrollPane.getHorizontalScrollBar().getHeight()); imagePanel.setVisible(true); imagePanel.repaint(); } @Override public String toString() { return file.getName(); } } private class ViewTransferHandler extends TransferHandler { private static final long serialVersionUID = 2695692501459052660L; @Override public boolean canImport(final TransferSupport support) { if (!support.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { return false; } final boolean copySupported = (COPY & support.getSourceDropActions()) == COPY; if (!copySupported) { return false; } support.setDropAction(COPY); return true; } @Override @SuppressWarnings({"unchecked", "serial"}) public boolean importData(final TransferSupport support) { if (!canImport(support)) { return false; } final Transferable transferable = support.getTransferable(); try { final java.util.List<File> fileList = (java.util.List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor); return unwatermark(fileList.toArray(new File[fileList.size()])); } catch (final UnsupportedFlavorException | IOException e) { return false; } } } ViewFrame() { super("Unwatermark"); final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, list, scrollPane); splitPane.setDividerLocation(120); getContentPane().add(splitPane); list.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); list.addListSelectionListener(e -> { if (e.getValueIsAdjusting()) { return; } final Document document = list.getSelectedValue(); if (document != null) { document.show(); } }); final TransferHandler transferHandler = new ViewTransferHandler(); setTransferHandler(transferHandler); setBackground(Color.LIGHT_GRAY); imagePanel.setTransferHandler(transferHandler); imagePanel.setLayout(new BorderLayout()); imagePanel.setBackground(Color.LIGHT_GRAY); scrollPane.setBackground(Color.LIGHT_GRAY); scrollPane.addComponentListener(new ComponentListener() { @Override public void componentResized(ComponentEvent e) { imagePanel.setBounds(0, 0, scrollPane.getWidth() - scrollPane.getVerticalScrollBar().getWidth(), scrollPane.getHeight() - scrollPane.getHorizontalScrollBar().getHeight()); } @Override public void componentMoved(ComponentEvent e) { } @Override public void componentShown(ComponentEvent e) { } @Override public void componentHidden(ComponentEvent e) { } }); pack(); initialiseMenuBar(); openChooser.setMultiSelectionEnabled(true); openChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); saveChooser.setMultiSelectionEnabled(false); } private void initialiseMenuBar() { final JMenuBar menuBar = new JMenuBar(); JMenu menu; menu = new JMenu("File"); menu.add(new JMenuItem("Open...")).addActionListener(e -> { if (openChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { unwatermark(openChooser.getSelectedFiles()); } }); menu.add(new JMenuItem("Save...")).addActionListener(e -> { Document document = list.getSelectedValue(); if (null == document && listModel.size() > 0) { document = listModel.getElementAt(0); } if (null == document) { return; } saveChooser.setSelectedFile(document.file); if (saveChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { unwatermark(document, saveChooser.getSelectedFile()); } }); menu.add(new JMenuItem("Print")).addActionListener(e -> { Document document = list.getSelectedValue(); if (null == document && listModel.size() > 0) { document = listModel.getElementAt(0); } if (null == document) { return; } try { document.mode.print(document.file); } catch (final IOException | PrinterException exc) { displayException(exc); } }); menuBar.add(menu); menu = new JMenu("Help"); menu.add(new JMenuItem("About")).addActionListener(e -> { JOptionPane.showMessageDialog(imagePanel, "Unwatermark\nmattcg@gmail.com"); }); menuBar.add(menu); setJMenuBar(menuBar); } private boolean unwatermark(final File... files) { try { Document document = null; for (File file : files) { document = new Document(file); listModel.add(listModel.size(), document); } if (null != document) { document.show(); } } catch (final IOException e) { displayException(e); return false; } return true; } private void unwatermark(final Document input, final File output) { try { input.mode.apply(input.file, output); } catch (final IOException e) { displayException(e); } } @SuppressWarnings("serial") private void displayException(final Exception e) { final JPanel panel = new JPanel(); final JPanel labelPanel = new JPanel(new BorderLayout()); final StringWriter writer = new StringWriter(); labelPanel.add(new JLabel("Unable to unwatermark.")); panel.add(labelPanel); panel.add(Box.createVerticalStrut(10)); e.printStackTrace(new PrintWriter(writer)); panel.add(new JScrollPane(new JTextArea(writer.toString())){ @Override public Dimension getPreferredSize() { return new Dimension(480, 320); } }); panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS)); JOptionPane.showMessageDialog(imagePanel, panel, "Error", JOptionPane.ERROR_MESSAGE); } }
/* * The MIT License (MIT) * * Copyright (c) 2014 Egbert Verhage * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ #ifndef PLANNINGEDITOR_H #define PLANNINGEDITOR_H #include <cstddef> #include <cursesapp.h> #include <cursesm.h> #include <cursesf.h> class PlanningEditor : public NCursesApplication { protected: int titlesize() const {return 1;} void title(); Soft_Label_Key_Set::Label_Layout useSLKs() const { return Soft_Label_Key_Set::PC_Style_With_Index; } void init_labels(Soft_Label_Key_Set& S) const; public: PlanningEditor() : NCursesApplication(true) { } int run(); }; #endif // PLANNINGEDITOR_H
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.12.21 at 09:18:55 AM CST // package ca.ieso.reports.schema.daareareserveconst; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.ieso.ca/schema}DocTitle"/> * &lt;element ref="{http://www.ieso.ca/schema}DocRevision"/> * &lt;element ref="{http://www.ieso.ca/schema}DocConfidentiality"/> * &lt;element ref="{http://www.ieso.ca/schema}CreatedAt"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "docTitle", "docRevision", "docConfidentiality", "createdAt" }) @XmlRootElement(name = "DocHeader") public class DocHeader { @XmlElement(name = "DocTitle", required = true) protected String docTitle; @XmlElement(name = "DocRevision", required = true) protected BigInteger docRevision; @XmlElement(name = "DocConfidentiality", required = true) protected DocConfidentiality docConfidentiality; @XmlElement(name = "CreatedAt", required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar createdAt; /** * Gets the value of the docTitle property. * * @return * possible object is * {@link String } * */ public String getDocTitle() { return docTitle; } /** * Sets the value of the docTitle property. * * @param value * allowed object is * {@link String } * */ public void setDocTitle(String value) { this.docTitle = value; } /** * Gets the value of the docRevision property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getDocRevision() { return docRevision; } /** * Sets the value of the docRevision property. * * @param value * allowed object is * {@link BigInteger } * */ public void setDocRevision(BigInteger value) { this.docRevision = value; } /** * Gets the value of the docConfidentiality property. * * @return * possible object is * {@link DocConfidentiality } * */ public DocConfidentiality getDocConfidentiality() { return docConfidentiality; } /** * Sets the value of the docConfidentiality property. * * @param value * allowed object is * {@link DocConfidentiality } * */ public void setDocConfidentiality(DocConfidentiality value) { this.docConfidentiality = value; } /** * Gets the value of the createdAt property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getCreatedAt() { return createdAt; } /** * Sets the value of the createdAt property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setCreatedAt(XMLGregorianCalendar value) { this.createdAt = value; } }
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double OrangeLabelVersionNumber; FOUNDATION_EXPORT const unsigned char OrangeLabelVersionString[];
<?php /** * This file is part of FunctionInjector project. * You are using it at your own risk and you are fully responsible for everything that code will do. * * Copyright (c) 2016 Grzegorz Zdanowski <grzegorz@noflash.pl> * * For the full copyright and license information, please view the LICENSE file distributed with this source code. */ namespace noFlash\FunctionsManipulator\Exception; use Exception; use noFlash\FunctionsManipulator\NameValidator; class InvalidFunctionNameException extends \InvalidArgumentException { public function __construct($functionName, $reasonCode, Exception $previous = null) { $message = sprintf( 'Function name "%s" is invalid - %s.', $functionName, NameValidator::getErrorFromCode($reasonCode) ); parent::__construct($message, 0, $previous); } }
# hagenberg-gamejam.at Website for the Hagenberg Game Jam ## Development on Windows These are the full development instructions to get a development machine running under Microsoft Windows. ### Install Git and Clone the Repository Get the Git binaries from <https://git-scm.com/> or download GitHub Desktop from <https://desktop.github.com/>, then clone the repository to your local machine (e.g., `C:\Users\[User]\Documents\GitHub\hagenberg-gamejam.at`). ### Install Ruby Go to <http://rubyinstaller.org/>, download the latest installer for Ruby and run it. Also install the development kit so you can build native extensions. ### Install all Gems with Bundler Use `bundle install` to install Jekyll and all required dependencies. ### Start the development server Use `bundle exec jekyll serve --watch` to start the development server. ## Development on Mac OS X These are the full developement instructions to get a development machine running under Mac OS X. ### Install Git and Clone the Repository Get the Git binaries from <https://git-scm.com/> or download GitHub Desktop from <https://desktop.github.com/>, then clone the repository to your local machine (e.g., `/Documents/GitHub/hagenberg-gamejam.at`). ### Install Ruby Use the Ruby Version Manager (RVM) to get the latest Ruby version installed. Go to <http://rvm.io/> and follow the installation instructions on the front page. Provide the flag `--ruby` to install ruby together with RVM in one go. ### Install all Gems with Bundler Use `bundle install` to install Jekyll and all required dependencies. ### Start the development server Use `bundle exec jekyll serve --watch` to start the development server.
using UnityEngine; [ExecuteInEditMode] [AddComponentMenu("Colorful/Fast Vignette")] public class CC_FastVignette : CC_Base { public Vector2 center = new Vector2(0.5f, 0.5f); [Range(-100f, 100f)] public float sharpness = 10f; [Range(0f, 100f)] public float darkness = 30f; public bool desaturate = false; void OnRenderImage(RenderTexture source, RenderTexture destination) { material.SetVector("_Data", new Vector4(center.x, center.y, sharpness * 0.01f, darkness * 0.02f)); Graphics.Blit(source, destination, material, desaturate ? 1 : 0); } }
# ES6 Module Loader Polyfill [![Build Status][travis-image]][travis-url] Dynamically loads ES6 modules in browsers and [NodeJS](#nodejs-use) with support for loading existing and custom module formats through loader hooks. This project implements dynamic module loading through `System` exactly to the previous ES6-specified loader API at [2014-08-24 ES6 Specification Draft Rev 27, Section 15](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#august_24_2014_draft_rev_27) and will continue to track this API as it is re-drafted as a browser specification (currently most likely to be at https://github.com/whatwg/loader). * Provides an asynchronous loader (`System.import`) to [dynamically load ES6 modules](#getting-started). * Supports both [Traceur](https://github.com/google/traceur-compiler) and [Babel](http://babeljs.io/) for compiling ES6 modules and syntax into ES5 in the browser with source map support. * Fully supports [ES6 circular references and live bindings](https://github.com/ModuleLoader/es6-module-loader/wiki/Circular-References-&-Bindings). * Includes [`baseURL` and `paths` implementations](https://github.com/ModuleLoader/es6-module-loader/wiki/Configuring-the-Loader). * Can be used as a [tracing tool](https://github.com/ModuleLoader/es6-module-loader/wiki/Tracing-API) for static analysis of modules. * Polyfills ES6 Promises in the browser with an optionally bundled ES6 promise implementation. * Supports IE8+, with IE9+ support for ES6 development without pre-compilation. * The complete combined polyfill, including ES6 promises, comes to 9KB minified and gzipped, making it suitable for production use, provided that modules are [built into ES5 making them independent of Traceur](https://github.com/ModuleLoader/es6-module-loader/wiki/Production-Workflows). For an overview of build workflows, [see the production guide](https://github.com/ModuleLoader/es6-module-loader/wiki/Production-Workflows). For an example of a universal module loader based on this polyfill for loading AMD, CommonJS and globals, see [SystemJS](https://github.com/systemjs/systemjs). ### Documentation * [A brief overview of ES6 module syntax](https://github.com/ModuleLoader/es6-module-loader/wiki/Brief-Overview-of-ES6-Module-syntax) * [Configuring the loader](https://github.com/ModuleLoader/es6-module-loader/wiki/Configuring-the-Loader) * [Production workflows](https://github.com/ModuleLoader/es6-module-loader/wiki/Production-Workflows) * [Circular References &amp; Bindings](https://github.com/ModuleLoader/es6-module-loader/wiki/Circular-References-&-Bindings) * [Extending the loader through loader hooks](https://github.com/ModuleLoader/es6-module-loader/wiki/Extending-the-ES6-Loader) * [Tracing API](https://github.com/ModuleLoader/es6-module-loader/wiki/Tracing-API) ### Getting Started If using ES6 syntax (optional), include `traceur.js` or `babel.js` in the page first then include `es6-module-loader.js`: ```html <script src="traceur.js"></script> <script src="es6-module-loader.js"></script> ``` To use Babel, set the transpiler to `babel` with the loader configuration: ```html <script> System.transpiler = 'babel'; </script> ``` Then we can write any ES6 module: mymodule.js: ```javascript export class q { constructor() { console.log('this is an es6 class!'); } } ``` and load the module dynamically in the browser ```html <script> System.import('mymodule').then(function(m) { new m.q(); }); </script> ``` The dynamic loader returns a `Module` object, which contains getters for the named exports (in this case, `q`). #### Setting transpilation options If using Traceur, these can be set with: ```javascript System.traceurOptions = {...}; ``` Or with Babel: ```javascript System.babelOptions = {...}; ``` #### Module Tag As well as defining `window.System`, this polyfill provides support for the `<script type="module">` tag: ```html <script type="module"> // loads the 'q' export from 'mymodule.js' in the same path as the page import { q } from 'mymodule'; new q(); // -> 'this is an es6 class!' </script> ``` Because it is only possible to load ES6 modules with this tag, it is not suitable for production use in this way. See the [demo folder](https://github.com/ModuleLoader/es6-module-loader/blob/master/demo/index.html) in this repo for a working example demonstrating module loading in the browser both with `System.import` and with the module-type script tag. #### NodeJS Use ``` npm install es6-module-loader ``` For use in NodeJS, the `Loader` and `System` globals are provided as exports: index.js: ```javascript var System = require('es6-module-loader').System; /* * Include: * System.transpiler = 'babel'; * to use Babel instead of Traceur */ System.import('some-module').then(function(m) { console.log(m.p); }); ``` some-module.js: ```javascript export var p = 'NodeJS test'; ``` Running the application: ``` > node index.js NodeJS test ``` ## Contributing In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt). _Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "lib" subdirectory!_ ## Testing - `npm run test:node` will use node to to run the tests - `npm run test:browser` will run `npm run test:browser-babel` and `npm run test:browser-traceur` - `npm run test:browser-[transpiler]` use karma to run the tests with Traceur or Babel. - `npm run test:browser:perf` will use karma to run benchmarks `npm run test:browser-[transpiler]` supports options after a double dash (`--`) : - You can use the `--polyfill` option to test the code with polyfill. - You can use the `--coverage` option to test and extract coverage info. - You can use the `--ie8` option to test the code in the ie8 scope only. - You can use the `--saucelabs` option to use karma and saucelabs to run the tests in various browsers. Note: you will need to export your username and key to launch it. ```sh export SAUCE_USERNAME={your user name} && export SAUCE_ACCESS_KEY={the access key that you see once logged in} npm run test:browsers -- --saucelabs ``` ## Credit Copyright (c) 2015 Luke Hoban, Addy Osmani, Guy Bedford ## License Licensed under the MIT license. [travis-url]: https://travis-ci.org/ModuleLoader/es6-module-loader [travis-image]: https://travis-ci.org/ModuleLoader/es6-module-loader.svg?branch=master
/* FTUI Plugin * Copyright (c) 2016 Mario Stephan <mstephan@shared-files.de> * Under MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* global ftui:true, Modul_widget:true */ "use strict"; var Modul_medialist = function () { $('head').append('<link rel="stylesheet" href="' + ftui.config.dir + '/../css/ftui_medialist.css" type="text/css" />'); function changedCurrent(elem, pos) { elem.find('.media').each(function (index) { $(this).removeClass('current'); }); var idx = elem.hasClass('index1') ? pos - 1 : pos; var currentElem = elem.find('.media').eq(idx); if (currentElem.length > 0) { currentElem.addClass("current"); if (elem.hasClass("autoscroll")) { elem.scrollTop(currentElem.offset().top - elem.offset().top + elem.scrollTop()); } } } function init_attr(elem) { elem.initData('get', 'STATE'); elem.initData('set', 'play'); elem.initData('pos', 'Pos'); elem.initData('cmd', 'set'); elem.initData('color', ftui.getClassColor(elem) || ftui.getStyle('.' + me.widgetname, 'color') || '#222'); elem.initData('background-color', ftui.getStyle('.' + me.widgetname, 'background-color') || 'transparent'); elem.initData('text-color', ftui.getStyle('.' + me.widgetname, 'text-color') || '#ddd'); elem.initData('width', '90%'); elem.initData('height', '80%'); me.addReading(elem, 'get'); me.addReading(elem, 'pos'); } function init_ui(elem) { // prepare container element var width = elem.data('width'); var widthUnit = ($.isNumeric(width)) ? 'px' : ''; var height = elem.data('height'); var heightUnit = ($.isNumeric(height)) ? 'px' : ''; elem.html('') .addClass('media-list') .css({ width: width + widthUnit, maxWidth: width + widthUnit, height: height + heightUnit, color: elem.mappedColor('text-color'), backgroundColor: elem.mappedColor('background-color'), }); elem.on('click', '.media', function (index) { elem.data('value', elem.hasClass('index1') ? $(this).index() + 1 : $(this).index()); elem.transmitCommand(); }); } function update(dev, par) { // update medialist reading me.elements.filterDeviceReading('get', dev, par) .each(function (index) { var elem = $(this); var list = elem.getReading('get').val; var pos = elem.getReading('pos').val; if (ftui.isValid(list)) { elem.html(''); var text = ''; try { var collection = JSON.parse(list); for (var idx in collection) { var media = collection[idx]; text += '<div class="media">'; text += '<div class="media-image">'; text += '<img class="cover" src="' + media.Cover + '"/>'; text += '</div>'; text += '<div class="media-text">'; text += '<div class="title" data-track="' + media.Track + '">' + media.Title + '</div>'; text += '<div class="artist">' + media.Artist + '</div>'; text += '<div class="duration">' + ftui.durationFromSeconds(media.Time) + '</div>'; text += '</div></div>'; } } catch (e) { ftui.log(1, 'widget-' + me.widgetname + ': error:' + e); ftui.log(1, list); ftui.toast('<b>widget-' + me.widgetname + '</b><br>' + e, 'error'); } elem.append(text).fadeIn(); } if (pos) { changedCurrent(elem, pos); } }); //extra reading for current position me.elements.filterDeviceReading('pos', dev, par) .each(function (idx) { var elem = $(this); var pos = elem.getReading('pos').val; if (ftui.isValid(pos)){ changedCurrent(elem, pos); } }); } // public // inherit members from base class var me = $.extend(new Modul_widget(), { //override members widgetname: 'medialist', init_attr: init_attr, init_ui: init_ui, update: update, }); return me; };
<?php declare(strict_types=1); /* * This file is part of the RollerworksSearch package. * * (c) Sebastiaan Stok <s.stok@rollerscapes.net> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Rollerworks\Component\Search\Extension\Symfony\Validator\Tests; use Rollerworks\Component\Search\ConditionErrorMessage; use Rollerworks\Component\Search\ErrorList; use Rollerworks\Component\Search\Extension\Core\Type\DateType; use Rollerworks\Component\Search\Extension\Core\Type\IntegerType; use Rollerworks\Component\Search\Extension\Core\Type\TextType; use Rollerworks\Component\Search\Extension\Symfony\Validator\InputValidator; use Rollerworks\Component\Search\Extension\Symfony\Validator\ValidatorExtension; use Rollerworks\Component\Search\Test\SearchIntegrationTestCase; use Rollerworks\Component\Search\Value\PatternMatch; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\Validation; /** * @internal */ final class InputValidatorTest extends SearchIntegrationTestCase { private $sfValidator; /** * @var InputValidator */ private $validator; protected function setUp(): void { parent::setUp(); $validatorBuilder = Validation::createValidatorBuilder(); $validatorBuilder->disableAnnotationMapping(); $this->sfValidator = $validatorBuilder->getValidator(); $this->validator = new InputValidator($this->sfValidator); } protected function getFieldSet(bool $build = true) { $fieldSet = $this->getFactory()->createFieldSetBuilder(); $fieldSet->add('id', IntegerType::class, ['constraints' => new Assert\Range(['min' => 5])]); $fieldSet->add('date', DateType::class, [ 'constraints' => [ new Assert\Range( ['min' => new \DateTimeImmutable('2014-12-20 14:35:05 UTC')] ), ], ]); $fieldSet->add('type', TextType::class); return $build ? $fieldSet->getFieldSet() : $fieldSet; } protected function getExtensions(): array { return [new ValidatorExtension()]; } /** @test */ public function it_validates_fields_with_constraints(): void { $fieldSet = $this->getFieldSet(); $errorList = new ErrorList(); $this->validator->initializeContext($fieldSet->get('id'), $errorList); $this->validator->validate(10, 'simple', 10, 'simpleValues[0]'); $this->validator->validate(3, 'simple', 3, 'simpleValues[1]'); $this->validator->validate(4, 'simple', 4, 'simpleValues[2]'); $errorList2 = new ErrorList(); $this->validator->initializeContext($fieldSet->get('date'), $errorList2); $this->validator->validate($d1 = new \DateTimeImmutable('2014-12-13 14:35:05 UTC'), 'simple', '2014-12-13 14:35:05', 'simpleValues[0]'); $this->validator->validate($d2 = new \DateTimeImmutable('2014-12-21 14:35:05 UTC'), 'simple', '2014-12-17 14:35:05', 'simpleValues[1]'); $this->validator->validate($d3 = new \DateTimeImmutable('2014-12-10 14:35:05 UTC'), 'simple', '2014-12-10 14:35:05', 'simpleValues[2]'); $errorList3 = new ErrorList(); $this->validator->initializeContext($fieldSet->get('type'), $errorList3); $this->validator->validate('something', 'simple', 'something', 'simpleValues[0]'); $this->assertContainsErrors( [ new ConditionErrorMessage('simpleValues[1]', 'This value should be 5 or more.', 'This value should be {{ limit }} or more.', ['{{ value }}' => '3', '{{ limit }}' => '5']), new ConditionErrorMessage('simpleValues[2]', 'This value should be 5 or more.', 'This value should be {{ limit }} or more.', ['{{ value }}' => '4', '{{ limit }}' => '5']), ], $errorList ); $minDate = self::formatDateTime(new \DateTimeImmutable('2014-12-20 14:35:05 UTC')); $this->assertContainsErrors( [ new ConditionErrorMessage('simpleValues[0]', 'This value should be ' . $minDate . ' or more.', 'This value should be {{ limit }} or more.', ['{{ value }}' => self::formatDateTime($d1), '{{ limit }}' => $minDate]), new ConditionErrorMessage('simpleValues[2]', 'This value should be ' . $minDate . ' or more.', 'This value should be {{ limit }} or more.', ['{{ value }}' => self::formatDateTime($d3), '{{ limit }}' => $minDate]), ], $errorList2 ); self::assertEmpty($errorList3); } /** @test */ public function it_validates_matchers(): void { $fieldSet = $this->getFieldSet(false); $fieldSet->add('username', TextType::class, ['constraints' => new Assert\NotBlank()]); $fieldSet = $fieldSet->getFieldSet(); $errorList = new ErrorList(); $this->validator->initializeContext($fieldSet->get('username'), $errorList); $this->validator->validate('foo', PatternMatch::class, 'foo', 'patternMatch[0].value'); $this->validator->validate('bar', PatternMatch::class, 'foo', 'patternMatch[1].value'); $this->validator->validate('', PatternMatch::class, 'foo', 'patternMatch[2].value'); $this->assertContainsErrors( [ new ConditionErrorMessage('patternMatch[2].value', 'This value should not be blank.', 'This value should not be blank.', ['{{ value }}' => '""']), ], $errorList ); } private function assertContainsErrors(array $expectedErrors, ErrorList $errors): void { foreach ($errors as $error) { self::assertInstanceOf(ConstraintViolation::class, $error->cause); // Remove cause to make assertion possible. $error->cause = null; } self::assertEquals($expectedErrors, $errors->getArrayCopy()); } /** * @param \DateTimeImmutable $value * * @return string */ private static function formatDateTime($value) { if (\class_exists('IntlDateFormatter')) { $locale = \Locale::getDefault(); $formatter = new \IntlDateFormatter($locale, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT); // neither the native nor the stub IntlDateFormatter support // DateTimeImmutable as of yet if (! $value instanceof \DateTime) { $value = new \DateTime( $value->format('Y-m-d H:i:s.u e'), $value->getTimezone() ); } return $formatter->format($value); } return $value->format('Y-m-d H:i:s'); } }
--- layout: logistics date: June 14 - 16, 2010 permalink: meetings/2010/06/logistics --- ### [Meeting Registration](https://www.ornl.gov/ccsd_registrations/nccs_mpi_forums/) Advanced registration is required for this meeting so that Cisco can process their visitor processing procedure. The registration covers snacks at the meeting, lunch on Tuesday, and the meeting logistics. ### Meeting Location The meeting will take place: * **Mon, June 14:** **Cisco building 9**, [260 East Tasman Drive, San Jose, California 95134, USA](http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=260+East+Tasman+Drive+San+Jose,+California+95134+United+States&sll=37.413016,-121.93417&sspn=0.040359,0.087376&ie=UTF8&ll=37.413255,-121.934166&spn=0.080717,0.174751&z=13&iwloc=addr) (marker "C" on the map) in the Kistler room. _This is the same building/room as in previous Forum meetings_. * **Tue, June 15:** **Cisco building J** (yes, the letter "J"), [255 West Tasman Drive, San Jose, California 95134, USA](http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=255+W+Tasman+Dr,+San+Jose,+Santa+Clara,+California+95134&sll=37.41018,-121.944575&sspn=0.010226,0.021436&dirflg=w&ie=UTF8&hq=&hnear=255+W+Tasman+Dr,+San+Jose,+Santa+Clara,+California+95134&ll=37.411619,-121.954079&spn=0.081809,0.17149&z=13) (marker "B" on the map) in the Brooklyn room. This building is approximately 1.5 miles west on Tasman from building 9. * **Wed, June 16:** **Cisco Building J**. Same as Tuesday. ### Meeting Cost $125 per person to cover meeting logistics costs. This will cover snacks, and lunch on Tuesday.   This is payable by credit card or check made out to the MPI Forum. ### Hotel Room Block A block of rooms is reserved at the Residence Inn hotel, [1080 Stewart Drive, Sunnyvale, CA](http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1080+Stewart+Drive,+Sunnyvale,+CA&sll=37.413255,-121.934166&sspn=0.080717,0.174751&ie=UTF8&ll=37.400301,-121.993389&spn=0.080731,0.174751&z=13&iwloc=r1) (marker "A" on the map). The nightly rate is the government rate of $132/night. To reserve a hotel room at this hotel, please indicate on the meeting registration form which nights you would like to stay at the hotel. Reservations must be made be made by individual attendees directly either through Marriott Reservations at 1-800-331-3131 (ask for MPI Forum March Group Rate) or their website link above using group code MPJMPJA. Reservations by attendees must be received on or before Monday, May 31, 2010. Room Block Name: MPJMPJA. Rate is $132 per night for studio suite. [Hotel web site](http://www.residenceinnsiliconvalley2.com/)
# GradeMe COMS 309 Project that helps your average student.
#pragma once // ApplicationDialog dialog /*struct buttonSet { CString name; CButton* ctrlCheckButton; CButton* altCheckButton; CComboBox* VKBox; };*///This actually seemed to crash windows????? class ApplicationDialog : public CDialog { DECLARE_DYNAMIC(ApplicationDialog) public: ApplicationDialog(CWnd* pParent = NULL); // standard constructor virtual ~ApplicationDialog(); virtual BOOL OnInitDialog(); // Dialog Data enum { IDD = IDD_APPLICATION_MANAGER }; private: CString VKS[100]; bool InitVKS(); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() public: afx_msg void OnBnClickedOk(); };
version https://git-lfs.github.com/spec/v1 oid sha256:2d79d4ce9f72e0b9db16aee949410ecd30bfcfb5205af39053f05ac39083e151 size 22425
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. --> # `$ regarde` [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/regarde.svg)](https://www.npmjs.com/package/regarde) [![Downloads](https://img.shields.io/npm/dt/regarde.svg)](https://www.npmjs.com/package/regarde) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github) <a href="https://www.buymeacoffee.com/H96WwChMy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee"></a> > A tiny tool and library to watch commands. ## :cloud: Installation You can install the package globally and use it as command line tool: ```sh # Using npm npm install --global regarde # Using yarn yarn global add regarde ``` Then, run `regarde --help` and see what the CLI tool can do. ``` $ regarde --help regarde --help A tiny tool and library to watch commands. usage: regarde [command] [options] command: The command to watch. options: -h --help Displays this help. -n, --interval <secs> Seconds to wait between updates. examples: regarde 'ls' Documentation can be found at https://github.com/IonicaBizau/regarde ``` ## :clipboard: Example Here is an example how to use this package as library. To install it locally, as library, you can use `npm install regarde` (or `yarn add regarde`): ```js // Dependencies var Regarde = require("regarde"); Regarde("date +%s%N", 0.1) // <milliseconds> ``` ## :question: Get Help There are few ways to get help: 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question. 2. For bug reports and feature requests, open issues. :bug: 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket: ## :memo: Documentation For full API reference, see the [DOCUMENTATION.md][docs] file. ## :yum: How to contribute Have an idea? Found a bug? See [how to contribute][contributing]. ## :sparkling_heart: Support my projects I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it). However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it: - Starring and sharing the projects you like :rocket: - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book: - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: - [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone). - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6` ![](https://i.imgur.com/z6OQI95.png) Thanks! :heart: ## :scroll: License [MIT][license] © [Ionică Bizău][website] [license]: /LICENSE [website]: https://ionicabizau.net [contributing]: /CONTRIBUTING.md [docs]: /DOCUMENTATION.md [badge_patreon]: https://ionicabizau.github.io/badges/patreon.svg [badge_amazon]: https://ionicabizau.github.io/badges/amazon.svg [badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg [badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg [patreon]: https://www.patreon.com/ionicabizau [amazon]: http://amzn.eu/hRo9sIZ [paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
/**************************************************************************************** Copyright (C) 2014 Autodesk, Inc. All rights reserved. Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. ****************************************************************************************/ //! \file fbxshape.h #ifndef _FBXSDK_SCENE_GEOMETRY_SHAPE_H_ #define _FBXSDK_SCENE_GEOMETRY_SHAPE_H_ #include <fbxsdk/fbxsdk_def.h> #include <fbxsdk/scene/geometry/fbxgeometrybase.h> #include <fbxsdk/fbxsdk_nsbegin.h> class FbxBlendShapeChannel; class FbxGeometry; /** A shape describes the deformation on a set of control points, which is similar to the cluster deformer in Maya. * For example, we can add a shape to a created geometry. And the shape and the geometry have the same * topological information but different position of the control points. * With varying amounts of influence, the geometry performs a deformation effect. * \nosubgrouping * \see FbxGeometry */ class FBXSDK_DLL FbxShape : public FbxGeometryBase { FBXSDK_OBJECT_DECLARE(FbxShape, FbxGeometryBase); public: /** Set the blend shape channel that contains this target shape. * \param pBlendShapeChannel Pointer to the blend shape channel to set. * \return \c true on success, \c false otherwise. */ bool SetBlendShapeChannel(FbxBlendShapeChannel* pBlendShapeChannel); /** Get the blend shape channel that contains this target shape. * \return a pointer to the blend shape channel if set or NULL. */ FbxBlendShapeChannel* GetBlendShapeChannel() const; /** Get the base geometry of this target shape. * \return a pointer to the base geometry if set or NULL. * \remarks Since target shape can only connected to its base geometry through * blend shape channel and blend shape deformer. * So only when this target shape is connected to a blend shape channel, * and the blend shape channel is connected to a blend shape deformer, * and the blend shape deformer is used on a base geometry, then to get * base geometry will success. */ FbxGeometry* GetBaseGeometry(); /** Get the length of the arrays of control point indices and weights. * \return Length of the arrays of control point indices and weights. * Returns 0 if no control point indices have been added or the arrays have been reset. */ int GetControlPointIndicesCount() const; /** Get the array of control point indices. * \return Pointer to the array of control point indices. * \c NULL if no control point indices have been added or the array has been reset. */ int* GetControlPointIndices() const; /** Set the array size for the control point indices * \param pCount The new count. */ void SetControlPointIndicesCount(int pCount); /** Add a control point index to the control point indices array * \param pIndex The control point index to add. */ void AddControlPointIndex(int pIndex); /** Restore the shape to its initial state. * Calling this function will clear the following: * \li Pointer to blend shape channel. * \li Control point indices. */ void Reset(); /***************************************************************************************************************************** ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** *****************************************************************************************************************************/ #ifndef DOXYGEN_SHOULD_SKIP_THIS virtual FbxObject& Copy(const FbxObject& pObject); virtual FbxObject* Clone(FbxObject::ECloneType pCloneType=eDeepClone, FbxObject* pContainer=NULL, void* pSet = NULL) const; protected: virtual FbxNodeAttribute::EType GetAttributeType() const; virtual FbxStringList GetTypeFlags() const; FbxArray<int> mControlPointIndices; #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ }; #include <fbxsdk/fbxsdk_nsend.h> #endif /* _FBXSDK_SCENE_GEOMETRY_SHAPE_H_ */
//****************************************************************************************************** // CollectionEventArgs.cs - Gbtc // // Copyright © 2014, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // the NOTICE file distributed with this work for additional information regarding copyright ownership. // The GPA licenses this file to you under the MIT License (MIT), the "License"; you may // not use this file except in compliance with the License. You may obtain a copy of the License at: // // http://opensource.org/licenses/MIT // // Unless agreed to in writing, the subject software distributed under the License is distributed on an // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the // License for the specific language governing permissions and limitations. // // Code Modification History: // ---------------------------------------------------------------------------------------------------- // 8/18/2012 - Steven E. Chisholm // Generated original version of source code. // // //****************************************************************************************************** using System; namespace GSF.IO.Unmanaged { /// <summary> /// Speifies how critical the collection of memory blocks is. /// </summary> public enum MemoryPoolCollectionMode { /// <summary> /// This means no collection has to occur. /// </summary> None, /// <summary> /// This is the routine mode /// </summary> Normal, /// <summary> /// This means the engine is using more memory than desired /// </summary> Emergency, /// <summary> /// This means any memory that can be released should be released. /// If no memory is released after this pass, /// an out of memory exception will occur. /// </summary> Critical } /// <summary> /// This contains information about the collection that is requested from the system. /// </summary> public class CollectionEventArgs : EventArgs { private readonly Action<int> m_releasePage; /// <summary> /// When <see cref="CollectionMode"/> is <see cref="MemoryPoolCollectionMode.Emergency"/> or /// <see cref="MemoryPoolCollectionMode.Critical"/> this field contains the number of pages /// that need to be released by all of the objects. This value will automatically decrement /// every time a page has been released. /// </summary> public int DesiredPageReleaseCount { get; private set; } /// <summary> /// The mode for the collection /// </summary> public MemoryPoolCollectionMode CollectionMode { get; private set; } /// <summary> /// Creates a new <see cref="CollectionEventArgs"/>. /// </summary> /// <param name="releasePage"></param> /// <param name="collectionMode"></param> /// <param name="desiredPageReleaseCount"></param> public CollectionEventArgs(Action<int> releasePage, MemoryPoolCollectionMode collectionMode, int desiredPageReleaseCount) { DesiredPageReleaseCount = desiredPageReleaseCount; m_releasePage = releasePage; CollectionMode = collectionMode; } /// <summary> /// Releases an unused page. /// </summary> /// <param name="index">the index of the page</param> public void ReleasePage(int index) { m_releasePage(index); DesiredPageReleaseCount--; } } }
/** * Copyright (c) 2012-2014 André Bargull * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms. * * <https://github.com/anba/es6draft> */ package com.github.anba.es6draft.ast; /** * <h1>12 ECMAScript Language: Expressions</h1><br> * <h2>12.1 Primary Expressions</h2><br> * <h3>12.1.4 Array Initialiser</h3> * <ul> * <li>12.1.4.2 Array Comprehension * </ul> */ public final class ComprehensionFor extends ComprehensionQualifier implements ScopedNode { private BlockScope scope; private Binding binding; private Expression expression; public ComprehensionFor(long beginPosition, long endPosition, BlockScope scope, Binding binding, Expression expression) { super(beginPosition, endPosition); this.scope = scope; this.binding = binding; this.expression = expression; } @Override public BlockScope getScope() { return scope; } public Binding getBinding() { return binding; } public Expression getExpression() { return expression; } @Override public <R, V> R accept(NodeVisitor<R, V> visitor, V value) { return visitor.visit(this, value); } }
module.exports = function (grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), requirejs: { compile: { options: { shim: { grape: { exports: 'Grape' } }, paths:{ grape:'../../../../dist/grape.min' }, baseUrl: "js", name: "../node_modules/almond/almond", include: ["pong"], out: "build/pong.min.js", optimize: 'uglify2', logLevel: 3, uglify2: { output: { beautify: true }, compress: { sequences: false }, warnings: true, mangle: false } } } } }); grunt.loadNpmTasks('grunt-contrib-requirejs'); grunt.registerTask('default', ['requirejs']); };
--- title: Quick-start guide permalink: /docs/quickstart/ --- If you already have a full [Ruby](https://www.ruby-lang.org/en/downloads/) development environment with all headers and [RubyGems](https://rubygems.org/pages/download) installed (see Jekyll's [requirements](/docs/installation/#requirements)), you can create a new Jekyll site by doing the following: ```sh # Install Jekyll and Bundler gems through RubyGems gem install jekyll bundler # Create a new Jekyll site at ./myblog jekyll new myblog # Change into your new directory cd myblog # Build the site on the preview server bundle exec jekyll serve # Now browse to http://localhost:4000 ``` If you encounter any unexpected errors during the above, please refer to the [troubleshooting](/docs/troubleshooting/#configuration-problems) page or the already-mentioned [requirements](/docs/installation/#requirements) page, as you might be missing development headers or other prerequisites. ## About Bundler `gem install jekyll bundler` installs the [jekyll](https://rubygems.org/gems/jekyll/) and [bundler](https://rubygems.org/gems/bundler) gems through [RubyGems](https://rubygems.org/). You need only to install the gems one time &mdash; not every time you create a new Jekyll project. Here are some additional details: * `bundler` is a gem that manages other Ruby gems. It makes sure your gems and gem versions are compatible, and that you have all necessary dependencies each gem requires. * The `Gemfile` and `Gemfile.lock` files inform Bundler about the gem requirements in your site. If your site doesn't have these Gemfiles, you can omit `bundle exec` and just run `jekyll serve`. * When you run `bundle exec jekyll serve`, Bundler uses the gems and versions as specified in `Gemfile.lock` to ensure your Jekyll site builds with no compatibility or dependency conflicts. ## Options for creating a new site with Jekyll `jekyll new <PATH>` installs a new Jekyll site at the path specified (relative to current directory). In this case, Jekyll will be installed in a directory called `myblog`. Here are some additional details: * To install the Jekyll site into the directory you're currently in, run `jekyll new .` If the existing directory isn't empty, you can pass the `--force` option with `jekyll new . --force`. * `jekyll new` automatically initiates `bundle install` to install the dependencies required. (If you don't want Bundler to install the gems, use `jekyll new myblog --skip-bundle`.) * By default, the Jekyll site installed by `jekyll new` uses a gem-based theme called [Minima](https://github.com/jekyll/minima). With [gem-based themes](../themes), some of the directories and files are stored in the theme-gem, hidden from your immediate view. * We recommend setting up Jekyll with a gem-based theme but if you want to start with a blank slate, use `jekyll new myblog --blank` * To learn about other parameters you can include with `jekyll new`, type `jekyll new --help`. When in doubt, use the <code>help</code> command to remind you of all available options and usage, it also works with the <code>new</code>, <code>build</code> and <code>serve</code> subcommands, e.g. <code>jekyll help new</code> or <code>jekyll help build</code>. {: .note .info } ## Next steps Building a Jekyll site with the default theme is just the first step. The real magic happens when you start creating blog posts, using the front matter to control templates and layouts, and taking advantage of all the awesome configuration options Jekyll makes available.
# REAutoComplete [![CI Status](http://img.shields.io/travis/Rinat Enikeev/REAutoComplete.svg?style=flat)](https://travis-ci.org/rinat-enikeev/REAutoComplete) [![Version](https://img.shields.io/cocoapods/v/REAutoComplete.svg?style=flat)](http://cocoapods.org/pods/REAutoComplete) [![License](https://img.shields.io/cocoapods/l/REAutoComplete.svg?style=flat)](http://cocoapods.org/pods/REAutoComplete) [![Platform](https://img.shields.io/cocoapods/p/REAutoComplete.svg?style=flat)](http://cocoapods.org/pods/REAutoComplete) UITextField category to add autocomplete suggestions in a UITableView. ## Usage Adapt REAutoCompleteItem protocol: ````objc #import <REAutoComplete/REAutoComplete.h> @interface NSString (REAutoCompleteItem) <REAutoCompleteItem> @end @implementation NSString (REAutoCompleteItem) - (NSString*)autoCompleteText { return self; } @end ```` DataSource based: ````objc #import <REAutoComplete/REAutoComplete.h> - (void)viewDidLoad { [super viewDidLoad]; self.textField.autoComplete.dataSource = self; self.textField.autoComplete.delegate = self; } #pragma mark <REAutoCompleteDataSource> - (void)autoComplete:(REAutoComplete*)autoComplete suggestionsFor:(NSString*)query whenReady:(void (^)(NSArray<id<REAutoCompleteItem>>* suggestions))callback { callback(@[@"suggestion"]); } ```` Algorithm based: ````objc #import <REAutoComplete/REAutoComplete.h> - (void)viewDidLoad { [super viewDidLoad]; id<REAutoCompleteAlgorithm> algorithm = <algorithm>; self.textField.autoComplete.algorithm = algorithm; self.textField.autoComplete.delegate = self; } ```` ## Installation REAutoComplete is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: ```ruby pod 'REAutoComplete' ``` ## Author Rinat Enikeev, http://rinat-enikeev.github.io ## License REAutoComplete is available under the MIT license. See the LICENSE file for more info.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using kinectApp.Utilities; namespace kinectApp.Entities { public interface IScene { List<IEntity> Entities { get; } string Name { get; } void HandleKeys(InputHelper aInputHelper, ISceneManager aSceneManager); } /* Defines a list of entities for the Entity Manager to load in when required. Would define parts of game - Menu / Game / HighScores / GameOver etc */ public abstract class Scene : IScene { private string _name; private List<IEntity> _entites; public Scene(string aName) { _name = aName; _entites = new List<IEntity>(); } public List<IEntity> Entities { get { return _entites; } } public string Name { get { return _name; } } public abstract void HandleKeys(InputHelper aInputHelper, ISceneManager aSceneManager); } }
'unit tests'; module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './src', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['mocha', 'chai', 'sinon', 'browserify'], browserify: { debug: true, transform: ['browserify-shim'], plugin: ['stringify'] }, // list of files / patterns to load in the browser files: [ '../test/**/*Test.js', {pattern: '**/*.js', included: false, load: false}, {pattern: '../test/**/*Test.js', included: false, load: false}, ], // list of files to exclude exclude: [ 'gulpfile.js' ], // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { '../test/**/*Test.js': ['browserify'] }, // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter reporters: ['mocha'], // web server port port: 9876, // enable / disable colors in the output (reporters and logs) colors: true, // level of logging // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG logLevel: config.LOG_INFO, // enable / disable watching file and executing tests whenever any file changes autoWatch: false, // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher browsers: ['Chrome'], // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits singleRun: true, // capture console.log client: { captureConsole: true } }); };
steps-bash-script ================= Saves it's input as a bash file and runs it. Roll your own, custom bash scripts with this Bitrise Step! This Step is part of the [Open StepLib](http://www.steplib.com/), you can find its StepLib page [here](http://www.steplib.com/step/bash-script-runner) ## Input: - Check the `step.yml` file. ## Notes: - instead of `__INPUT_FILE__` you should now use the new `content` input to define the content of the script. - **DEPRECATED** `__INPUT_FILE__` is a special Bitrise input. Bitrise will write the value into a file and provide the file's path for the Step instead of providing the value directly.
class TokyoMetro::Factory::Convert::Customize::Api::TrainTimetable::RomanceCar::Info < TokyoMetro::Factory::Convert::Common::Api::MetaClass::TrainInfos::RomanceCar::Info end
#!/usr/bin/env python # -*- coding: utf-8 -*- """ make_loaddata.py Convert ken_all.csv to loaddata """ import argparse import csv def merge_separated_line(args): """ yields line yields a line. if two (or more) lines has same postalcode, merge them. """ def is_dup(line, buff): """ lines is duplicated or not """ # same postalcode if line[2] != buff[2]: return False # include choume and not if line[11] != buff[11]: return False # line contains touten(kana) if line[5].count(u'、') != 0: return True if buff[5].count(u'、') != 0: return True # line contains touten(kanji) if line[8].count(u'、') != 0: return True if buff[8].count(u'、') != 0: return True return False def merge(line, buff): """ merge address of two lines """ new_buff = [] idx = 0 for element in line: if element[:len(buff[idx])] != buff[idx]: new_buff.append(u''.join([buff[idx], element])) else: new_buff.append(buff[idx]) idx += 1 return new_buff line_buffer = [] ken_all = csv.reader(open(args.source)) for line in ken_all: unicode_line = [unicode(s, 'utf8') for s in line] if not(line_buffer): line_buffer = unicode_line continue if is_dup(unicode_line, line_buffer): line_buffer = merge(unicode_line, line_buffer) else: yield line_buffer line_buffer = unicode_line yield line_buffer def parse_args(): # parse aruguments Parser = argparse.ArgumentParser(description='Make loaddata of postalcode.') Parser.add_argument('source', help='input file of converting') Parser.add_argument('area', help='data file for area-code') Parser.add_argument('net', help='data file of net-code') return Parser.parse_args() def main(args): # converting main Areadata = csv.writer(open(args.area, 'w'), delimiter=',', quoting=csv.QUOTE_NONE) Netdata = csv.writer(open(args.net, 'w'), delimiter=',', quoting=csv.QUOTE_NONE) for line in merge_separated_line(args): zipcode = line[2] if zipcode[5:7] != '00': Areadata.writerow([s.encode('utf8') for s in line]) else: Netdata.writerow([s.encode('utf8') for s in line]) if __name__ == '__main__': args = parse_args() main(args)
package main.java.srm149; import java.util.HashSet; import java.util.Set; /* * SRM 149 DIV I Level 2 * http://community.topcoder.com/stat?c=problem_statement&pm=1331 */ public class MessageMess { private Set<String> _dictionarySet = new HashSet<String>(); public String restore(String[] dictionary, String message) { populateDictionarySet(dictionary); int numAnswers = 0; StringBuilder answer = findPossibleAnswer(0, message, ""); int ansLength = answer.length(); //Find answer if (ansLength > 0 && ansLength < message.length()) { answer = answer.deleteCharAt(ansLength - 1); ansLength = answer.length(); answer = findPossibleAnswer(ansLength, message, answer.toString()); } else if ( ansLength > 0) { //Find multiple answers numAnswers++; StringBuilder alternative = new StringBuilder(answer.substring(0, answer.indexOf(" "))); ansLength = alternative.length(); alternative = findPossibleAnswer(ansLength, message, alternative.toString()); if (alternative.length() >= message.length()) { numAnswers++; } } if(numAnswers > 1) { answer = new StringBuilder("AMBIGUOUS!"); } else if(answer.length() == 0 || answer.length() < message.length()) { answer = new StringBuilder("IMPOSSIBLE!"); } else { answer.deleteCharAt(answer.length() - 1); } return answer.toString(); } private StringBuilder findPossibleAnswer(int startIndex, String message, String prefix) { StringBuilder possibleWord = new StringBuilder(prefix); StringBuilder answer = new StringBuilder(); for(int i = startIndex; i < message.length(); i++) { possibleWord.append(message.charAt(i)); if(_dictionarySet.contains(possibleWord.toString())) { answer.append(possibleWord).append(" "); possibleWord.delete(0, possibleWord.length()); } } return answer; } private void populateDictionarySet(String[] array) { for(int i = 0; i < array.length; i++) { _dictionarySet.add(array[i]); } } }
package seedu.taskboss.logic.commands; import java.util.Arrays; import java.util.HashSet; import java.util.Set; /** * Finds and lists all tasks in TaskBoss whose name contains any of the argument keywords. * Keyword matching is case sensitive. */ public class FindCommand extends Command { private static final String ALL_WHITESPACE = "\\s+"; public static final String COMMAND_WORD = "find"; public static final String COMMAND_WORD_SHORT = "f"; public static final String MESSAGE_USAGE = COMMAND_WORD + "/" + COMMAND_WORD_SHORT + ": Finds all tasks with names or information containing any of " + "the specified keywords (case-sensitive),\n" + " or with dates specified in any of following formats" + " e.g 28 / Feb / Feb 28 / Feb 28, 2017,\n" + " and displays them in a list.\n" + "Parameters: NAME AND INFORMATION KEYWORDS or sd/START_DATE or ed/END_DATE \n" + "Example: " + COMMAND_WORD + " meeting" + " || " + COMMAND_WORD_SHORT + " sd/march 19"; private static final String TYPE_KEYWORDS = "keywords"; private static final String TYPE_START_DATE = "startDate"; private static final String TYPE_END_DATE = "endDate"; private final String keywords; private final String type; //@@author A0147990R public FindCommand(String type, String keywords) { this.type = type; this.keywords = keywords; } @Override public CommandResult execute() { switch(type) { case TYPE_KEYWORDS: String[] keywordsList = keywords.split(ALL_WHITESPACE); final Set<String> keywordSet = new HashSet<String>(Arrays.asList(keywordsList)); model.updateFilteredTaskListByKeywords(keywordSet); return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size())); case TYPE_START_DATE: model.updateFilteredTaskListByStartDateTime(keywords); return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size())); case TYPE_END_DATE: model.updateFilteredTaskListByEndDateTime(keywords); return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size())); default: return null; //will never reach here } } }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package autoescola.view; import autoescola.controleDao.ControleLogin; import autoescola.controleDao.ControleVeiculo; import autoescola.modelo.bean.Veiculo; /** * * @author felipe */ public class TelaCadastroVeiculo extends javax.swing.JDialog { /** * Creates new form TelaCadastroVeiculo */ private final ControleLogin controleLogin = new ControleLogin(); private final ControleVeiculo controleVeiculo = new ControleVeiculo(); public TelaCadastroVeiculo(java.awt.Frame parent, boolean modal, int id) { super(parent, modal); initComponents(); editar(id); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel7 = new javax.swing.JLabel(); jtUsario = new javax.swing.JTabbedPane(); jPanel10 = new javax.swing.JPanel(); jLabel11 = new javax.swing.JLabel(); jLabel16 = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); jLabel18 = new javax.swing.JLabel(); txtPlaca = new javax.swing.JFormattedTextField(); txtAno = new javax.swing.JFormattedTextField(); bntCadastrarVeiculo = new javax.swing.JPanel(); lblCadastrarEditar = new javax.swing.JLabel(); jSCapacidade = new javax.swing.JSpinner(); txtModelo = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(144, 180, 242)); jLabel7.setFont(new java.awt.Font("Ubuntu", 1, 24)); // NOI18N jLabel7.setForeground(new java.awt.Color(254, 254, 254)); jLabel7.setText("Veículo"); jtUsario.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jtUsarioMouseClicked(evt); } }); jPanel10.setBackground(new java.awt.Color(254, 254, 254)); jLabel11.setText("Placa"); jLabel16.setText("Modelo"); jLabel17.setText("Capacidade"); jLabel18.setText("Ano"); try { txtPlaca.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("AAA-####"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } try { txtAno.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("####"))); } catch (java.text.ParseException ex) { ex.printStackTrace(); } bntCadastrarVeiculo.setBackground(new java.awt.Color(28, 181, 165)); bntCadastrarVeiculo.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); bntCadastrarVeiculo.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { bntCadastrarVeiculoMouseClicked(evt); } }); lblCadastrarEditar.setBackground(new java.awt.Color(254, 254, 254)); lblCadastrarEditar.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N lblCadastrarEditar.setForeground(new java.awt.Color(254, 254, 254)); lblCadastrarEditar.setText("Cadastrar veiculo"); javax.swing.GroupLayout bntCadastrarVeiculoLayout = new javax.swing.GroupLayout(bntCadastrarVeiculo); bntCadastrarVeiculo.setLayout(bntCadastrarVeiculoLayout); bntCadastrarVeiculoLayout.setHorizontalGroup( bntCadastrarVeiculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bntCadastrarVeiculoLayout.createSequentialGroup() .addGap(13, 13, 13) .addComponent(lblCadastrarEditar) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); bntCadastrarVeiculoLayout.setVerticalGroup( bntCadastrarVeiculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bntCadastrarVeiculoLayout.createSequentialGroup() .addContainerGap() .addComponent(lblCadastrarEditar) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jSCapacidade.setModel(new javax.swing.SpinnerNumberModel(1, 1, null, 1)); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel10Layout.createSequentialGroup() .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(244, 244, 244)) .addComponent(txtPlaca) .addComponent(jLabel11) .addGroup(jPanel10Layout.createSequentialGroup() .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(txtAno, javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addComponent(jLabel16) .addGap(168, 168, 168)) .addComponent(txtModelo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel17) .addComponent(jSCapacidade, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(bntCadastrarVeiculo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel10Layout.setVerticalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addGap(17, 17, 17) .addComponent(jLabel11) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtPlaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel16) .addComponent(jLabel17)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtModelo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jSCapacidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(25, 25, 25) .addComponent(jLabel18) .addGap(18, 18, 18) .addComponent(txtAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE) .addComponent(bntCadastrarVeiculo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jtUsario.addTab("Dados do veiculo", jPanel10); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel7) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jtUsario)) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jtUsario, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); setBounds(0, 0, 713, 480); }// </editor-fold>//GEN-END:initComponents private void editar(int id) { if (id != 0) { Veiculo veiculo = controleVeiculo.getVeiculo(id); txtPlaca.setText(veiculo.getPlaca()); jSCapacidade.setValue(veiculo.getCapacidade()); txtModelo.setText(veiculo.getModelo()); txtAno.setText(veiculo.getAno()); lblCadastrarEditar.setText("Editar veículo"); } } private void bntCadastrarVeiculoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_bntCadastrarVeiculoMouseClicked Veiculo veiculo = new Veiculo(); veiculo.setPlaca(txtPlaca.getText()); float capacidade = Float.parseFloat(jSCapacidade.getValue().toString()); veiculo.setCapacidade(capacidade); veiculo.setModelo(txtModelo.getText()); veiculo.setAno(txtAno.getText()); if (controleVeiculo.isEditar()) { boolean res = controleVeiculo.editarVeiculo(veiculo); if (res) { lblCadastrarEditar.setText("Editar Veiculo"); //verificarTela(); } } else { veiculo.setStatus(true); boolean res = controleVeiculo.cadastrarVeiculo(veiculo); if (res) { lblCadastrarEditar.setText("Editar Veiculo"); //verificarTela(); } } }//GEN-LAST:event_bntCadastrarVeiculoMouseClicked private void jtUsarioMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtUsarioMouseClicked }//GEN-LAST:event_jtUsarioMouseClicked /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(TelaCadastroVeiculo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(TelaCadastroVeiculo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(TelaCadastroVeiculo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(TelaCadastroVeiculo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { TelaCadastroVeiculo dialog = new TelaCadastroVeiculo(new javax.swing.JFrame(), true, 0); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel bntCadastrarVeiculo; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel17; private javax.swing.JLabel jLabel18; private javax.swing.JLabel jLabel7; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel10; private javax.swing.JSpinner jSCapacidade; private javax.swing.JTabbedPane jtUsario; private javax.swing.JLabel lblCadastrarEditar; private javax.swing.JFormattedTextField txtAno; private javax.swing.JTextField txtModelo; private javax.swing.JFormattedTextField txtPlaca; // End of variables declaration//GEN-END:variables }
#pragma once #include "def.h" class fsm :public boost::enable_shared_from_this<fsm> { std::map<string,ptr_state_unit> m_stateunitmap; void* m_userdata; // room , game_user , user...... ptr_state_unit m_curstateunit; public: fsm(); ~fsm(); void add(string arg_name, ptr_state_unit arg_state_unit) { m_stateunitmap.insert(std::map<string, ptr_state_unit>::value_type(arg_name, arg_state_unit)); } void addrule(int arg_condition ,string arg_prestate, string arg_curstate) // ÀÌÀü ½ºÅ×ÀÌÆ® - > ÀÌÈÄ ½ºÅ×ÀÌÆ®c { } void addevent(string arg_state, boost::function<void(string)> arg_handler) // ½ºÅ×ÀÌÆ® º¯°æ½Ã { } void start(string arg_statename); void transition(string arg_statename); void update(float deltatime); };
require File.dirname(__FILE__) + '/../spec_helper' describe ProjectsController, "spam" do let(:spammer_content) { p = Project.make! p.user.update_attributes(spammer: true) p } let(:flagged_content) { p = Project.make! Flag.make!(flaggable: p, flag: Flag::SPAM) p } it "should render 403 when the owner is a spammer" do get :show, id: spammer_content.id expect(response.response_code).to eq 403 end it "should render 403 when content is flagged as spam" do get :show, id: spammer_content.id expect(response.response_code).to eq 403 end end describe ProjectsController, "add" do let(:user) { User.make! } let(:project_user) { ProjectUser.make!(user: user) } let(:project) { project_user.project } before do sign_in user end it "should add to the project" do o = Observation.make!(user: user) post :add, id: project.id, observation_id: o.id o.reload expect( o.projects ).to include(project) end it "should set the project observation's user_id" do o = Observation.make!(user: user) post :add, id: project.id, observation_id: o.id o.reload expect( o.projects ).to include(project) expect( o.project_observations.last.user_id ).to eq user.id end end describe ProjectsController, "join" do let(:user) { User.make! } let(:project) { Project.make! } before do sign_in user end it "should create a project user" do post :join, id: project.id expect( project.project_users.where(user_id: user.id).count ).to eq 1 end it "should accept project user parameters" do post :join, id: project.id, project_user: {preferred_updates: false} pu = project.project_users.where(user_id: user.id).first expect( pu ).not_to be_prefers_updates end end describe ProjectsController, "leave" do let(:user) { User.make! } let(:project) { Project.make! } before do sign_in user end it "should destroy the project user" do pu = ProjectUser.make!(user: user, project: project) delete :leave, id: project.id expect( ProjectUser.find_by_id(pu.id) ).to be_blank end describe "routes" do it "should accept DELETE requests" do expect(delete: "/projects/#{project.slug}/leave").to be_routable end end end describe ProjectsController, "search" do elastic_models( Project, Place ) describe "for site with a place" do let(:place) { make_place_with_geom } before { Site.default.update_attributes(place_id: place.id) } it "should filter by place" do with_place = Project.make!(place: place) without_place = Project.make!(title: "#{with_place.title} without place") response_json = <<-JSON { "results": [ { "record": { "id": #{with_place.id} } } ] } JSON stub_request(:get, /#{INatAPIService::ENDPOINT}/).to_return( status: 200, body: response_json, headers: { "Content-Type" => "application/json" } ) get :search, q: with_place.title expect( assigns(:projects) ).to include with_place expect( assigns(:projects) ).not_to include without_place end it "should allow removal of the place filter" do with_place = Project.make!(place: place) without_place = Project.make!(title: "#{with_place.title} without place") response_json = <<-JSON { "results": [ { "record": { "id": #{with_place.id} } }, { "record": { "id": #{without_place.id} } } ] } JSON stub_request(:get, /#{INatAPIService::ENDPOINT}/).to_return( status: 200, body: response_json, headers: { "Content-Type" => "application/json" } ) get :search, q: with_place.title, everywhere: true expect( assigns(:projects) ).to include with_place expect( assigns(:projects) ).to include without_place end end end describe ProjectsController, "update" do let(:project) { Project.make! } let(:user) { project.user } elastic_models( Observation ) before { sign_in user } it "should work for the owner" do put :update, id: project.id, project: {title: "the new title"} project.reload expect( project.title ).to eq "the new title" end it "allows bioblitz project to turn on aggregation" do project.update_attributes(place: make_place_with_geom) expect( project ).to be_aggregation_allowed expect( project ).not_to be_prefers_aggregation put :update, id: project.id, project: { prefers_aggregation: true } project.reload # still not allowed to aggregate since it's not a Bioblitz project expect( project ).not_to be_prefers_aggregation put :update, id: project.id, project: { prefers_aggregation: true, project_type: Project::BIOBLITZ_TYPE, start_time: 5.minutes.ago, end_time: Time.now } project.reload expect( project ).to be_prefers_aggregation end it "should not allow a non-curator to turn on observation aggregation" do project.update_attributes(place: make_place_with_geom) expect( project ).to be_aggregation_allowed expect( project ).not_to be_prefers_aggregation put :update, id: project.id, project: {prefers_aggregation: true} project.reload expect( project ).not_to be_prefers_aggregation end it "should not allow a non-curator to turn off observation aggregation" do project.update_attributes(place: make_place_with_geom, prefers_aggregation: true) expect( project ).to be_aggregation_allowed expect( project ).to be_prefers_aggregation put :update, id: project.id, project: {prefers_aggregation: false} project.reload expect( project ).to be_prefers_aggregation end end describe ProjectsController, "destroy" do let( :project ) { Project.make! } before do sign_in project.user end it "should not actually destroy the project" do delete :destroy, id: project.id expect( Project.find_by_id( project.id ) ).not_to be_blank end it "should queue a job to destroy the project" do delete :destroy, id: project.id expect( Delayed::Job.where("handler LIKE '%sane_destroy%'").count ).to eq 1 expect( Delayed::Job.where("unique_hash = '{:\"Project::sane_destroy\"=>#{project.id}}'"). count ).to eq 1 end end
const FeedParser = require("feedparser"); const request = require("request"); const Promise = require("bluebird"); const flatten = require("lodash").flatten; const nodemailer = require("nodemailer"); const cfg = require("dotenv").config(); const readUrls = require("./urls.json"); const EMAIL_OPTIONS = { host: "smtp.gmail.com", port: 465, secure: true, auth: { user: cfg.EMAIL, pass: cfg.APP_PASS } }; const urls = Object.keys(readUrls).filter((url) => readUrls[url]); Promise.map(urls, (url) => { return new Promise((resolve, reject) => { const items = []; const req = request(url); const feeder = new FeedParser(); req.on("error", reject); req.on('response', function (res) { if (res.statusCode != 200) return reject(new Error("Something went wrong.")); res.pipe(feeder); }); feeder.on("error", reject); feeder.on("readable", function () { let item; while (item = this.read()) { items.push(item); } }); feeder.on("end", () => { return resolve(items.map((item) => { return { title: item.title, link: item.link }; })); }); }); }).then(flatten).then(email).catch(console.error); function email(items) { const transporter = nodemailer.createTransport(EMAIL_OPTIONS); const mail = { from: cfg.EMAIL, to: cfg.EMAIL, subject: "New Craigslist Finds", html: items.map((item) => `<a href=${item.link}>${item.title}</a>`).join("<br /><br />") }; transporter.sendMail(mail, (err, info) => { if (err) { return console.error(err); } console.log("Mail Sent: " + info.response); }); }
/* * -╥⌐⌐⌐⌐ -⌐⌐⌐⌐- * ≡╢░░░░⌐\░░░φ ╓╝░░░░⌐░░░░╪╕ * ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q * ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣ * ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒ * ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å * ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝` * ``˚¬ ⌐ ˚˚⌐´ * * Copyright © 2016 Flipkart.com */ package com.flipkart.connekt.boot import com.flipkart.connekt.busybees.BusyBeesBoot import com.flipkart.connekt.firefly.FireflyBoot import com.flipkart.connekt.receptors.ReceptorsBoot import com.flipkart.connekt.barklice.BarkLiceBoot import com.flipkart.connekt.commons.utils.NetworkUtils object Boot extends App { println( """ | dP dP | 88 88 |.d8888b. .d8888b. 88d888b. 88d888b. .d8888b. 88 .dP d8888P |88' `"" 88' `88 88' `88 88' `88 88ooood8 88888" 88 |88. ... 88. .88 88 88 88 88 88. ... 88 `8b. 88 |`88888P' `88888P' dP dP dP dP `88888P' dP `YP dP """.stripMargin) println("Hello " + NetworkUtils.getHostname + "\n") if (args.length < 1) { println(usage) } else { val command = args.head.toString command match { case "receptors" => sys.addShutdownHook(ReceptorsBoot.terminate()) ReceptorsBoot.start() case "busybees" => sys.addShutdownHook(BusyBeesBoot.terminate()) BusyBeesBoot.start() case "firefly" => sys.addShutdownHook(FireflyBoot.terminate()) FireflyBoot.start() case "barklice" => sys.addShutdownHook(BarkLiceBoot.terminate()) BarkLiceBoot.start case _ => println(usage) } } private def usage: String = { """ |Invalid Command. See Usage | |Usage : AppName (receptors | busybees | firefly) """.stripMargin } }
const {Scene, Sprite} = spritejs; const container = document.getElementById('stage'); const scene = new Scene({ container, width: 1200, height: 600, // contextType: '2d', }); const layer = scene.layer(); (async function () { const sprite = new Sprite({ anchor: 0.5, bgcolor: 'red', pos: [500, 300], size: [200, 200], borderRadius: 50, }); layer.append(sprite); await sprite.transition(2.0) .attr({ bgcolor: 'green', width: width => width + 100, }); await sprite.transition(1.0) .attr({ bgcolor: 'orange', height: height => height + 100, }); }());
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.IO; using System.Linq; using System.Threading.Tasks; using AutoRest.Core; using AutoRest.Core.ClientModel; using AutoRest.Core.Utilities; using AutoRest.Extensions; using AutoRest.Ruby.TemplateModels; using AutoRest.Ruby.Templates; namespace AutoRest.Ruby { /// <summary> /// A class with main code generation logic for Ruby. /// </summary> public class RubyCodeGenerator : CodeGenerator { /// <summary> /// Name of the generated sub-folder inside ourput directory. /// </summary> private const string GeneratedFolderName = "generated"; /// <summary> /// The name of the SDK. Determined in the following way: /// if the parameter 'Name' is provided that it becomes the /// name of the SDK, otherwise the name of input swagger is converted /// into Ruby style and taken as name. /// </summary> protected readonly string sdkName; /// <summary> /// The name of the package version to be used in creating a version.rb file /// </summary> protected readonly string packageVersion; /// <summary> /// The name of the package name to be used in creating a version.rb file /// </summary> protected readonly string packageName; /// <summary> /// Relative path to produced SDK files. /// </summary> protected readonly string sdkPath; /// <summary> /// Relative path to produced SDK model files. /// </summary> protected readonly string modelsPath; /// <summary> /// A code namer instance (object which is responsible for correct files/variables naming). /// </summary> protected RubyCodeNamer CodeNamer { get; private set; } /// <summary> /// Initializes a new instance of the class RubyCodeGenerator. /// </summary> /// <param name="settings">The settings.</param> public RubyCodeGenerator(Settings settings) : base(settings) { CodeNamer = new RubyCodeNamer(); this.packageVersion = Settings.PackageVersion; this.packageName = Settings.PackageName; if (Settings.CustomSettings.ContainsKey("Name")) { this.sdkName = Settings.CustomSettings["Name"].ToString(); } if (sdkName == null) { this.sdkName = Path.GetFileNameWithoutExtension(Settings.Input); } if (sdkName == null) { sdkName = "client"; } this.sdkName = RubyCodeNamer.UnderscoreCase(CodeNamer.RubyRemoveInvalidCharacters(this.sdkName)); this.sdkPath = this.packageName ?? this.sdkName; this.modelsPath = Path.Combine(this.sdkPath, "models"); // AutoRest generated code for Ruby and Azure.Ruby generator will live inside "generated" sub-folder settings.OutputDirectory = Path.Combine(settings.OutputDirectory, GeneratedFolderName); } /// <summary> /// Gets the name of code generator. /// </summary> public override string Name { get { return "Ruby"; } } /// <summary> /// Gets the brief description of the code generator. /// </summary> public override string Description { get { return "Generic Ruby code generator."; } } /// <summary> /// Gets the brief instructions required to complete before using the code generator. /// </summary> public override string UsageInstructions { get { return "The \"gem 'ms_rest' ~> 0.6\" is required for working with generated code."; } } /// <summary> /// Gets the file extension of the generated code files. /// </summary> public override string ImplementationFileExtension { get { return ".rb"; } } /// <summary> /// Normalizes client model by updating names and types to be language specific. /// </summary> /// <param name="serviceClient"></param> public override void NormalizeClientModel(ServiceClient serviceClient) { SwaggerExtensions.NormalizeClientModel(serviceClient, Settings); PopulateAdditionalProperties(serviceClient); CodeNamer.NormalizeClientModel(serviceClient); CodeNamer.ResolveNameCollisions(serviceClient, Settings.Namespace, Settings.Namespace + "::Models"); } /// <summary> /// Adds special properties to the service client (e.g. credentials). /// </summary> /// <param name="serviceClient">The service client.</param> private void PopulateAdditionalProperties(ServiceClient serviceClient) { if (Settings.AddCredentials) { if (!serviceClient.Properties.Any(p => p.Type.IsPrimaryType(KnownPrimaryType.Credentials))) { serviceClient.Properties.Add(new Property { Name = "Credentials", Type = new PrimaryType(KnownPrimaryType.Credentials), IsRequired = true, Documentation = "Subscription credentials which uniquely identify client subscription." }); } } } /// <summary> /// Generates Ruby code for service client. /// </summary> /// <param name="serviceClient">The service client.</param> /// <returns>Async task for generating SDK files.</returns> public override async Task Generate(ServiceClient serviceClient) { // Service client var serviceClientTemplate = new ServiceClientTemplate { Model = new ServiceClientTemplateModel(serviceClient), }; await Write(serviceClientTemplate, Path.Combine(sdkPath, RubyCodeNamer.UnderscoreCase(serviceClient.Name) + ImplementationFileExtension)); // Method groups foreach (var group in serviceClient.MethodGroups) { var groupTemplate = new MethodGroupTemplate { Model = new MethodGroupTemplateModel(serviceClient, group), }; await Write(groupTemplate, Path.Combine(sdkPath, RubyCodeNamer.UnderscoreCase(group) + ImplementationFileExtension)); } // Models foreach (var model in serviceClient.ModelTypes) { var modelTemplate = new ModelTemplate { Model = new ModelTemplateModel(model, serviceClient.ModelTypes) }; await Write(modelTemplate, Path.Combine(modelsPath, RubyCodeNamer.UnderscoreCase(model.Name) + ImplementationFileExtension)); } // Enums foreach (var enumType in serviceClient.EnumTypes) { var enumTemplate = new EnumTemplate { Model = new EnumTemplateModel(enumType), }; await Write(enumTemplate, Path.Combine(modelsPath, RubyCodeNamer.UnderscoreCase(enumTemplate.Model.TypeDefinitionName) + ImplementationFileExtension)); } // Requirements var requirementsTemplate = new RequirementsTemplate { Model = new RequirementsTemplateModel(serviceClient, this.packageName ?? this.sdkName, this.ImplementationFileExtension, this.Settings.Namespace), }; await Write(requirementsTemplate, RubyCodeNamer.UnderscoreCase(this.packageName ?? this.sdkName) + ImplementationFileExtension); // Version File if (!string.IsNullOrEmpty(this.packageVersion)) { var versionTemplate = new VersionTemplate { Model = new VersionTemplateModel(packageVersion), }; await Write(versionTemplate, Path.Combine(sdkPath, "version" + ImplementationFileExtension)); } // Module Definition File if (!string.IsNullOrEmpty(Settings.Namespace)) { var modTemplate = new ModuleDefinitionTemplate { Model = new ModuleDefinitionTemplateModel(Settings.Namespace), }; await Write(modTemplate, Path.Combine(sdkPath, "module_definition" + ImplementationFileExtension)); } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AcademyRPG { class Ninja:Character,IGatherer,IFighter { private int attackPointsCount; public Ninja(string name, Point position,int owner) : base(name, position, owner) { HitPoints = 1; attackPointsCount = 0; } public int AttackPoints { get { return attackPointsCount; } } public int DefensePoints { get { return int.MaxValue; } } public int GetTargetIndex(List<WorldObject> availableTargets) { int maxHitPointsIndex = -1; for (int i = 0; i < availableTargets.Count; i++) { if (availableTargets[i].Owner != this.Owner && availableTargets[i].Owner != 0) { if (maxHitPointsIndex == -1 || availableTargets[maxHitPointsIndex].HitPoints < availableTargets[i].HitPoints) { maxHitPointsIndex = i; } } } return maxHitPointsIndex; } public bool TryGather(IResource resource) { if (resource.Type == ResourceType.Stone) { attackPointsCount += resource.Quantity * 2; } else { attackPointsCount += resource.Quantity; } return true; } } }
#include "learnuv.h" int main() { int err; double uptime; err = uv_uptime(&uptime); CHECK(err, "uv_uptime"); log_info("Uptime: %f", uptime); log_report("Uptime: %f", uptime); size_t resident_set_memory; err = uv_resident_set_memory(&resident_set_memory); CHECK(err, "uv_resident_set_memory"); log_report("RSS: %ld", resident_set_memory); return 0; }
--- layout: page title: Rowe Motors Show date: 2016-05-24 author: Matthew Clarke tags: weekly links, java status: published summary: Vivamus accumsan libero at purus. banner: images/banner/wedding.jpg booking: startDate: 09/28/2018 endDate: 10/01/2018 ctyhocn: FDYOHHX groupCode: RMS published: true --- Ut mollis urna sed erat congue tristique. Maecenas vitae lacus rutrum, laoreet tellus vitae, vestibulum nulla. Etiam nec congue justo. Pellentesque at ipsum orci. In sed nisl ac nulla placerat pellentesque. Proin rhoncus ante et quam tincidunt semper. Fusce volutpat sodales orci sit amet euismod. Duis luctus justo a interdum finibus. Vivamus mollis dui pretium, consectetur ante sed, malesuada nulla. Proin blandit ipsum vel lacinia ornare. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec tincidunt lectus et lectus sodales vehicula. Curabitur lacinia risus turpis, quis gravida dolor ullamcorper sit amet. Morbi vitae neque egestas, faucibus nibh facilisis, ultricies ex. Phasellus in enim et mauris vestibulum convallis in ut erat. Aliquam erat volutpat. Aliquam dignissim dolor ac luctus fringilla. Donec viverra elementum ante, suscipit porta sapien. Sed vel commodo dolor, dignissim sollicitudin felis. Pellentesque tincidunt lorem a posuere faucibus. Phasellus mollis nisl eget faucibus maximus. Sed porttitor semper ultricies. Cras in condimentum ligula. Donec elementum feugiat erat, sit amet tincidunt felis consectetur in. Integer auctor malesuada rhoncus. Morbi id lacus ac nisl placerat consequat in vitae erat. Donec in nisi vel ligula interdum cursus. Vivamus ac facilisis tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * Ut id nibh pretium, porta mauris sed, volutpat eros * Aenean ac augue quis erat molestie volutpat * Mauris nec turpis eget nisl tempor accumsan * Sed sed odio non augue mattis molestie * Duis euismod nibh sit amet turpis dignissim lobortis in eu libero * Proin congue mauris nec sem interdum tempus. Sed feugiat lacus augue, et vulputate quam interdum non. Donec bibendum nunc vel eros interdum viverra. Sed elementum id risus non porttitor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Maecenas nisl tortor, interdum nec sem vel, iaculis feugiat lacus. Sed pretium justo nec augue scelerisque, vitae tincidunt diam consectetur. Mauris rutrum magna at semper venenatis. Nam mollis nunc arcu, sed consectetur lectus tempor vitae.
require 'fn_space/utils' describe FnSpace::Utils do describe 'mod' do it 'creates a object with assign function' do res = FnSpace::Utils.mod.().assign(:q){50}.assign(:w){93} expect(res.q).to eql(50) expect(res.w).to eql(93) end end describe 'struct' do it 'creates a struct from a hash' do res = FnSpace::Utils.struct.(a: 57, b: 6) expect(res.a).to eql(57) end end describe 'apply_send' do it 'creates a lamda that sends a message with paramaters to the first argument' do add_five = FnSpace::Utils.apply_send.(:+, 5) expect(add_five.(9)).to eql(14) end end describe 'chain' do it 'creates a monad' do x = 5 add_one = ->(v) { v + 1 } side_effect = ->(v) { x += 3 } res = FnSpace::Utils.chain.(4) >> add_one << side_effect | :value expect(res).to eql(5) expect(x).to eql(8) end end end
#!/bin/sh set -e if [ -n "${MESOS_HOST}" ]; then if [ -z "${COLLECTD_HOST}" ]; then export COLLECTD_HOST="${MESOS_HOST}" fi fi export GRAPHITE_PORT=${GRAPHITE_PORT:-2003} export GRAPHITE_PREFIX=${GRAPHITE_PREFIX:-collectd.} export COLLECTD_INTERVAL=${COLLECTD_INTERVAL:-10} # Adding a user if needed to be able to communicate with docker GROUP=nobody if [ -e /var/run/docker.sock ]; then GROUP=$(ls -l /var/run/docker.sock | awk '{ print $4 }') fi useradd -g "${GROUP}" collectd-docker-collector exec reefer -t /etc/collectd/collectd.conf.tpl:/tmp/collectd.conf \ collectd -f -C /tmp/collectd.conf "$@" > /dev/null
<?php namespace Jasig; /* * Copyright © 2003-2010, The ESUP-Portail consortium & the JA-SIG Collaborative. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the ESUP-Portail consortium & the JA-SIG * Collaborative nor the names of its contributors may be used to endorse or * promote products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require_once(dirname(__FILE__).'/../Exception.php'); /** * An Exception for problems performing requests */ class CAS_Request_Exception extends \Exception implements CAS_Exception { }
using ICSharpCode.SharpZipLib.Zip.Compression.Streams; using System; using System.Collections.Generic; using System.IO; using System.Text; using U3d = UnityEngine; namespace M2Image { /// <summary> /// WZL(与WZX配套)文件读取工具类 /// </summary> internal sealed class WZL : IDisposable { /// <summary> /// 图片数量 /// </summary> internal int ImageCount { get; private set; } /// <summary> /// 色深度 /// </summary> internal int ColorCount { get; private set; } /// <summary> /// 图片数据起始位置 /// </summary> private int[] OffsetList; /// <summary> /// 图片数据长度 /// </summary> private int[] LengthList; /// <summary> /// 图片描述对象 /// </summary> internal M2ImageInfo[] ImageInfos { get; private set; } /// <summary> /// WIL文件指针 /// </summary> private FileStream FS_wzl; /// <summary> /// 是否成功初始化 /// </summary> internal bool Loaded { get; private set; } /// <summary> /// 文件指针读取锁 /// </summary> private Object wzl_locker = new Object(); internal WZL(String wzlPath) { Loaded = false; ColorCount = 8; if (!File.Exists(Path.ChangeExtension(wzlPath, "wzx"))) return; FileStream fs_wzx = new FileStream(Path.ChangeExtension(wzlPath, "wzx"), FileMode.Open, FileAccess.Read); fs_wzx.Position += 44; // 跳过标题 using (BinaryReader rwzx = new BinaryReader(fs_wzx)) { ImageCount = rwzx.ReadInt32(); OffsetList = new int[ImageCount]; for (int i = 0; i < ImageCount; ++i) { // 读取数据偏移地址 OffsetList[i] = rwzx.ReadInt32(); } } //fs_wzx.Dispose(); FS_wzl = new FileStream(wzlPath, FileMode.Open, FileAccess.Read); using (BinaryReader rwzl = new BinaryReader(FS_wzl)) { ImageInfos = new M2ImageInfo[ImageCount]; LengthList = new int[ImageCount]; for (int i = 0; i < ImageCount; ++i) { // 读取图片信息和数据长度 M2ImageInfo ii = new M2ImageInfo(); FS_wzl.Position = OffsetList[i] + 4; // 跳过4字节未知数据 ii.Width = rwzl.ReadUInt16(); ii.Height = rwzl.ReadUInt16(); ii.OffsetX = rwzl.ReadInt16(); ii.OffsetY = rwzl.ReadInt16(); ImageInfos[i] = ii; LengthList[i] = rwzl.ReadInt32(); } } Loaded = true; } /// <summary> /// 获取某个索引的图片 /// </summary> /// <param name="index">图片索引,从0开始</param> /// <returns>对应图片数据</returns> internal U3d.Texture2D this[uint index] { get { M2ImageInfo ii = ImageInfos[index]; U3d.Texture2D result = new U3d.Texture2D(ii.Width, ii.Height); if (ii.Width == 0 && ii.Height == 0) return result; byte[] pixels = null; lock (wzl_locker) { FS_wzl.Position = OffsetList[index] + 16; using (BinaryReader rwzl = new BinaryReader(FS_wzl)) { pixels = unzip(rwzl.ReadBytes(LengthList[index])); } } int p_index = 0; for (int h = 0; h < ii.Height; ++h) for (int w = 0; w < ii.Width; ++w) { // 跳过填充字节 if (w == 0) p_index += Delphi.SkipBytes(8, ii.Width); float[] pallete = Delphi.PALLETE[pixels[p_index++] & 0xff]; result.SetPixel(w, ii.Height - h, new U3d.Color(pallete[1], pallete[2], pallete[3], pallete[0])); } result.Apply (); return result; } } private byte[] unzip(byte[] ziped) { InflaterInputStream iib = new InflaterInputStream(new MemoryStream(ziped)); MemoryStream o = new MemoryStream(); int i = 1024; byte[] buf = new byte[i]; while ((i = iib.Read(buf, 0, i)) > 0) { o.Write(buf, 0, i); } return o.ToArray(); } public void Dispose() { lock (wzl_locker) { OffsetList = null; ImageInfos = null; Loaded = false; if (FS_wzl != null) { FS_wzl.Dispose(); } } } } }
import webpack from 'webpack'; import path from 'path'; export default { debug: true, devtool: 'cheap-module-eval-source-map', noInfo: false, entry: [ // 'eventsource-polyfill', // necessary for hot reloading with IE 'webpack-hot-middleware/client?reload=true', //note that it reloads the page if hot module reloading fails. './src/index' ], target: 'web', output: { path: __dirname + '/dist', // Note: Physical files are only output by the production build task `npm run build`. publicPath: '/', filename: 'bundle.js' }, devServer: { contentBase: './src' }, plugins: [ new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin() ], module: { loaders: [ {test: /\.js$/, include: path.join(__dirname, 'src'), loaders: ['babel']}, {test: /(\.css)$/, loaders: ['style', 'css']}, {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file"}, {test: /\.(woff|woff2)$/, loader: "url?prefix=font/&limit=5000"}, {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream"}, {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml"} ] } };
h3.fb-album-heading, h3.fb-account-heading { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: inline-block; margin: 0px; margin-left: 10px; font-weight: lighter; color: rgba(59, 89, 152, 1); } h3.fb-album-heading { cursor: pointer; } h3.fb-album-heading-single { cursor: default !important; display:block !important; } ul.fb-albums, ul.fb-photos { list-style: none; list-style-type: none; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; margin: 0px; padding: 0px; min-height:130px; background-image:none; } .fb-loading-image{ background-image:url('loader.gif') !important; background-position: center center; background-repeat:no-repeat; } .fb-loading { background-color: #f7f7f7; border-radius: 6px; width: 64px; height: 64px; background-image: url('loader.gif'); background-position: center center; background-repeat: no-repeat; } li.fb-album, li.fb-photo { display: inline-block; width: 130px; height: 130px; overflow: hidden; padding: 0px; background-color: #f7f7f7; /*margin-top: -4px; margin-bottom: 3px; margin-right: 3px;*/ background-image: url('loader.gif'); background-position: center center; background-repeat: no-repeat; cursor: pointer; border: 1px solid #fff; border-bottom-style: none; } li.fb-photo:hover { /*border:2px solid rgba(59,89,152,1);*/ } li.fb-photo:hover .image-check { display: block; } li.fb-photo .image-check { display: none; position: absolute; width: 25px; height: 25px; background-color: rgba(59,89,152,1); } li.fb-photo .image-check.checked { display: block; background-image: url('check.png'); background-position: left top; background-repeat: no-repeat; } li.fb-album img { display: none; } div.fb-album-title { color: #fff; background-color: rgba(59,89,152,1); position: relative; margin-top: 0px; padding: 5px; display: none; } div.fb-album-count { background-color: rgba(59,89,152,0.8); color: #ffffff; position: absolute; text-align: center; padding: 5px; margin: 6px; display: block; min-width: 34px; border-radius: 5px; } .fb-album-preview { display: none; } .fb-photo-thumb, .fb-photo-thumb-link { border: none; text-decoration: none; } img.fb-albums-list { border: none; display: inline-block; cursor: pointer; margin-bottom: 10px; vertical-align: middle; } .fb-account-info { margin-bottom: 10px; } .fb-account-info img { display: inline-block; vertical-align: middle; } /*Simple lightbox*/ .fb-preview-overlay { background-color: rgba(59, 89, 152, 0.7); position: fixed; top: 0px; left: 0px; z-index: 999; background-image: url('loader.gif'); background-position: center center; background-repeat: no-repeat; width: 100%; height: 100%; text-align: center; overflow: auto; display: none; } .fb-preview-img, .fb-preview-img-prev, .fb-preview-img-next { display: inline-block; vertical-align: middle; } .fb-preview-img { max-width: 100%; width: auto; } .fb-preview-img-prev, .fb-preview-img-next { cursor: pointer; display: none; margin-top: auto; position: fixed; top: 50%; } .fb-preview-img-prev { left: 0; float: left; } .fb-preview-img-next { right: 20px; float: right; } .fb-photo-text { display: none; } .fb-comment-text { display: inline-block; margin-left: 10px; vertical-align: top; width: calc(100% - 60px); } .fb-comment-date { color: #969696; float: right; font-size: 11px; } .fb-comment-more { font-family: "Segoe UI",Tahoma,Geneva,Verdana,sans-serif; color: rgba(59, 89, 152, 1); text-align: center; background-color: #e1e2e3; cursor: pointer; padding: 6px; margin-bottom: 10px; margin-left: auto; margin-right: auto; font-size: 12px; } img.fb-comment-account { display: inline-block; width: 50px; height: 50px; background-image: url('loader.gif'); background-position: center center; background-repeat: no-repeat; } .fb-comment-account { text-decoration: none; color: rgba(59, 89, 152, 1); } .fb-preview-text, .fb-comment, .fb-album-text { display: block; background-color: #e1e2e3; margin-left: auto; margin-right: auto; font-size: 12px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; text-align: left; padding: 6px; display: block; clear: both; } .fb-preview-text .addthis_toolbox{ display:block; margin-top:6px; margin-bottom:6px; } .fb-preview-text, .fb-album-text { display: table !important; clear: both !important; } .fb-album-text { margin-bottom: 6px; width: 100%; } .fb-comment { background-color: #e9eaeb; border-bottom: 1px solid #e1e2e3; width: calc(100% - 60px); } .fb-preview-text a { color: rgba(59, 89, 152, 1); } .fb-preview-content { margin-top: 30px; } .fb-like-container { display: block; float: right; margin-left: 6px; } .fb-btn-more { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-weight: bold; display: block; color: #fff; background: rgba(59, 89, 152, 1); padding: 12px; text-align: center; cursor: pointer; } .fb-albums-more { display: none; }
/******************************************************************************* MIT License Copyright (c) 2017 Jeff Kubascik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ #ifndef __NIXIE_DRIVER_H #define __NIXIE_DRIVER_H /* Includes *******************************************************************/ /* Definitions ****************************************************************/ #define NUM_CNT 3 /* Public function prototypes ************************************************/ void nixieDriver_init(void); void nixieDriver_set(int* vals); #endif /* __NIXIE_DRIVER_H */
// Copyright 2021-2022, University of Colorado Boulder /** * Provides a minimum and preferred width. The minimum width is set by the component, so that layout containers could * know how "small" the component can be made. The preferred width is set by the layout container, and the component * should adjust its size so that it takes up that width. * * @author Jonathan Olson <jonathan.olson@colorado.edu> */ import TinyProperty from '../../../axon/js/TinyProperty.js'; import memoize from '../../../phet-core/js/memoize.js'; import { scenery, Node } from '../imports.js'; import Constructor from '../../../phet-core/js/types/Constructor.js'; const WIDTH_SIZABLE_OPTION_KEYS = [ 'preferredWidth', 'minimumWidth' ]; type WidthSizableSelfOptions = { preferredWidth?: number | null, minimumWidth?: number | null }; const WidthSizable = memoize( <SuperType extends Constructor>( type: SuperType ) => { const clazz = class extends type { preferredWidthProperty: TinyProperty<number | null>; minimumWidthProperty: TinyProperty<number | null>; constructor( ...args: any[] ) { super( ...args ); this.preferredWidthProperty = new TinyProperty<number | null>( null ); this.minimumWidthProperty = new TinyProperty<number | null>( null ); } get preferredWidth(): number | null { return this.preferredWidthProperty.value; } set preferredWidth( value: number | null ) { assert && assert( value === null || ( typeof value === 'number' && isFinite( value ) && value >= 0 ), 'preferredWidth should be null or a non-negative finite number' ); this.preferredWidthProperty.value = value; } get minimumWidth(): number | null { return this.minimumWidthProperty.value; } set minimumWidth( value: number | null ) { assert && assert( value === null || ( typeof value === 'number' && isFinite( value ) ) ); this.minimumWidthProperty.value = value; } // Detection flag for this trait get widthSizable(): boolean { return true; } }; // If we're extending into a Node type, include option keys // TODO: This is ugly, we'll need to mutate after construction, no? if ( type.prototype._mutatorKeys ) { clazz.prototype._mutatorKeys = type.prototype._mutatorKeys.concat( WIDTH_SIZABLE_OPTION_KEYS ); } return clazz; } ); // Some typescript gymnastics to provide a user-defined type guard that treats something as widthSizable const wrapper = () => WidthSizable( Node ); type WidthSizableNode = InstanceType<ReturnType<typeof wrapper>>; const isWidthSizable = ( node: Node ): node is WidthSizableNode => { return node.widthSizable; }; scenery.register( 'WidthSizable', WidthSizable ); export default WidthSizable; export { isWidthSizable }; export type { WidthSizableNode, WidthSizableSelfOptions };
// // Created by admarkov on 09.05.17. // #include "mapping.h" Node* Node::clone(Node* r, Node* p) { if (r==nullptr) r = NodeToItsCopy[root]; Node *n = new Node (p, r, type, data, nullptr, nullptr); NodeToItsCopy[this] = n; CopyToClonedNode[n] = this; if (n->root==nullptr) n->root = n; if (left!=nullptr) n->left = left->clone(r,n); if (right!=nullptr) n->right = right->clone(r,n); return n; }
<a href="https://github.com/yanhaijing/canvaShape"> <img src="./img/logo.gif" width="100px"> </a> #[canvaShape](https://github.com/yanhaijing/canvaShape) ========== 一款用来自存管理和存储绘制到html5 canvas上的图形信息的库,用来解决canvas绘制的图形为位图,不能存储信息
<?php namespace Core\Entity; use Doctrine\ORM\Mapping as ORM; /** * Phone * * @ORM\Table(name="phone", uniqueConstraints={@ORM\UniqueConstraint(name="phone", columns={"phone","ddd","people_id"})}, indexes={@ORM\Index(name="IDX_E7927C743147C936", columns={"people_id"})}) * @ORM\Entity */ class Phone { /** * @var integer * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var integer * * @ORM\Column(name="phone", type="integer", length=10, nullable=false) */ private $phone; /** * @var string * * @ORM\Column(name="ddd", type="integer", length=2, nullable=false) */ private $ddd; /** * @var boolean * * @ORM\Column(name="confirmed", type="boolean", nullable=false) */ private $confirmed = '0'; /** * @var \Core\Entity\People * * @ORM\ManyToOne(targetEntity="Core\Entity\People") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="people_id", referencedColumnName="id") * }) */ private $people; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set ddd * * @param string $ddd * @return Ddd */ public function setDdd($ddd) { $this->ddd = $ddd; return $this; } /** * Get ddd * * @return string */ public function getDdd() { return $this->ddd; } /** * Set phone * * @param string $phone * @return Phone */ public function setPhone($phone) { $this->phone = $phone; return $this; } /** * Get phone * * @return string */ public function getPhone() { return $this->phone; } /** * Set confirmed * * @param boolean $confirmed * @return Phone */ public function setConfirmed($confirmed) { $this->confirmed = $confirmed; return $this; } /** * Get confirmed * * @return boolean */ public function getConfirmed() { return $this->confirmed; } /** * Set people * * @param \Core\Entity\People $people * @return Phone */ public function setPeople(\Core\Entity\People $people = null) { $this->people = $people; return $this; } /** * Get people * * @return \Core\Entity\People */ public function getPeople() { return $this->people; } }
/** * */ package com.zimbra.qa.selenium.framework.util; import java.net.*; import java.util.regex.*; import org.apache.log4j.*; import com.zimbra.common.soap.Element; /** * Represents an 'external' account * * @author Matt Rhoades * */ public class ZimbraExternalAccount extends ZimbraAccount { private static Logger logger = LogManager.getLogger(ZimbraExternalAccount.class); protected URI UrlRegistration = null; protected URI UrlLogin = null; public ZimbraExternalAccount() { logger.info("new "+ ZimbraExternalAccount.class.getCanonicalName()); } public void setEmailAddress(String address) { this.EmailAddress = address; } public void setPassword(String password) { this.Password = password; } /** * Based on the external invitation message, * set both the login and registration URLs for this account * @param GetMsgResponse * @throws HarnessException */ public void setURL(Element GetMsgResponse) throws HarnessException { this.setRegistrationURL(GetMsgResponse); this.setLoginURL(GetMsgResponse); } /** * Based on the external invitation message, extract the login URL * example, https://zqa-062.eng.vmware.com/service/extuserprov/?p=0_46059ce585e90f5d2d5...12e636f6d3b * @param GetMsgResponse */ public void setRegistrationURL(Element GetMsgResponse) throws HarnessException { String content = this.soapClient.selectValue(GetMsgResponse, "//mail:mp[@ct='text/html']//mail:content", null, 1); try { setRegistrationURL(determineRegistrationURL(content)); } catch (URISyntaxException e) { throw new HarnessException("Unable to parse registration URL from ["+ content +"]", e); } } /** * Set the external user's registration URL to the specified URL * @param url */ public void setRegistrationURL(URI url) { this.UrlRegistration = url; } public URI getRegistrationURL() { return (this.UrlRegistration); } /** * Based on the external invitation message, extract the login URL * example, https://zqa-062.eng.vmware.com/?virtualacctdomain=zqa-062.eng.vmware.com * @param GetMsgResponse * @throws HarnessException */ public void setLoginURL(Element GetMsgResponse) throws HarnessException { String content = this.soapClient.selectValue(GetMsgResponse, "//mail:mp[@ct='text/html']//mail:content", null, 1); try { setLoginURL(determineLoginURL(content)); } catch (URISyntaxException e) { throw new HarnessException("Unable to parse registration URL from ["+ content +"]", e); } } /** * Set the external user's login URL to the specified URL * @param url */ public void setLoginURL(URI url) { this.UrlLogin = url; } public URI getLoginURL() { return (this.UrlLogin); } public static final Pattern patternTag = Pattern.compile("(?i)<a([^>]+)>(.+?)</a>"); public static final Pattern patternLink = Pattern.compile("\\s*(?i)href\\s*=\\s*(\"([^\"]*\")|'[^']*'|([^'\">\\s]+))"); /** * Parse the invitation message to grab the registration URL * for the external user * @param content * @return * @throws HarnessException * @throws MalformedURLException * @throws URISyntaxException */ protected URI determineRegistrationURL(String content) throws HarnessException, URISyntaxException { String registrationURL = null; Matcher matcherTag = patternTag.matcher(content); while (matcherTag.find()) { String href = matcherTag.group(1); String text = matcherTag.group(2); logger.info("href: "+ href); logger.info("text: "+ text); Matcher matcherLink = patternLink.matcher(href); while(matcherLink.find()){ registrationURL = matcherLink.group(1); //link if ( registrationURL.startsWith("\"") ) { registrationURL = registrationURL.substring(1); // Strip the beginning " } if ( registrationURL.endsWith("\"") ) { registrationURL = registrationURL.substring(0, registrationURL.length()-1); // Strip the ending " } logger.info("link: "+ registrationURL); return (new URI(registrationURL)); } } throw new HarnessException("Unable to determine the regisration URL from "+ content); } /** * Parse the invitation message to grab the login URL * for the external user * @param content * @return * @throws HarnessException * @throws URISyntaxException */ protected URI determineLoginURL(String content) throws HarnessException, URISyntaxException { // TODO: implement me! return (determineRegistrationURL(content)); } /** * Get the external account for config.properties -> external.yahoo.account * @return the ZimbraExternalAccount */ public static synchronized ZimbraExternalAccount ExternalA() { if ( _ExternalA == null ) { _ExternalA = new ZimbraExternalAccount(); } return (_ExternalA); } private static ZimbraExternalAccount _ExternalA = null; }
package com.github.ysl3000.quantum.impl; import com.github.ysl3000.quantum.QuantumConnectors; import com.github.ysl3000.quantum.impl.circuits.CircuitManager; import com.github.ysl3000.quantum.impl.utils.MessageLogger; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; public class ConfigConverter { private QuantumConnectors plugin; private MessageLogger messageLogger; public ConfigConverter(QuantumConnectors plugin, MessageLogger messageLogger) { this.plugin = plugin; this.messageLogger = messageLogger; } //1.2.3 circuits.yml Converter public void convertOldCircuitsYml() { File oldYmlFile = new File(plugin.getDataFolder(), "circuits.yml"); if (oldYmlFile.exists()) { messageLogger.log(messageLogger.getMessage("found_old_file").replace("%file%", oldYmlFile.getName())); FileConfiguration oldYml = YamlConfiguration.loadConfiguration(oldYmlFile); for (String worldName : oldYml.getValues(false).keySet()) { ArrayList<Map<String, Object>> tempCircuitObjs = new ArrayList<>(); for (int x = 0; ; x++) { String path = worldName + ".circuit_" + x; if (oldYml.get(path) == null) { break; } Map<String, Object> tempCircuitObj = new HashMap<String, Object>(); String[] senderXYZ = oldYml.get(path + ".sender").toString().split(","); tempCircuitObj.put("x", Integer.parseInt(senderXYZ[0])); tempCircuitObj.put("y", Integer.parseInt(senderXYZ[1])); tempCircuitObj.put("z", Integer.parseInt(senderXYZ[2])); //they'll all be the same, should only ever be one anyway String receiversType = oldYml.get(path + ".type").toString(); ArrayList<Map<String, Object>> tempReceiverObjs = new ArrayList<Map<String, Object>>(); for (Object receiver : oldYml.getList(path + ".receivers")) { Map<String, Object> tempReceiverObj = new HashMap<String, Object>(); String[] sReceiverLoc = receiver.toString().split(","); tempReceiverObj.put("x", Integer.parseInt(sReceiverLoc[0])); tempReceiverObj.put("y", Integer.parseInt(sReceiverLoc[1])); tempReceiverObj.put("z", Integer.parseInt(sReceiverLoc[2])); tempReceiverObj.put("d", 0); tempReceiverObj.put("t", Integer.parseInt(receiversType)); tempReceiverObjs.add(tempReceiverObj); } tempCircuitObj.put("r", tempReceiverObjs); tempCircuitObjs.add(tempCircuitObj); } File newYmlFile = new File(plugin.getDataFolder(), worldName + ".circuits.yml"); FileConfiguration newYml = YamlConfiguration.loadConfiguration(newYmlFile); newYml.set("fileVersion", 2); newYml.set("circuits", tempCircuitObjs); try { newYml.save(newYmlFile); } catch (IOException ex) { messageLogger.error(messageLogger.getMessage("unable_to_save").replace("%file%", newYmlFile.getName())); Logger.getLogger(CircuitManager.class.getName()).log(Level.SEVERE, null, ex); } } File testFile = new File(plugin.getDataFolder(), "circuits.yml.bak"); new File(plugin.getDataFolder(), "circuits.yml").renameTo(testFile); } } }
/* * sysctl.h: General linux system control interface * * Begun 24 March 1995, Stephen Tweedie * **************************************************************** **************************************************************** ** ** WARNING: ** The values in this file are exported to user space via ** the sysctl() binary interface. Do *NOT* change the ** numbering of any existing values here, and do not change ** any numbers within any one set of values. If you have to ** redefine an existing interface, use a new number for it. ** The kernel will then return -ENOTDIR to any application using ** the old binary interface. ** **************************************************************** **************************************************************** */ #ifndef _LINUX_SYSCTL_H #define _LINUX_SYSCTL_H #include <linux/list.h> #include <linux/rcupdate.h> #include <linux/wait.h> #include <linux/rbtree.h> /* For the /proc/sys support */ struct ctl_table; struct nsproxy; struct ctl_table_root; struct ctl_table_header; struct ctl_dir; typedef int proc_handler (struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos); extern int proc_dostring(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_dointvec(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_dointvec_minmax(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_dointvec_jiffies(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_doulongvec_minmax(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void __user *, size_t *, loff_t *); extern int proc_do_large_bitmap(struct ctl_table *, int, void __user *, size_t *, loff_t *); /* * Register a set of sysctl names by calling register_sysctl_table * with an initialised array of struct ctl_table's. An entry with * NULL procname terminates the table. table->de will be * set up by the registration and need not be initialised in advance. * * sysctl names can be mirrored automatically under /proc/sys. The * procname supplied controls /proc naming. * * The table's mode will be honoured both for sys_sysctl(2) and * proc-fs access. * * Leaf nodes in the sysctl tree will be represented by a single file * under /proc; non-leaf nodes will be represented by directories. A * null procname disables /proc mirroring at this node. * * sysctl(2) can automatically manage read and write requests through * the sysctl table. The data and maxlen fields of the ctl_table * struct enable minimal validation of the values being written to be * performed, and the mode field allows minimal authentication. * * There must be a proc_handler routine for any terminal nodes * mirrored under /proc/sys (non-terminals are handled by a built-in * directory handler). Several default handlers are available to * cover common cases. */ /* Support for userspace poll() to watch for changes */ struct ctl_table_poll { atomic_t event; wait_queue_head_t wait; }; static inline void *proc_sys_poll_event(struct ctl_table_poll *poll) { return (void *)(unsigned long)atomic_read(&poll->event); } #define __CTL_TABLE_POLL_INITIALIZER(name) { \ .event = ATOMIC_INIT(0), \ .wait = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait) } #define DEFINE_CTL_TABLE_POLL(name) \ struct ctl_table_poll name = __CTL_TABLE_POLL_INITIALIZER(name) /* A sysctl table is an array of struct ctl_table: */ struct ctl_table { const char *procname; /* Text ID for /proc/sys, or zero */ void *data; int maxlen; umode_t mode; struct ctl_table *child; /* Deprecated */ proc_handler *proc_handler; /* Callback for text formatting */ struct ctl_table_poll *poll; void *extra1; void *extra2; }; struct ctl_node { struct rb_node node; struct ctl_table_header *header; }; /* struct ctl_table_header is used to maintain dynamic lists of struct ctl_table trees. */ struct ctl_table_header { union { struct { struct ctl_table *ctl_table; int used; int count; int nreg; }; struct rcu_head rcu; }; struct completion *unregistering; struct ctl_table *ctl_table_arg; struct ctl_table_root *root; struct ctl_table_set *set; struct ctl_dir *parent; struct ctl_node *node; }; struct ctl_dir { /* Header must be at the start of ctl_dir */ struct ctl_table_header header; struct rb_root root; }; struct ctl_table_set { int (*is_seen)(struct ctl_table_set *); struct ctl_dir dir; }; struct ctl_table_root { struct ctl_table_set default_set; struct ctl_table_set *(*lookup)(struct ctl_table_root *root, struct nsproxy *namespaces); int (*permissions)(struct ctl_table_header *head, struct ctl_table *table); }; /* struct ctl_path describes where in the hierarchy a table is added */ struct ctl_path { const char *procname; }; #ifdef CONFIG_SYSCTL void proc_sys_poll_notify(struct ctl_table_poll *poll); extern void setup_sysctl_set(struct ctl_table_set *p, struct ctl_table_root *root, int (*is_seen)(struct ctl_table_set *)); extern void retire_sysctl_set(struct ctl_table_set *set); void register_sysctl_root(struct ctl_table_root *root); struct ctl_table_header *__register_sysctl_table( struct ctl_table_set *set, const char *path, struct ctl_table *table); struct ctl_table_header *__register_sysctl_paths( struct ctl_table_set *set, const struct ctl_path *path, struct ctl_table *table); struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table); struct ctl_table_header *register_sysctl_table(struct ctl_table * table); struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, struct ctl_table *table); void unregister_sysctl_table(struct ctl_table_header * table); extern int sysctl_init(void); #else /* CONFIG_SYSCTL */ static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table) { return NULL; } static inline struct ctl_table_header *register_sysctl_paths( const struct ctl_path *path, struct ctl_table *table) { return NULL; } static inline void unregister_sysctl_table(struct ctl_table_header * table) { } static inline void setup_sysctl_set(struct ctl_table_set *p, struct ctl_table_root *root, int (*is_seen)(struct ctl_table_set *)) { } #endif /* CONFIG_SYSCTL */ #endif /* _LINUX_SYSCTL_H */
# esearch ES API
<?php namespace Cviebrock\EloquentTaggable\Events; use Illuminate\Broadcasting\Channel; use Illuminate\Queue\SerializesModels; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; class ModelUntagged { use Dispatchable, InteractsWithSockets, SerializesModels; private $model; private $tags; /** * @return mixed */ public function getModel() { return $this->model; } /** * @return mixed */ public function getTags() { return $this->tags; } /** * Create a new event instance. * * @return void */ public function __construct($model, $tags) { $this->model = $model; $this->tags = $tags; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { } }
using System; using System.Linq; namespace Task_5 { class Program { static void Main(string[] args) { Console.OutputEncoding = System.Text.Encoding.UTF8; int count= 0; Console.WriteLine("Ohjelma kertoo kuinka monta vokaalia lauseessa on!"); Console.Write("Anna lause:"); string UserInput = Console.ReadLine().ToUpper(); foreach (char letter in UserInput) { if (IsVowel(letter)) count++; } Console.WriteLine($"Vokaaleita on: {count}"); Console.ReadLine(); } static bool IsVowel(char letter) { if (letter == 'A' || letter == 'E' || letter == 'I' || letter == 'O' || letter == 'U' || letter == 'Y' || letter == 'Ä' || letter == 'Ö') return true; else return false; } } }
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #pragma once #include "cpprest/base_uri.h" #include "web_request.h" namespace signalr { class web_request_factory { public: virtual std::unique_ptr<web_request> create_web_request(const web::uri &url); virtual ~web_request_factory(); }; }
//{ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(ll i=0;i<n;i++) #define FILL(i,n) memset(i,n,sizeof i) #define X first #define Y second #define SZ(_a) (int)_a.size() #define ALL(_a) _a.begin(),_a.end() #define pb push_back #ifdef brian #define debug(...) do{\ fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\ _do(__VA_ARGS__);\ }while(0) template<typename T>void _do(T &&_x){cerr<<_x<<endl;} template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);} template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";} template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb) { _s<<"{"; for(It _it=_ita;_it!=_itb;_it++) { _s<<(_it==_ita?"":",")<<*_it; } _s<<"}"; return _s; } template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));} template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));} template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));} template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;} #define IOS() #else #define debug(...) #define pary(...) #define endl '\n' #define IOS() ios_base::sync_with_stdio(0);cin.tie(0); #endif // brian //} const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2; const ll MOD=1000000007; const ll INF=ll(1e15); int main() { IOS(); char c; while(cin>>c) { if(c<'a')c+=('a'-'A'); if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='y')continue; cout<<"."<<c; } cout<<endl; }
/*! * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */ /* FONT PATH * -------------------------- */ @font-face { font-family: 'FontAwesome'; src: url('../fonts/fontawesome-webfont.eot?v=4.5.0'); src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } .fa { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* makes the font 33% larger relative to the icon container */ .fa-lg { font-size: 1.33333333em; line-height: 0.75em; vertical-align: -15%; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-fw { width: 1.28571429em; text-align: center; } .fa-ul { padding-left: 0; margin-left: 2.14285714em; list-style-type: none; } .fa-ul > li { position: relative; } .fa-li { position: absolute; left: -2.14285714em; width: 2.14285714em; top: 0.14285714em; text-align: center; } .fa-li.fa-lg { left: -1.85714286em; } .fa-border { padding: .2em .25em .15em; border: solid 0.08em #eeeeee; border-radius: .1em; } .fa-pull-left { float: left; } .fa-pull-right { float: right; } .fa.fa-pull-left { margin-right: .3em; } .fa.fa-pull-right { margin-left: .3em; } /* Deprecated as of 4.4.0 */ .pull-right { float: right; } .pull-left { float: left; } .fa.pull-left { margin-right: .3em; } .fa.pull-right { margin-left: .3em; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear; } .fa-pulse { -webkit-animation: fa-spin 1s infinite steps(8); animation: fa-spin 1s infinite steps(8); } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .fa-rotate-90 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); -webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); -webkit-transform: scale(1, -1); -ms-transform: scale(1, -1); transform: scale(1, -1); } :root .fa-rotate-90, :root .fa-rotate-180, :root .fa-rotate-270, :root .fa-flip-horizontal, :root .fa-flip-vertical { filter: none; } .fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .fa-stack-1x, .fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center; } .fa-stack-1x { line-height: inherit; } .fa-stack-2x { font-size: 2em; } .fa-inverse { color: #ffffff; } /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ .fa-glass:before { content: "\f000"; } .fa-music:before { content: "\f001"; } .fa-search:before { content: "\f002"; } .fa-envelope-o:before { content: "\f003"; } .fa-heart:before { content: "\f004"; } .fa-star:before { content: "\f005"; } .fa-star-o:before { content: "\f006"; } .fa-user:before { content: "\f007"; } .fa-film:before { content: "\f008"; } .fa-th-large:before { content: "\f009"; } .fa-th:before { content: "\f00a"; } .fa-th-list:before { content: "\f00b"; } .fa-check:before { content: "\f00c"; } .fa-remove:before, .fa-close:before, .fa-times:before { content: "\f00d"; } .fa-search-plus:before { content: "\f00e"; } .fa-search-minus:before { content: "\f010"; } .fa-power-off:before { content: "\f011"; } .fa-signal:before { content: "\f012"; } .fa-gear:before, .fa-cog:before { content: "\f013"; } .fa-trash-o:before { content: "\f014"; } .fa-home:before { content: "\f015"; } .fa-file-o:before { content: "\f016"; } .fa-clock-o:before { content: "\f017"; } .fa-road:before { content: "\f018"; } .fa-download:before { content: "\f019"; } .fa-arrow-circle-o-down:before { content: "\f01a"; } .fa-arrow-circle-o-up:before { content: "\f01b"; } .fa-inbox:before { content: "\f01c"; } .fa-play-circle-o:before { content: "\f01d"; } .fa-rotate-right:before, .fa-repeat:before { content: "\f01e"; } .fa-refresh:before { content: "\f021"; } .fa-list-alt:before { content: "\f022"; } .fa-lock:before { content: "\f023"; } .fa-flag:before { content: "\f024"; } .fa-headphones:before { content: "\f025"; } .fa-volume-off:before { content: "\f026"; } .fa-volume-down:before { content: "\f027"; } .fa-volume-up:before { content: "\f028"; } .fa-qrcode:before { content: "\f029"; } .fa-barcode:before { content: "\f02a"; } .fa-tag:before { content: "\f02b"; } .fa-tags:before { content: "\f02c"; } .fa-book:before { content: "\f02d"; } .fa-bookmark:before { content: "\f02e"; } .fa-print:before { content: "\f02f"; } .fa-camera:before { content: "\f030"; } .fa-font:before { content: "\f031"; } .fa-bold:before { content: "\f032"; } .fa-italic:before { content: "\f033"; } .fa-text-height:before { content: "\f034"; } .fa-text-width:before { content: "\f035"; } .fa-align-left:before { content: "\f036"; } .fa-align-center:before { content: "\f037"; } .fa-align-right:before { content: "\f038"; } .fa-align-justify:before { content: "\f039"; } .fa-list:before { content: "\f03a"; } .fa-dedent:before, .fa-outdent:before { content: "\f03b"; } .fa-indent:before { content: "\f03c"; } .fa-video-camera:before { content: "\f03d"; } .fa-photo:before, .fa-image:before, .fa-picture-o:before { content: "\f03e"; } .fa-pencil:before { content: "\f040"; } .fa-map-marker:before { content: "\f041"; } .fa-adjust:before { content: "\f042"; } .fa-tint:before { content: "\f043"; } .fa-edit:before, .fa-pencil-square-o:before { content: "\f044"; } .fa-share-square-o:before { content: "\f045"; } .fa-check-square-o:before { content: "\f046"; } .fa-arrows:before { content: "\f047"; } .fa-step-backward:before { content: "\f048"; } .fa-fast-backward:before { content: "\f049"; } .fa-backward:before { content: "\f04a"; } .fa-play:before { content: "\f04b"; } .fa-pause:before { content: "\f04c"; } .fa-stop:before { content: "\f04d"; } .fa-forward:before { content: "\f04e"; } .fa-fast-forward:before { content: "\f050"; } .fa-step-forward:before { content: "\f051"; } .fa-eject:before { content: "\f052"; } .fa-chevron-left:before { content: "\f053"; } .fa-chevron-right:before { content: "\f054"; } .fa-plus-circle:before { content: "\f055"; } .fa-minus-circle:before { content: "\f056"; } .fa-times-circle:before { content: "\f057"; } .fa-check-circle:before { content: "\f058"; } .fa-question-circle:before { content: "\f059"; } .fa-info-circle:before { content: "\f05a"; } .fa-crosshairs:before { content: "\f05b"; } .fa-times-circle-o:before { content: "\f05c"; } .fa-check-circle-o:before { content: "\f05d"; } .fa-ban:before { content: "\f05e"; } .fa-arrow-left:before { content: "\f060"; } .fa-arrow-right:before { content: "\f061"; } .fa-arrow-up:before { content: "\f062"; } .fa-arrow-down:before { content: "\f063"; } .fa-mail-forward:before, .fa-share:before { content: "\f064"; } .fa-expand:before { content: "\f065"; } .fa-compress:before { content: "\f066"; } .fa-plus:before { content: "\f067"; } .fa-minus:before { content: "\f068"; } .fa-asterisk:before { content: "\f069"; } .fa-exclamation-circle:before { content: "\f06a"; } .fa-gift:before { content: "\f06b"; } .fa-leaf:before { content: "\f06c"; } .fa-fire:before { content: "\f06d"; } .fa-eye:before { content: "\f06e"; } .fa-eye-slash:before { content: "\f070"; } .fa-warning:before, .fa-exclamation-triangle:before { content: "\f071"; } .fa-plane:before { content: "\f072"; } .fa-calendar:before { content: "\f073"; } .fa-random:before { content: "\f074"; } .fa-comment:before { content: "\f075"; } .fa-magnet:before { content: "\f076"; } .fa-chevron-up:before { content: "\f077"; } .fa-chevron-down:before { content: "\f078"; } .fa-retweet:before { content: "\f079"; } .fa-shopping-cart:before { content: "\f07a"; } .fa-folder:before { content: "\f07b"; } .fa-folder-open:before { content: "\f07c"; } .fa-arrows-v:before { content: "\f07d"; } .fa-arrows-h:before { content: "\f07e"; } .fa-bar-chart-o:before, .fa-bar-chart:before { content: "\f080"; } .fa-twitter-square:before { content: "\f081"; } .fa-facebook-square:before { content: "\f082"; } .fa-camera-retro:before { content: "\f083"; } .fa-key:before { content: "\f084"; } .fa-gears:before, .fa-cogs:before { content: "\f085"; } .fa-comments:before { content: "\f086"; } .fa-thumbs-o-up:before { content: "\f087"; } .fa-thumbs-o-down:before { content: "\f088"; } .fa-star-half:before { content: "\f089"; } .fa-heart-o:before { content: "\f08a"; } .fa-sign-out:before { content: "\f08b"; } .fa-linkedin-square:before { content: "\f08c"; } .fa-thumb-tack:before { content: "\f08d"; } .fa-external-link:before { content: "\f08e"; } .fa-sign-in:before { content: "\f090"; } .fa-trophy:before { content: "\f091"; } .fa-github-square:before { content: "\f092"; } .fa-upload:before { content: "\f093"; } .fa-lemon-o:before { content: "\f094"; } .fa-phone:before { content: "\f095"; } .fa-square-o:before { content: "\f096"; } .fa-bookmark-o:before { content: "\f097"; } .fa-phone-square:before { content: "\f098"; } .fa-twitter:before { content: "\f099"; } .fa-facebook-f:before, .fa-facebook:before { content: "\f09a"; } .fa-github:before { content: "\f09b"; } .fa-unlock:before { content: "\f09c"; } .fa-credit-card:before { content: "\f09d"; } .fa-feed:before, .fa-rss:before { content: "\f09e"; } .fa-hdd-o:before { content: "\f0a0"; } .fa-bullhorn:before { content: "\f0a1"; } .fa-bell:before { content: "\f0f3"; } .fa-certificate:before { content: "\f0a3"; } .fa-hand-o-right:before { content: "\f0a4"; } .fa-hand-o-left:before { content: "\f0a5"; } .fa-hand-o-up:before { content: "\f0a6"; } .fa-hand-o-down:before { content: "\f0a7"; } .fa-arrow-circle-left:before { content: "\f0a8"; } .fa-arrow-circle-right:before { content: "\f0a9"; } .fa-arrow-circle-up:before { content: "\f0aa"; } .fa-arrow-circle-down:before { content: "\f0ab"; } .fa-globe:before { content: "\f0ac"; } .fa-wrench:before { content: "\f0ad"; } .fa-tasks:before { content: "\f0ae"; } .fa-filter:before { content: "\f0b0"; } .fa-briefcase:before { content: "\f0b1"; } .fa-arrows-alt:before { content: "\f0b2"; } .fa-group:before, .fa-users:before { content: "\f0c0"; } .fa-chain:before, .fa-link:before { content: "\f0c1"; } .fa-cloud:before { content: "\f0c2"; } .fa-flask:before { content: "\f0c3"; } .fa-cut:before, .fa-scissors:before { content: "\f0c4"; } .fa-copy:before, .fa-files-o:before { content: "\f0c5"; } .fa-paperclip:before { content: "\f0c6"; } .fa-save:before, .fa-floppy-o:before { content: "\f0c7"; } .fa-square:before { content: "\f0c8"; } .fa-navicon:before, .fa-reorder:before, .fa-bars:before { content: "\f0c9"; } .fa-list-ul:before { content: "\f0ca"; } .fa-list-ol:before { content: "\f0cb"; } .fa-strikethrough:before { content: "\f0cc"; } .fa-underline:before { content: "\f0cd"; } .fa-table:before { content: "\f0ce"; } .fa-magic:before { content: "\f0d0"; } .fa-truck:before { content: "\f0d1"; } .fa-pinterest:before { content: "\f0d2"; } .fa-pinterest-square:before { content: "\f0d3"; } .fa-google-plus-square:before { content: "\f0d4"; } .fa-google-plus:before { content: "\f0d5"; } .fa-money:before { content: "\f0d6"; } .fa-caret-down:before { content: "\f0d7"; } .fa-caret-up:before { content: "\f0d8"; } .fa-caret-left:before { content: "\f0d9"; } .fa-caret-right:before { content: "\f0da"; } .fa-columns:before { content: "\f0db"; } .fa-unsorted:before, .fa-sort:before { content: "\f0dc"; } .fa-sort-down:before, .fa-sort-desc:before { content: "\f0dd"; } .fa-sort-up:before, .fa-sort-asc:before { content: "\f0de"; } .fa-envelope:before { content: "\f0e0"; } .fa-linkedin:before { content: "\f0e1"; } .fa-rotate-left:before, .fa-undo:before { content: "\f0e2"; } .fa-legal:before, .fa-gavel:before { content: "\f0e3"; } .fa-dashboard:before, .fa-tachometer:before { content: "\f0e4"; } .fa-comment-o:before { content: "\f0e5"; } .fa-comments-o:before { content: "\f0e6"; } .fa-flash:before, .fa-bolt:before { content: "\f0e7"; } .fa-sitemap:before { content: "\f0e8"; } .fa-umbrella:before { content: "\f0e9"; } .fa-paste:before, .fa-clipboard:before { content: "\f0ea"; } .fa-lightbulb-o:before { content: "\f0eb"; } .fa-exchange:before { content: "\f0ec"; } .fa-cloud-download:before { content: "\f0ed"; } .fa-cloud-upload:before { content: "\f0ee"; } .fa-user-md:before { content: "\f0f0"; } .fa-stethoscope:before { content: "\f0f1"; } .fa-suitcase:before { content: "\f0f2"; } .fa-bell-o:before { content: "\f0a2"; } .fa-coffee:before { content: "\f0f4"; } .fa-cutlery:before { content: "\f0f5"; } .fa-file-text-o:before { content: "\f0f6"; } .fa-building-o:before { content: "\f0f7"; } .fa-hospital-o:before { content: "\f0f8"; } .fa-ambulance:before { content: "\f0f9"; } .fa-medkit:before { content: "\f0fa"; } .fa-fighter-jet:before { content: "\f0fb"; } .fa-beer:before { content: "\f0fc"; } .fa-h-square:before { content: "\f0fd"; } .fa-plus-square:before { content: "\f0fe"; } .fa-angle-double-left:before { content: "\f100"; } .fa-angle-double-right:before { content: "\f101"; } .fa-angle-double-up:before { content: "\f102"; } .fa-angle-double-down:before { content: "\f103"; } .fa-angle-left:before { content: "\f104"; } .fa-angle-right:before { content: "\f105"; } .fa-angle-up:before { content: "\f106"; } .fa-angle-down:before { content: "\f107"; } .fa-desktop:before { content: "\f108"; } .fa-laptop:before { content: "\f109"; } .fa-tablet:before { content: "\f10a"; } .fa-mobile-phone:before, .fa-mobile:before { content: "\f10b"; } .fa-circle-o:before { content: "\f10c"; } .fa-quote-left:before { content: "\f10d"; } .fa-quote-right:before { content: "\f10e"; } .fa-spinner:before { content: "\f110"; } .fa-circle:before { content: "\f111"; } .fa-mail-reply:before, .fa-reply:before { content: "\f112"; } .fa-github-alt:before { content: "\f113"; } .fa-folder-o:before { content: "\f114"; } .fa-folder-open-o:before { content: "\f115"; } .fa-smile-o:before { content: "\f118"; } .fa-frown-o:before { content: "\f119"; } .fa-meh-o:before { content: "\f11a"; } .fa-gamepad:before { content: "\f11b"; } .fa-keyboard-o:before { content: "\f11c"; } .fa-flag-o:before { content: "\f11d"; } .fa-flag-checkered:before { content: "\f11e"; } .fa-terminal:before { content: "\f120"; } .fa-code:before { content: "\f121"; } .fa-mail-reply-all:before, .fa-reply-all:before { content: "\f122"; } .fa-star-half-empty:before, .fa-star-half-full:before, .fa-star-half-o:before { content: "\f123"; } .fa-location-arrow:before { content: "\f124"; } .fa-crop:before { content: "\f125"; } .fa-code-fork:before { content: "\f126"; } .fa-unlink:before, .fa-chain-broken:before { content: "\f127"; } .fa-question:before { content: "\f128"; } .fa-info:before { content: "\f129"; } .fa-exclamation:before { content: "\f12a"; } .fa-superscript:before { content: "\f12b"; } .fa-subscript:before { content: "\f12c"; } .fa-eraser:before { content: "\f12d"; } .fa-puzzle-piece:before { content: "\f12e"; } .fa-microphone:before { content: "\f130"; } .fa-microphone-slash:before { content: "\f131"; } .fa-shield:before { content: "\f132"; } .fa-calendar-o:before { content: "\f133"; } .fa-fire-extinguisher:before { content: "\f134"; } .fa-rocket:before { content: "\f135"; } .fa-maxcdn:before { content: "\f136"; } .fa-chevron-circle-left:before { content: "\f137"; } .fa-chevron-circle-right:before { content: "\f138"; } .fa-chevron-circle-up:before { content: "\f139"; } .fa-chevron-circle-down:before { content: "\f13a"; } .fa-html5:before { content: "\f13b"; } .fa-css3:before { content: "\f13c"; } .fa-anchor:before { content: "\f13d"; } .fa-unlock-alt:before { content: "\f13e"; } .fa-bullseye:before { content: "\f140"; } .fa-ellipsis-h:before { content: "\f141"; } .fa-ellipsis-v:before { content: "\f142"; } .fa-rss-square:before { content: "\f143"; } .fa-play-circle:before { content: "\f144"; } .fa-ticket:before { content: "\f145"; } .fa-minus-square:before { content: "\f146"; } .fa-minus-square-o:before { content: "\f147"; } .fa-level-up:before { content: "\f148"; } .fa-level-down:before { content: "\f149"; } .fa-check-square:before { content: "\f14a"; } .fa-pencil-square:before { content: "\f14b"; } .fa-external-link-square:before { content: "\f14c"; } .fa-share-square:before { content: "\f14d"; } .fa-compass:before { content: "\f14e"; } .fa-toggle-down:before, .fa-caret-square-o-down:before { content: "\f150"; } .fa-toggle-up:before, .fa-caret-square-o-up:before { content: "\f151"; } .fa-toggle-right:before, .fa-caret-square-o-right:before { content: "\f152"; } .fa-euro:before, .fa-eur:before { content: "\f153"; } .fa-gbp:before { content: "\f154"; } .fa-dollar:before, .fa-usd:before { content: "\f155"; } .fa-rupee:before, .fa-inr:before { content: "\f156"; } .fa-cny:before, .fa-rmb:before, .fa-yen:before, .fa-jpy:before { content: "\f157"; } .fa-ruble:before, .fa-rouble:before, .fa-rub:before { content: "\f158"; } .fa-won:before, .fa-krw:before { content: "\f159"; } .fa-bitcoin:before, .fa-btc:before { content: "\f15a"; } .fa-file:before { content: "\f15b"; } .fa-file-text:before { content: "\f15c"; } .fa-sort-alpha-asc:before { content: "\f15d"; } .fa-sort-alpha-desc:before { content: "\f15e"; } .fa-sort-amount-asc:before { content: "\f160"; } .fa-sort-amount-desc:before { content: "\f161"; } .fa-sort-numeric-asc:before { content: "\f162"; } .fa-sort-numeric-desc:before { content: "\f163"; } .fa-thumbs-up:before { content: "\f164"; } .fa-thumbs-down:before { content: "\f165"; } .fa-youtube-square:before { content: "\f166"; } .fa-youtube:before { content: "\f167"; } .fa-xing:before { content: "\f168"; } .fa-xing-square:before { content: "\f169"; } .fa-youtube-play:before { content: "\f16a"; } .fa-dropbox:before { content: "\f16b"; } .fa-stack-overflow:before { content: "\f16c"; } .fa-instagram:before { content: "\f16d"; } .fa-flickr:before { content: "\f16e"; } .fa-adn:before { content: "\f170"; } .fa-bitbucket:before { content: "\f171"; } .fa-bitbucket-square:before { content: "\f172"; } .fa-tumblr:before { content: "\f173"; } .fa-tumblr-square:before { content: "\f174"; } .fa-long-arrow-down:before { content: "\f175"; } .fa-long-arrow-up:before { content: "\f176"; } .fa-long-arrow-left:before { content: "\f177"; } .fa-long-arrow-right:before { content: "\f178"; } .fa-apple:before { content: "\f179"; } .fa-windows:before { content: "\f17a"; } .fa-android:before { content: "\f17b"; } .fa-linux:before { content: "\f17c"; } .fa-dribbble:before { content: "\f17d"; } .fa-skype:before { content: "\f17e"; } .fa-foursquare:before { content: "\f180"; } .fa-trello:before { content: "\f181"; } .fa-female:before { content: "\f182"; } .fa-male:before { content: "\f183"; } .fa-gittip:before, .fa-gratipay:before { content: "\f184"; } .fa-sun-o:before { content: "\f185"; } .fa-moon-o:before { content: "\f186"; } .fa-archive:before { content: "\f187"; } .fa-bug:before { content: "\f188"; } .fa-vk:before { content: "\f189"; } .fa-weibo:before { content: "\f18a"; } .fa-renren:before { content: "\f18b"; } .fa-pagelines:before { content: "\f18c"; } .fa-stack-exchange:before { content: "\f18d"; } .fa-arrow-circle-o-right:before { content: "\f18e"; } .fa-arrow-circle-o-left:before { content: "\f190"; } .fa-toggle-left:before, .fa-caret-square-o-left:before { content: "\f191"; } .fa-dot-circle-o:before { content: "\f192"; } .fa-wheelchair:before { content: "\f193"; } .fa-vimeo-square:before { content: "\f194"; } .fa-turkish-lira:before, .fa-try:before { content: "\f195"; } .fa-plus-square-o:before { content: "\f196"; } .fa-space-shuttle:before { content: "\f197"; } .fa-slack:before { content: "\f198"; } .fa-envelope-square:before { content: "\f199"; } .fa-wordpress:before { content: "\f19a"; } .fa-openid:before { content: "\f19b"; } .fa-institution:before, .fa-bank:before, .fa-university:before { content: "\f19c"; } .fa-mortar-board:before, .fa-graduation-cap:before { content: "\f19d"; } .fa-yahoo:before { content: "\f19e"; } .fa-google:before { content: "\f1a0"; } .fa-reddit:before { content: "\f1a1"; } .fa-reddit-square:before { content: "\f1a2"; } .fa-stumbleupon-circle:before { content: "\f1a3"; } .fa-stumbleupon:before { content: "\f1a4"; } .fa-delicious:before { content: "\f1a5"; } .fa-digg:before { content: "\f1a6"; } .fa-pied-piper:before { content: "\f1a7"; } .fa-pied-piper-alt:before { content: "\f1a8"; } .fa-drupal:before { content: "\f1a9"; } .fa-joomla:before { content: "\f1aa"; } .fa-language:before { content: "\f1ab"; } .fa-fax:before { content: "\f1ac"; } .fa-building:before { content: "\f1ad"; } .fa-child:before { content: "\f1ae"; } .fa-paw:before { content: "\f1b0"; } .fa-spoon:before { content: "\f1b1"; } .fa-cube:before { content: "\f1b2"; } .fa-cubes:before { content: "\f1b3"; } .fa-behance:before { content: "\f1b4"; } .fa-behance-square:before { content: "\f1b5"; } .fa-steam:before { content: "\f1b6"; } .fa-steam-square:before { content: "\f1b7"; } .fa-recycle:before { content: "\f1b8"; } .fa-automobile:before, .fa-car:before { content: "\f1b9"; } .fa-cab:before, .fa-taxi:before { content: "\f1ba"; } .fa-tree:before { content: "\f1bb"; } .fa-spotify:before { content: "\f1bc"; } .fa-deviantart:before { content: "\f1bd"; } .fa-soundcloud:before { content: "\f1be"; } .fa-database:before { content: "\f1c0"; } .fa-file-pdf-o:before { content: "\f1c1"; } .fa-file-word-o:before { content: "\f1c2"; } .fa-file-excel-o:before { content: "\f1c3"; } .fa-file-powerpoint-o:before { content: "\f1c4"; } .fa-file-photo-o:before, .fa-file-picture-o:before, .fa-file-image-o:before { content: "\f1c5"; } .fa-file-zip-o:before, .fa-file-archive-o:before { content: "\f1c6"; } .fa-file-sound-o:before, .fa-file-audio-o:before { content: "\f1c7"; } .fa-file-movie-o:before, .fa-file-video-o:before { content: "\f1c8"; } .fa-file-code-o:before { content: "\f1c9"; } .fa-vine:before { content: "\f1ca"; } .fa-codepen:before { content: "\f1cb"; } .fa-jsfiddle:before { content: "\f1cc"; } .fa-life-bouy:before, .fa-life-buoy:before, .fa-life-saver:before, .fa-support:before, .fa-life-ring:before { content: "\f1cd"; } .fa-circle-o-notch:before { content: "\f1ce"; } .fa-ra:before, .fa-rebel:before { content: "\f1d0"; } .fa-ge:before, .fa-empire:before { content: "\f1d1"; } .fa-git-square:before { content: "\f1d2"; } .fa-git:before { content: "\f1d3"; } .fa-y-combinator-square:before, .fa-yc-square:before, .fa-hacker-news:before { content: "\f1d4"; } .fa-tencent-weibo:before { content: "\f1d5"; } .fa-qq:before { content: "\f1d6"; } .fa-wechat:before, .fa-weixin:before { content: "\f1d7"; } .fa-send:before, .fa-paper-plane:before { content: "\f1d8"; } .fa-send-o:before, .fa-paper-plane-o:before { content: "\f1d9"; } .fa-history:before { content: "\f1da"; } .fa-circle-thin:before { content: "\f1db"; } .fa-header:before { content: "\f1dc"; } .fa-paragraph:before { content: "\f1dd"; } .fa-sliders:before { content: "\f1de"; } .fa-share-alt:before { content: "\f1e0"; } .fa-share-alt-square:before { content: "\f1e1"; } .fa-bomb:before { content: "\f1e2"; } .fa-soccer-ball-o:before, .fa-futbol-o:before { content: "\f1e3"; } .fa-tty:before { content: "\f1e4"; } .fa-binoculars:before { content: "\f1e5"; } .fa-plug:before { content: "\f1e6"; } .fa-slideshare:before { content: "\f1e7"; } .fa-twitch:before { content: "\f1e8"; } .fa-yelp:before { content: "\f1e9"; } .fa-newspaper-o:before { content: "\f1ea"; } .fa-wifi:before { content: "\f1eb"; } .fa-calculator:before { content: "\f1ec"; } .fa-paypal:before { content: "\f1ed"; } .fa-google-wallet:before { content: "\f1ee"; } .fa-cc-visa:before { content: "\f1f0"; } .fa-cc-mastercard:before { content: "\f1f1"; } .fa-cc-discover:before { content: "\f1f2"; } .fa-cc-amex:before { content: "\f1f3"; } .fa-cc-paypal:before { content: "\f1f4"; } .fa-cc-stripe:before { content: "\f1f5"; } .fa-bell-slash:before { content: "\f1f6"; } .fa-bell-slash-o:before { content: "\f1f7"; } .fa-trash:before { content: "\f1f8"; } .fa-copyright:before { content: "\f1f9"; } .fa-at:before { content: "\f1fa"; } .fa-eyedropper:before { content: "\f1fb"; } .fa-paint-brush:before { content: "\f1fc"; } .fa-birthday-cake:before { content: "\f1fd"; } .fa-area-chart:before { content: "\f1fe"; } .fa-pie-chart:before { content: "\f200"; } .fa-line-chart:before { content: "\f201"; } .fa-lastfm:before { content: "\f202"; } .fa-lastfm-square:before { content: "\f203"; } .fa-toggle-off:before { content: "\f204"; } .fa-toggle-on:before { content: "\f205"; } .fa-bicycle:before { content: "\f206"; } .fa-bus:before { content: "\f207"; } .fa-ioxhost:before { content: "\f208"; } .fa-angellist:before { content: "\f209"; } .fa-cc:before { content: "\f20a"; } .fa-shekel:before, .fa-sheqel:before, .fa-ils:before { content: "\f20b"; } .fa-meanpath:before { content: "\f20c"; } .fa-buysellads:before { content: "\f20d"; } .fa-connectdevelop:before { content: "\f20e"; } .fa-dashcube:before { content: "\f210"; } .fa-forumbee:before { content: "\f211"; } .fa-leanpub:before { content: "\f212"; } .fa-sellsy:before { content: "\f213"; } .fa-shirtsinbulk:before { content: "\f214"; } .fa-simplybuilt:before { content: "\f215"; } .fa-skyatlas:before { content: "\f216"; } .fa-cart-plus:before { content: "\f217"; } .fa-cart-arrow-down:before { content: "\f218"; } .fa-diamond:before { content: "\f219"; } .fa-ship:before { content: "\f21a"; } .fa-user-secret:before { content: "\f21b"; } .fa-motorcycle:before { content: "\f21c"; } .fa-street-view:before { content: "\f21d"; } .fa-heartbeat:before { content: "\f21e"; } .fa-venus:before { content: "\f221"; } .fa-mars:before { content: "\f222"; } .fa-mercury:before { content: "\f223"; } .fa-intersex:before, .fa-transgender:before { content: "\f224"; } .fa-transgender-alt:before { content: "\f225"; } .fa-venus-double:before { content: "\f226"; } .fa-mars-double:before { content: "\f227"; } .fa-venus-mars:before { content: "\f228"; } .fa-mars-stroke:before { content: "\f229"; } .fa-mars-stroke-v:before { content: "\f22a"; } .fa-mars-stroke-h:before { content: "\f22b"; } .fa-neuter:before { content: "\f22c"; } .fa-genderless:before { content: "\f22d"; } .fa-facebook-official:before { content: "\f230"; } .fa-pinterest-p:before { content: "\f231"; } .fa-whatsapp:before { content: "\f232"; } .fa-server:before { content: "\f233"; } .fa-user-plus:before { content: "\f234"; } .fa-user-times:before { content: "\f235"; } .fa-hotel:before, .fa-bed:before { content: "\f236"; } .fa-viacoin:before { content: "\f237"; } .fa-train:before { content: "\f238"; } .fa-subway:before { content: "\f239"; } .fa-medium:before { content: "\f23a"; } .fa-yc:before, .fa-y-combinator:before { content: "\f23b"; } .fa-optin-monster:before { content: "\f23c"; } .fa-opencart:before { content: "\f23d"; } .fa-expeditedssl:before { content: "\f23e"; } .fa-battery-4:before, .fa-battery-full:before { content: "\f240"; } .fa-battery-3:before, .fa-battery-three-quarters:before { content: "\f241"; } .fa-battery-2:before, .fa-battery-half:before { content: "\f242"; } .fa-battery-1:before, .fa-battery-quarter:before { content: "\f243"; } .fa-battery-0:before, .fa-battery-empty:before { content: "\f244"; } .fa-mouse-pointer:before { content: "\f245"; } .fa-i-cursor:before { content: "\f246"; } .fa-object-group:before { content: "\f247"; } .fa-object-ungroup:before { content: "\f248"; } .fa-sticky-note:before { content: "\f249"; } .fa-sticky-note-o:before { content: "\f24a"; } .fa-cc-jcb:before { content: "\f24b"; } .fa-cc-diners-club:before { content: "\f24c"; } .fa-clone:before { content: "\f24d"; } .fa-balance-scale:before { content: "\f24e"; } .fa-hourglass-o:before { content: "\f250"; } .fa-hourglass-1:before, .fa-hourglass-start:before { content: "\f251"; } .fa-hourglass-2:before, .fa-hourglass-half:before { content: "\f252"; } .fa-hourglass-3:before, .fa-hourglass-end:before { content: "\f253"; } .fa-hourglass:before { content: "\f254"; } .fa-hand-grab-o:before, .fa-hand-rock-o:before { content: "\f255"; } .fa-hand-stop-o:before, .fa-hand-paper-o:before { content: "\f256"; } .fa-hand-scissors-o:before { content: "\f257"; } .fa-hand-lizard-o:before { content: "\f258"; } .fa-hand-spock-o:before { content: "\f259"; } .fa-hand-pointer-o:before { content: "\f25a"; } .fa-hand-peace-o:before { content: "\f25b"; } .fa-trademark:before { content: "\f25c"; } .fa-registered:before { content: "\f25d"; } .fa-creative-commons:before { content: "\f25e"; } .fa-gg:before { content: "\f260"; } .fa-gg-circle:before { content: "\f261"; } .fa-tripadvisor:before { content: "\f262"; } .fa-odnoklassniki:before { content: "\f263"; } .fa-odnoklassniki-square:before { content: "\f264"; } .fa-get-pocket:before { content: "\f265"; } .fa-wikipedia-w:before { content: "\f266"; } .fa-safari:before { content: "\f267"; } .fa-chrome:before { content: "\f268"; } .fa-firefox:before { content: "\f269"; } .fa-opera:before { content: "\f26a"; } .fa-internet-explorer:before { content: "\f26b"; } .fa-tv:before, .fa-television:before { content: "\f26c"; } .fa-contao:before { content: "\f26d"; } .fa-500px:before { content: "\f26e"; } .fa-amazon:before { content: "\f270"; } .fa-calendar-plus-o:before { content: "\f271"; } .fa-calendar-minus-o:before { content: "\f272"; } .fa-calendar-times-o:before { content: "\f273"; } .fa-calendar-check-o:before { content: "\f274"; } .fa-industry:before { content: "\f275"; } .fa-map-pin:before { content: "\f276"; } .fa-map-signs:before { content: "\f277"; } .fa-map-o:before { content: "\f278"; } .fa-map:before { content: "\f279"; } .fa-commenting:before { content: "\f27a"; } .fa-commenting-o:before { content: "\f27b"; } .fa-houzz:before { content: "\f27c"; } .fa-vimeo:before { content: "\f27d"; } .fa-black-tie:before { content: "\f27e"; } .fa-fonticons:before { content: "\f280"; } .fa-reddit-alien:before { content: "\f281"; } .fa-edge:before { content: "\f282"; } .fa-credit-card-alt:before { content: "\f283"; } .fa-codiepie:before { content: "\f284"; } .fa-modx:before { content: "\f285"; } .fa-fort-awesome:before { content: "\f286"; } .fa-usb:before { content: "\f287"; } .fa-product-hunt:before { content: "\f288"; } .fa-mixcloud:before { content: "\f289"; } .fa-scribd:before { content: "\f28a"; } .fa-pause-circle:before { content: "\f28b"; } .fa-pause-circle-o:before { content: "\f28c"; } .fa-stop-circle:before { content: "\f28d"; } .fa-stop-circle-o:before { content: "\f28e"; } .fa-shopping-bag:before { content: "\f290"; } .fa-shopping-basket:before { content: "\f291"; } .fa-hashtag:before { content: "\f292"; } .fa-bluetooth:before { content: "\f293"; } .fa-bluetooth-b:before { content: "\f294"; } .fa-percent:before { content: "\f295"; } .hidden { display: none; } .Charts { margin: 0 auto; background-color: #f9f9f9; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: end; -webkit-align-items: flex-end; -ms-flex-align: end; align-items: flex-end; padding: 10px; padding-right: 50px; } .Charts.horizontal { display: block; } .Charts.horizontal .Charts--serie { display: block; margin: 0 0 30px 0; border: 0; } .Charts.horizontal .Charts--serie label { position: relative; top: auto; right: auto; left: 0; bottom: auto; padding: 0 0 10px 0; } .Charts--serie { height: 100%; margin: 0 30px 0 0; display: inline-block; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: end; -webkit-align-items: flex-end; -ms-flex-align: end; align-items: flex-end; -webkit-transform-origin: 0 100%; transform-origin: 0 100%; -webkit-animation: slideUp .6s; animation: slideUp .6s; position: relative; border-bottom: 1px solid #c2c2c2; } .Charts--serie.stacked { display: block; } .Charts--serie label { position: absolute; left: 0; right: 0; bottom: -20px; font-family: Helvetica, sans-serif; font-size: 10px; text-align: center; color: #808080; } .Charts.horizontal .Charts--item { display: block; border-radius: 0 2px 2px 0; margin: 0 0 5px 0; height: 1em; } .Charts.horizontal .Charts--item b { position: absolute; right: -20px; top: .3em; } .Charts--item { background-color: #43A19E; display: inline-block; margin: 0 5px 0 0; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; -webkit-transition: height 1s ease-out, width 1s ease-out; transition: height 1s ease-out, width 1s ease-out; position: relative; text-align: center; border-radius: 2px 2px 0 0; } .Charts--item.layered { position: absolute; left: 5%; right: 5%; bottom: 0; margin: 0; } .Charts--item.layered b { position: absolute; right: 0; } .Charts--item.stacked { position: relative; display: block; border-radius: 0; } .Charts--item b { position: relative; font-family: Helvetica, sans-serif; font-size: 10px; top: -20px; color: #43A19E; } .Legend--color { display: inline-block; vertical-align: middle; border-radius: 2px; width: 16px; height: 16px; } .Legend--label { display: inline-block; vertical-align: middle; font-family: Helvetica, sans-serif; font-size: 12px; margin: 0 0 0 5px; } @-webkit-keyframes slideUp { from { -webkit-transform: scaleY(0); transform: scaleY(0); } to { -webkit-transform: scaleY(1); transform: scaleY(1); } } @keyframes slideUp { from { -webkit-transform: scaleY(0); transform: scaleY(0); } to { -webkit-transform: scaleY(1); transform: scaleY(1); } }
/* Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dojox.gfx.silverlight_attach"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. dojo._hasResource["dojox.gfx.silverlight_attach"] = true; dojo.provide("dojox.gfx.silverlight_attach"); dojo.require("dojox.gfx.silverlight"); dojo.experimental("dojox.gfx.silverlight_attach"); (function(){ var g = dojox.gfx, sl = g.silverlight; sl.attachNode = function(node){ // summary: creates a shape from a Node // node: Node: an Silverlight node return null; // not implemented }; sl.attachSurface = function(node){ // summary: creates a surface from a Node // node: Node: an Silverlight node return null; // dojox.gfx.Surface }; })(); }
<?php $myArr = array("Keeyana", "Mary", "Peter", "Sally"); $myJSON = json_encode($myArr); echo $myJSON; ?>
--- layout: page title: Santiago Rain Software Conference date: 2016-05-24 author: Jeremy Kennedy tags: weekly links, java status: published summary: Vestibulum sollicitudin elit ac nunc faucibus ultrices. Morbi laoreet suscipit. banner: images/banner/office-01.jpg booking: startDate: 03/25/2017 endDate: 03/30/2017 ctyhocn: DNDHXHX groupCode: SRSC published: true --- Integer quis tellus pellentesque neque scelerisque volutpat. In hac habitasse platea dictumst. Phasellus ornare eget est ac dignissim. Vivamus faucibus dapibus neque, eget luctus turpis venenatis vitae. Quisque ut semper nisl. Integer ac varius ex. Sed ac blandit ante. Suspendisse potenti. In vestibulum eros vel urna vehicula aliquet. Cras tempus diam vitae tortor finibus, tincidunt hendrerit mauris euismod. Vivamus mollis eu orci at posuere. Cras justo risus, luctus vitae eleifend sed, pellentesque vel orci. Praesent fringilla placerat tempus. Quisque at pellentesque ex. Ut iaculis, massa eget aliquet facilisis, dolor neque suscipit ex, varius ultrices nibh leo non ipsum. Morbi facilisis pretium magna sed tempor. Nunc suscipit, ex id tincidunt dapibus, quam lectus fringilla nibh, vel ornare arcu urna id velit. Suspendisse vel dui dui. Sed ut ipsum sit amet leo fringilla sagittis ac vitae urna. Donec a ultricies nulla. Praesent sollicitudin volutpat felis, eget luctus metus condimentum nec. Nunc tincidunt odio et tincidunt mollis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus pretium odio mauris, at semper orci sagittis quis. Nulla a rhoncus ex, ac faucibus felis. * Duis eu ligula tincidunt, ornare nibh ut, fermentum neque. Ut et massa magna. Vivamus finibus sapien nec dictum condimentum. Ut nec mauris sit amet enim dignissim viverra. Vestibulum urna velit, porttitor id justo sit amet, condimentum dapibus neque. Nulla sed est tempor, finibus purus id, sagittis lectus. Morbi ornare, risus eu gravida malesuada, elit libero tristique dui, luctus scelerisque magna arcu id enim. Integer eget nulla pulvinar, congue augue et, viverra nibh. Donec vulputate nulla ex, ut faucibus felis volutpat in. Nunc fringilla, augue eget iaculis viverra, est orci venenatis lectus, in imperdiet leo nulla nec ligula. Phasellus aliquam porttitor mi, molestie bibendum velit varius nec. Donec quis enim interdum, varius enim ut, interdum quam. Fusce maximus quam id auctor dignissim. Sed sed aliquet nisl. Suspendisse potenti. In hac habitasse platea dictumst. Donec dui lorem, maximus in sollicitudin mattis, ullamcorper in lectus. Etiam ultrices elementum egestas. Pellentesque congue ex in posuere lobortis. Mauris malesuada elit ac nibh cursus posuere. Vivamus semper turpis id ex gravida, sit amet vehicula eros ultrices.
<?php /** * Created by Roquie. * E-mail: roquie0@gmail.com * GitHub: Roquie * Date: 17/05/2017 */ namespace Tmconsulting\Uniteller\Tests\Payment; use Tmconsulting\Uniteller\Payment\Payment; use Tmconsulting\Uniteller\Payment\UriInterface; use Tmconsulting\Uniteller\Tests\TestCase; class PaymentTest extends TestCase { public function testCanPaymentRequestReceiveUri() { $payment = new Payment(); $results = $payment->execute(['q' => 'banana'], ['base_uri' => 'https://google.com']); $this->assertInstanceOf(UriInterface::class, $results); $this->assertEquals('https://google.com/pay?q=banana', $results->getUri()); } }
/** * Automatically generated file. Please do not edit. * @author Highcharts Config Generator by Karasiq * @see [[http://api.highcharts.com/highmaps]] */ package com.highmaps.config import scalajs.js, js.`|` import com.highcharts.CleanJsObject import com.highcharts.HighchartsUtils._ /** * @note JavaScript name: <code>series&lt;mfi&gt;-pathfinder-marker</code> */ @js.annotation.ScalaJSDefined class SeriesMfiPathfinderMarker extends com.highcharts.HighchartsGenericObject { /** * <p>Enable markers for the connectors.</p> * @since 6.2.0 */ val enabled: js.UndefOr[Boolean] = js.undefined /** * <p>Horizontal alignment of the markers relative to the points.</p> * @since 6.2.0 */ val align: js.UndefOr[String] = js.undefined /** * <p>Vertical alignment of the markers relative to the points.</p> * @since 6.2.0 */ val verticalAlign: js.UndefOr[String] = js.undefined /** * <p>Whether or not to draw the markers inside the points.</p> * @since 6.2.0 */ val inside: js.UndefOr[Boolean] = js.undefined /** * <p>Set the line/border width of the pathfinder markers.</p> * @since 6.2.0 */ val lineWidth: js.UndefOr[Double] = js.undefined /** * <p>Set the radius of the pathfinder markers. The default is * automatically computed based on the algorithmMargin setting.</p> * <p>Setting marker.width and marker.height will override this * setting.</p> * @since 6.2.0 */ val radius: js.UndefOr[Double] = js.undefined /** * <p>Set the width of the pathfinder markers. If not supplied, this * is inferred from the marker radius.</p> * @since 6.2.0 */ val width: js.UndefOr[Double] = js.undefined /** * <p>Set the height of the pathfinder markers. If not supplied, this * is inferred from the marker radius.</p> * @since 6.2.0 */ val height: js.UndefOr[Double] = js.undefined /** * <p>Set the color of the pathfinder markers. By default this is the * same as the connector color.</p> * @since 6.2.0 */ val color: js.UndefOr[String | js.Object] = js.undefined /** * <p>Set the line/border color of the pathfinder markers. By default * this is the same as the marker color.</p> * @since 6.2.0 */ val lineColor: js.UndefOr[String | js.Object] = js.undefined } object SeriesMfiPathfinderMarker { /** * @param enabled <p>Enable markers for the connectors.</p> * @param align <p>Horizontal alignment of the markers relative to the points.</p> * @param verticalAlign <p>Vertical alignment of the markers relative to the points.</p> * @param inside <p>Whether or not to draw the markers inside the points.</p> * @param lineWidth <p>Set the line/border width of the pathfinder markers.</p> * @param radius <p>Set the radius of the pathfinder markers. The default is. automatically computed based on the algorithmMargin setting.</p>. <p>Setting marker.width and marker.height will override this. setting.</p> * @param width <p>Set the width of the pathfinder markers. If not supplied, this. is inferred from the marker radius.</p> * @param height <p>Set the height of the pathfinder markers. If not supplied, this. is inferred from the marker radius.</p> * @param color <p>Set the color of the pathfinder markers. By default this is the. same as the connector color.</p> * @param lineColor <p>Set the line/border color of the pathfinder markers. By default. this is the same as the marker color.</p> */ def apply(enabled: js.UndefOr[Boolean] = js.undefined, align: js.UndefOr[String] = js.undefined, verticalAlign: js.UndefOr[String] = js.undefined, inside: js.UndefOr[Boolean] = js.undefined, lineWidth: js.UndefOr[Double] = js.undefined, radius: js.UndefOr[Double] = js.undefined, width: js.UndefOr[Double] = js.undefined, height: js.UndefOr[Double] = js.undefined, color: js.UndefOr[String | js.Object] = js.undefined, lineColor: js.UndefOr[String | js.Object] = js.undefined): SeriesMfiPathfinderMarker = { val enabledOuter: js.UndefOr[Boolean] = enabled val alignOuter: js.UndefOr[String] = align val verticalAlignOuter: js.UndefOr[String] = verticalAlign val insideOuter: js.UndefOr[Boolean] = inside val lineWidthOuter: js.UndefOr[Double] = lineWidth val radiusOuter: js.UndefOr[Double] = radius val widthOuter: js.UndefOr[Double] = width val heightOuter: js.UndefOr[Double] = height val colorOuter: js.UndefOr[String | js.Object] = color val lineColorOuter: js.UndefOr[String | js.Object] = lineColor com.highcharts.HighchartsGenericObject.toCleanObject(new SeriesMfiPathfinderMarker { override val enabled: js.UndefOr[Boolean] = enabledOuter override val align: js.UndefOr[String] = alignOuter override val verticalAlign: js.UndefOr[String] = verticalAlignOuter override val inside: js.UndefOr[Boolean] = insideOuter override val lineWidth: js.UndefOr[Double] = lineWidthOuter override val radius: js.UndefOr[Double] = radiusOuter override val width: js.UndefOr[Double] = widthOuter override val height: js.UndefOr[Double] = heightOuter override val color: js.UndefOr[String | js.Object] = colorOuter override val lineColor: js.UndefOr[String | js.Object] = lineColorOuter }) } }
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/App'; import Greetings from './components/Greetings'; import SignupPage from './components/signup/SignupPage' export default ( <Route path="/" component={App}> <IndexRoute component={Greetings}/> //make all main routes components as class components <Route path="signup" component={SignupPage}/> </Route> )
a{color:red}b{p:v}a{margin:3 3 3 4}
# We borrow heavily from the kernel build setup, though we are simpler since # we don't have Kconfig tweaking settings on us. # The implicit make rules have it looking for RCS files, among other things. # We instead explicitly write all the rules we care about. # It's even quicker (saves ~200ms) to pass -r on the command line. MAKEFLAGS=-r # The source directory tree. srcdir := .. abs_srcdir := $(abspath $(srcdir)) # The name of the builddir. builddir_name ?= . # The V=1 flag on command line makes us verbosely print command lines. ifdef V quiet= else quiet=quiet_ endif # Specify BUILDTYPE=Release on the command line for a release build. BUILDTYPE ?= Release # Directory all our build output goes into. # Note that this must be two directories beneath src/ for unit tests to pass, # as they reach into the src/ directory for data with relative paths. builddir ?= $(builddir_name)/$(BUILDTYPE) abs_builddir := $(abspath $(builddir)) depsdir := $(builddir)/.deps # Object output directory. obj := $(builddir)/obj abs_obj := $(abspath $(obj)) # We build up a list of every single one of the targets so we can slurp in the # generated dependency rule Makefiles in one pass. all_deps := CC.target ?= $(CC) CFLAGS.target ?= $(CFLAGS) CXX.target ?= $(CXX) CXXFLAGS.target ?= $(CXXFLAGS) LINK.target ?= $(LINK) LDFLAGS.target ?= $(LDFLAGS) AR.target ?= $(AR) # C++ apps need to be linked with g++. LINK ?= $(CXX.target) # TODO(evan): move all cross-compilation logic to gyp-time so we don't need # to replicate this environment fallback in make as well. CC.host ?= gcc CFLAGS.host ?= CXX.host ?= g++ CXXFLAGS.host ?= LINK.host ?= $(CXX.host) LDFLAGS.host ?= AR.host ?= ar # Define a dir function that can handle spaces. # http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions # "leading spaces cannot appear in the text of the first argument as written. # These characters can be put into the argument value by variable substitution." empty := space := $(empty) $(empty) # http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces replace_spaces = $(subst $(space),?,$1) unreplace_spaces = $(subst ?,$(space),$1) dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) # Flags to make gcc output dependency info. Note that you need to be # careful here to use the flags that ccache and distcc can understand. # We write to a dep file on the side first and then rename at the end # so we can't end up with a broken dep file. depfile = $(depsdir)/$(call replace_spaces,$@).d DEPFLAGS = -MMD -MF $(depfile).raw # We have to fixup the deps output in a few ways. # (1) the file output should mention the proper .o file. # ccache or distcc lose the path to the target, so we convert a rule of # the form: # foobar.o: DEP1 DEP2 # into # path/to/foobar.o: DEP1 DEP2 # (2) we want missing files not to cause us to fail to build. # We want to rewrite # foobar.o: DEP1 DEP2 \ # DEP3 # to # DEP1: # DEP2: # DEP3: # so if the files are missing, they're just considered phony rules. # We have to do some pretty insane escaping to get those backslashes # and dollar signs past make, the shell, and sed at the same time. # Doesn't work with spaces, but that's fine: .d files have spaces in # their names replaced with other characters. define fixup_dep # The depfile may not exist if the input file didn't have any #includes. touch $(depfile).raw # Fixup path as in (1). sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) # Add extra rules as in (2). # We remove slashes and replace spaces with new lines; # remove blank lines; # delete the first line and append a colon to the remaining lines. sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ grep -v '^$$' |\ sed -e 1d -e 's|$$|:|' \ >> $(depfile) rm $(depfile).raw endef # Command definitions: # - cmd_foo is the actual command to run; # - quiet_cmd_foo is the brief-output summary of the command. quiet_cmd_cc = CC($(TOOLSET)) $@ cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< quiet_cmd_cxx = CXX($(TOOLSET)) $@ cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< quiet_cmd_objc = CXX($(TOOLSET)) $@ cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< quiet_cmd_objcxx = CXX($(TOOLSET)) $@ cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< # Commands for precompiled header files. quiet_cmd_pch_c = CXX($(TOOLSET)) $@ cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< quiet_cmd_pch_cc = CXX($(TOOLSET)) $@ cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< quiet_cmd_pch_m = CXX($(TOOLSET)) $@ cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< quiet_cmd_pch_mm = CXX($(TOOLSET)) $@ cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< # gyp-mac-tool is written next to the root Makefile by gyp. # Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd # already. quiet_cmd_mac_tool = MACTOOL $(4) $< cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) quiet_cmd_infoplist = INFOPLIST $@ cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" quiet_cmd_touch = TOUCH $@ cmd_touch = touch $@ quiet_cmd_copy = COPY $@ # send stderr to /dev/null to ignore messages when linking directories. cmd_copy = rm -rf "$@" && cp -af "$<" "$@" quiet_cmd_alink = LIBTOOL-STATIC $@ cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) quiet_cmd_link = LINK($(TOOLSET)) $@ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) quiet_cmd_solink = SOLINK($(TOOLSET)) $@ cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) # Define an escape_quotes function to escape single quotes. # This allows us to handle quotes properly as long as we always use # use single quotes and escape_quotes. escape_quotes = $(subst ','\'',$(1)) # This comment is here just to include a ' to unconfuse syntax highlighting. # Define an escape_vars function to escape '$' variable syntax. # This allows us to read/write command lines with shell variables (e.g. # $LD_LIBRARY_PATH), without triggering make substitution. escape_vars = $(subst $$,$$$$,$(1)) # Helper that expands to a shell command to echo a string exactly as it is in # make. This uses printf instead of echo because printf's behaviour with respect # to escape sequences is more portable than echo's across different shells # (e.g., dash, bash). exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' # Helper to compare the command we're about to run against the command # we logged the last time we ran the command. Produces an empty # string (false) when the commands match. # Tricky point: Make has no string-equality test function. # The kernel uses the following, but it seems like it would have false # positives, where one string reordered its arguments. # arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ # $(filter-out $(cmd_$@), $(cmd_$(1)))) # We instead substitute each for the empty string into the other, and # say they're equal if both substitutions produce the empty string. # .d files contain ? instead of spaces, take that into account. command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) # Helper that is non-empty when a prerequisite changes. # Normally make does this implicitly, but we force rules to always run # so we can check their command lines. # $? -- new prerequisites # $| -- order-only dependencies prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) # Helper that executes all postbuilds until one fails. define do_postbuilds @E=0;\ for p in $(POSTBUILDS); do\ eval $$p;\ E=$$?;\ if [ $$E -ne 0 ]; then\ break;\ fi;\ done;\ if [ $$E -ne 0 ]; then\ rm -rf "$@";\ exit $$E;\ fi endef # do_cmd: run a command via the above cmd_foo names, if necessary. # Should always run for a given target to handle command-line changes. # Second argument, if non-zero, makes it do asm/C/C++ dependency munging. # Third argument, if non-zero, makes it do POSTBUILDS processing. # Note: We intentionally do NOT call dirx for depfile, since it contains ? for # spaces already and dirx strips the ? characters. define do_cmd $(if $(or $(command_changed),$(prereq_changed)), @$(call exact_echo, $($(quiet)cmd_$(1))) @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" $(if $(findstring flock,$(word 2,$(cmd_$1))), @$(cmd_$(1)) @echo " $(quiet_cmd_$(1)): Finished", @$(cmd_$(1)) ) @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) @$(if $(2),$(fixup_dep)) $(if $(and $(3), $(POSTBUILDS)), $(call do_postbuilds) ) ) endef # Declare the "all" target first so it is the default, # even though we don't have the deps yet. .PHONY: all all: # make looks for ways to re-generate included makefiles, but in our case, we # don't have a direct way. Explicitly telling make that it has nothing to do # for them makes it go faster. %.d: ; # Use FORCE_DO_CMD to force a target to run. Should be coupled with # do_cmd. .PHONY: FORCE_DO_CMD FORCE_DO_CMD: TOOLSET := target # Suffix rules, putting all outputs into $(obj). $(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD @$(call do_cmd,objc,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD @$(call do_cmd,objcxx,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD @$(call do_cmd,cc,1) # Try building from generated source, too. $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD @$(call do_cmd,objc,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD @$(call do_cmd,objcxx,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD @$(call do_cmd,objc,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD @$(call do_cmd,objcxx,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD @$(call do_cmd,cc,1) ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ $(findstring $(join ^,$(prefix)),\ $(join ^,validation.target.mk)))),) include validation.target.mk endif quiet_cmd_regen_makefile = ACTION Regenerating $@ cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/jdyer/Development/github/angular-gpio/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/jdyer/.node-gyp/0.12.7/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/jdyer/.node-gyp/0.12.7" "-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp" "-Dmodule_root_dir=/Users/jdyer/Development/github/angular-gpio/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate" binding.gyp Makefile: $(srcdir)/../../../../../../../../../../../../../.node-gyp/0.12.7/common.gypi $(srcdir)/../../../../../../../../../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(call do_cmd,regen_makefile) # "all" is a concatenation of the "all" targets from all the included # sub-makefiles. This is just here to clarify. all: # Add in dependency-tracking rules. $(all_deps) is the list of every single # target in our tree. Only consider the ones with .d (dependency) info: d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) ifneq ($(d_files),) include $(d_files) endif
<?php /* Unsafe sample input : get the field userData from the variable $_GET via an object, which store it in a array sanitize : none construction : concatenation with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.*/ class Input{ private $input; public function getInput(){ return $this->input[1]; } public function __construct(){ $this->input = array(); $this->input[0]= 'safe' ; $this->input[1]= $_GET['UserData'] ; $this->input[2]= 'safe' ; } } $temp = new Input(); $tainted = $temp->getInput(); //no_sanitizing $query = "//User[username/text()='". $tainted . "']"; //flaw $xml = simplexml_load_file("users.xml");//file load echo "query : ". $query ."<br /><br />" ; $res=$xml->xpath($query);//execution print_r($res); echo "<br />" ; ?>
#include "MoQiang.h" enum CAUSE{ AN_ZHI_JIE_FANG=2901, HUAN_YING_XING_CHEN=2902, HEI_AN_SHU_FU=2903, AN_ZHI_ZHANG_BI=2904, CHONG_YING=2905, CHONG_YING_DISCARD = 29051, QI_HEI_ZHI_QIANG=2906 }; MoQiang::MoQiang() { makeConnection(); setMyRole(this); Button *chongying; chongying=new Button(3,QStringLiteral("充盈")); buttonArea->addButton(chongying); connect(chongying,SIGNAL(buttonSelected(int)),this,SLOT(ChongYing())); } void MoQiang::normal() { Role::normal(); handArea->disableMagic(); if(!jieFangFirst) { if(handArea->checkElement("thunder") || handArea->checkType("magic")) buttonArea->enable(3); } unactionalCheck(); } void MoQiang::AnZhiJieFang() { state=AN_ZHI_JIE_FANG; gui->reset(); SafeList<Card*> handcards=dataInterface->getHandCards(); bool flag=true; int magicCount = 0; int cardCount = handcards.size(); decisionArea->enable(1); for(int i = 0;i < cardCount;i++) { if(handcards[i]->getType() == "magic") { magicCount++; } } if(magicCount == cardCount) { flag = false; } tipArea->setMsg(QStringLiteral("是否发动暗之解放?")); if(flag) { decisionArea->enable(0); } else { decisionArea->disable(0); } } void MoQiang::HuanYingXingChen() { state=HUAN_YING_XING_CHEN; gui->reset(); tipArea->setMsg(QStringLiteral("是否发动幻影星辰?")); playerArea->enableAll(); playerArea->setQuota(1); decisionArea->enable(1); } void MoQiang::AnZhiBiZhang() { state=AN_ZHI_ZHANG_BI; tipArea->setMsg(QStringLiteral("是否发动暗之障壁?")); handArea->setQuota(1,7); decisionArea->enable(1); decisionArea->disable(0); handArea->enableElement("thunder"); handArea->enableMagic(); } void MoQiang::QiHeiZhiQiang() { state= QI_HEI_ZHI_QIANG; tipArea->reset(); tipArea->setMsg(QStringLiteral("是否发动漆黑之枪?如是请选择发动能量数:")); decisionArea->enable(0); decisionArea->enable(1); Player* myself=dataInterface->getMyself(); int min=myself->getEnergy(); for(;min>0;min--) tipArea->addBoxItem(QString::number(min)); tipArea->showBox(); } void MoQiang::ChongYing() { state=CHONG_YING; playerArea->reset(); handArea->reset(); tipArea->reset(); handArea->enableElement("thunder"); handArea->enableMagic(); handArea->setQuota(1); decisionArea->enable(1); decisionArea->disable(0); } void MoQiang::cardAnalyse() { SafeList<Card*> selectedCards; Role::cardAnalyse(); selectedCards=handArea->getSelectedCards(); try{ switch(state) { case AN_ZHI_ZHANG_BI: { bool thunder = true; bool magic = true; for(int i=0;i<selectedCards.size();i++) { if(selectedCards[i]->getElement()!= "thunder") { thunder = false; } if(selectedCards[i]->getType() != "magic") { magic = false; } } if(thunder || magic){ decisionArea->enable(0); } else{ playerArea->reset(); decisionArea->disable(0); } break; } case CHONG_YING: decisionArea->enable(0); break; } }catch(int error){ logic->onError(error); } } void MoQiang::playerAnalyse() { Role::playerAnalyse(); switch(state) { case HUAN_YING_XING_CHEN: decisionArea->enable(0); break; } } void MoQiang::turnBegin() { Role::turnBegin(); jieFangFirst=false; usingChongYing = false; } void MoQiang::askForSkill(Command* cmd) { switch(cmd->respond_id()) { case AN_ZHI_JIE_FANG: AnZhiJieFang(); break; case HUAN_YING_XING_CHEN: HuanYingXingChen(); break; case QI_HEI_ZHI_QIANG: QiHeiZhiQiang(); break; case AN_ZHI_ZHANG_BI: AnZhiBiZhang(); break; default: Role::askForSkill(cmd); } } void MoQiang::onOkClicked() { Role::onOkClicked(); SafeList<Card*> selectedCards; SafeList<Player*>selectedPlayers; selectedCards=handArea->getSelectedCards(); selectedPlayers=playerArea->getSelectedPlayers(); network::Action* action; network::Respond* respond; try{ switch(state) { case AN_ZHI_JIE_FANG: respond = new Respond(); respond->set_src_id(myID); respond->set_respond_id(AN_ZHI_JIE_FANG); respond->add_args(1); jieFangFirst=true; start = true; gui->reset(); emit sendCommand(network::MSG_RESPOND, respond); break; case HUAN_YING_XING_CHEN: respond = newRespond(HUAN_YING_XING_CHEN); respond->add_args(2); respond->add_dst_ids(selectedPlayers[0]->getID()); emit sendCommand(network::MSG_RESPOND, respond); start = true; gui->reset(); break; case AN_ZHI_ZHANG_BI: respond = newRespond(AN_ZHI_ZHANG_BI); respond->add_args(1); for(int i=0;i<selectedCards.size();i++) { respond->add_card_ids(selectedCards[i]->getID()); } emit sendCommand(network::MSG_RESPOND, respond); gui->reset(); break; case QI_HEI_ZHI_QIANG: respond = newRespond(QI_HEI_ZHI_QIANG); respond->add_args(1); respond->add_args(tipArea->getBoxCurrentText().toInt()); emit sendCommand(network::MSG_RESPOND, respond); gui->reset(); break; case CHONG_YING: action = newAction(ACTION_MAGIC_SKILL,CHONG_YING); action->add_card_ids(selectedCards[0]->getID()); emit sendCommand(network::MSG_ACTION, action); usingChongYing = true; gui->reset(); break; } }catch(int error){ logic->onError(error); } } void MoQiang::onCancelClicked() { Role::onCancelClicked(); network::Respond* respond; switch(state) { case AN_ZHI_JIE_FANG: respond = new Respond(); respond->set_src_id(myID); respond->set_respond_id(AN_ZHI_JIE_FANG); respond->add_args(0); gui->reset(); emit sendCommand(network::MSG_RESPOND, respond); break; case HUAN_YING_XING_CHEN: respond = newRespond(HUAN_YING_XING_CHEN); respond->add_args(0); emit sendCommand(network::MSG_RESPOND, respond); gui->reset(); break; case AN_ZHI_ZHANG_BI: respond = newRespond(AN_ZHI_ZHANG_BI); respond->add_args(0); emit sendCommand(network::MSG_RESPOND, respond); gui->reset(); break; case QI_HEI_ZHI_QIANG: respond = newRespond(QI_HEI_ZHI_QIANG); respond->add_args(0); emit sendCommand(network::MSG_RESPOND, respond); gui->reset(); break; case CHONG_YING: normal(); break; } } void MoQiang::attacked(QString element, int hitRate) { Role::attacked(element,hitRate); handArea->disableMagic(); } void MoQiang::moDaned(int nextID,int sourceID, int howMany) { Role::moDaned(nextID,sourceID,howMany); handArea->disableMagic(); }
require 'rubygems' require 'test/unit' require 'flexmock/test_unit' require 'action_view/test_case' require 'action_view/helpers' require File.expand_path(File.dirname(__FILE__) + '/../lib/i18n_multi_locales_form')
class Item < ActiveRecord::Base # The SecureRandom library is used to generate uid:s require 'securerandom' # Generate uid on creation before_save :generate_uid, on: :new def generate_uid self.uid = SecureRandom.uuid end validates :uid, presence: true, format: { with: /\h{8}-\h{4}-\h{4}-\h{4}-\h{12}/ }, length: { is: 36 }, on: :update validates :uid, uniqueness: true, on: :create validates :type, presence: true validates :title, presence: true, length: { in: 2..80 } serialize :features def features_human if self.features self.features.join(', ') else "" end end def features_human=(input) self.features = input.split(',').grep(String).collect(&:strip) end ## List of subclasses and their aliases # When adding a new subclass, please maintain TYPES # class => name, TYPES = { 'Cable' => I18n.t(:cable, scope: [:activerecord, :models]), 'Device' => I18n.t(:device, scope: [:activerecord, :models]), 'Misc' => I18n.t(:misc, scope: [:activerecord, :models]), } def get_type_name TYPES[self.type] end ## # Use uid as an URL parameter instead of id def to_param self.uid end # Returns a short version of the uid. # Dramatically increases chances of duplicates. Not guaranteed to be unique! def short_uid self.uid.split(/\-/).first end def self.find_by_uid (uid) Item.where("uid LIKE ?", "#{uid}%").first end protected def after_create # Expire main trivia (includes Item.count) expire_fragment 'main_trivia' end def after_destroy; after_create; end end
<?php namespace App\AdminBundle\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\SecurityContext; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Component\Validator\Constraints as Asset ; /** * @Route("/admin") */ class SecuredController extends Controller { /** * @Route("/login", name="app_admin_login") * @Template() */ public function loginAction(Request $request) { $form = $this->crateForm($request) ; // $form = $this->container->get('app.admin.loader')->getAdminByName('app_user')->getLoginForm( $request ) ; $dispatcher = $this->container->get('event_dispatcher'); $event = new \App\AdminBundle\Event\FormEvent($form, $request); $dispatcher->dispatch('app.event.form', $event) ; if (null !== $event->getResponse()) { return $event->getResponse() ; } return array( 'form' => $form->createView() , ); } /** * @Route("/login_check", name="app_admin_check") */ public function securityCheckAction() { throw new \RuntimeException('You must configure the check path to be handled by the firewall using form_login in your security firewall configuration.'); } /** * @Route("/logout", name="app_admin_logout") */ public function logoutAction() { throw new \RuntimeException('You must activate the logout in your security firewall configuration.'); } protected function crateForm(\Symfony\Component\HttpFoundation\Request $request) { if ( $request->attributes->has(SecurityContext::AUTHENTICATION_ERROR) ) { $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR); } else { $error = $request->getSession()->get(SecurityContext::AUTHENTICATION_ERROR); $request->getSession()->set( SecurityContext::AUTHENTICATION_ERROR , null ) ; } $tr = $this->container->get('translator') ; $app_domain = $this->container->getParameter('app.admin.domain') ; $builder = $this->container->get('form.factory')->createNamedBuilder('login', 'form', array( 'label' => 'app.login.label' , 'translation_domain' => $app_domain , )) ; $builder ->add('username', 'text', array( 'label' => 'app.login.username.label' , 'translation_domain' => $app_domain , 'data' => $request->getSession()->get(SecurityContext::LAST_USERNAME) , 'horizontal_input_wrapper_class' => 'col-xs-6', 'attr' => array( 'placeholder' => 'app.login.username.placeholder' , ) ) ) ->add('password', 'password', array( 'label' => 'app.login.password.label' , 'translation_domain' => $app_domain , 'horizontal_input_wrapper_class' => 'col-xs-6', 'attr' => array( ) ) ) ->add('captcha', 'appcaptcha', array( 'label' => 'app.form.captcha.label' , 'translation_domain' => $app_domain , )) ; $form = $builder->getForm() ; if( $error ) { if( $error instanceof \Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException ) { $_error = new \Symfony\Component\Form\FormError( $tr->trans('app.login.error.crsf', array(), $app_domain ) ) ; $form->addError( $_error ) ; } else if ( $error instanceof \App\UserBundle\Exception\CaptchaException ) { $_error = $tr->trans('app.login.error.captcha' , array(), $app_domain ) ; if( $this->container->getParameter('kernel.debug') ) { $_error .= sprintf(" code(%s)", $error->getCode() ) ; } $_error = new \Symfony\Component\Form\FormError( $_error ); $form->get('captcha')->addError( $_error ) ; } else if( $error instanceof \Symfony\Component\Security\Core\Exception\BadCredentialsException ) { $_error = new \Symfony\Component\Form\FormError( $tr->trans('app.login.error.credentials' , array(), $app_domain ) ) ; $form->get('username')->addError( $_error ) ; } else if( $error instanceof \Symfony\Component\Security\Core\Exception\DisabledException ) { $_error = new \Symfony\Component\Form\FormError( $tr->trans('app.login.error.disabled' , array(), $app_domain ) ) ; $form->get('username')->addError( $_error ) ; } else { $_error = new \Symfony\Component\Form\FormError( $error->getMessage() ) ; if( $this->container->getParameter('kernel.debug') ) { \Dev::dump( $error ) ; } $form->get('username')->addError( $_error ) ; } } return $form ; } }
--- layout: default --- <div class="home"> <div class="posts yue"> {% for post in paginator.posts %} <div class="post"> <p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</p> <a href="{{ post.url | prepend: site.baseurl }}" class="post-link"><h3 class="h2 post-title">{{ post.title }}</h3></a> <p class="post-summary"> {% if post.summary %} {{ post.summary }} {% else %} {{ post.excerpt }} {% endif %} </p> </div> {% endfor %} </div> {% include pagination.html %} </div>
<?php declare(strict_types=1); namespace Doctrine\ODM\MongoDB\Tests\Functional; use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; use Doctrine\ODM\MongoDB\Mapping\ClassMetadata; use Doctrine\ODM\MongoDB\Tests\BaseTest; use Documents\SchemaValidated; use function MongoDB\BSON\fromJSON; use function MongoDB\BSON\fromPHP; use function MongoDB\BSON\toCanonicalExtendedJSON; use function MongoDB\BSON\toPHP; class ValidationTest extends BaseTest { public function testCreateUpdateValidatedDocument(): void { $this->requireVersion($this->getServerVersion(), '3.6.0', '<', 'MongoDB cannot perform JSON schema validation before version 3.6'); // Test creation of SchemaValidated collection $cm = $this->dm->getClassMetadata(SchemaValidated::class); $this->dm->getSchemaManager()->createDocumentCollection($cm->name); $expectedValidatorJson = <<<'EOT' { "$jsonSchema": { "required": ["name"], "properties": { "name": { "bsonType": "string", "description": "must be a string and is required" } } }, "$or": [ { "phone": { "$type": "string" } }, { "email": { "$regex": { "$regularExpression" : { "pattern": "@mongodb\\.com$", "options": "" } } } }, { "status": { "$in": [ "Unknown", "Incomplete" ] } } ] } EOT; $expectedValidatorBson = fromJSON($expectedValidatorJson); $expectedValidator = toPHP($expectedValidatorBson, []); $expectedOptions = [ 'validator' => $expectedValidator, 'validationLevel' => ClassMetadata::SCHEMA_VALIDATION_LEVEL_MODERATE, 'validationAction' => ClassMetadata::SCHEMA_VALIDATION_ACTION_WARN, ]; $expectedOptionsBson = fromPHP($expectedOptions); $expectedOptionsJson = toCanonicalExtendedJSON($expectedOptionsBson); $collections = $this->dm->getDocumentDatabase($cm->name)->listCollections(); $assertNb = 0; foreach ($collections as $collection) { if ($collection->getName() !== $cm->getCollection()) { continue; } $assertNb++; $collectionOptionsBson = fromPHP($collection->getOptions()); $collectionOptionsJson = toCanonicalExtendedJSON($collectionOptionsBson); $this->assertJsonStringEqualsJsonString($expectedOptionsJson, $collectionOptionsJson); } $this->assertEquals(1, $assertNb); // Test updating the same collection, this time removing the validators and resetting to default options $cmUpdated = $this->dm->getClassMetadata(SchemaValidatedUpdate::class); $this->dm->getSchemaManager()->updateDocumentValidator($cmUpdated->name); // We expect the default values set by MongoDB // See: https://docs.mongodb.com/manual/reference/command/collMod/#document-validation $expectedOptions = [ 'validationLevel' => ClassMetadata::SCHEMA_VALIDATION_LEVEL_STRICT, 'validationAction' => ClassMetadata::SCHEMA_VALIDATION_ACTION_ERROR, ]; $collections = $this->dm->getDocumentDatabase($cmUpdated->name)->listCollections(); $assertNb = 0; foreach ($collections as $collection) { if ($collection->getName() !== $cm->getCollection()) { continue; } $assertNb++; $this->assertEquals($expectedOptions, $collection->getOptions()); } $this->assertEquals(1, $assertNb); } } /** * @ODM\Document(collection="SchemaValidated") */ class SchemaValidatedUpdate extends SchemaValidated { }
package hr.fer.bio.project.booleanarray; import hr.fer.bio.project.rankable.Rankable; import hr.fer.bio.project.wavelet.TreeNode; import java.util.Arrays; /** * Simple class for boolean[] encapsulation * * @author bpervan * @since 1.0 */ public class BooleanArray implements Rankable { public boolean[] data; public BooleanArray(int size){ data = new boolean[size]; } public BooleanArray(boolean[] data){ this.data = Arrays.copyOf(data, data.length); } @Override public int rank(char c, int endPos, TreeNode rootNode){ TreeNode<BooleanArray> workingNode = rootNode; if(workingNode.data.data.length <= endPos){ throw new IllegalArgumentException("End position larger than input data"); } int counter = 0; int rightBound = endPos; while(workingNode != null){ if(workingNode.charMap.get(c) == true){ //char c is encoded as 1, count 1es, proceed to right child for(int i = 0; i < rightBound; ++i){ if(workingNode.data.data[i]){ counter++; } } workingNode = workingNode.rightChild; } else { //char c is encoded as 0, count 0es, proceed to left child for(int i = 0; i < rightBound; ++i){ if(!workingNode.data.data[i]){ counter++; } } workingNode = workingNode.leftChild; } rightBound = counter; counter = 0; } return rightBound; } @Override public int select(char c, int boundary, TreeNode rootNode) { TreeNode<BooleanArray> workingNode = rootNode; while(true){ if(!workingNode.charMap.get(c)){ //left if(workingNode.leftChild != null){ workingNode = workingNode.leftChild; } else { break; } } else { //right if(workingNode.rightChild != null){ workingNode = workingNode.rightChild; } else { break; } } } //workingNode now contains leaf with char c //count 0/1 //parent with same operation count -> previously calculated boundary int counter = 0; int newBound = boundary; int Select = 0; while(workingNode != null){ if(workingNode.charMap.get(c)){ for(int i = 0; i < workingNode.data.data.length; ++i){ Select++; if(workingNode.data.data[i]){ counter++; if(counter == newBound){ break; } } } } else { for(int i = 0; i < workingNode.data.data.length; ++i){ Select++; if(!workingNode.data.data[i]){ counter++; if(counter == newBound){ break; } } } } workingNode = workingNode.parent; newBound = Select; counter = 0; Select = 0; } return newBound; } @Override public String toString(){ StringBuilder stringBuilder = new StringBuilder(); for(int i = 0; i < data.length; ++i){ if(data[i]){ stringBuilder.append(1); } else { stringBuilder.append(0); } } return stringBuilder.toString(); } @Override public boolean equals(Object that){ if(that == null){ return false; } if(!(that instanceof BooleanArray)){ return false; } BooleanArray thatBooleanArray = (BooleanArray) that; if(data.length != thatBooleanArray.data.length){ return false; } for(int i = 0; i < data.length; ++i){ if(data[i] != thatBooleanArray.data[i]){ return false; } } return true; } }
run: @./buildserver.sh " " @./run.sh build: @./buildserver.sh setup: @./setup.sh setupnode: @./setupnode.sh
#colorful-nav { padding-bottom: 0px; border: 1px transparent; } #colorful-nav .navbar { margin-bottom: 0px; } #colorful-nav { background-color: transparent; } #colorful-nav .navbar-nav { border-radius: 10px; float:none; height: 5%; } #colorful-nav .navbar-collapse { border-top: 0; } #colorful-nav ul>li { float:left; text-align: center; width: 20%; padding-bottom: 13px; transition: 0.2s padding-top; } #colorful-nav ul>li:hover { padding-top: 10px; } #colorful-nav .navbar-nav>a { padding-top: 15px; color: white; } #colorful-nav ul>a:hover, #colorful-nav ul>a:focus { background-color: transparent; text-decoration: none; } #colorful-nav .glyphicon{ font-size: 30px; margin-bottom: 10px; padding-top: 10px; color: white; } #colorful-nav .fa{ font-size: 30px; margin-bottom: 10px; padding-top: 10px; color: white; } #colorful-nav .icon-bar { background-color: #eb8b1b; } #colorful-nav .navbar-toggle { float: left; border-color: #eb8b1b; margin-left: 15px; margin-top: 15px; margin-bottom: 10px; } #colorful-nav .navbar-brand { height: 100px; } #colorful-nav h5{ color:white; } #colorful-nav .home { background-color: #eb8b1b; } #colorful-nav .sop { background-color: #FFCC00; } #colorful-nav .document { background-color: #AADD00; } #colorful-nav .login { background-color: #00CCCC; } #colorful-nav .angleb { background-color: #666699; } #colorful-nav .facebook { background-color: #3B5998; } #colorful-nav .search { background-color: #2253e2; } @media screen and (max-width: 767px){ #colorful-nav ul>li { text-align: center; width: 100%; } #colorful-nav ul>li:hover{ padding-top: 0px; } }
class Solution { public: string multiply(string num1, string num2) { string a, b; a = num1; b = num2; string A, B; // cout << a; // cout << b; int fa = 1; int fb = 1; int f = 1; int lena = 0; int lenb = 0; if (a[0] == '-') { A = a.substr(1, a.size() - 1); fa = -1; lena = a.size() - 1; } else { A = a; lena = a.size(); } if (b[0] == '-') { B = b.substr(1, b.size() - 1); fb = -1; lenb = b.size() - 1; } else { B = b; lenb = b.size(); } // cout << A << endl; // cout << B; f = fa * fb; int lenmax = max(lena, lenb); int na[lenmax]; int nb[lenmax]; int i; int j; // cout << lenmax<< endl; for (i = lenmax - 1, j = lena - 1; j >= 0; --i, --j) { na[i] = A[j] - '0'; // cout << na[i] << endl; } while (i >= 0) { na[i] = 0; --i; } for (i = lenmax - 1, j = lenb - 1; j >= 0; --i, --j) { nb[i] = B[j] - '0'; // cout << nb[i] << endl; } while (i >= 0) { nb[i] = 0; --i; } int nc[2 * lenmax]; for (i = 0; i < 2 * lenmax; ++i) { nc[i] = 0; } for (i = 0; i < lenmax; ++i) { for (j = 0; j < lenmax; ++j) { nc[i + j] += na[lenmax - 1 - i] * nb[lenmax - 1 - j]; } } for (i = 0; i < 2 * lenmax - 1; ++i) { nc[i + 1] += nc[i] / 10; nc[i] = nc[i] % 10; } j = 2 * lenmax - 1; // cout << j << endl; while (nc[j] == 0 && j >= 0) { --j; if (j == -1) { break; } } string res; if (f == -1) { // printf("-"); res += "-"; } if (j == -1) { res += "0"; return res; } else { for (i = j; i >= 0; --i) { // printf("%d",nc[i]); res += to_string(nc[i]); } return res; } } };
<form name="form" sg-read-only="!(access.administrarTrabajadores || access.administrarTrabajadoresAgencia)" class="form-horizontal" novalidate> <fieldset class="border-top"> <legend><span class="text ng-scope">Asignar usuario <i class="fa fa-question-circle text-muted ng-scope" tooltip="Usuario asignado en el sistema actualmente." tooltip-placement="right"></i></span></legend> <div class="form-group" ng-class="{ 'has-error' : form.usuario.$invalid && form.usuario.$dirty}"> <label class="col-sm-2 control-label"><span class="required">*</span> Usuario:</label> <div class="col-sm-3"> <div class="input-group"> <input type="text" name="usuario" ng-model="view.usuario" ng-minlength="1" ng-maxlength="60" class="form-control" autofocus required/> <span data-ng-show="view.trabajador.usuario" class="input-group-btn"> <button type="button" data-ng-click="desvincular()" class="btn btn-default" tooltip="Desvincular el usuario." tooltip-placement="right"> <span class="glyphicon glyphicon-remove"></span> </button> </span> </div> <div ng-messages="form.usuario.$error" ng-if="form.usuario.$dirty"> <div class="has-error" ng-message="required">Ingrese denominacion.</div> <div class="has-error" ng-message="maxlength">Minimo 1 caracter.</div> <div class="has-error" ng-message="maxlength">Maximo 60 caracteres.</div> <div class="has-error" ng-message="disponible">Usuario no disponible.</div> </div> </div> <div class="col-sm-3"> <a href="" data-ng-click="crearUsuarioKeycloak()" class="btn btn-link" tooltip="Crear un nuevo usuario." tooltip-placement="right">Crear usuario</a> </div> </div> </fieldset> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button sg-save>Guardar</button> <button sg-cancel ui-sref="^.resumen">Cancelar</button> </div> </div> </form>
using System; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Threading; using PropertyChanged; using WpfTestApp.Tasks; namespace WpfTestApp.Model { public interface IUIModel { bool Busy { get; } void CancelOperations(); CancellationTokenSource CancellationSource { get; } } [ImplementPropertyChanged] public class UIModel : IUIModel { [AlsoNotifyFor("SearchEnabled")] public bool Busy { get; set; } public ConcurrentBag<string> Logs { get; set; } [AlsoNotifyFor("SearchEnabled")] public string Keyword { get; set; } [AlsoNotifyFor("SearchEnabled")] public string DirectoryToSearch { get; set; } public ObservableCollection<Job> CompletedJobs { get; set; } public JobRunner JobRunner { get; set; } public CancellationTokenSource CancellationSource { get; private set; } public int JobCount { get; set; } public bool HasJobs { get { return JobCount > 0; } } public bool SearchEnabled { get { return !Busy && !String.IsNullOrEmpty(Keyword) && !String.IsNullOrEmpty(DirectoryToSearch); } } public UIModel() { Logs = new ConcurrentBag<string>(); DirectoryToSearch = Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments, Environment.SpecialFolderOption.DoNotVerify); CompletedJobs = new ObservableCollection<Job>(); JobRunner = new JobRunner(CompletedJobs, OnProgressCallback, TimeSpan.FromMilliseconds(500)); CancellationSource = new CancellationTokenSource(); JobRunner.CancellationSource = CancellationSource; } private void OnProgressCallback(string progress) { AddLog(progress); JobCount = JobRunner.JobCount; } [AlsoNotifyFor("Logs")] private int LogsChanged { get; set; } public void AddLog(string log) { Logs.Add(String.Format("[{0}] {1}", DateTime.Now, log)); LogsChanged++; } public void AddLog(string formatString, params object[] args) { Logs.Add(String.Format("[{0}]", DateTime.Now)); Logs.Add(String.Format(formatString, args)); LogsChanged++; } public void CancelOperations() { CancellationSource.Cancel(); JobRunner.Stop(); CancellationSource = new CancellationTokenSource(); } public void BeginOperations() { CancellationSource = new CancellationTokenSource(); JobRunner.CancellationSource = CancellationSource; JobRunner.Start(); } } }
(function() { 'use strict'; angular .module('tiny-leaflet-directive') .factory('tldMapService', tldMapService); tldMapService.$inject = ['tldHelpers']; function tldMapService(tldHelpers) { var maps = {}; return { setMap: setMap, getMap: getMap, unresolveMap: unresolveMap }; function setMap(leafletMap, mapId) { var defer = tldHelpers.getUnresolvedDefer(maps, mapId); defer.resolve(leafletMap); tldHelpers.setResolvedDefer(maps, mapId); } function getMap (mapId) { var defer = tldHelpers.getDefer(maps, mapId); return defer.promise; } function unresolveMap(mapId) { maps[mapId] = undefined; } } })();
<?php App::uses('Invoices.InvoicesAppModel', 'Model'); /** * InvoiceLine model * */ class InvoiceSetting extends InvoicesAppModel { /** * Validation rules - initialized in constructor * * @var array */ public $validate = array(); /** * Constructor * * @param mixed $id Set this ID for this model on startup, can also be an array of options, see above. * @param string $table Name of database table to use. * @param string $ds DataSource connection name. * @return void */ public function __construct($id = false, $table = null, $ds = null) { $this->validate = array( 'name' => array( 'notempty' => array( 'rule' => array('notempty'), 'message' => __d('invoices', 'Please, write a name.'), 'allowEmpty' => false, 'required' => true, ), ), 'value' => array( 'notempty' => array( 'rule' => array('notempty'), 'message' => __d('invoices', 'Please, write a value.'), 'allowEmpty' => false, 'required' => true, ), ), 'tag' => array( 'notempty' => array( 'rule' => array('notempty'), 'message' => __d('invoices', 'Please, write a tag.'), 'allowEmpty' => false, 'required' => true, 'last' => false ), 'isUnique' => array( 'rule' => array('isUnique'), 'message' => __d('invoices', 'The tag must be unique.'), ) ), ); parent::__construct($id, $table, $ds); } }
using UnityEditor; using UnityEditor.Callbacks; namespace Agens.StickersEditor { public class StickersBuildPostprocessor { [PostProcessBuild(1)] public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) { if (target != BuildTarget.iOS) { return; } StickersExport.WriteToProject(pathToBuiltProject); } } }
<?php // // Copyright (c) 2020-2022 Grigore Stefan <g_stefan@yahoo.com> // Created by Grigore Stefan <g_stefan@yahoo.com> // // MIT License (MIT) <http://opensource.org/licenses/MIT> // defined("XYO_CLOUD") or die("Access is denied"); $this->processModel("set-primary-key-value-one"); $this->processModel("set-ds"); if (!$this->isError()) { $this->processModel("table-toggle"); }; $this->doRedirect("table-view");
/*eslint-disable react/prop-types*/ import React, { Component } from 'react' import ReactDOM from 'react-dom' import { createStore } from 'redux' import { Provider, connect, ReactReduxContext } from '../../src/index.js' import * as rtl from '@testing-library/react' import '@testing-library/jest-dom/extend-expect' const createExampleTextReducer = () => (state = 'example text') => state describe('React', () => { describe('Provider', () => { afterEach(() => rtl.cleanup()) const createChild = (storeKey = 'store') => { class Child extends Component { render() { return ( <ReactReduxContext.Consumer> {({ store }) => { let text = '' if (store) { text = store.getState().toString() } return ( <div data-testid="store"> {storeKey} - {text} </div> ) }} </ReactReduxContext.Consumer> ) } } return Child } const Child = createChild() it('should not enforce a single child', () => { const store = createStore(() => ({})) // Ignore propTypes warnings const propTypes = Provider.propTypes Provider.propTypes = {} const spy = jest.spyOn(console, 'error').mockImplementation(() => {}) expect(() => rtl.render( <Provider store={store}> <div /> </Provider> ) ).not.toThrow() expect(() => rtl.render(<Provider store={store} />)).not.toThrow( /children with exactly one child/ ) expect(() => rtl.render( <Provider store={store}> <div /> <div /> </Provider> ) ).not.toThrow(/a single React element child/) spy.mockRestore() Provider.propTypes = propTypes }) it('should add the store to context', () => { const store = createStore(createExampleTextReducer()) const spy = jest.spyOn(console, 'error').mockImplementation(() => {}) const tester = rtl.render( <Provider store={store}> <Child /> </Provider> ) expect(spy).toHaveBeenCalledTimes(0) spy.mockRestore() expect(tester.getByTestId('store')).toHaveTextContent( 'store - example text' ) }) it('accepts new store in props', () => { const store1 = createStore((state = 10) => state + 1) const store2 = createStore((state = 10) => state * 2) const store3 = createStore((state = 10) => state * state + 1) let externalSetState class ProviderContainer extends Component { constructor() { super() this.state = { store: store1 } externalSetState = this.setState.bind(this) } render() { return ( <Provider store={this.state.store}> <Child /> </Provider> ) } } const tester = rtl.render(<ProviderContainer />) expect(tester.getByTestId('store')).toHaveTextContent('store - 11') rtl.act(() => { externalSetState({ store: store2 }) }) expect(tester.getByTestId('store')).toHaveTextContent('store - 20') rtl.act(() => { store1.dispatch({ type: 'hi' }) }) expect(tester.getByTestId('store')).toHaveTextContent('store - 20') rtl.act(() => { store2.dispatch({ type: 'hi' }) }) expect(tester.getByTestId('store')).toHaveTextContent('store - 20') rtl.act(() => { externalSetState({ store: store3 }) }) expect(tester.getByTestId('store')).toHaveTextContent('store - 101') rtl.act(() => { store1.dispatch({ type: 'hi' }) }) expect(tester.getByTestId('store')).toHaveTextContent('store - 101') rtl.act(() => { store2.dispatch({ type: 'hi' }) }) expect(tester.getByTestId('store')).toHaveTextContent('store - 101') rtl.act(() => { store3.dispatch({ type: 'hi' }) }) expect(tester.getByTestId('store')).toHaveTextContent('store - 101') }) it('should handle subscriptions correctly when there is nested Providers', () => { const reducer = (state = 0, action) => action.type === 'INC' ? state + 1 : state const innerStore = createStore(reducer) const innerMapStateToProps = jest.fn((state) => ({ count: state })) @connect(innerMapStateToProps) class Inner extends Component { render() { return <div>{this.props.count}</div> } } const outerStore = createStore(reducer) @connect((state) => ({ count: state })) class Outer extends Component { render() { return ( <Provider store={innerStore}> <Inner /> </Provider> ) } } rtl.render( <Provider store={outerStore}> <Outer /> </Provider> ) expect(innerMapStateToProps).toHaveBeenCalledTimes(1) rtl.act(() => { innerStore.dispatch({ type: 'INC' }) }) expect(innerMapStateToProps).toHaveBeenCalledTimes(2) }) it('should pass state consistently to mapState', () => { function stringBuilder(prev = '', action) { return action.type === 'APPEND' ? prev + action.body : prev } const store = createStore(stringBuilder) rtl.act(() => { store.dispatch({ type: 'APPEND', body: 'a' }) }) let childMapStateInvokes = 0 @connect((state) => ({ state })) class Container extends Component { emitChange() { store.dispatch({ type: 'APPEND', body: 'b' }) } render() { return ( <div> <button onClick={this.emitChange.bind(this)}>change</button> <ChildContainer parentState={this.props.state} /> </div> ) } } const childCalls = [] @connect((state, parentProps) => { childMapStateInvokes++ childCalls.push([state, parentProps.parentState]) // The state from parent props should always be consistent with the current state return {} }) class ChildContainer extends Component { render() { return <div /> } } const tester = rtl.render( <Provider store={store}> <Container /> </Provider> ) expect(childMapStateInvokes).toBe(1) // The store state stays consistent when setState calls are batched rtl.act(() => { store.dispatch({ type: 'APPEND', body: 'c' }) }) expect(childMapStateInvokes).toBe(2) expect(childCalls).toEqual([ ['a', 'a'], ['ac', 'ac'], ]) // setState calls DOM handlers are batched const button = tester.getByText('change') rtl.fireEvent.click(button) expect(childMapStateInvokes).toBe(3) // Provider uses unstable_batchedUpdates() under the hood rtl.act(() => { store.dispatch({ type: 'APPEND', body: 'd' }) }) expect(childCalls).toEqual([ ['a', 'a'], ['ac', 'ac'], // then store update is processed ['acb', 'acb'], // then store update is processed ['acbd', 'acbd'], // then store update is processed ]) expect(childMapStateInvokes).toBe(4) }) it('works in <StrictMode> without warnings (React 16.3+)', () => { if (!React.StrictMode) { return } const spy = jest.spyOn(console, 'error').mockImplementation(() => {}) const store = createStore(() => ({})) rtl.render( <React.StrictMode> <Provider store={store}> <div /> </Provider> </React.StrictMode> ) expect(spy).not.toHaveBeenCalled() }) it.skip('should unsubscribe before unmounting', () => { const store = createStore(createExampleTextReducer()) const subscribe = store.subscribe // Keep track of unsubscribe by wrapping subscribe() const spy = jest.fn(() => ({})) store.subscribe = (listener) => { const unsubscribe = subscribe(listener) return () => { spy() return unsubscribe() } } const div = document.createElement('div') ReactDOM.render( <Provider store={store}> <div /> </Provider>, div ) expect(spy).toHaveBeenCalledTimes(0) ReactDOM.unmountComponentAtNode(div) expect(spy).toHaveBeenCalledTimes(1) }) it('should handle store and children change in a the same render', () => { const reducerA = (state = { nestedA: { value: 'expectedA' } }) => state const reducerB = (state = { nestedB: { value: 'expectedB' } }) => state const storeA = createStore(reducerA) const storeB = createStore(reducerB) @connect((state) => ({ value: state.nestedA.value })) class ComponentA extends Component { render() { return <div data-testid="value">{this.props.value}</div> } } @connect((state) => ({ value: state.nestedB.value })) class ComponentB extends Component { render() { return <div data-testid="value">{this.props.value}</div> } } const { getByTestId, rerender } = rtl.render( <Provider store={storeA}> <ComponentA /> </Provider> ) expect(getByTestId('value')).toHaveTextContent('expectedA') rerender( <Provider store={storeB}> <ComponentB /> </Provider> ) expect(getByTestId('value')).toHaveTextContent('expectedB') }) }) })
module Nyaa module Commands module Admin extend Discordrb::Commands::CommandContainer command(:'bot.kill', help_available: false, permission_level: 4, permission_message: false) do |event| event.user.pm "Desligando..." Nyaa::Database::ModLog.create( event: :shutdown, moderator: event.user.distinct, moderator_id: event.user.id, server_id: event.server.id ) exit end command(:'bot.reiniciar', help_available: false, permission_level: 4, permission_message: false) do |event| event.user.pm "Reiniciando..." Nyaa::Database::ModLog.create( event: :restart, moderator: event.user.distinct, moderator_id: event.user.id, server_id: event.server.id ) exec "#{DIR}/start" end command(:'bot.avatar', help_available: false, permission_level: 4, permission_message: false) do |event, img| next "\\⚠ :: !bot.avatar [url]" unless img event.bot.profile.avatar = open(img) Nyaa::Database::ModLog.create( event: :avatar, moderator: event.user.distinct, moderator_id: event.user.id, server_id: event.server.id ) "Avatar alterado!" end command(:kick, help_available: false, permission_level: 2, permission_message: false) do |event, user, *reason| next "\\⚠ :: !kick [usuário] [razão]" if event.message.mentions.empty? || reason.empty? # event.server.kick( event.message.mentions.first.on( event.server ) ) user = event.message.mentions.first.on(event.server) log = Nyaa::Database::Ban.create( event: :kick, user: user.distinct, user_id: user.id, moderator: event.user.distinct, moderator_id: event.user.id, server_id: event.server.id, reason: reason.join(" ") ) log.transparency if CONFIG["transparency"] end command(:ban, help_available: false, permission_level: 3, permission_message: false) do |event, user, *reason| next "\\⚠ :: !ban [usuário] [razão]" if event.message.mentions.empty? || reason.empty? # event.server.kick( event.message.mentions.first.on( event.server ) ) user = event.message.mentions.first.on(event.server) log = Nyaa::Database::Ban.create( event: :ban, user: user.distinct, user_id: user.id, moderator: event.user.distinct, moderator_id: event.user.id, server_id: event.server.id, reason: reason.join(" ") ) log.transparency if CONFIG["transparency"] end end end end
using System; using System.Collections.Generic; using System.Linq; using hw.DebugFormatter; using hw.Scanner; using hw.UnitTest; using Reni; namespace ReniUI.Test { [UnitTest] [AutoCompleteFunctionInCompound] public sealed class AutoComplete : DependenceProvider { const string text = @"systemdata: { Memory: ((0 type *(125)) mutable) instance(); !mutable FreePointer: Memory array_reference mutable; }; repeat: @ ^ while () then(^ body(), repeat(^)); system: { MaxNumber8: @! '7f' to_number_of_base 16. MaxNumber16: @! '7fff' to_number_of_base 16. MaxNumber32: @! '7fffffff' to_number_of_base 16. MaxNumber64: @! '7fffffffffffffff' to_number_of_base 16. TextItemType: @! MaxNumber8 text_item type. NewMemory: @ { result: (((^ elementType) * 1) array_reference mutable) instance(systemdata FreePointer enable_reinterpretation). initializer: ^ initializer. count: ^ count. !mutable position: count type instance(0). repeat ( while: @ position < count, body: @ ( result(position) := initializer(position), position :=(position + 1) enable_cut ) ). systemdata FreePointer :=(systemdata FreePointer type) instance((result + count) mutable enable_reinterpretation) } result }; system MaxNumber8 + ; "; [UnitTest] public void GetDeclarationOptions() { var compiler = CompilerBrowser.FromText(text); for(var offset = 1; offset < text.Length; offset++) { var position = compiler.Source + offset; if((position + -1).Span(2).Id != "\r\n") { var t = compiler.DeclarationOptions(offset); Tracer.Assert(t != null, () => (new Source(text) + offset).Dump()); } } } } }
# codehub.github.io
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-23 08:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0003_auto_20171221_0336'), ] operations = [ migrations.AlterField( model_name='dailyproductivitylog', name='source', field=models.CharField(choices=[('api', 'Api'), ('ios', 'Ios'), ('android', 'Android'), ('mobile', 'Mobile'), ('web', 'Web'), ('user_excel', 'User_Excel'), ('text_message', 'Text_Message')], max_length=50), ), migrations.AlterField( model_name='sleeplog', name='source', field=models.CharField(choices=[('api', 'Api'), ('ios', 'Ios'), ('android', 'Android'), ('mobile', 'Mobile'), ('web', 'Web'), ('user_excel', 'User_Excel'), ('text_message', 'Text_Message')], max_length=50), ), migrations.AlterField( model_name='supplementlog', name='source', field=models.CharField(choices=[('api', 'Api'), ('ios', 'Ios'), ('android', 'Android'), ('mobile', 'Mobile'), ('web', 'Web'), ('user_excel', 'User_Excel'), ('text_message', 'Text_Message')], default='web', max_length=50), ), migrations.AlterField( model_name='useractivitylog', name='source', field=models.CharField(choices=[('api', 'Api'), ('ios', 'Ios'), ('android', 'Android'), ('mobile', 'Mobile'), ('web', 'Web'), ('user_excel', 'User_Excel'), ('text_message', 'Text_Message')], default='web', max_length=50), ), migrations.AlterField( model_name='usermoodlog', name='source', field=models.CharField(choices=[('api', 'Api'), ('ios', 'Ios'), ('android', 'Android'), ('mobile', 'Mobile'), ('web', 'Web'), ('user_excel', 'User_Excel'), ('text_message', 'Text_Message')], default='web', max_length=50), ), ]