code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("hazlo.api")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("hazlo.api")] [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("bab7fc86-e578-4c9a-9d59-e19913a164b1")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
Hazlo/hazlo-web
Hazlo/hazlo.api/Properties/AssemblyInfo.cs
C#
unlicense
1,412
/** * @defgroup Win Win * @ingroup Elementary * * @image html win_inheritance_tree.png * @image latex win_inheritance_tree.eps * * @image html img/widget/win/preview-00.png * @image latex img/widget/win/preview-00.eps * * The window class of Elementary. Contains functions to manipulate * windows. The Evas engine used to render the window contents is specified * in the system or user elementary config files (whichever is found last), * and can be overridden with the ELM_ENGINE environment variable for * testing. Engines that may be supported (depending on Evas and Ecore-Evas * compilation setup and modules actually installed at runtime) are (listed * in order of best supported and most likely to be complete and work to * lowest quality). * * @li "x11", "x", "software-x11", "software_x11" (Software rendering in X11) * @li "gl", "opengl", "opengl-x11", "opengl_x11" (OpenGL or OpenGL-ES2 * rendering in X11) * @li "shot:..." (Virtual screenshot renderer - renders to output file and * exits) * @li "fb", "software-fb", "software_fb" (Linux framebuffer direct software * rendering) * @li "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL * buffer) * @li "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2 * rendering using SDL as the buffer) * @li "gdi", "software-gdi", "software_gdi" (Windows WIN32 rendering via * GDI with software) * @li "dfb", "directfb" (Rendering to a DirectFB window) * @li "x11-8", "x8", "software-8-x11", "software_8_x11" (Rendering in * grayscale using dedicated 8bit software engine in X11) * @li "x11-16", "x16", "software-16-x11", "software_16_x11" (Rendering in * X11 using 16bit software engine) * @li "wince-gdi", "software-16-wince-gdi", "software_16_wince_gdi" * (Windows CE rendering via GDI with 16bit software renderer) * @li "sdl-16", "software-16-sdl", "software_16_sdl" (Rendering to SDL * buffer with 16bit software renderer) * @li "ews" (rendering to EWS - Ecore + Evas Single Process Windowing System) * @li "gl-cocoa", "gl_cocoa", "opengl-cocoa", "opengl_cocoa" (OpenGL rendering in Cocoa) * @li "psl1ght" (PS3 rendering using PSL1GHT) * * All engines use a simple string to select the engine to render, EXCEPT * the "shot" engine. This actually encodes the output of the virtual * screenshot and how long to delay in the engine string. The engine string * is encoded in the following way: * * "shot:[delay=XX][:][repeat=DDD][:][file=XX]" * * Where options are separated by a ":" char if more than one option is * given, with delay, if provided being the first option and file the last * (order is important). The delay specifies how long to wait after the * window is shown before doing the virtual "in memory" rendering and then * save the output to the file specified by the file option (and then exit). * If no delay is given, the default is 0.5 seconds. If no file is given the * default output file is "out.png". Repeat option is for continuous * capturing screenshots. Repeat range is from 1 to 999 and filename is * fixed to "out001.png" Some examples of using the shot engine: * * ELM_ENGINE="shot:delay=1.0:repeat=5:file=elm_test.png" elementary_test * ELM_ENGINE="shot:delay=1.0:file=elm_test.png" elementary_test * ELM_ENGINE="shot:file=elm_test2.png" elementary_test * ELM_ENGINE="shot:delay=2.0" elementary_test * ELM_ENGINE="shot:" elementary_test * * Signals that you can add callbacks for are: * * @li "delete,request": the user requested to close the window. See * elm_win_autodel_set(). * @li "focus,in": window got focus (deprecated. use "focused" instead.) * @li "focus,out": window lost focus (deprecated. use "unfocused" instead.) * @li "moved": window that holds the canvas was moved * @li "withdrawn": window is still managed normally but removed from view * @li "iconified": window is minimized (perhaps into an icon or taskbar) * @li "normal": window is in a normal state (not withdrawn or iconified) * @li "stick": window has become sticky (shows on all desktops) * @li "unstick": window has stopped being sticky * @li "fullscreen": window has become fullscreen * @li "unfullscreen": window has stopped being fullscreen * @li "maximized": window has been maximized * @li "unmaximized": window has stopped being maximized * @li "ioerr": there has been a low-level I/O error with the display system * @li "indicator,prop,changed": an indicator's property has been changed * @li "rotation,changed": window rotation has been changed * @li "profile,changed": profile of the window has been changed * @li "focused" : When the win has received focus. (since 1.8) * @li "unfocused" : When the win has lost focus. (since 1.8) * * Note that calling evas_object_show() after window contents creation is * recommended. It will trigger evas_smart_objects_calculate() and some backend * calls directly. For example, XMapWindow is called directly during * evas_object_show() in X11 engine. * * Examples: * @li @ref win_example_01 * * @{ */ #include <elm_win_common.h> #ifdef EFL_EO_API_SUPPORT #include <elm_win_eo.h> #endif #ifndef EFL_NOLEGACY_API_SUPPORT #include <elm_win_legacy.h> #endif /** * @} */
maikodaraine/EnlightenmentUbuntu
core/elementary/src/lib/elm_win.h
C
unlicense
5,226
/** ****************************************************************************** * @file USB_Host/MSC_RTOS/Src/menu.c * @author MCD Application Team * @version V1.3.0 * @date 18-December-2015 * @brief This file implements Menu Functions ****************************************************************************** * @attention * * <h2><center>&copy; Copyright © 2015 STMicroelectronics International N.V. * All rights reserved.</center></h2> * * Redistribution and use in source and binary forms, with or without * modification, are permitted, provided that the following conditions are met: * * 1. Redistribution 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 STMicroelectronics nor the names of other * contributors to this software may be used to endorse or promote products * derived from this software without specific written permission. * 4. This software, including modifications and/or derivative works of this * software, must execute solely and exclusively on microcontroller or * microprocessor devices manufactured by or for STMicroelectronics. * 5. Redistribution and use of this software other than as permitted under * this license is void and will automatically terminate your rights under * this license. * * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT * SHALL STMICROELECTRONICS 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. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ #define MENU_UPDATE_EVENT 0x10 /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ MSC_DEMO_StateMachine msc_demo; osSemaphoreId MenuEvent; uint8_t *MSC_main_menu[] = { (uint8_t *)" 1 - File Operations ", (uint8_t *)" 2 - Explorer Disk ", (uint8_t *)" 3 - Re-Enumerate ", }; /* Private function prototypes -----------------------------------------------*/ static void MSC_SelectItem(uint8_t **menu, uint8_t item); static void MSC_DEMO_ProbeKey(JOYState_TypeDef state); static void MSC_MenuThread(void const *argument); /* Private functions ---------------------------------------------------------*/ /** * @brief Demo state machine. * @param None * @retval None */ void Menu_Init(void) { /* Create Menu Semaphore */ osSemaphoreDef(osSem); MenuEvent = osSemaphoreCreate(osSemaphore(osSem), 1); /* Force menu to show Item 0 by default */ osSemaphoreRelease(MenuEvent); /* Menu task */ #if defined(__GNUC__) osThreadDef(Menu_Thread, MSC_MenuThread, osPriorityHigh, 0, 8 * configMINIMAL_STACK_SIZE); #else osThreadDef(Menu_Thread, MSC_MenuThread, osPriorityHigh, 0, 4 * configMINIMAL_STACK_SIZE); #endif osThreadCreate(osThread(Menu_Thread), NULL); BSP_LCD_SetTextColor(LCD_COLOR_GREEN); BSP_LCD_DisplayStringAtLine(15, (uint8_t *)"Use [Joystick Left/Right] to scroll up/down"); BSP_LCD_DisplayStringAtLine(16, (uint8_t *)"Use [Joystick Up/Down] to scroll MSC menu"); } /** * @brief User task * @param pvParameters not used * @retval None */ static void MSC_MenuThread(void const *argument) { for(;;) { if(osSemaphoreWait(MenuEvent, osWaitForever) == osOK) { switch(msc_demo.state) { case MSC_DEMO_IDLE: MSC_SelectItem(MSC_main_menu, 0); msc_demo.state = MSC_DEMO_WAIT; msc_demo.select = 0; osSemaphoreRelease(MenuEvent); break; case MSC_DEMO_WAIT: MSC_SelectItem(MSC_main_menu, msc_demo.select & 0x7F); /* Handle select item */ if(msc_demo.select & 0x80) { switch(msc_demo.select & 0x7F) { case 0: msc_demo.state = MSC_DEMO_FILE_OPERATIONS; osSemaphoreRelease(MenuEvent); break; case 1: msc_demo.state = MSC_DEMO_EXPLORER; osSemaphoreRelease(MenuEvent); break; case 2: msc_demo.state = MSC_REENUMERATE; osSemaphoreRelease(MenuEvent); break; default: break; } } break; case MSC_DEMO_FILE_OPERATIONS: /* Read and Write File Here */ if(Appli_state == APPLICATION_READY) { MSC_File_Operations(); } msc_demo.state = MSC_DEMO_WAIT; break; case MSC_DEMO_EXPLORER: /* Display disk content */ if(Appli_state == APPLICATION_READY) { Explore_Disk("0:/", 1); } msc_demo.state = MSC_DEMO_WAIT; break; case MSC_REENUMERATE: /* Force MSC Device to re-enumerate */ USBH_ReEnumerate(&hUSBHost); msc_demo.state = MSC_DEMO_WAIT; break; default: break; } msc_demo.select &= 0x7F; } } } /** * @brief Manages the menu on the screen. * @param menu: Menu table * @param item: Selected item to be highlighted * @retval None */ static void MSC_SelectItem(uint8_t **menu, uint8_t item) { BSP_LCD_SetTextColor(LCD_COLOR_WHITE); switch(item) { case 0: BSP_LCD_SetBackColor(LCD_COLOR_MAGENTA); BSP_LCD_DisplayStringAtLine(17, menu [0]); BSP_LCD_SetBackColor(LCD_COLOR_BLUE); BSP_LCD_DisplayStringAtLine(18 , menu [1]); BSP_LCD_DisplayStringAtLine(19 , menu [2]); break; case 1: BSP_LCD_SetBackColor(LCD_COLOR_BLUE); BSP_LCD_DisplayStringAtLine(17, menu [0]); BSP_LCD_SetBackColor(LCD_COLOR_MAGENTA); BSP_LCD_DisplayStringAtLine(18, menu [1]); BSP_LCD_SetBackColor(LCD_COLOR_BLUE); BSP_LCD_DisplayStringAtLine(19, menu [2]); break; case 2: BSP_LCD_SetBackColor(LCD_COLOR_BLUE); BSP_LCD_DisplayStringAtLine(17, menu [0]); BSP_LCD_SetBackColor(LCD_COLOR_BLUE); BSP_LCD_DisplayStringAtLine(18, menu [1]); BSP_LCD_SetBackColor(LCD_COLOR_MAGENTA); BSP_LCD_DisplayStringAtLine(19, menu [2]); break; } BSP_LCD_SetBackColor(LCD_COLOR_BLACK); } /** * @brief Probes the MSC joystick state. * @param state: Joystick state * @retval None */ static void MSC_DEMO_ProbeKey(JOYState_TypeDef state) { /* Handle Menu inputs */ if((state == JOY_UP) && (msc_demo.select > 0)) { msc_demo.select--; } else if((state == JOY_DOWN) && (msc_demo.select < 2)) { msc_demo.select++; } else if(state == JOY_SEL) { msc_demo.select |= 0x80; } } /** * @brief EXTI line detection callbacks. * @param GPIO_Pin: Specifies the pins connected EXTI line * @retval None */ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { static JOYState_TypeDef JoyState = JOY_NONE; if(GPIO_Pin == GPIO_PIN_14) { /* Get the Joystick State */ JoyState = BSP_JOY_GetState(); MSC_DEMO_ProbeKey(JoyState); switch(JoyState) { case JOY_LEFT: LCD_LOG_ScrollBack(); break; case JOY_RIGHT: LCD_LOG_ScrollForward(); break; default: break; } /* Clear joystick interrupt pending bits */ BSP_IO_ITClear(JOY_ALL_PINS); osSemaphoreRelease(MenuEvent); } } /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
hyller/CodeLibrary
stm32cubef1/STM32Cube_FW_F1_V1.3.0/Projects/STM3210C_EVAL/Applications/USB_Host/MSC_RTOS/Src/menu.c
C
unlicense
9,254
/* FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. This file is part of the FreeRTOS distribution. FreeRTOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. *************************************************************************** >>! NOTE: The modification to the GPL is included to allow you to !<< >>! distribute a combined work that includes FreeRTOS without being !<< >>! obliged to provide the source code for proprietary components !<< >>! outside of the FreeRTOS kernel. !<< *************************************************************************** FreeRTOS 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. Full license text is available on the following link: http://www.freertos.org/a00114.html *************************************************************************** * * * FreeRTOS provides completely free yet professionally developed, * * robust, strictly quality controlled, supported, and cross * * platform software that is more than just the market leader, it * * is the industry's de facto standard. * * * * Help yourself get started quickly while simultaneously helping * * to support the FreeRTOS project by purchasing a FreeRTOS * * tutorial book, reference manual, or both: * * http://www.FreeRTOS.org/Documentation * * * *************************************************************************** http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading the FAQ page "My application does not run, what could be wrong?". Have you defined configASSERT()? http://www.FreeRTOS.org/support - In return for receiving this top quality embedded software for free we request you assist our global community by participating in the support forum. http://www.FreeRTOS.org/training - Investing in training allows your team to be as productive as possible as early as possible. Now you can receive FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers Ltd, and the world's leading authority on the world's leading RTOS. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool, a DOS compatible FAT file system, and our tiny thread aware UDP/IP stack. http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS licenses offer ticketed support, indemnification and commercial middleware. http://www.SafeRTOS.com - High Integrity Systems also provide a safety engineered and independently SIL3 certified version for use in safety and mission critical applications that require provable dependability. 1 tab == 4 spaces! */ /* * A sample implementation of pvPortMalloc() that allows the heap to be defined * across multiple non-contigous blocks and combines (coalescences) adjacent * memory blocks as they are freed. * * See heap_1.c, heap_2.c, heap_3.c and heap_4.c for alternative * implementations, and the memory management pages of http://www.FreeRTOS.org * for more information. * * Usage notes: * * vPortDefineHeapRegions() ***must*** be called before pvPortMalloc(). * pvPortMalloc() will be called if any task objects (tasks, queues, event * groups, etc.) are created, therefore vPortDefineHeapRegions() ***must*** be * called before any other objects are defined. * * vPortDefineHeapRegions() takes a single parameter. The parameter is an array * of HeapRegion_t structures. HeapRegion_t is defined in portable.h as * * typedef struct HeapRegion * { * uint8_t *pucStartAddress; << Start address of a block of memory that will be part of the heap. * size_t xSizeInBytes; << Size of the block of memory. * } HeapRegion_t; * * The array is terminated using a NULL zero sized region definition, and the * memory regions defined in the array ***must*** appear in address order from * low address to high address. So the following is a valid example of how * to use the function. * * HeapRegion_t xHeapRegions[] = * { * { ( uint8_t * ) 0x80000000UL, 0x10000 }, << Defines a block of 0x10000 bytes starting at address 0x80000000 * { ( uint8_t * ) 0x90000000UL, 0xa0000 }, << Defines a block of 0xa0000 bytes starting at address of 0x90000000 * { NULL, 0 } << Terminates the array. * }; * * vPortDefineHeapRegions( xHeapRegions ); << Pass the array into vPortDefineHeapRegions(). * * Note 0x80000000 is the lower address so appears in the array first. * */ #include <stdlib.h> /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining all the API functions to use the MPU wrappers. That should only be done when task.h is included from an application file. */ #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE #include "FreeRTOS.h" #include "task.h" #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE /* Block sizes must not get too small. */ #define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( uxHeapStructSize << 1 ) ) /* Assumes 8bit bytes! */ #define heapBITS_PER_BYTE ( ( size_t ) 8 ) /* Define the linked list structure. This is used to link free blocks in order of their memory address. */ typedef struct A_BLOCK_LINK { struct A_BLOCK_LINK *pxNextFreeBlock; /*<< The next free block in the list. */ size_t xBlockSize; /*<< The size of the free block. */ } BlockLink_t; /*-----------------------------------------------------------*/ /* * Inserts a block of memory that is being freed into the correct position in * the list of free memory blocks. The block being freed will be merged with * the block in front it and/or the block behind it if the memory blocks are * adjacent to each other. */ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ); /*-----------------------------------------------------------*/ /* The size of the structure placed at the beginning of each allocated memory block must by correctly byte aligned. */ static const uint32_t uxHeapStructSize = ( ( sizeof ( BlockLink_t ) + ( portBYTE_ALIGNMENT - 1 ) ) & ~portBYTE_ALIGNMENT_MASK ); /* Create a couple of list links to mark the start and end of the list. */ static BlockLink_t xStart, *pxEnd = NULL; /* Keeps track of the number of free bytes remaining, but says nothing about fragmentation. */ static size_t xFreeBytesRemaining = 0; static size_t xMinimumEverFreeBytesRemaining = 0; /* Gets set to the top bit of an size_t type. When this bit in the xBlockSize member of an BlockLink_t structure is set then the block belongs to the application. When the bit is free the block is still part of the free heap space. */ static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; /* The heap must be initialised before the first call to prvPortMalloc(). */ configASSERT( pxEnd ); vTaskSuspendAll(); { /* Check the requested block size is not so large that the top bit is set. The top bit of the block size member of the BlockLink_t structure is used to determine who owns the block - the application or the kernel, so it must be free. */ if( ( xWantedSize & xBlockAllocatedBit ) == 0 ) { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) { xWantedSize += uxHeapStructSize; /* Ensure that blocks are always aligned to the required number of bytes. */ if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); } else { mtCOVERAGE_TEST_MARKER(); } } else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + uxHeapStructSize ); /* This block is being returned for use so must be taken out of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; /* If the block is larger than required it can be split into two. */ if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) { /* This block is to be split into two. Create a new block following the number of bytes requested. The void cast is used to prevent byte alignment warnings from the compiler. */ pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; pxBlock->xBlockSize = xWantedSize; /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); } else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; } else { mtCOVERAGE_TEST_MARKER(); } /* The block is being returned - it is allocated and owned by the application and has no "next" block. */ pxBlock->xBlockSize |= xBlockAllocatedBit; pxBlock->pxNextFreeBlock = NULL; } else { mtCOVERAGE_TEST_MARKER(); } } else { mtCOVERAGE_TEST_MARKER(); } } else { mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); #if( configUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) { extern void vApplicationMallocFailedHook( void ); vApplicationMallocFailedHook(); } else { mtCOVERAGE_TEST_MARKER(); } } #endif return pvReturn; } /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { uint8_t *puc = ( uint8_t * ) pv; BlockLink_t *pxLink; if( pv != NULL ) { /* The memory being freed will have an BlockLink_t structure immediately before it. */ puc -= uxHeapStructSize; /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); configASSERT( pxLink->pxNextFreeBlock == NULL ); if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ) { if( pxLink->pxNextFreeBlock == NULL ) { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; vTaskSuspendAll(); { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); } ( void ) xTaskResumeAll(); } else { mtCOVERAGE_TEST_MARKER(); } } else { mtCOVERAGE_TEST_MARKER(); } } } /*-----------------------------------------------------------*/ size_t xPortGetFreeHeapSize( void ) { return xFreeBytesRemaining; } /*-----------------------------------------------------------*/ size_t xPortGetMinimumEverFreeHeapSize( void ) { return xMinimumEverFreeBytesRemaining; } /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { BlockLink_t *pxIterator; uint8_t *puc; /* Iterate through the list until a block is found that has a higher address than the block being inserted. */ for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock ) { /* Nothing to do here, just iterate to the right position. */ } /* Do the block being inserted, and the block it is being inserted after make a contiguous block of memory? */ puc = ( uint8_t * ) pxIterator; if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; pxBlockToInsert = pxIterator; } else { mtCOVERAGE_TEST_MARKER(); } /* Do the block being inserted, and the block it is being inserted before make a contiguous block of memory? */ puc = ( uint8_t * ) pxBlockToInsert; if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) { if( pxIterator->pxNextFreeBlock != pxEnd ) { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; } else { pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; } /* If the block being inserted plugged a gab, so was merged with the block before and the block after, then it's pxNextFreeBlock pointer will have already been set, and should not be set here as that would make it point to itself. */ if( pxIterator != pxBlockToInsert ) { pxIterator->pxNextFreeBlock = pxBlockToInsert; } else { mtCOVERAGE_TEST_MARKER(); } } /*-----------------------------------------------------------*/ void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) { BlockLink_t *pxFirstFreeBlockInRegion = NULL, *pxPreviousFreeBlock; uint8_t *pucAlignedHeap; size_t xTotalRegionSize, xTotalHeapSize = 0; BaseType_t xDefinedRegions = 0; uint32_t ulAddress; const HeapRegion_t *pxHeapRegion; /* Can only call once! */ configASSERT( pxEnd == NULL ); pxHeapRegion = &( pxHeapRegions[ xDefinedRegions ] ); while( pxHeapRegion->xSizeInBytes > 0 ) { xTotalRegionSize = pxHeapRegion->xSizeInBytes; /* Ensure the heap region starts on a correctly aligned boundary. */ ulAddress = ( uint32_t ) pxHeapRegion->pucStartAddress; if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) { ulAddress += ( portBYTE_ALIGNMENT - 1 ); ulAddress &= ~portBYTE_ALIGNMENT_MASK; /* Adjust the size for the bytes lost to alignment. */ xTotalRegionSize -= ulAddress - ( uint32_t ) pxHeapRegion->pucStartAddress; } pucAlignedHeap = ( uint8_t * ) ulAddress; /* Set xStart if it has not already been set. */ if( xDefinedRegions == 0 ) { /* xStart is used to hold a pointer to the first item in the list of free blocks. The void cast is used to prevent compiler warnings. */ xStart.pxNextFreeBlock = ( BlockLink_t * ) pucAlignedHeap; xStart.xBlockSize = ( size_t ) 0; } else { /* Should only get here if one region has already been added to the heap. */ configASSERT( pxEnd != NULL ); /* Check blocks are passed in with increasing start addresses. */ configASSERT( ulAddress > ( uint32_t ) pxEnd ); } /* Remember the location of the end marker in the previous region, if any. */ pxPreviousFreeBlock = pxEnd; /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the region space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalRegionSize; ulAddress -= uxHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( BlockLink_t * ) ulAddress; pxEnd->xBlockSize = 0; pxEnd->pxNextFreeBlock = NULL; /* To start with there is a single free block in this region that is sized to take up the entire heap region minus the space taken by the free block structure. */ pxFirstFreeBlockInRegion = ( BlockLink_t * ) pucAlignedHeap; pxFirstFreeBlockInRegion->xBlockSize = ulAddress - ( uint32_t ) pxFirstFreeBlockInRegion; pxFirstFreeBlockInRegion->pxNextFreeBlock = pxEnd; /* If this is not the first region that makes up the entire heap space then link the previous region to this region. */ if( pxPreviousFreeBlock != NULL ) { pxPreviousFreeBlock->pxNextFreeBlock = pxFirstFreeBlockInRegion; } xTotalHeapSize += pxFirstFreeBlockInRegion->xBlockSize; /* Move onto the next HeapRegion_t structure. */ xDefinedRegions++; pxHeapRegion = &( pxHeapRegions[ xDefinedRegions ] ); } xMinimumEverFreeBytesRemaining = xTotalHeapSize; xFreeBytesRemaining = xTotalHeapSize; /* Check something was actually defined before it is accessed. */ configASSERT( xTotalHeapSize ); /* Work out the position of the top bit in a size_t variable. */ xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); }
hyller/GladiatorCots
QP/v5.4.2/qpcpp/3rd_party/FreeRTOS/Source/portable/MemMang/heap_5.c
C
unlicense
20,516
package com.yao.spring_hello_world_demo.controller; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.RequestBuilder; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultHandlers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @RunWith(SpringRunner.class) @SpringBootTest public class UserControllerRESTfultest { private MockMvc mvc; @Before public void setUp() throws Exception { mvc = MockMvcBuilders.standaloneSetup(new UserControllerRESTfultest()).alwaysDo(MockMvcResultHandlers.print()).build(); } @Test public void UserControllerRESTfulTest() throws Exception { // 测试UserControllerRESTful RequestBuilder request = null; // 1、get查一下user列表,应该为空 mvc.perform(MockMvcRequestBuilders.get("/users/").accept(MediaType.APPLICATION_JSON)) .andExpect(MockMvcResultMatchers.status().isOk()).andDo(MockMvcResultHandlers.print()).andReturn();; //.andExpect(content().string(equals("[]"))); // 2、post提交一个user request = MockMvcRequestBuilders.post("/users/").param("id", "1").param("name", "测试大师").param("age", "20"); mvc.perform(request).andReturn();;//.andExpect(content().string(equals("success"))); // 3、get获取user列表,应该有刚才插入的数据 request = MockMvcRequestBuilders.get("/users/"); mvc.perform(request).andExpect(MockMvcResultMatchers.status().isOk()).andDo(MockMvcResultHandlers.print()).andReturn();; //.andExpect(content().string(equals("[{\"id\":1,\"name\":\"测试大师\",\"age\":20}]"))); // 4、put修改id为1的user request = MockMvcRequestBuilders.put("/users/1").param("name", "测试终极大师").param("age", "30"); mvc.perform(request).andReturn();;//.andExpect(content().string(equals("success"))); // 5、get一个id为1的user request = MockMvcRequestBuilders.get("/users/1"); mvc.perform(request).andReturn();;//.andExpect(content().string(equals("{\"id\":1,\"name\":\"测试终极大师\",\"age\":30}"))); // 6、del删除id为1的user request = MockMvcRequestBuilders.delete("/users/1"); mvc.perform(request).andReturn();;//.andExpect(content().string(equals("success"))); // 7、get查一下user列表,应该为空 request = MockMvcRequestBuilders.get("/users/"); mvc.perform(request).andExpect(MockMvcResultMatchers.status().isOk()).andDo(MockMvcResultHandlers.print()).andReturn();;//.andExpect(content().string(equals("[]"))); } }
xiaoxiaoyao/MyApp
JAVA/spring_hello_world_demo/src/test/java/com/yao/spring_hello_world_demo/controller/UserControllerRESTfultest.java
Java
unlicense
2,876
from h2o.estimators.xgboost import * from h2o.estimators.gbm import * from tests import pyunit_utils def xgboost_vs_gbm_monotone_test(): assert H2OXGBoostEstimator.available() is True monotone_constraints = { "AGE": 1 } xgboost_params = { "tree_method": "exact", "seed": 123, "backend": "cpu", # CPU Backend is forced for the results to be comparable "monotone_constraints": monotone_constraints } gbm_params = { "seed": 42, "monotone_constraints": monotone_constraints } prostate_hex = h2o.import_file(pyunit_utils.locate('smalldata/prostate/prostate.csv')) prostate_hex["CAPSULE"] = prostate_hex["CAPSULE"].asfactor() xgboost_model = H2OXGBoostEstimator(**xgboost_params) xgboost_model.train(y="CAPSULE", ignored_columns=["ID"], training_frame=prostate_hex) gbm_model = H2OGradientBoostingEstimator(**gbm_params) gbm_model.train(y="CAPSULE", ignored_columns=["ID"], training_frame=prostate_hex) xgb_varimp_percentage = dict(map(lambda x: (x[0], x[3]), xgboost_model.varimp(use_pandas=False))) gbm_varimp_percentage = dict(map(lambda x: (x[0], x[3]), gbm_model.varimp(use_pandas=False))) # We expect the variable importances of AGE to be similar assert xgb_varimp_percentage["VOL"] > xgb_varimp_percentage["AGE"] assert xgb_varimp_percentage["AGE"] > xgb_varimp_percentage["RACE"] print("XGBoost varimp of AGE = %s" % xgb_varimp_percentage["AGE"]) print("GBM varimp of AGE = %s" % gbm_varimp_percentage["AGE"]) assert abs(xgb_varimp_percentage["AGE"] - gbm_varimp_percentage["AGE"]) < 0.02 if __name__ == "__main__": pyunit_utils.standalone_test(xgboost_vs_gbm_monotone_test) else: xgboost_vs_gbm_monotone_test()
michalkurka/h2o-3
h2o-py/tests/testdir_misc/pyunit_xgboost_gbm_monotone.py
Python
apache-2.0
1,780
/* * Copyright 2016 Alexey Andreev. * * 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 org.teavm.model.optimization; import java.util.List; import org.teavm.common.IntegerStack; import org.teavm.model.BasicBlock; import org.teavm.model.Incoming; import org.teavm.model.Phi; import org.teavm.model.Program; import org.teavm.model.TryCatchBlock; import org.teavm.model.util.InstructionTransitionExtractor; public class UnreachableBasicBlockEliminator { public void optimize(Program program) { if (program.basicBlockCount() == 0) { return; } InstructionTransitionExtractor transitionExtractor = new InstructionTransitionExtractor(); boolean[] reachable = new boolean[program.basicBlockCount()]; IntegerStack stack = new IntegerStack(program.basicBlockCount()); stack.push(0); while (!stack.isEmpty()) { int i = stack.pop(); if (reachable[i]) { continue; } reachable[i] = true; BasicBlock block = program.basicBlockAt(i); block.getLastInstruction().acceptVisitor(transitionExtractor); for (BasicBlock successor : transitionExtractor.getTargets()) { if (!reachable[successor.getIndex()]) { stack.push(successor.getIndex()); } } for (TryCatchBlock tryCatch : block.getTryCatchBlocks()) { stack.push(tryCatch.getHandler().getIndex()); } } for (int i = 0; i < reachable.length; ++i) { if (!reachable[i]) { BasicBlock block = program.basicBlockAt(i); if (block.getLastInstruction() != null) { block.getLastInstruction().acceptVisitor(transitionExtractor); for (BasicBlock successor : transitionExtractor.getTargets()) { successor.removeIncomingsFrom(block); } } for (TryCatchBlock tryCatch : block.getTryCatchBlocks()) { tryCatch.getHandler().removeIncomingsFrom(block); } program.deleteBasicBlock(i); } } for (int i = 0; i < program.basicBlockCount(); ++i) { BasicBlock block = program.basicBlockAt(i); if (block == null) { continue; } for (Phi phi : block.getPhis()) { List<Incoming> incomingList = phi.getIncomings(); for (int j = 0; j < incomingList.size(); ++j) { Incoming incoming = incomingList.get(j); if (!reachable[incoming.getSource().getIndex()]) { incomingList.remove(j--); } } } } program.pack(); } }
jtulach/teavm
core/src/main/java/org/teavm/model/optimization/UnreachableBasicBlockEliminator.java
Java
apache-2.0
3,402
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="fi_FI"> <context> <name>AboutBox</name> <message> <location filename="aboutbox.ui" line="14"/> <source>About Q Light Controller Plus</source> <oldsource>About Q Light Controller</oldsource> <translation type="unfinished">Tietoja Q Light Controller-sovelluksesta</translation> </message> <message> <location filename="aboutbox.ui" line="69"/> <source>Contributors</source> <translation>Avustajat</translation> </message> <message> <location filename="aboutbox.ui" line="116"/> <source>This application is licensed under the terms of the Apache 2.0 license.</source> <oldsource>This application is licensed under the terms of GNU GPL version 2.</oldsource> <translation>Tämä sovellus on lisensoitu Apache versio 2.0:n alla.</translation> </message> <message> <location filename="aboutbox.cpp" line="41"/> <source>and contributors:</source> <translation>ja avustajat:</translation> </message> <message> <location filename="aboutbox.cpp" line="42"/> <source>Website: %1</source> <translation>Web-osoite: %1</translation> </message> </context> <context> <name>AddChannelsGroup</name> <message> <location filename="addchannelsgroup.ui" line="14"/> <source>Select Channels</source> <translation type="unfinished"></translation> </message> <message> <location filename="addchannelsgroup.ui" line="24"/> <source>Group Name</source> <translation type="unfinished"></translation> </message> <message> <location filename="addchannelsgroup.ui" line="48"/> <source>Name</source> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="addchannelsgroup.ui" line="53"/> <source>Type</source> <translation type="unfinished">Tyyppi</translation> </message> <message> <location filename="addchannelsgroup.ui" line="58"/> <source>Group</source> <translation type="unfinished"></translation> </message> <message> <location filename="addchannelsgroup.ui" line="66"/> <source>Apply changes to fixtures of the same type and mode</source> <oldsource>Apply changes to fixtures of the same type</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="addchannelsgroup.ui" line="73"/> <source>External Input</source> <translation type="unfinished">Ulkoinen ohjaus</translation> </message> <message> <location filename="addchannelsgroup.ui" line="79"/> <source>Input channel</source> <translation type="unfinished">Sisääntulon kanava</translation> </message> <message> <location filename="addchannelsgroup.ui" line="86"/> <source>The particular input channel within the input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="addchannelsgroup.ui" line="109"/> <source>The input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="addchannelsgroup.ui" line="119"/> <source>Choose an external input universe and channel that this group should listen to</source> <translation type="unfinished">Valitse sisääntulon universumi ja kanava, joilla tätä liukua voidaan ohjata</translation> </message> <message> <location filename="addchannelsgroup.ui" line="122"/> <source>Choose...</source> <translation type="unfinished">Valitse...</translation> </message> <message> <location filename="addchannelsgroup.ui" line="129"/> <source>When toggled, you can move an external slider/knob to assign it to this group.</source> <translation type="unfinished">Alaskytkettynä, voit liikuttaa ulkoista kontrollia kytkeäksesi sen tähän liukuun.</translation> </message> <message> <location filename="addchannelsgroup.ui" line="132"/> <source>Auto Detect</source> <translation type="unfinished">Automaattinen tunnistus</translation> </message> <message> <location filename="addchannelsgroup.ui" line="142"/> <source>Input universe</source> <translation type="unfinished">Sisääntulon universumi</translation> </message> <message> <location filename="addchannelsgroup.cpp" line="81"/> <source>Universe %1</source> <translation type="unfinished"></translation> </message> </context> <context> <name>AddFixture</name> <message> <location filename="addfixture.ui" line="14"/> <source>Add fixture</source> <translation>Lisää valaisin</translation> </message> <message> <location filename="addfixture.ui" line="234"/> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;ERROR: Address already used !&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="addfixture.ui" line="265"/> <source>Quick search</source> <oldsource>Quick search:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="addfixture.ui" line="282"/> <source>Fixture Model</source> <translation>Valaisimen malli</translation> </message> <message> <location filename="addfixture.ui" line="78"/> <source>Fixture Properties</source> <translation>Valaisimen ominaisuudet</translation> </message> <message> <location filename="addfixture.ui" line="84"/> <source>Name</source> <translation>Nimi</translation> </message> <message> <location filename="addfixture.ui" line="97"/> <source>A friendly name for the new fixture</source> <translation>Tuttavallinen nimi uudelle valaisimelle</translation> </message> <message> <location filename="addfixture.ui" line="104"/> <source>Mode</source> <translation>Tila</translation> </message> <message> <location filename="addfixture.ui" line="117"/> <source>Selected fixture mode</source> <translation>Valaisimelle valittu tila</translation> </message> <message> <location filename="addfixture.ui" line="148"/> <source>Address</source> <translation>Osoite</translation> </message> <message> <location filename="addfixture.ui" line="163"/> <source>The starting address of the (first) added fixture</source> <translation>(Ensimmäisen) lisättävän valaisimen aloitusosoite</translation> </message> <message> <location filename="addfixture.ui" line="176"/> <source>Address Tool</source> <translation type="unfinished"></translation> </message> <message> <location filename="addfixture.ui" line="189"/> <source>Channels</source> <translation>Kanavia</translation> </message> <message> <location filename="addfixture.ui" line="205"/> <source>Number of channels in the selected fixture</source> <translation>Kanavien määrä valitussa valaisimessa</translation> </message> <message> <location filename="addfixture.ui" line="221"/> <source>List of channels in the selected fixture mode</source> <translation>Valitussa tilassa käytössä olevat kanavat</translation> </message> <message> <location filename="addfixture.ui" line="131"/> <source>Universe</source> <translation>Universumi</translation> </message> <message> <location filename="addfixture.ui" line="20"/> <source>Multiple Fixtures</source> <translation>Useita valaisimia</translation> </message> <message> <location filename="addfixture.ui" line="26"/> <source>Quantity</source> <translation type="unfinished"></translation> </message> <message> <location filename="addfixture.ui" line="39"/> <source>Number of fixtures to add</source> <translation>Lisättävien valaisimien määrä</translation> </message> <message> <location filename="addfixture.ui" line="52"/> <source>Address gap</source> <translation>Osoitteiden väli</translation> </message> <message> <location filename="addfixture.ui" line="65"/> <source>Number of empty channels to leave between added fixtures</source> <translation>Jätä valaisinten kanavien väliin näin monta tyhjää kanavaa</translation> </message> <message> <location filename="addfixture.cpp" line="100"/> <source>Fixtures found: %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="addfixture.cpp" line="630"/> <source>Dimmers</source> <translation>Himmentimet</translation> </message> </context> <context> <name>AddRGBPanel</name> <message> <location filename="addrgbpanel.ui" line="14"/> <source>Add RGB Panel</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="215"/> <source>Panel properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="229"/> <source>Universe</source> <oldsource>Universe:</oldsource> <translation type="unfinished">Universumi</translation> </message> <message> <location filename="addrgbpanel.ui" line="236"/> <source>RGB Panel</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="243"/> <source>Name</source> <oldsource>Name:</oldsource> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="addrgbpanel.ui" line="253"/> <source>Address</source> <oldsource>Address:</oldsource> <translation type="unfinished">Osoite</translation> </message> <message> <location filename="addrgbpanel.ui" line="270"/> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;ERROR: Address already used !&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="24"/> <source>Size</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="38"/> <source>Columns</source> <oldsource>Columns:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="45"/> <source>Rows</source> <oldsource>Rows:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="52"/> <source>Total pixels</source> <oldsource>Total pixels:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="97"/> <source>Orientation</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="103"/> <source>Top-Right</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="110"/> <source>Top-Left</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="120"/> <source>Bottom-Left</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="127"/> <source>Bottom-Right</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="147"/> <source>Physical</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="164"/> <source>Width</source> <oldsource>Width:</oldsource> <translation type="unfinished">Leveys</translation> </message> <message> <location filename="addrgbpanel.ui" line="171"/> <location filename="addrgbpanel.ui" line="194"/> <source>mm</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="187"/> <source>Height</source> <oldsource>Height:</oldsource> <translation type="unfinished">Korkeus</translation> </message> <message> <location filename="addrgbpanel.ui" line="282"/> <source>Displacement</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="288"/> <source>Snake</source> <translation type="unfinished"></translation> </message> <message> <location filename="addrgbpanel.ui" line="298"/> <source>Zig Zag</source> <translation type="unfinished"></translation> </message> </context> <context> <name>AddVCButtonMatrix</name> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="14"/> <source>Add Button Matrix</source> <translation>Lisää painikematriisi</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="34"/> <source>Add functions to be attached to the buttons in the matrix</source> <translation>Valitse funktiot, jotka liitetään uusiin painikkeisiin automaattisesti</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="54"/> <source>Remove selected functions from the list of functions to attach</source> <translation>Poista valitut funktiot</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="87"/> <source>Dimensions</source> <translation>Mittasuhteet</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="93"/> <source>Horizontal button count</source> <translation>Painikkeita vaakasuunnassa</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="100"/> <source>Number of buttons per horizontal row</source> <translation>Nappien lukumäärä vaakariviä kohti</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="120"/> <source>Created buttons&apos; size</source> <translation>Nappien koko</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="136"/> <source>Vertical button count</source> <translation>Painikkeita pystysuunnassa</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="143"/> <source>Number of buttons per vertical column</source> <translation>Nappien lukumäärä saraketta kohti</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="153"/> <source>Allocation</source> <translation>Käyttöaste</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="160"/> <source>Functions / Buttons</source> <translation>Funktioita / nappeja</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="173"/> <source>Frame</source> <translation>Kehys</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="179"/> <source>Place the buttons inside a normal frame</source> <translation>Asettele napit tavallisen kehyksen sisään</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="182"/> <source>Normal</source> <translation>Tavallinen</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="189"/> <source>Place the buttons inside a frame that ensures that only one of them is pressed at a time</source> <translation>Asettele napit kehyksen sisään, joka varmistaa, että vain yksi napeista on painettuna kerrallaan</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="192"/> <source>Solo</source> <translation>Solo</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="113"/> <source>Button size</source> <translation>Painikkeiden koko</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="123"/> <source> px</source> <translation>px</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="21"/> <source>Function</source> <translation>Funktio</translation> </message> <message> <location filename="virtualconsole/addvcbuttonmatrix.ui" line="26"/> <source>Type</source> <translation>Tyyppi</translation> </message> </context> <context> <name>AddVCSliderMatrix</name> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="14"/> <source>Add Slider Matrix</source> <translation>Lisää liukumatriisi</translation> </message> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="20"/> <source>Sliders</source> <translation>Liu&apos;ut</translation> </message> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="26"/> <source>Amount</source> <translation>Määrä</translation> </message> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="33"/> <source>Number of sliders to create</source> <translation>Luotavien liukujen määrä</translation> </message> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="43"/> <source>Height</source> <translation>Korkeus</translation> </message> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="50"/> <source>Vertical height of each slider</source> <translation>Liukujen korkeus</translation> </message> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="53"/> <location filename="virtualconsole/addvcslidermatrix.ui" line="76"/> <source>px</source> <translation>px</translation> </message> <message> <location filename="virtualconsole/addvcslidermatrix.ui" line="69"/> <source>Width</source> <translation type="unfinished">Leveys</translation> </message> </context> <context> <name>AddressTool</name> <message> <location filename="addresstool.ui" line="14"/> <source>Address Tool</source> <translation type="unfinished"></translation> </message> <message> <location filename="addresstool.ui" line="22"/> <source>Reverse vertically</source> <translation type="unfinished"></translation> </message> <message> <location filename="addresstool.ui" line="35"/> <source>Colour</source> <oldsource>Color</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="addresstool.ui" line="51"/> <source>Address</source> <translation type="unfinished">Osoite</translation> </message> <message> <location filename="addresstool.ui" line="98"/> <source>Reverse Horizontally</source> <translation type="unfinished"></translation> </message> </context> <context> <name>App</name> <message> <location filename="app.cpp" line="319"/> <source>Cannot exit in Operate mode</source> <translation>Ei voida sulkea Käyttötilassa</translation> </message> <message> <location filename="app.cpp" line="320"/> <source>You must switch back to Design mode to close the application.</source> <translation>Sinun täytyy vaihtaa takaisin Suunnittelu-tilaan sulkeaksesi sovelluksen.</translation> </message> <message> <location filename="app.cpp" line="328"/> <source>Close</source> <translation>Sulje</translation> </message> <message> <location filename="app.cpp" line="328"/> <source>Do you wish to save the current workspace before closing the application?</source> <translation>Haluatko tallentaa nykyisen työtilan ennen sovelluksen sulkemista?</translation> </message> <message> <location filename="app.cpp" line="385"/> <source>Starting Q Light Controller Plus</source> <oldsource>Starting Q Light Controller</oldsource> <translation type="unfinished">Käynnistetään Q Light Controller</translation> </message> <message> <location filename="app.cpp" line="453"/> <source> - New Workspace</source> <translation> - Uusi työtila</translation> </message> <message> <location filename="app.cpp" line="514"/> <source>Switch to Design Mode</source> <translation>Vaihda Suunnittelutilaan</translation> </message> <message> <location filename="app.cpp" line="515"/> <source>There are still running functions. Really stop them and switch back to Design mode?</source> <translation>Joitain funktioita on vielä ajossa. Haluatko varmasti pysäyttää ne ja vaihtaa takaisin Suunnittelutilaan?</translation> </message> <message> <location filename="app.cpp" line="550"/> <source>Design</source> <translation>Suunnittelu</translation> </message> <message> <location filename="app.cpp" line="551"/> <source>Switch to design mode</source> <translation>Vaihda Suunnittelutilaan</translation> </message> <message> <location filename="app.cpp" line="562"/> <source>Operate</source> <translation>Käyttötila</translation> </message> <message> <location filename="app.cpp" line="563"/> <location filename="app.cpp" line="591"/> <source>Switch to operate mode</source> <translation>Vaihda Käyttötilaan</translation> </message> <message> <location filename="app.cpp" line="574"/> <source>&amp;New</source> <translation>&amp;Uusi</translation> </message> <message> <location filename="app.cpp" line="575"/> <source>CTRL+N</source> <comment>File|New</comment> <translation></translation> </message> <message> <location filename="app.cpp" line="578"/> <source>&amp;Open</source> <translation>&amp;Avaa</translation> </message> <message> <location filename="app.cpp" line="579"/> <source>CTRL+O</source> <comment>File|Open</comment> <translation></translation> </message> <message> <location filename="app.cpp" line="582"/> <source>&amp;Save</source> <translation>&amp;Tallenna</translation> </message> <message> <location filename="app.cpp" line="583"/> <source>CTRL+S</source> <comment>File|Save</comment> <translation></translation> </message> <message> <location filename="app.cpp" line="586"/> <source>Save &amp;As...</source> <translation>Tallenna &amp;nimellä...</translation> </message> <message> <location filename="app.cpp" line="590"/> <source>&amp;Operate</source> <translation>&amp;Käyttötila</translation> </message> <message> <location filename="app.cpp" line="595"/> <source>&amp;Monitor</source> <translation>&amp;Monitorointi</translation> </message> <message> <location filename="app.cpp" line="602"/> <source>Toggle &amp;Blackout</source> <translation type="unfinished">Kytke &amp;Pimennys</translation> </message> <message> <location filename="app.cpp" line="592"/> <source>CTRL+F12</source> <comment>Control|Toggle operate/design mode</comment> <translation></translation> </message> <message> <location filename="app.cpp" line="596"/> <source>CTRL+M</source> <comment>Control|Monitor</comment> <translation></translation> </message> <message> <location filename="app.cpp" line="607"/> <source>Live edit a function</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="647"/> <source>Toggle Full Screen</source> <translation>Kytke koko näyttö</translation> </message> <message> <location filename="app.cpp" line="649"/> <source>CTRL+F11</source> <comment>Control|Toggle Full Screen</comment> <translation></translation> </message> <message> <location filename="app.cpp" line="653"/> <source>&amp;Index</source> <translation>&amp;Hakemisto</translation> </message> <message> <location filename="app.cpp" line="654"/> <source>SHIFT+F1</source> <comment>Help|Index</comment> <translation></translation> </message> <message> <location filename="app.cpp" line="657"/> <source>&amp;About QLC+</source> <oldsource>&amp;About QLC</oldsource> <translation type="unfinished">Ti&amp;etoja QLC:stä</translation> </message> <message> <location filename="app.cpp" line="247"/> <source>Fixtures</source> <translation type="unfinished">Valaisimet</translation> </message> <message> <location filename="app.cpp" line="249"/> <source>Functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="251"/> <source>Shows</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="253"/> <source>Virtual Console</source> <translation type="unfinished">Virtuaalikonsoli</translation> </message> <message> <location filename="app.cpp" line="255"/> <source>Simple Desk</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="257"/> <source>Inputs/Outputs</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="342"/> <source>Close the application?</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="343"/> <source>Do you wish to close the application?</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="495"/> <source>Exit</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="599"/> <source>Address Tool</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="611"/> <source>Toggle Virtual Console Live edit</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="616"/> <source>Dump DMX values to a function</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="617"/> <source>CTRL+D</source> <comment>Control|Dump DMX</comment> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="620"/> <source>Stop ALL functions!</source> <translation type="unfinished">Pysäytä KAIKKI funktiot!</translation> </message> <message> <location filename="app.cpp" line="625"/> <source>Fade 1 second and stop</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="630"/> <source>Fade 5 seconds and stop</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="635"/> <source>Fade 10 second and stop</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="640"/> <source>Fade 30 second and stop</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="663"/> <source>Workspace</source> <translation>Työtila</translation> </message> <message> <location filename="app.cpp" line="719"/> <source>Unable to read from file</source> <translation>Tiedostoa ei voida lukea</translation> </message> <message> <location filename="app.cpp" line="722"/> <source>Unable to write to file</source> <translation>Tiedostoon ei voida kirjoittaa</translation> </message> <message> <location filename="app.cpp" line="725"/> <source>A fatal error occurred</source> <translation>Peruuttamaton virhe on tapahtunut</translation> </message> <message> <location filename="app.cpp" line="728"/> <source>Unable to access resource</source> <translation>Resurssiin ei voida käsitellä</translation> </message> <message> <location filename="app.cpp" line="731"/> <source>Unable to open file for reading or writing</source> <translation>Tiedostoa ei voida avata lukemista tai kirjoittamista varten</translation> </message> <message> <location filename="app.cpp" line="734"/> <source>Operation was aborted</source> <translation>Toiminto peruutettiin</translation> </message> <message> <location filename="app.cpp" line="737"/> <source>Operation timed out</source> <translation>Toiminto aikakatkaistiin</translation> </message> <message> <location filename="app.cpp" line="741"/> <source>An unspecified error has occurred. Nice.</source> <translation>Määrittelemätön virhe on tapahtunut. Siistiä.</translation> </message> <message> <location filename="app.cpp" line="745"/> <source>File error</source> <translation>Tiedostovirhe</translation> </message> <message> <location filename="app.cpp" line="839"/> <location filename="app.cpp" line="855"/> <location filename="app.cpp" line="1130"/> <source>Do you wish to save the current workspace? Changes will be lost if you don&apos;t save them.</source> <translation>Haluatko tallentaa nykyisen työtilan? Menetät muutokset jos et tallenna niitä.</translation> </message> <message> <location filename="app.cpp" line="841"/> <source>New Workspace</source> <translation>Uusi työtila</translation> </message> <message> <location filename="app.cpp" line="857"/> <location filename="app.cpp" line="865"/> <location filename="app.cpp" line="1132"/> <source>Open Workspace</source> <translation>Avaa työtila</translation> </message> <message> <location filename="app.cpp" line="873"/> <location filename="app.cpp" line="950"/> <source>Workspaces (*%1)</source> <translation>Työtilat (*%1)</translation> </message> <message> <location filename="app.cpp" line="875"/> <location filename="app.cpp" line="952"/> <source>All Files (*.*)</source> <translation>Kaikki tiedostot (*.*)</translation> </message> <message> <location filename="app.cpp" line="877"/> <location filename="app.cpp" line="954"/> <source>All Files (*)</source> <translation>Kaikki tiedostot (*)</translation> </message> <message> <location filename="app.cpp" line="944"/> <source>Save Workspace As</source> <translation>Tallenna työtila nimellä</translation> </message> <message> <location filename="app.cpp" line="1123"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="1124"/> <source>File not found ! The selected file has been moved or deleted.</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="1273"/> <source>Warning</source> <translation type="unfinished"></translation> </message> <message> <location filename="app.cpp" line="1274"/> <source>Some errors occurred while loading the project:</source> <translation type="unfinished"></translation> </message> </context> <context> <name>AssignHotKey</name> <message> <location filename="assignhotkey.ui" line="14"/> <source>Assign a key combination to button</source> <translation>Aseta napille näppäinyhdistelmä</translation> </message> <message> <location filename="assignhotkey.ui" line="23"/> <source>Key combination</source> <translation>Näppäinyhdistelmä</translation> </message> <message> <location filename="assignhotkey.ui" line="43"/> <source>Close automatically on key press</source> <translation>Sulje automaattisesti näppäintä painettaessa</translation> </message> <message> <location filename="assignhotkey.cpp" line="50"/> <source>Assign Key</source> <translation>Aseta näppäin</translation> </message> <message> <location filename="assignhotkey.cpp" line="51"/> <source>Hit the key combination that you wish to assign. You may hit either a single key or a combination using %1, %2, and %3.</source> <translation type="unfinished"></translation> </message> </context> <context> <name>AudioEditor</name> <message> <location filename="audioeditor.ui" line="14"/> <source>Audio editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="136"/> <source>Bitrate</source> <oldsource>Bitrate:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="122"/> <source>Duration</source> <oldsource>Duration:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="78"/> <source>File name</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="115"/> <source>Audio name</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="143"/> <source>Sample rate</source> <oldsource>Sample rate:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="213"/> <source>Name of the function being edited</source> <translation type="unfinished">Muokattavan funktion nimi</translation> </message> <message> <location filename="audioeditor.ui" line="230"/> <source>Preview</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="267"/> <source>Audio device</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="129"/> <source>Channels</source> <oldsource>Channels:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="64"/> <source>Fade in</source> <oldsource>Fade in:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.ui" line="71"/> <source>Fade out</source> <oldsource>Fade out:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.cpp" line="106"/> <source>Default device</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.cpp" line="153"/> <source>Open Audio File</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.cpp" line="161"/> <source>Audio Files (%1)</source> <translation type="unfinished"></translation> </message> <message> <location filename="audioeditor.cpp" line="163"/> <source>All Files (*.*)</source> <translation type="unfinished">Kaikki tiedostot (*.*)</translation> </message> <message> <location filename="audioeditor.cpp" line="165"/> <source>All Files (*)</source> <translation type="unfinished">Kaikki tiedostot (*)</translation> </message> </context> <context> <name>AudioItem</name> <message> <location filename="showmanager/audioitem.cpp" line="54"/> <location filename="showmanager/audioitem.cpp" line="357"/> <source>Preview Left Channel</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/audioitem.cpp" line="58"/> <source>Preview Right Channel</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/audioitem.cpp" line="62"/> <source>Preview Stereo Channels</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/audioitem.cpp" line="353"/> <source>Preview Mono</source> <translation type="unfinished"></translation> </message> </context> <context> <name>AudioTriggersConfiguration</name> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="14"/> <source>Audio Triggers Configuration</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="97"/> <source>Number of spectrum bars:</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="40"/> <source>Name</source> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="24"/> <source>Triggers</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="32"/> <source>Widget name</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="45"/> <source>Type</source> <translation type="unfinished">Tyyppi</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="50"/> <source>Assign</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="55"/> <source>Info</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="60"/> <source>Disable threshold</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="65"/> <source>Enable threshold</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="70"/> <source>Divisor</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="113"/> <source>Input</source> <translation type="unfinished">Sisääntulo</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="119"/> <source>External Input</source> <translation type="unfinished">Ulkoinen ohjaus</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="125"/> <source>Input Universe</source> <translation type="unfinished">Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="132"/> <source>Input Channel</source> <translation type="unfinished">Sisääntulokanava</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="139"/> <source>When toggled, you can click an external button to assign it to this widget.</source> <oldsource>When toggled, you can click an external button to assign it to this virtual console button.</oldsource> <translation type="unfinished">Alaskytkettynä voit painaa ulkoista kontrollinappia kytkeäksesi sen tähän virtuaalinappiin.</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="142"/> <source>Auto Detect</source> <translation type="unfinished">Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="158"/> <source>The particular input channel within the input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="168"/> <source>The input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="184"/> <source>Choose an external input universe &amp; channel that this widget should listen to.</source> <oldsource>Choose an external input universe &amp; channel that this button should listen to.</oldsource> <translation type="unfinished">Valitse ulkoinen sisääntulouniversumi ja -kanava, jota tämä nappi kuuntelee.</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="187"/> <source>Choose...</source> <translation type="unfinished">Valitse...</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="210"/> <source>Key combination</source> <translation type="unfinished">Näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="225"/> <source>Keyboard combination that toggles this widget</source> <oldsource>Keyboard combination that toggles this button</oldsource> <translation type="unfinished">Näppäinyhdistelmä, joka kytkee tämän napin päälle/pois</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="235"/> <source>Set a key combination for this widget</source> <oldsource>Set a key combination for this button</oldsource> <translation type="unfinished">Aseta näppäinyhdistelmä tälle napille</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.ui" line="255"/> <source>Remove the widget&apos;s keyboard shortcut key</source> <oldsource>Remove the button&apos;s keyboard shortcut key</oldsource> <translation type="unfinished">Poista näppäinyhdistelmä tästä napista</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="125"/> <source>None</source> <translation type="unfinished">Ei mitään</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="126"/> <source>DMX</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="127"/> <source>Function</source> <translation type="unfinished">Funktio</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="128"/> <source>VC Widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="141"/> <source>%1 channels</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="173"/> <source>No function</source> <translation type="unfinished">Ei funktiota</translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="191"/> <source>No widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="197"/> <source>Not assigned</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="251"/> <source>Volume Bar</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggersproperties.cpp" line="260"/> <source>#%1 (%2Hz - %3Hz)</source> <translation type="unfinished"></translation> </message> </context> <context> <name>ChannelModifierEditor</name> <message> <location filename="channelmodifiereditor.ui" line="14"/> <source>Channel Modifier Editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="31"/> <source>Modified DMX value</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="44"/> <source>Original DMX value</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="62"/> <source>Remove the selected handler</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="79"/> <source>Overwrite the current template</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="96"/> <source>Add a new handler</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="130"/> <source>Templates</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="142"/> <source>Name</source> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="channelmodifiereditor.ui" line="149"/> <source>New Template</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.ui" line="162"/> <source>Unset Modifier</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.cpp" line="183"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelmodifiereditor.cpp" line="184"/> <source>You are trying to overwrite a system template ! Please choose another name and the template will be saved in your channel modifier&apos;s user folder.</source> <translation type="unfinished"></translation> </message> </context> <context> <name>ChannelsSelection</name> <message> <location filename="channelsselection.ui" line="14"/> <source>Channels selection</source> <oldsource>Channels Fade Configuration</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="channelsselection.ui" line="28"/> <location filename="channelsselection.cpp" line="50"/> <source>Name</source> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="channelsselection.ui" line="33"/> <location filename="channelsselection.cpp" line="50"/> <source>Type</source> <translation type="unfinished">Tyyppi</translation> </message> <message> <location filename="channelsselection.ui" line="41"/> <source>Apply changes to fixtures of the same type</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelsselection.cpp" line="54"/> <source>Selected</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelsselection.cpp" line="58"/> <source>Channel properties configuration</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelsselection.cpp" line="60"/> <source>Can fade</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelsselection.cpp" line="60"/> <source>Behaviour</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelsselection.cpp" line="60"/> <source>Modifier</source> <translation type="unfinished"></translation> </message> <message> <location filename="channelsselection.cpp" line="118"/> <source>Universe %1</source> <translation type="unfinished"></translation> </message> </context> <context> <name>ChaserEditor</name> <message> <location filename="chasereditor.ui" line="14"/> <source>Chaser editor</source> <translation>Juoksutuksen muokkaus</translation> </message> <message> <location filename="chasereditor.ui" line="123"/> <source>Chaser name</source> <translation>Juoksutuksen nimi</translation> </message> <message> <location filename="chasereditor.ui" line="136"/> <source>Name of the chaser being edited</source> <translation>Muokattavan juoksutus-funktion nimi</translation> </message> <message> <location filename="chasereditor.ui" line="60"/> <source>Step</source> <translation>Askel</translation> </message> <message> <location filename="chasereditor.ui" line="65"/> <source>Function</source> <translation>Funktio</translation> </message> <message> <location filename="chasereditor.ui" line="70"/> <location filename="chasereditor.cpp" line="967"/> <source>Fade In</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="80"/> <location filename="chasereditor.cpp" line="968"/> <source>Fade Out</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="85"/> <source>Duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="722"/> <source>Add step(s) to the current position</source> <translation>Lisää askel(eita) valittuun kohtaan</translation> </message> <message> <location filename="chasereditor.ui" line="98"/> <source>Remove the selected step</source> <translation>Poista valittu askel</translation> </message> <message> <location filename="chasereditor.ui" line="739"/> <source>Raise the selected step once</source> <translation>Nosta valittua askelta kerran</translation> </message> <message> <location filename="chasereditor.ui" line="537"/> <source>Lower the selected step once</source> <translation>Laske valittua askelta kerran</translation> </message> <message> <location filename="chasereditor.ui" line="576"/> <source>Show/Hide speed dial window</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="147"/> <source>Run Order</source> <translation>Ajojärjestys</translation> </message> <message> <location filename="chasereditor.ui" line="75"/> <location filename="chasereditor.cpp" line="969"/> <source>Hold</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="90"/> <source>Notes</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="174"/> <source>Run through over and over again</source> <translation>Aja läpi uudelleen ja uudelleen</translation> </message> <message> <location filename="chasereditor.ui" line="177"/> <source>Loop</source> <translation>Silmukka</translation> </message> <message> <location filename="chasereditor.ui" line="193"/> <source>Run through once and stop</source> <translation>Aja läpi kerran ja pysäytä</translation> </message> <message> <location filename="chasereditor.ui" line="196"/> <source>Single Shot</source> <translation>Kertalaukaus</translation> </message> <message> <location filename="chasereditor.ui" line="209"/> <source>Switch direction at both ends</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="219"/> <source>Execute steps in random order</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="222"/> <source>Random</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="307"/> <source>Fade In Speed</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="334"/> <source>All steps have common fade in speed set by the chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="337"/> <location filename="chasereditor.ui" line="412"/> <location filename="chasereditor.ui" line="490"/> <source>Common</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="350"/> <source>Each step has its own fade in speed set by the chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="353"/> <location filename="chasereditor.ui" line="428"/> <location filename="chasereditor.ui" line="509"/> <source>Per Step</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="366"/> <source>Use each function&apos;s own fade in speed</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="369"/> <location filename="chasereditor.ui" line="444"/> <source>Default</source> <translation type="unfinished">Oletus</translation> </message> <message> <location filename="chasereditor.ui" line="382"/> <source>Fade Out Speed</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="409"/> <source>All steps have common fade out speed set by the chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="425"/> <source>Each step has its own fade out speed set by the chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="441"/> <source>Use each function&apos;s own fade out speed</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="457"/> <source>Step Duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="487"/> <source>All steps have common step duration set by the chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="506"/> <source>Each step has its own duration set by the chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="603"/> <source>See what the chaser does when it is run</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="620"/> <source>Stop the chaser if running</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="654"/> <source>Skip to the next step</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="637"/> <source>Skip to the previous step</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.ui" line="212"/> <source>Ping Pong</source> <translation>Edestakaisin</translation> </message> <message> <location filename="chasereditor.ui" line="232"/> <source>Direction</source> <translation>Suunta</translation> </message> <message> <location filename="chasereditor.ui" line="259"/> <source>Start from the first step</source> <translation>Aloita ensimmäisestä askeleesta</translation> </message> <message> <location filename="chasereditor.ui" line="262"/> <source>Forward</source> <translation>Etuperin</translation> </message> <message> <location filename="chasereditor.ui" line="278"/> <source>Start from the last step</source> <translation>Aloita viimeisestä askeleesta</translation> </message> <message> <location filename="chasereditor.ui" line="281"/> <source>Backward</source> <translation>Takaperin</translation> </message> <message> <location filename="chasereditor.cpp" line="73"/> <source>Cut</source> <translation>Leikkaa</translation> </message> <message> <location filename="chasereditor.cpp" line="78"/> <source>Copy</source> <translation>Kopioi</translation> </message> <message> <location filename="chasereditor.cpp" line="83"/> <source>Paste</source> <translation>Liitä</translation> </message> <message> <location filename="chasereditor.cpp" line="702"/> <source>Paste error</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.cpp" line="702"/> <source>Trying to paste on an incompatible Scene. Operation cancelled.</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.cpp" line="970"/> <source>Common Fade In</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.cpp" line="971"/> <source>Common Fade Out</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.cpp" line="972"/> <source>Common Hold</source> <translation type="unfinished"></translation> </message> <message> <location filename="chasereditor.cpp" line="988"/> <source>Multiple Steps</source> <translation type="unfinished"></translation> </message> </context> <context> <name>CollectionEditor</name> <message> <location filename="collectioneditor.ui" line="14"/> <source>Collection editor</source> <translation>Kokoelman muokkaus</translation> </message> <message> <location filename="collectioneditor.ui" line="26"/> <source>Collection name</source> <translation>Kokoelman nimi</translation> </message> <message> <location filename="collectioneditor.ui" line="33"/> <source>Name of the function being edited</source> <translation>Muokattavan funktion nimi</translation> </message> <message> <location filename="collectioneditor.ui" line="53"/> <source>Function</source> <translation>Funktio</translation> </message> <message> <location filename="collectioneditor.ui" line="61"/> <source>Add function(s) to the collection</source> <translation>Lisää funktioita kokoelmaan</translation> </message> <message> <location filename="collectioneditor.ui" line="81"/> <source>Remove the selected function</source> <translation>Poista valitut funktiot kokoelmasta</translation> </message> </context> <context> <name>ConsoleChannel</name> <message> <location filename="consolechannel.cpp" line="160"/> <source>Intensity</source> <translation type="unfinished">Intensiteetti</translation> </message> </context> <context> <name>CreateFixtureGroup</name> <message> <location filename="createfixturegroup.ui" line="14"/> <source>Create Fixture Group</source> <translation type="unfinished"></translation> </message> <message> <location filename="createfixturegroup.ui" line="20"/> <source>Group name</source> <translation type="unfinished"></translation> </message> <message> <location filename="createfixturegroup.ui" line="32"/> <source>Initial size</source> <translation type="unfinished"></translation> </message> <message> <location filename="createfixturegroup.ui" line="38"/> <source>Width</source> <translation type="unfinished">Leveys</translation> </message> <message> <location filename="createfixturegroup.ui" line="52"/> <source>Height</source> <translation type="unfinished">Korkeus</translation> </message> </context> <context> <name>CueStackModel</name> <message> <location filename="cuestackmodel.cpp" line="142"/> <source>Number</source> <translation type="unfinished">Numero</translation> </message> <message> <location filename="cuestackmodel.cpp" line="144"/> <source>Fade In</source> <translation type="unfinished"></translation> </message> <message> <location filename="cuestackmodel.cpp" line="146"/> <source>Fade Out</source> <translation type="unfinished"></translation> </message> <message> <location filename="cuestackmodel.cpp" line="148"/> <source>Duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="cuestackmodel.cpp" line="150"/> <source>Cue</source> <translation type="unfinished"></translation> </message> </context> <context> <name>DmxDumpFactory</name> <message> <location filename="dmxdumpfactory.ui" line="14"/> <source>Dump DMX values</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="24"/> <source>Dump only non-zero values</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="55"/> <source>Dump options</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="138"/> <source>Dump selected channels</source> <oldsource>Dump selected DMX values</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="82"/> <source>Add to:</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="65"/> <source>Name</source> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="dmxdumpfactory.ui" line="89"/> <source>Chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="99"/> <source>Button</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="106"/> <source>Slider</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.ui" line="43"/> <source>Scene name:</source> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.cpp" line="72"/> <source>Dump all channels (%1 Universes, %2 Fixtures, %3 Channels)</source> <oldsource>Dump all DMX values (%1 Universes, %2 Fixtures, %3 Channels)</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="dmxdumpfactory.cpp" line="75"/> <source>New Scene From Live %1</source> <translation type="unfinished"></translation> </message> </context> <context> <name>DocBrowser</name> <message> <location filename="docbrowser.cpp" line="105"/> <source>%1 - Document Browser</source> <translation>%1 - ohjeiden selaus</translation> </message> <message> <location filename="docbrowser.cpp" line="121"/> <source>Backward</source> <translation>Takaisin</translation> </message> <message> <location filename="docbrowser.cpp" line="122"/> <source>Forward</source> <translation>Eteen</translation> </message> <message> <location filename="docbrowser.cpp" line="123"/> <source>Index</source> <translation>Hakemisto</translation> </message> <message> <location filename="docbrowser.cpp" line="124"/> <source>About Qt</source> <translation type="unfinished"></translation> </message> <message> <location filename="docbrowser.cpp" line="152"/> <source>Close</source> <translation type="unfinished">Sulje</translation> </message> </context> <context> <name>EFXEditor</name> <message> <location filename="efxeditor.ui" line="14"/> <source>EFX Editor</source> <translation>EFX muokkaus</translation> </message> <message> <location filename="efxeditor.ui" line="27"/> <source>General</source> <translation>Yleinen</translation> </message> <message> <location filename="efxeditor.ui" line="682"/> <source>EFX name</source> <translation>EFX nimi</translation> </message> <message> <location filename="efxeditor.ui" line="689"/> <source>The name of the function being edited</source> <translation>Muokattavan funktion nimi</translation> </message> <message> <location filename="efxeditor.ui" line="163"/> <source>Step</source> <translation>Askel</translation> </message> <message> <location filename="efxeditor.ui" line="168"/> <source>Fixture</source> <translation>Valaisin</translation> </message> <message> <location filename="efxeditor.ui" line="173"/> <source>Reverse</source> <translation>Käänteinen</translation> </message> <message> <location filename="efxeditor.ui" line="82"/> <source>Fixture order</source> <translation>Valaisinten järjestys</translation> </message> <message> <location filename="efxeditor.ui" line="88"/> <source>All fixtures move in parallel</source> <translation>Kaikki valaisimet liikkuvat yhtäaikaa</translation> </message> <message> <location filename="efxeditor.ui" line="91"/> <source>Parallel</source> <translation>Rinnakkain</translation> </message> <message> <location filename="efxeditor.ui" line="101"/> <source>The pattern propagates to each fixture in a sequential order</source> <translation>Kuvio leviää vähitellen kaikkiin valaisimiin järjestyksessä</translation> </message> <message> <location filename="efxeditor.ui" line="104"/> <source>Serial</source> <translation>Sarjassa</translation> </message> <message> <location filename="efxeditor.ui" line="205"/> <source>Movement</source> <translation>Liike</translation> </message> <message> <location filename="efxeditor.ui" line="183"/> <source>Intensity</source> <translation>Intensiteetti</translation> </message> <message> <location filename="efxeditor.ui" line="178"/> <location filename="efxeditor.ui" line="504"/> <source>Start Offset</source> <translation type="unfinished"></translation> </message> <message> <location filename="efxeditor.ui" line="111"/> <source>Each fixture starts moving immediately with an offset</source> <translation>Jokainen valaisin alkaa liikkua yhtäaikaisesti, hieman toisistaan erillään</translation> </message> <message> <location filename="efxeditor.ui" line="114"/> <source>Asymmetric</source> <translation>Epäsymmetrinen</translation> </message> <message> <location filename="efxeditor.ui" line="233"/> <source>Pattern</source> <translation>Kuvio</translation> </message> <message> <location filename="efxeditor.ui" line="245"/> <source>Pattern for moving the mirror/head</source> <translation>Kuvio, jonka mukaan peiliä/sankaa liikutetaan</translation> </message> <message> <location filename="efxeditor.ui" line="255"/> <source>Parameters</source> <translation>Parametrit</translation> </message> <message> <location filename="efxeditor.ui" line="293"/> <source>Width</source> <translation>Leveys</translation> </message> <message> <location filename="efxeditor.ui" line="300"/> <source>Value width of the pattern</source> <translation>Kuvion leveys</translation> </message> <message> <location filename="efxeditor.ui" line="313"/> <source>Height</source> <translation>Korkeus</translation> </message> <message> <location filename="efxeditor.ui" line="320"/> <source>Value height of the pattern</source> <translation>Kuvion korkeus</translation> </message> <message> <location filename="efxeditor.ui" line="333"/> <source>X offset</source> <translation>X-poikkeutus</translation> </message> <message> <location filename="efxeditor.ui" line="340"/> <source>Pattern&apos;s center point on the X axis</source> <translation>Kuvion keskuspiste X-akselilla</translation> </message> <message> <location filename="efxeditor.ui" line="353"/> <source>Y offset</source> <translation>Y-poikkeutus</translation> </message> <message> <location filename="efxeditor.ui" line="360"/> <source>Pattern&apos;s center point on the Y axis</source> <translation>Kuvion keskuspiste Y-akselilla</translation> </message> <message> <location filename="efxeditor.ui" line="373"/> <source>Rotation</source> <translation>Kääntö</translation> </message> <message> <location filename="efxeditor.ui" line="380"/> <source>Rotation of the pattern&apos;s starting point</source> <translation>Kuvion aloituspisteen kääntö</translation> </message> <message utf8="true"> <location filename="efxeditor.ui" line="383"/> <location filename="efxeditor.ui" line="494"/> <source>°</source> <translation type="unfinished"></translation> </message> <message> <location filename="efxeditor.ui" line="396"/> <source>X frequency</source> <translation>X-taajuus</translation> </message> <message> <location filename="efxeditor.ui" line="406"/> <source>Lissajous pattern&apos;s X frequency</source> <translation>Lissajous-kuvion X-taajuus</translation> </message> <message> <location filename="efxeditor.ui" line="422"/> <source>Y frequency</source> <translation>Y-taajuus</translation> </message> <message> <location filename="efxeditor.ui" line="432"/> <source>Lissajous pattern&apos;s Y frequency</source> <translation>Lissajous-kuvion Y-taajuus</translation> </message> <message> <location filename="efxeditor.ui" line="448"/> <source>X phase</source> <translation>X-vaihe</translation> </message> <message> <location filename="efxeditor.ui" line="471"/> <source>Lissajous pattern&apos;s X phase</source> <translation>Lissajous-kuvion X-vaihe</translation> </message> <message> <location filename="efxeditor.ui" line="487"/> <source>Y phase</source> <translation>Y-vaihe</translation> </message> <message> <location filename="efxeditor.ui" line="636"/> <source>Show/Hide speed dial window</source> <translation type="unfinished"></translation> </message> <message> <location filename="efxeditor.ui" line="273"/> <source>Lissajous pattern&apos;s Y phase</source> <translation>Lissajous-kuvion Y-vaihe</translation> </message> <message> <location filename="efxeditor.ui" line="514"/> <source>Relative</source> <translation type="unfinished"></translation> </message> <message> <location filename="efxeditor.ui" line="524"/> <source>Direction</source> <translation>Suunta</translation> </message> <message> <location filename="efxeditor.ui" line="530"/> <source>Run the pattern forwards</source> <translation>Aja kuviota eteenpäin</translation> </message> <message> <location filename="efxeditor.ui" line="533"/> <source>Forward</source> <translation>Etuperin</translation> </message> <message> <location filename="efxeditor.ui" line="543"/> <source>Run the pattern backwards</source> <translation>Aja kuviota takaperin</translation> </message> <message> <location filename="efxeditor.ui" line="546"/> <source>Backward</source> <translation>Takaperin</translation> </message> <message> <location filename="efxeditor.ui" line="572"/> <source>Run order</source> <translation>Ajojärjestys</translation> </message> <message> <location filename="efxeditor.ui" line="578"/> <source>Run through over and over again</source> <translation>Aja jatkuvasti alusta loppuun</translation> </message> <message> <location filename="efxeditor.ui" line="581"/> <source>Loop</source> <translation>Silmukka</translation> </message> <message> <location filename="efxeditor.ui" line="591"/> <source>Run through once and stop</source> <translation>Aja läpi kerran ja lopeta</translation> </message> <message> <location filename="efxeditor.ui" line="594"/> <source>Single shot</source> <translation>Kertalaukaus</translation> </message> <message> <location filename="efxeditor.ui" line="601"/> <source>First run forwards, then backwards, again forwards, etc...</source> <translation>Aja ensin alusta loppuun, sitten lopusta alkuun, alusta loppuun, jne...</translation> </message> <message> <location filename="efxeditor.ui" line="604"/> <source>Ping pong</source> <translation>Edestakaisin</translation> </message> <message> <location filename="efxeditor.ui" line="656"/> <source>See what the EFX does when it is run</source> <translation type="unfinished"></translation> </message> <message> <location filename="efxeditor.cpp" line="710"/> <source>Remove fixtures</source> <translation>Poista valaisimia</translation> </message> <message> <location filename="efxeditor.cpp" line="711"/> <source>Do you want to remove the selected fixture(s)?</source> <translation>Haluatko poistaa valitut valaisimet?</translation> </message> </context> <context> <name>FixtureGroupEditor</name> <message> <location filename="fixturegroupeditor.ui" line="14"/> <source>Fixture Group</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturegroupeditor.ui" line="158"/> <source>Fixture group name</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturegroupeditor.ui" line="39"/> <source>Remove selected fixture/head</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturegroupeditor.ui" line="69"/> <source>Width</source> <translation type="unfinished">Leveys</translation> </message> <message> <location filename="fixturegroupeditor.ui" line="76"/> <location filename="fixturegroupeditor.ui" line="106"/> <source>px</source> <translation type="unfinished">px</translation> </message> <message> <location filename="fixturegroupeditor.ui" line="86"/> <source>Height</source> <translation type="unfinished">Korkeus</translation> </message> <message> <location filename="fixturegroupeditor.ui" line="116"/> <source>Add/replace fixtures to current row, starting from selected cell</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturegroupeditor.ui" line="133"/> <source>Add/replace fixtures to current column, starting from selected cell</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FixtureManager</name> <message> <location filename="fixturemanager.cpp" line="363"/> <source>Fixtures Groups</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="367"/> <source>Channels</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="380"/> <source>Channels Groups</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="573"/> <source>All fixtures</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="573"/> <source>This group contains all fixtures.</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="585"/> <source>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Multiple fixtures selected&lt;/H1&gt;&lt;P&gt;Click &lt;IMG SRC=&quot;:/edit_remove.png&quot;&gt; to remove the selected fixtures.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</source> <translation>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Useita valaisimia valittuna&lt;/H1&gt;&lt;P&gt;Klikkaa &lt;IMG SRC=&quot;:/edit_remove.png&quot;&gt; poistaaksesi valitut valaisimet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</translation> </message> <message> <location filename="fixturemanager.cpp" line="591"/> <source>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Multiple fixtures selected&lt;/H1&gt;&lt;P&gt;Fixture list modification is not permitted in operate mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</source> <translation>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Useita valaisimia valittuna&lt;/H1&gt;&lt;P&gt;Valaisinlistan muokkaus käyttötilassa ei ole sallittua.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</translation> </message> <message> <location filename="fixturemanager.cpp" line="600"/> <source>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;No fixtures&lt;/H1&gt;&lt;P&gt;Click &lt;IMG SRC=&quot;:/edit_add.png&quot;&gt; to add fixtures.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</source> <translation>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Ei valaisimia&lt;/H1&gt;&lt;P&gt;Klikkaa &lt;IMG SRC=&quot;:/edit_add.png&quot;&gt; lisätäksesi valaisimia.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</translation> </message> <message> <location filename="fixturemanager.cpp" line="606"/> <source>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Nothing selected&lt;/H1&gt;&lt;P&gt;Select a fixture from the list or click &lt;IMG SRC=&quot;:/edit_add.png&quot;&gt; to add fixtures.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</source> <translation>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Ei valintaa&lt;/H1&gt;&lt;P&gt;Valitse valaisin listasta tai klikkaa &lt;IMG SRC=&quot;:/edit_add.png&quot;&gt; lisätäksesi valaisimia.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</translation> </message> <message> <location filename="fixturemanager.cpp" line="658"/> <source>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Multiple groups selected&lt;/H1&gt;&lt;P&gt;Click &lt;IMG SRC=&quot;:/edit_remove.png&quot;&gt; to remove the selected groups.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="666"/> <source>&lt;HTML&gt;&lt;BODY&gt;&lt;H1&gt;Nothing selected&lt;/H1&gt;&lt;P&gt;Select a channel group from the list or click &lt;IMG SRC=&quot;:/edit_add.png&quot;&gt; to add a new channels group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="691"/> <source>Add group...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="697"/> <location filename="fixturemanager.cpp" line="805"/> <source>Add fixture...</source> <translation>Lisää valaisin...</translation> </message> <message> <location filename="fixturemanager.cpp" line="810"/> <source>Add RGB panel...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="815"/> <source>Delete items</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="820"/> <source>Properties...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="825"/> <source>Channels Fade Configuration...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="831"/> <source>Add fixture to group...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="834"/> <source>Remove fixture from group</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="838"/> <source>New Group...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="841"/> <source>Move group up...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="847"/> <source>Move group down...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="853"/> <source>Import fixtures...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="858"/> <source>Export fixtures...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="864"/> <source>Remap fixtures...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1078"/> <source>%1 - Row %2</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1141"/> <source>Do you want to delete the selected items?</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1196"/> <source>Delete Channels Group</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1300"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1301"/> <source>Please enter a valid address</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1377"/> <source>Ungroup fixtures?</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1378"/> <source>Do you want to ungroup the selected fixtures?</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1493"/> <source>Import Fixtures List</source> <oldsource>Import Fixture Definition</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1498"/> <source>Export Fixtures List As</source> <oldsource>Export Fixture Definition As</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1504"/> <source>Fixtures List (*%1)</source> <oldsource>Fixture Definitions (*%1)</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1506"/> <source>All Files (*.*)</source> <translation type="unfinished">Kaikki tiedostot (*.*)</translation> </message> <message> <location filename="fixturemanager.cpp" line="1508"/> <source>All Files (*)</source> <translation type="unfinished">Kaikki tiedostot (*)</translation> </message> <message> <location filename="fixturemanager.cpp" line="897"/> <source>Fixture manager</source> <translation>Valaisinten hallinta</translation> </message> <message> <location filename="fixturemanager.cpp" line="965"/> <source>Generic Dimmer</source> <translation>Yleinen himmennin</translation> </message> <message> <location filename="fixturemanager.cpp" line="1140"/> <source>Delete Fixtures</source> <translation>Poista valaisimia</translation> </message> <message> <location filename="fixturemanager.cpp" line="1197"/> <source>Do you want to delete the selected groups?</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturemanager.cpp" line="1262"/> <source>Change fixture properties</source> <translation>Muokkaa valaisimen ominaisuuksia</translation> </message> <message> <location filename="fixturemanager.cpp" line="367"/> <source>Name</source> <translation>Nimi</translation> </message> </context> <context> <name>FixtureRemap</name> <message> <location filename="fixtureremap.ui" line="14"/> <source>Fixtures Remap</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="28"/> <source>Add target fixture...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="45"/> <source>Remove target fixture...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="69"/> <source>Clone and auto-remap the selected source fixture</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="93"/> <source>Connect selections...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="110"/> <source>Disconnect selections...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="265"/> <source>Destination project name</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="161"/> <source>Remapped Fixtures</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="166"/> <location filename="fixtureremap.ui" line="198"/> <source>Address</source> <translation type="unfinished">Osoite</translation> </message> <message> <location filename="fixtureremap.ui" line="193"/> <source>Source Fixtures</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.ui" line="253"/> <source>Remap fixture names</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="116"/> <location filename="fixtureremap.cpp" line="118"/> <source> (remapped)</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="147"/> <source>Universe %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="211"/> <source>Generic Dimmer</source> <translation type="unfinished">Yleinen himmennin</translation> </message> <message> <location filename="fixtureremap.cpp" line="277"/> <source>Delete Fixtures</source> <translation type="unfinished">Poista valaisimia</translation> </message> <message> <location filename="fixtureremap.cpp" line="278"/> <source>Do you want to delete the selected items?</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="326"/> <source>Invalid operation</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="327"/> <source>You are trying to clone a fixture on an address already in use. Please fix the target list first.</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="388"/> <location filename="fixtureremap.cpp" line="404"/> <location filename="fixtureremap.cpp" line="427"/> <location filename="fixtureremap.cpp" line="517"/> <source>Invalid selection</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="389"/> <location filename="fixtureremap.cpp" line="405"/> <location filename="fixtureremap.cpp" line="518"/> <source>Please select a source and a target fixture or channel to perform this operation.</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="428"/> <source>To perform a fixture remap, please select fixtures on both lists.</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="643"/> <source>This might take a while...</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixtureremap.cpp" line="643"/> <source>Cancel</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FixtureSelection</name> <message> <location filename="fixtureselection.ui" line="14"/> <source>Select fixture</source> <translation>Valitse valaisin</translation> </message> <message> <location filename="fixtureselection.cpp" line="73"/> <source>No fixtures available</source> <translation>Ei valaisimia saatavilla</translation> </message> <message> <location filename="fixtureselection.cpp" line="75"/> <source>Go to the Fixture Manager and add some fixtures first.</source> <translation>Mene Laitehallintaan luodaksesi ensin valaisimia.</translation> </message> </context> <context> <name>FixtureTreeWidget</name> <message> <location filename="fixturetreewidget.cpp" line="65"/> <source>Name</source> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="fixturetreewidget.cpp" line="70"/> <source>Universe</source> <translation type="unfinished">Universumi</translation> </message> <message> <location filename="fixturetreewidget.cpp" line="75"/> <source>Address</source> <translation type="unfinished">Osoite</translation> </message> <message> <location filename="fixturetreewidget.cpp" line="80"/> <source>Type</source> <translation type="unfinished">Tyyppi</translation> </message> <message> <location filename="fixturetreewidget.cpp" line="85"/> <source>Heads</source> <translation type="unfinished"></translation> </message> <message> <location filename="fixturetreewidget.cpp" line="90"/> <source>Manufacturer</source> <translation type="unfinished">Valmistaja</translation> </message> <message> <location filename="fixturetreewidget.cpp" line="95"/> <source>Model</source> <translation type="unfinished">Malli</translation> </message> <message> <location filename="fixturetreewidget.cpp" line="203"/> <location filename="fixturetreewidget.cpp" line="211"/> <source>Generic</source> <translation type="unfinished">Yleinen</translation> </message> <message> <location filename="fixturetreewidget.cpp" line="223"/> <source>Head</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FunctionLiveEditDialog</name> <message> <location filename="functionliveeditdialog.cpp" line="45"/> <source>Function Live Edit</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FunctionManager</name> <message> <location filename="functionmanager.cpp" line="239"/> <source>New &amp;scene</source> <translation>Uusi &amp;tilanne</translation> </message> <message> <location filename="functionmanager.cpp" line="245"/> <source>New c&amp;haser</source> <translation>Uusi &amp;juoksutus</translation> </message> <message> <location filename="functionmanager.cpp" line="251"/> <source>New se&amp;quence</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="258"/> <source>New c&amp;ollection</source> <translation>Uusi &amp;kokoelma</translation> </message> <message> <location filename="functionmanager.cpp" line="264"/> <source>New E&amp;FX</source> <translation>Uusi &amp;EFX</translation> </message> <message> <location filename="functionmanager.cpp" line="270"/> <source>New &amp;RGB Matrix</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="276"/> <source>New scrip&amp;t</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="367"/> <source>New Scene</source> <translation type="unfinished">Uusi tilanne</translation> </message> <message> <location filename="functionmanager.cpp" line="380"/> <source>New Chaser</source> <translation type="unfinished">Uusi juoksutus</translation> </message> <message> <location filename="functionmanager.cpp" line="403"/> <source>New Sequence</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="313"/> <source>&amp;Clone</source> <translation>K&amp;loonaa</translation> </message> <message> <location filename="functionmanager.cpp" line="282"/> <source>New au&amp;dio</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="289"/> <source>New vid&amp;eo</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="295"/> <source>New fo&amp;lder</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="301"/> <source>Select Startup Function</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="306"/> <source>Function &amp;Wizard</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="319"/> <source>&amp;Delete</source> <translation>&amp;Poista</translation> </message> <message> <location filename="functionmanager.cpp" line="325"/> <source>Select &amp;all</source> <translation>Valitse k&amp;aikki</translation> </message> <message> <location filename="functionmanager.cpp" line="416"/> <source>New Collection</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="429"/> <source>New EFX</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="442"/> <source>New RGB Matrix</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="455"/> <source>New Script</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="467"/> <source>Open Audio File</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="475"/> <source>Audio Files (%1)</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="477"/> <location filename="functionmanager.cpp" line="530"/> <source>All Files (*.*)</source> <translation type="unfinished">Kaikki tiedostot (*.*)</translation> </message> <message> <location filename="functionmanager.cpp" line="479"/> <location filename="functionmanager.cpp" line="532"/> <source>All Files (*)</source> <translation type="unfinished">Kaikki tiedostot (*)</translation> </message> <message> <location filename="functionmanager.cpp" line="501"/> <source>Unsupported audio file</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="501"/> <source>This audio file cannot be played with QLC+. Sorry.</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="520"/> <source>Open Video File</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="528"/> <source>Video Files (%1)</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="554"/> <source>Unsupported video file</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="554"/> <source>This video file cannot be played with QLC+. Sorry.</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="615"/> <source>Do you want to DELETE folder:</source> <oldsource>Do you want to DELETE foler:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="617"/> <source>Do you want to DELETE functions:</source> <translation>Haluatko POISTAA funktiot:</translation> </message> <message> <location filename="functionmanager.cpp" line="629"/> <source>(This will also DELETE: </source> <translation type="unfinished"></translation> </message> <message> <location filename="functionmanager.cpp" line="641"/> <source>Delete Functions</source> <translation>Poista funktioita</translation> </message> <message> <location filename="functionmanager.cpp" line="747"/> <source>Function</source> <translation>Funktio</translation> </message> <message> <location filename="functionmanager.cpp" line="873"/> <source> (Copy)</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FunctionSelection</name> <message> <location filename="functionselection.ui" line="14"/> <source>Select Function</source> <translation>Valitse funktio</translation> </message> <message> <location filename="functionselection.ui" line="22"/> <source>All functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="32"/> <source>Running functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="74"/> <source>Filter</source> <translation>Suodatus</translation> </message> <message> <location filename="functionselection.ui" line="80"/> <source>Display collections in the list</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="90"/> <source>Display scripts in the list</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="93"/> <source>Scripts</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="100"/> <source>Display chasers in the list</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="110"/> <source>Display RGB Matrices in the list</source> <oldsource>Display RGB Matrixes in the list</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="113"/> <source>RGB matrices</source> <oldsource>RGB matrixes</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="120"/> <source>Display EFX&apos;s in the list</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="130"/> <source>Display scenes in the list</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="133"/> <source>Scenes</source> <translation>Tilanteet</translation> </message> <message> <location filename="functionselection.ui" line="140"/> <source>Shows</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="147"/> <source>Audio</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="154"/> <source>Video</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.ui" line="103"/> <source>Chasers</source> <translation>Juoksutukset</translation> </message> <message> <location filename="functionselection.ui" line="123"/> <source>EFX&apos;s</source> <translation>EFX:t</translation> </message> <message> <location filename="functionselection.ui" line="83"/> <source>Collections</source> <translation>Kokoelmat</translation> </message> <message> <location filename="functionselection.cpp" line="77"/> <source>Functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.cpp" line="299"/> <source>&lt;No function&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionselection.cpp" line="307"/> <source>&lt;Create a new track&gt;</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FunctionWizard</name> <message> <location filename="functionwizard.ui" line="14"/> <source>Function Wizard</source> <translation>Funktiovelho</translation> </message> <message> <location filename="functionwizard.ui" line="38"/> <source>Next</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="52"/> <source>OK</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="66"/> <source>Cancel</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="86"/> <source>Introduction</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="95"/> <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; p, li { white-space: pre-wrap; } &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Welcome to the QLC+ wizard !&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This is a guided procedure that will allow you to start using QLC+ in a few minutes.&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;It basically consists in three simple steps:&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;1- add fixtures&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;2- select capabilities to create functions&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;3- add widgets to the Virtual Console&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;To move from a step to another press the &amp;quot;Next&amp;quot; button&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="188"/> <source>Fixtures that will be included in automatic function creation</source> <translation>Valaisimet, jotka otetaan mukaan automaattiseen funktioiden luontiin</translation> </message> <message> <location filename="functionwizard.ui" line="235"/> <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; p, li { white-space: pre-wrap; } &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/wizard.png&quot; width=&quot;24&quot; /&gt; Add the fixtures for which you want to create functions and widgets&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="247"/> <source>Functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="254"/> <source>Results</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="263"/> <source>Available</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="268"/> <source>Odd/Even</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="288"/> <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; p, li { white-space: pre-wrap; } &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/wizard.png&quot; width=&quot;24&quot; /&gt; Based on the fixtures you added, I can create the functions listed on the left. Just select what you need and see the results on the right !&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="300"/> <source>Virtual Console</source> <translation type="unfinished">Virtuaalikonsoli</translation> </message> <message> <location filename="functionwizard.ui" line="318"/> <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; p, li { white-space: pre-wrap; } &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/wizard.png&quot; width=&quot;24&quot; /&gt; Based on the functions you selected, I can create the following widgets on your Virtual Console. Just check which ones you need.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="330"/> <source>Widgets</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.ui" line="129"/> <location filename="functionwizard.ui" line="204"/> <source>Fixtures</source> <translation>Valaisimet</translation> </message> <message> <location filename="functionwizard.ui" line="209"/> <source>Supported capabilities</source> <translation>Tuetut kyvyt</translation> </message> <message> <location filename="functionwizard.ui" line="168"/> <source>Select fixtures that will be included in the automatically created functions</source> <translation>Valitse valaisimet, jotka otetaan mukaan automaattiseen funktioiden luontiin</translation> </message> <message> <location filename="functionwizard.ui" line="171"/> <source>Add</source> <translation>Lisää</translation> </message> <message> <location filename="functionwizard.ui" line="135"/> <source>Don&apos;t include selected fixtures in the created functions</source> <translation>Älä sisällytä valittuja valaisimia luotaviin funktioihin</translation> </message> <message> <location filename="functionwizard.ui" line="138"/> <source>Remove</source> <translation>Poista</translation> </message> <message> <location filename="functionwizard.cpp" line="175"/> <source>%1 group</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.cpp" line="192"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.cpp" line="192"/> <source>%1 has no capability supported by this wizard.</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.cpp" line="466"/> <source>Presets solo frame</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.cpp" line="519"/> <source>Click &amp; Go RGB</source> <translation type="unfinished"></translation> </message> <message> <location filename="functionwizard.cpp" line="523"/> <source>Click &amp; Go Macro</source> <translation type="unfinished"></translation> </message> </context> <context> <name>GrandMasterSlider</name> <message> <location filename="grandmasterslider.cpp" line="88"/> <source>GM</source> <translation type="unfinished"></translation> </message> <message> <location filename="grandmasterslider.cpp" line="142"/> <source>Grand Master &lt;B&gt;limits&lt;/B&gt; the maximum value of</source> <translation type="unfinished"></translation> </message> <message> <location filename="grandmasterslider.cpp" line="145"/> <source>Grand Master &lt;B&gt;reduces&lt;/B&gt; the current value of</source> <translation type="unfinished"></translation> </message> <message> <location filename="grandmasterslider.cpp" line="154"/> <source>intensity channels</source> <translation>intensiteettikanaville</translation> </message> <message> <location filename="grandmasterslider.cpp" line="157"/> <source>all channels</source> <translation>kaikille kanaville</translation> </message> </context> <context> <name>InputChannelEditor</name> <message> <location filename="inputchanneleditor.ui" line="14"/> <source>Input Channel Editor</source> <translation>Sisääntulokanavan muokkaus</translation> </message> <message> <location filename="inputchanneleditor.ui" line="20"/> <source>Input Channel</source> <translation>Sisääntulokanava</translation> </message> <message> <location filename="inputchanneleditor.ui" line="36"/> <source>Number</source> <translation>Numero</translation> </message> <message> <location filename="inputchanneleditor.ui" line="69"/> <source>Midi</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="75"/> <source>Channel</source> <translation type="unfinished">Kanava</translation> </message> <message> <location filename="inputchanneleditor.ui" line="92"/> <source>Message</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="102"/> <source>Parameter</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="110"/> <source>Control Change</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="115"/> <source>Note On/Off</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="120"/> <source>Note Aftertouch</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="125"/> <source>Program Change</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="130"/> <source>Channel Aftertouch</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="135"/> <source>Pitch Wheel</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="140"/> <source>Beat Clock: Start/Stop/Continue</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="145"/> <source>Beat Clock: Beat</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="166"/> <source>Note</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputchanneleditor.ui" line="29"/> <source>Name</source> <translation>Nimi</translation> </message> <message> <location filename="inputchanneleditor.ui" line="56"/> <source>Type</source> <translation>Tyyppi</translation> </message> </context> <context> <name>InputOutputManager</name> <message> <location filename="inputoutputmanager.cpp" line="85"/> <source>Add U&amp;niverse</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputmanager.cpp" line="91"/> <source>&amp;Delete Universe</source> <oldsource>Universe</oldsource> <translation type="unfinished">Universumi</translation> </message> <message> <location filename="inputoutputmanager.cpp" line="110"/> <source>Universe name:</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputmanager.cpp" line="120"/> <source>Passthrough</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputmanager.cpp" line="230"/> <location filename="inputoutputmanager.cpp" line="397"/> <source>Universe %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputmanager.cpp" line="355"/> <location filename="inputoutputmanager.cpp" line="374"/> <source>Delete Universe</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputmanager.cpp" line="356"/> <source>The universe you are trying to delete is patched. Are you sure you want to delete it ?</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputmanager.cpp" line="375"/> <source>There are some fixtures using the universe you are trying to delete. Are you sure you want to delete it ?</source> <translation type="unfinished"></translation> </message> </context> <context> <name>InputOutputPatchEditor</name> <message> <location filename="inputoutputpatcheditor.ui" line="14"/> <source>Input/Output patch editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="36"/> <source>Mapping</source> <translation type="unfinished">Ohjaus</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="61"/> <source>Plugin</source> <translation type="unfinished">Liitännäinen</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="66"/> <location filename="inputoutputpatcheditor.ui" line="236"/> <source>Device</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="71"/> <location filename="inputoutputpatcheditor.ui" line="241"/> <source>Input</source> <translation type="unfinished">Sisääntulo</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="79"/> <location filename="inputoutputpatcheditor.ui" line="246"/> <source>Output</source> <translation type="unfinished">Ulostulo</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="87"/> <source>Feedback</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="123"/> <location filename="inputoutputpatcheditor.ui" line="212"/> <source>Profile</source> <translation type="unfinished">Profiili</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="129"/> <source>Create a new input profile</source> <translation type="unfinished">Luo uusi profiili</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="149"/> <source>Delete the selected input profile</source> <translation type="unfinished">Poista valittu profiili</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="169"/> <source>Edit the selected input profile</source> <translation type="unfinished">Muokkaa valittua profiilia</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="217"/> <source>Type</source> <translation type="unfinished">Tyyppi</translation> </message> <message> <location filename="inputoutputpatcheditor.ui" line="226"/> <source>Audio</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="433"/> <location filename="inputoutputpatcheditor.cpp" line="452"/> <location filename="inputoutputpatcheditor.cpp" line="561"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="434"/> <location filename="inputoutputpatcheditor.cpp" line="453"/> <source>Output line already assigned</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="562"/> <source>An error occurred while trying to open the selected device line. This can be caused either by a wrong system configuration or an unsupported input/output mode. Please refer to the plugins documentation to troubleshoot this.</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="703"/> <location filename="inputoutputpatcheditor.cpp" line="837"/> <source>Existing Input Profile</source> <translation type="unfinished">Olemassaoleva sisääntuloprofiili</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="704"/> <location filename="inputoutputpatcheditor.cpp" line="838"/> <source>An input profile at %1 already exists. Do you wish to overwrite it?</source> <translation type="unfinished">Sisääntuloprofiili %1 on jo olemassa. Haluatko ylikirjoittaa sen?</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="713"/> <location filename="inputoutputpatcheditor.cpp" line="847"/> <source>Save Input Profile</source> <translation type="unfinished">Tallenna sisääntuloprofiili</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="714"/> <location filename="inputoutputpatcheditor.cpp" line="848"/> <source>Input Profiles (*.qxi)</source> <translation type="unfinished">Sisääntuloprofiilit (*.qxi)</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="727"/> <location filename="inputoutputpatcheditor.cpp" line="864"/> <source>Saving failed</source> <translation type="unfinished">Tallennus epäonnistui</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="728"/> <source>Unable to save the profile to %1</source> <translation type="unfinished">Profiilia ei voida tallentaa tiedostoon %1</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="765"/> <source>Delete profile</source> <translation type="unfinished">Poista profiili</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="766"/> <source>Do you wish to permanently delete profile &quot;%1&quot;?</source> <translation type="unfinished">Haluat poistaa profiilin %1 pysyvästi?</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="794"/> <source>File deletion failed</source> <translation type="unfinished">Tiedoston poisto epäonnistui</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="795"/> <source>Unable to delete file %1</source> <translation type="unfinished">Tiedostoa %1 ei voida poistaa</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="865"/> <source>Unable to save %1 to %2</source> <translation type="unfinished">Profiilia %1 ei voida tallentaa tiedostoon %2</translation> </message> <message> <location filename="inputoutputpatcheditor.cpp" line="897"/> <source>Default device</source> <translation type="unfinished"></translation> </message> </context> <context> <name>InputProfileEditor</name> <message> <location filename="inputprofileeditor.ui" line="14"/> <source>Input Profile Editor</source> <translation>Sisääntulon profiilin muokkaus</translation> </message> <message> <location filename="inputprofileeditor.ui" line="28"/> <source>General</source> <translation>Yleinen</translation> </message> <message> <location filename="inputprofileeditor.ui" line="64"/> <source>Manufacturer</source> <translation>Valmistaja</translation> </message> <message> <location filename="inputprofileeditor.ui" line="34"/> <source>The name of the company that made the device</source> <translation>Laitteen valmistaneen yrityksen nimi</translation> </message> <message> <location filename="inputprofileeditor.ui" line="71"/> <source>Model</source> <translation>Malli</translation> </message> <message> <location filename="inputprofileeditor.ui" line="44"/> <source>The device&apos;s model name</source> <translation>Laitteen mallin nimi</translation> </message> <message> <location filename="inputprofileeditor.ui" line="90"/> <source>Channels</source> <translation>Kanavat</translation> </message> <message> <location filename="inputprofileeditor.ui" line="115"/> <source>Channel</source> <translation>Kanava</translation> </message> <message> <location filename="inputprofileeditor.ui" line="120"/> <source>Name</source> <translation>Nimi</translation> </message> <message> <location filename="inputprofileeditor.ui" line="78"/> <location filename="inputprofileeditor.ui" line="125"/> <source>Type</source> <translation>Tyyppi</translation> </message> <message> <location filename="inputprofileeditor.ui" line="130"/> <location filename="inputprofileeditor.ui" line="241"/> <source>Behaviour</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputprofileeditor.ui" line="253"/> <source>Movement</source> <translation type="unfinished">Liike</translation> </message> <message> <location filename="inputprofileeditor.ui" line="267"/> <source>Absolute</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputprofileeditor.ui" line="272"/> <source>Relative</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputprofileeditor.ui" line="280"/> <source>Sensitivity</source> <translation type="unfinished"></translation> </message> <message> <location filename="inputprofileeditor.ui" line="138"/> <source>Add a new channel description</source> <translation>Lisää uusi kanavakuvaus</translation> </message> <message> <location filename="inputprofileeditor.ui" line="158"/> <source>Remove the selected channels</source> <translation>Poista valitut kanavat</translation> </message> <message> <location filename="inputprofileeditor.ui" line="178"/> <source>Edit the selected channel</source> <translation>Muokkaa valittua kanavaa</translation> </message> <message> <location filename="inputprofileeditor.ui" line="198"/> <source>Automatically add channels to the list when you wiggle the device&apos;s controls</source> <translation>Lisää kanavia listaan automaattisesti kun laitteen toimintoja käytetään</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="97"/> <source>File not writable</source> <translation>Tiedoston ei voida kirjoittaa</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="98"/> <source>You do not have permission to write to the file %1. You might not be able to save your modifications to the profile.</source> <translation>Sinulla ei ole oikeuksia kirjoittaa tiedostoon %1. Et ehkä voi tallettaa muutoksiasi valittuun profiiliin.</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="197"/> <source>Missing information</source> <translation>Puutteelliset tiedot</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="198"/> <source>Manufacturer and/or model name is missing.</source> <translation>Valmistaja ja/tai mallinimike puuttuu.</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="228"/> <location filename="inputprofileeditor.cpp" line="324"/> <source>Channel already exists</source> <translation>Kanava on jo olemassa</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="229"/> <location filename="inputprofileeditor.cpp" line="325"/> <source>Channel %1 already exists</source> <translation>Kanava %1 on jo olemassa</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="251"/> <source>Delete channels</source> <translation>Poista kanavia</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="252"/> <source>Delete all %1 selected channels?</source> <translation>Poistetaanko kaikki %1 valittua kanavaa?</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="365"/> <source>Channel wizard activated</source> <translation>Kanavavelho on aktiivisena</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="366"/> <source>You have enabled the input channel wizard. After clicking OK, wiggle your mapped input profile&apos;s controls. They should appear into the list. Click the wizard button again to stop channel auto-detection. Note that the wizard cannot tell the difference between a knob and a slider so you will have to do the change manually.</source> <translation>Olet aktivoinut velhon. Klikattuasi OK-nappia, heiluttele laitteen ohjaimia edestakaisin. Jokaisesta erillisestä ohjaimesta pitäisi ilmaantua uusi kanava listaan. Klikkaa velho-nappia uudelleen lopettaaksesi kanavien automaattisen haun. Huomaa, että velho ei osaa erottaa pyöritettävää nuppia ja liukua toisistaan, joten sinun täytyy tehdä vastaavat muutokset käsin.</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="493"/> <source>Button %1</source> <translation>Nappi %1</translation> </message> <message> <location filename="inputprofileeditor.cpp" line="533"/> <source>Slider %1</source> <translation>Liuku %1</translation> </message> </context> <context> <name>Monitor</name> <message> <location filename="monitor/monitor.cpp" line="277"/> <source>Fixture Monitor</source> <translation>Valaisinten monitorointi</translation> </message> <message> <location filename="monitor/monitor.cpp" line="314"/> <source>2D View</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="321"/> <source>Font</source> <translation>Kirjasin</translation> </message> <message> <location filename="monitor/monitor.cpp" line="330"/> <source>DMX Channels</source> <translation>DMX-kanavat</translation> </message> <message> <location filename="monitor/monitor.cpp" line="331"/> <source>Show absolute DMX channel numbers</source> <translation>Näytä absoluuttiset DMX-kanavien numerot</translation> </message> <message> <location filename="monitor/monitor.cpp" line="341"/> <source>Relative Channels</source> <translation>Suhteelliset kanavat</translation> </message> <message> <location filename="monitor/monitor.cpp" line="342"/> <source>Show channel numbers relative to fixture</source> <translation>Näytä kanavanumerot suhteessa valaisimeen</translation> </message> <message> <location filename="monitor/monitor.cpp" line="358"/> <source>DMX Values</source> <translation>DMX-arvot</translation> </message> <message> <location filename="monitor/monitor.cpp" line="359"/> <source>Show DMX values 0-255</source> <translation>Näytä DMX-arvot 0-255</translation> </message> <message> <location filename="monitor/monitor.cpp" line="370"/> <source>Percent Values</source> <translation>Prosenttiarvot</translation> </message> <message> <location filename="monitor/monitor.cpp" line="371"/> <source>Show percentage values 0-100%</source> <translation>Näytä prosentuaaliset arvot 0-100%</translation> </message> <message> <location filename="monitor/monitor.cpp" line="384"/> <source>Universe</source> <oldsource>Universe:</oldsource> <translation type="unfinished">Universumi</translation> </message> <message> <location filename="monitor/monitor.cpp" line="389"/> <source>All universes</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="411"/> <source>DMX View</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="417"/> <source>Size</source> <oldsource>Size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="441"/> <source>Meters</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="442"/> <source>Feet</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="451"/> <source>Add fixture</source> <translation type="unfinished">Lisää valaisin</translation> </message> <message> <location filename="monitor/monitor.cpp" line="453"/> <source>Remove fixture</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="458"/> <source>Set a background picture</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitor.cpp" line="461"/> <source>Show/hide labels</source> <translation type="unfinished"></translation> </message> </context> <context> <name>MonitorBackgroundSelection</name> <message> <location filename="monitor/monitorbackgroundselection.ui" line="14"/> <source>Background Picture Selection</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorbackgroundselection.ui" line="24"/> <source>No background</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorbackgroundselection.ui" line="33"/> <source>Common background</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorbackgroundselection.ui" line="69"/> <source>Custom background list</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorbackgroundselection.ui" line="79"/> <source>Function</source> <translation type="unfinished">Funktio</translation> </message> <message> <location filename="monitor/monitorbackgroundselection.ui" line="84"/> <source>Background</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorbackgroundselection.cpp" line="160"/> <location filename="monitor/monitorbackgroundselection.cpp" line="182"/> <source>Select background image</source> <translation type="unfinished">Valitse taustakuva</translation> </message> <message> <location filename="monitor/monitorbackgroundselection.cpp" line="162"/> <location filename="monitor/monitorbackgroundselection.cpp" line="184"/> <source>Images</source> <translation type="unfinished"></translation> </message> </context> <context> <name>MonitorFixturePropertiesEditor</name> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="14"/> <source>Monitor Fixture Properties Editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="30"/> <source>Gel color</source> <oldsource>Gel color:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="37"/> <source>Position and rotation</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="53"/> <source>Vertical</source> <oldsource>Vertical:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="60"/> <source>Horizontal</source> <oldsource>Horizontal:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="77"/> <source>Rotation</source> <oldsource>Rotation:</oldsource> <translation type="unfinished">Kääntö</translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="99"/> <source>Set the color of the gel installed on the fixture</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="112"/> <source>Reset the current color</source> <translation type="unfinished"></translation> </message> <message> <location filename="monitor/monitorfixturepropertieseditor.ui" line="152"/> <source>Fixture name:</source> <translation type="unfinished"></translation> </message> </context> <context> <name>MultiTrackView</name> <message> <location filename="showmanager/multitrackview.cpp" line="319"/> <source>Do you want to DELETE item:</source> <oldsource>Do you want to DELETE sequence:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/multitrackview.cpp" line="322"/> <source>Delete Functions</source> <translation type="unfinished">Poista funktioita</translation> </message> <message> <location filename="showmanager/multitrackview.cpp" line="354"/> <source>Delete Track</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/multitrackview.cpp" line="342"/> <source>Do you want to DELETE track:</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/multitrackview.cpp" line="345"/> <source>This operation will also DELETE:</source> <translation type="unfinished"></translation> </message> </context> <context> <name>PaletteGenerator</name> <message> <location filename="palettegenerator.cpp" line="100"/> <source>Primary colours</source> <oldsource>Primary colors</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="101"/> <source>16 Colours</source> <oldsource>16 Colors</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="102"/> <source>Shutter macros</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="103"/> <source>Gobo macros</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="104"/> <source>Colour macros</source> <oldsource>Color macros</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="105"/> <source>Animations</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="108"/> <source>Unknown</source> <translation type="unfinished">Tuntematon</translation> </message> <message> <location filename="palettegenerator.cpp" line="257"/> <source>%1 - %2 (Even)</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="258"/> <source>%1 - %2 (Odd)</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="282"/> <source>Black</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="282"/> <source>Dark Blue</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="282"/> <source>Blue</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="282"/> <source>Dark Green</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="283"/> <source>Dark Cyan</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="283"/> <source>Green</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="283"/> <source>Cyan</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="283"/> <source>Dark Red</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="284"/> <source>Dark Magenta</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="284"/> <source>Dark Yellow</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="284"/> <source>Dark Gray</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="284"/> <source>Light Gray</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="285"/> <source>Red</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="285"/> <source>Magenta</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="285"/> <source>Yellow</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="285"/> <source>White</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="337"/> <source>%1 %2 - %3</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="341"/> <source>%1 %2 - %3 (Even)</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="342"/> <source>%1 %2 - %3 (Odd)</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="404"/> <source> - Even</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="405"/> <source> - Odd</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="422"/> <source> - RGB Group</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="428"/> <source>Animation %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="447"/> <source>%1 chaser - %2</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="519"/> <source>Red scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="520"/> <source>Green scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="521"/> <source>Blue scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="522"/> <source>Cyan scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="523"/> <source>Magenta scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="524"/> <source>Yellow scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="525"/> <source>White scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="palettegenerator.cpp" line="532"/> <location filename="palettegenerator.cpp" line="534"/> <source>Scene</source> <translation type="unfinished"></translation> </message> </context> <context> <name>PlaybackSlider</name> <message> <location filename="playbackslider.cpp" line="52"/> <source>Select</source> <translation type="unfinished"></translation> </message> <message> <location filename="playbackslider.cpp" line="84"/> <source>Flash</source> <translation type="unfinished"></translation> </message> </context> <context> <name>PositionTool</name> <message> <location filename="positiontool.ui" line="14"/> <source>PositonTool</source> <translation type="unfinished"></translation> </message> </context> <context> <name>QObject</name> <message> <location filename="app.cpp" line="70"/> <source>Operate</source> <translation>Käyttötila</translation> </message> <message> <location filename="app.cpp" line="71"/> <source>Design</source> <translation>Suunnittelu</translation> </message> <message> <location filename="virtualconsole/vcxypadfixture.cpp" line="233"/> <location filename="virtualconsole/vcxypadfixture.cpp" line="268"/> <source>Reversed</source> <translation>Käänteinen</translation> </message> </context> <context> <name>RGBMatrixEditor</name> <message> <location filename="rgbmatrixeditor.ui" line="14"/> <source>RGB Matrix Editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="364"/> <source>RGB matrix name</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="377"/> <source>The name of this RGB matrix function</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="408"/> <source>Save this matrix to a sequence</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="428"/> <source>Toggle between circle and square preview</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="474"/> <source>Fixture group</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="487"/> <source>The fixture group to use as the pixel matrix</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="28"/> <source>Pattern</source> <translation type="unfinished">Kuvio</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="74"/> <source>The RGB matrix pattern</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="96"/> <source>Animated Text</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="108"/> <source>Text to display</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="115"/> <source>Choose the font</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="50"/> <source>Reset end colour</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="84"/> <source>Properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="135"/> <source>Animation style</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="145"/> <source>Image</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="184"/> <source>Offset</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="190"/> <source>X</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="197"/> <source>Shift the pattern X pixels horizontally</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="210"/> <source>Y</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="217"/> <source>Shift the pattern Y pixels vertically</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="314"/> <source>Run Order</source> <translation type="unfinished">Ajojärjestys</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="320"/> <source>Run through over and over again</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="323"/> <source>Loop</source> <translation type="unfinished">Silmukka</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="333"/> <source>Run through once and stop</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="336"/> <source>Single Shot</source> <translation type="unfinished">Kertalaukaus</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="343"/> <source>First run forwards, then backwards, again forwards, etc.</source> <translation type="unfinished">Aja ensin alusta loppuun, sitten lopusta alkuun, taas alusta loppuun, jne.</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="346"/> <source>Ping Pong</source> <translation type="unfinished">Edestakaisin</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="260"/> <source>Direction</source> <translation type="unfinished">Suunta</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="61"/> <source>Matrix start colour</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="34"/> <source>Matrix end colour</source> <oldsource>Matrix end color</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="266"/> <source>Start from the first step</source> <translation type="unfinished">Aloita ensimmäisestä askeleesta</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="269"/> <source>Forward</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="279"/> <source>Start from the last step</source> <translation type="unfinished">Aloita viimeisestä askeleesta</translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="282"/> <source>Backward</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="388"/> <source>Show/Hide speed dial window</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.ui" line="448"/> <source>See what the RGB Matrix does when it is run</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.cpp" line="263"/> <source>None</source> <translation type="unfinished">Ei mitään</translation> </message> <message> <location filename="rgbmatrixeditor.cpp" line="477"/> <source>No fixture group to control</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.cpp" line="783"/> <source>Select image</source> <translation type="unfinished"></translation> </message> <message> <location filename="rgbmatrixeditor.cpp" line="785"/> <source>Images</source> <translation type="unfinished"></translation> </message> </context> <context> <name>SceneEditor</name> <message> <location filename="sceneeditor.ui" line="20"/> <source>Scene editor</source> <translation>Tilanteen muokkaus</translation> </message> <message> <location filename="sceneeditor.ui" line="45"/> <location filename="sceneeditor.ui" line="48"/> <source>General</source> <translation>Yleinen</translation> </message> <message> <location filename="sceneeditor.ui" line="101"/> <source>Enable all channel groups</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.ui" line="67"/> <source>Disable all channel groups</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.ui" line="190"/> <source>Channel groups used in this scene</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.ui" line="143"/> <source>Fixtures used in this scene</source> <oldsource>Name of this scene</oldsource> <translation type="unfinished">Tämän tilanteen nimi</translation> </message> <message> <location filename="sceneeditor.ui" line="84"/> <source>Add a new fixture to this scene</source> <translation>Lisää tilanteeseen uusi valaisin</translation> </message> <message> <location filename="sceneeditor.ui" line="151"/> <source>Remove the selected fixture(s) from this scene</source> <translation>Poista valitut valaisimet tilanteesta</translation> </message> <message> <location filename="sceneeditor.ui" line="222"/> <source>Enable all fixtures&apos; channels</source> <translation>Käytä kaikkien valaisinten kanavia</translation> </message> <message> <location filename="sceneeditor.ui" line="205"/> <source>Disable all fixtures&apos; channels</source> <translation>Kytke pois kaikkien valaisinten kanavat</translation> </message> <message> <location filename="sceneeditor.cpp" line="152"/> <source>Enable all channels in current fixture</source> <translation>Käytä kaikkia valitun valaisimen kanavia</translation> </message> <message> <location filename="sceneeditor.cpp" line="154"/> <source>Disable all channels in current fixture</source> <translation>Poista käytöstä valitun valaisimen kaikki kanavat</translation> </message> <message> <location filename="sceneeditor.cpp" line="156"/> <source>Copy current values to clipboard</source> <translation>Kopio nykyiset arvot leikepöydälle</translation> </message> <message> <location filename="sceneeditor.cpp" line="158"/> <source>Paste clipboard values to current fixture</source> <translation>Liitä leikepöydälle tallennetut arvot nykyiselle valaisimelle</translation> </message> <message> <location filename="sceneeditor.cpp" line="160"/> <source>Copy current values to all fixtures</source> <translation>Kopioi nykyisen valaisimen arvot kaikkiin valittuihin valaisimiin</translation> </message> <message> <location filename="sceneeditor.cpp" line="162"/> <source>Color tool for CMY/RGB-capable fixtures</source> <translation>Värityökalu CMY/RGB-toiminnolla varustettuja valaisimia varten</translation> </message> <message> <location filename="sceneeditor.cpp" line="164"/> <source>Position tool for moving heads/scanners</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="166"/> <source>Switch between tab view and all channels view</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="168"/> <source>Toggle blind mode</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="170"/> <source>Show/Hide speed dial window</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="172"/> <source>Clone this scene and append as a new step to the selected chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="174"/> <source>Go to next fixture tab</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="178"/> <source>Go to previous fixture tab</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="200"/> <source>None</source> <translation type="unfinished">Ei mitään</translation> </message> <message> <location filename="sceneeditor.cpp" line="212"/> <source>Scene name:</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="872"/> <location filename="sceneeditor.cpp" line="873"/> <source>All fixtures</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="1390"/> <location filename="sceneeditor.cpp" line="1391"/> <source>Channels Groups</source> <translation type="unfinished"></translation> </message> <message> <location filename="sceneeditor.cpp" line="1169"/> <location filename="sceneeditor.cpp" line="1170"/> <source>Generic</source> <translation>Yleinen</translation> </message> <message> <location filename="sceneeditor.cpp" line="1238"/> <source>Remove fixtures</source> <translation>Poista valaisimia</translation> </message> <message> <location filename="sceneeditor.cpp" line="1239"/> <source>Do you want to remove the selected fixture(s)?</source> <translation>Haluatko poistaa valitut valaisimet?</translation> </message> </context> <context> <name>ScriptEditor</name> <message> <location filename="scripteditor.ui" line="14"/> <source>Script editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="156"/> <source>Test the execution of this script</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="176"/> <source>Script name</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="36"/> <source>Add new command to cursor position</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="66"/> <source>Cut selected text to clipboard</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="83"/> <source>Copy selected text to clipboard</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="100"/> <source>Paste text from clipboard at cursor</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="124"/> <source>Undo</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.ui" line="195"/> <source>Check the syntax of this script</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="89"/> <source>Start Function</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="93"/> <source>Stop Function</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="97"/> <source>Wait</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="101"/> <source>Wait Key</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="105"/> <source>Set HTP</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="109"/> <source>Set LTP</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="113"/> <source>Set Fixture</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="117"/> <source>System Command</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="121"/> <source>Comment</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="125"/> <source>Random Number</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="129"/> <source>File Path</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="155"/> <source>Open Executable File</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="160"/> <source>All Files (*.*)</source> <translation type="unfinished">Kaikki tiedostot (*.*)</translation> </message> <message> <location filename="scripteditor.cpp" line="162"/> <source>All Files (*)</source> <translation type="unfinished">Kaikki tiedostot (*)</translation> </message> <message> <location filename="scripteditor.cpp" line="265"/> <source>Enter the desired time</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="349"/> <source>Invalid executable</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="349"/> <source>Please select an executable file !</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="355"/> <source>Enter the program arguments (leave empty if not required)</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="391"/> <source>Enter the range for the randomization</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="398"/> <source>Minimum value</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="399"/> <source>Maximum value</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="439"/> <source>No syntax errors found in the script</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="446"/> <source>Syntax error at line %1: %2 </source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="449"/> <source>Script check results</source> <translation type="unfinished"></translation> </message> <message> <location filename="scripteditor.cpp" line="375"/> <source>Add Comment</source> <translation type="unfinished"></translation> </message> </context> <context> <name>SelectInputChannel</name> <message> <location filename="selectinputchannel.ui" line="14"/> <source>Select input channel</source> <translation>Valitse sisääntulokanava</translation> </message> <message> <location filename="selectinputchannel.ui" line="24"/> <source>Name</source> <translation>Nimi</translation> </message> <message> <location filename="selectinputchannel.cpp" line="169"/> <source>&lt;Double click here to enter channel number manually&gt;</source> <translation>&lt;Kaksoisnapauta tähän kirjoittaaksesi kanavanumeron käsin&gt;</translation> </message> </context> <context> <name>ShowEditor</name> <message> <location filename="showmanager/showeditor.ui" line="14"/> <source>Show editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showeditor.ui" line="26"/> <source>Show name</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showeditor.ui" line="33"/> <source>Name of the function being edited</source> <translation type="unfinished">Muokattavan funktion nimi</translation> </message> <message> <location filename="showmanager/showeditor.ui" line="53"/> <source>Function</source> <translation type="unfinished">Funktio</translation> </message> <message> <location filename="showmanager/showeditor.ui" line="58"/> <source>Steps</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showeditor.ui" line="66"/> <source>Start Time</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showeditor.ui" line="74"/> <source>Duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showeditor.ui" line="85"/> <source>Add function(s) to the collection</source> <translation type="unfinished">Lisää funktioita kokoelmaan</translation> </message> <message> <location filename="showmanager/showeditor.ui" line="105"/> <source>Remove the selected function</source> <translation type="unfinished">Poista valitut funktiot kokoelmasta</translation> </message> </context> <context> <name>ShowItem</name> <message> <location filename="showmanager/showitem.cpp" line="53"/> <source>Align to cursor</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showitem.cpp" line="56"/> <location filename="showmanager/showitem.cpp" line="85"/> <location filename="showmanager/showitem.cpp" line="261"/> <source>Lock item</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showitem.cpp" line="66"/> <source>Name: %1 Start time: %2 Duration: %3 %4</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showitem.cpp" line="70"/> <source>Click to move this item across the timeline</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showitem.cpp" line="80"/> <location filename="showmanager/showitem.cpp" line="256"/> <source>Unlock item</source> <translation type="unfinished"></translation> </message> </context> <context> <name>ShowManager</name> <message> <location filename="showmanager/showmanager.cpp" line="196"/> <source>New s&amp;how</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="208"/> <source>New s&amp;equence</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="214"/> <source>New &amp;audio</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="221"/> <source>New vi&amp;deo</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="228"/> <source>&amp;Copy</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="235"/> <source>&amp;Paste</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="242"/> <source>&amp;Delete</source> <translation type="unfinished">&amp;Poista</translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="249"/> <source>Change Co&amp;lor</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="270"/> <source>Snap to &amp;Grid</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="277"/> <source>St&amp;op</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="283"/> <source>&amp;Play</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="344"/> <source>Time division:</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="349"/> <source>Time</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="556"/> <source>New Show</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="557"/> <source>Show name setup</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="558"/> <source>Show name:</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="202"/> <source>Add a &amp;track or an existing function</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="256"/> <source>Lock item</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="263"/> <source>Item start time and duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="676"/> <location filename="showmanager/showmanager.cpp" line="802"/> <source> (Copy)</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="762"/> <source>Track %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="787"/> <location filename="showmanager/showmanager.cpp" line="881"/> <source>New Sequence</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="860"/> <location filename="showmanager/showmanager.cpp" line="936"/> <location filename="showmanager/showmanager.cpp" line="995"/> <source>Overlapping error</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="860"/> <location filename="showmanager/showmanager.cpp" line="936"/> <location filename="showmanager/showmanager.cpp" line="995"/> <source>Overlapping not allowed. Operation cancelled.</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="869"/> <source>Scene for %1 - Track %2</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="894"/> <source>Open Audio File</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="903"/> <source>Audio Files (%1)</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="905"/> <location filename="showmanager/showmanager.cpp" line="964"/> <source>All Files (*.*)</source> <translation type="unfinished">Kaikki tiedostot (*.*)</translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="907"/> <location filename="showmanager/showmanager.cpp" line="966"/> <source>All Files (*)</source> <translation type="unfinished">Kaikki tiedostot (*)</translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="929"/> <source>Unsupported audio file</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="929"/> <source>This audio file cannot be played with QLC+. Sorry.</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="953"/> <source>Open Video File</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="962"/> <source>Video Files (%1)</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="988"/> <source>Unsupported video file</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="988"/> <source>This video file cannot be played with QLC+. Sorry.</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="1039"/> <location filename="showmanager/showmanager.cpp" line="1061"/> <source>Paste error</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="1039"/> <source>Overlapping paste not allowed. Operation cancelled.</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="1061"/> <source>Trying to paste on an incompatible Scene. Operation cancelled.</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="1350"/> <source>Track name setup</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/showmanager.cpp" line="1351"/> <source>Track name:</source> <translation type="unfinished"></translation> </message> </context> <context> <name>SimpleDesk</name> <message> <location filename="simpledesk.cpp" line="245"/> <source>Universe</source> <translation type="unfinished">Universumi</translation> </message> <message> <location filename="simpledesk.cpp" line="232"/> <source>Next page</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="224"/> <source>Current page</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="216"/> <source>Previous page</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="207"/> <source>View mode</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="240"/> <source>Reset universe</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="284"/> <source>Playback</source> <translation type="unfinished">Toisto</translation> </message> <message> <location filename="simpledesk.cpp" line="281"/> <location filename="simpledesk.cpp" line="291"/> <source>Cue Stack</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="301"/> <source>Previous cue</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="307"/> <source>Stop cue stack</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="313"/> <source>Next cue</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="321"/> <source>Clone cue stack</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="327"/> <source>Edit cue stack</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="334"/> <source>Record cue</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="531"/> <source>Channel groups</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="873"/> <source>Cue Stack - Playback %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="1055"/> <source>No selection</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="1078"/> <source>Cue name</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="1085"/> <source>Multiple Cues</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="1182"/> <source>Delete cue</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="1236"/> <source>Clone Cue Stack</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="1236"/> <source>Clone To Playback#</source> <translation type="unfinished"></translation> </message> <message> <location filename="simpledesk.cpp" line="1302"/> <source>Cue %1</source> <translation type="unfinished"></translation> </message> </context> <context> <name>SpeedDial</name> <message> <location filename="speeddial.cpp" line="136"/> <source>Hours</source> <translation type="unfinished"></translation> </message> <message> <location filename="speeddial.cpp" line="145"/> <source>Minutes</source> <translation type="unfinished"></translation> </message> <message> <location filename="speeddial.cpp" line="154"/> <source>Seconds</source> <translation type="unfinished"></translation> </message> <message> <location filename="speeddial.cpp" line="163"/> <source>Milliseconds</source> <translation type="unfinished"></translation> </message> <message> <location filename="speeddial.cpp" line="169"/> <source>Infinite</source> <translation type="unfinished"></translation> </message> <message> <location filename="speeddial.cpp" line="123"/> <source>Tap</source> <translation type="unfinished"></translation> </message> </context> <context> <name>SpeedDialWidget</name> <message> <location filename="speeddialwidget.cpp" line="61"/> <source>Fade In</source> <translation type="unfinished"></translation> </message> <message> <location filename="speeddialwidget.cpp" line="67"/> <source>Fade Out</source> <translation type="unfinished"></translation> </message> <message> <location filename="speeddialwidget.cpp" line="73"/> <source>Hold</source> <translation type="unfinished"></translation> </message> </context> <context> <name>TimingsTool</name> <message> <location filename="showmanager/timingstool.cpp" line="50"/> <source>Start Time</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/timingstool.cpp" line="61"/> <source>Duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/timingstool.cpp" line="68"/> <source>Duration options</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/timingstool.cpp" line="70"/> <source>Stretch the original function duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/timingstool.cpp" line="71"/> <source>Loop function until duration is reached</source> <translation type="unfinished"></translation> </message> </context> <context> <name>TrackItem</name> <message> <location filename="showmanager/trackitem.cpp" line="55"/> <source>Move up</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/trackitem.cpp" line="58"/> <source>Move down</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/trackitem.cpp" line="62"/> <source>Change name</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/trackitem.cpp" line="66"/> <source>Delete</source> <translation type="unfinished">Poista</translation> </message> </context> <context> <name>UniverseItemWidget</name> <message> <location filename="universeitemwidget.cpp" line="86"/> <source>Input:</source> <translation type="unfinished"></translation> </message> <message> <location filename="universeitemwidget.cpp" line="87"/> <source>Profile:</source> <translation type="unfinished"></translation> </message> <message> <location filename="universeitemwidget.cpp" line="88"/> <source>Output:</source> <translation type="unfinished"></translation> </message> <message> <location filename="universeitemwidget.cpp" line="89"/> <source>Feedback:</source> <translation type="unfinished"></translation> </message> <message> <location filename="universeitemwidget.cpp" line="106"/> <location filename="universeitemwidget.cpp" line="108"/> <location filename="universeitemwidget.cpp" line="110"/> <location filename="universeitemwidget.cpp" line="112"/> <source>None</source> <translation type="unfinished">Ei mitään</translation> </message> </context> <context> <name>VCAudioTriggers</name> <message> <location filename="virtualconsole/vcaudiotriggers.cpp" line="189"/> <source>Audio open error</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcaudiotriggers.cpp" line="190"/> <source>An error occurred while initializing the selected audio device. Please review your audio input settings.</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCButton</name> <message> <location filename="virtualconsole/vcbutton.cpp" line="89"/> <source>Choose...</source> <translation>Valitse...</translation> </message> <message> <location filename="virtualconsole/vcbutton.cpp" line="93"/> <source>None</source> <translation>Ei mitään</translation> </message> <message> <location filename="virtualconsole/vcbutton.cpp" line="131"/> <source>Button %1</source> <translation type="unfinished">Nappi %1</translation> </message> <message> <location filename="virtualconsole/vcbutton.cpp" line="306"/> <source>Select button icon</source> <translation>Valitse ikoni</translation> </message> <message> <location filename="virtualconsole/vcbutton.cpp" line="307"/> <source>Images (%1)</source> <translation>Kuvatiedostot (%1)</translation> </message> <message> <location filename="virtualconsole/vcbutton.cpp" line="553"/> <source>Toggle Blackout</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcbutton.cpp" line="555"/> <source>Stop ALL functions!</source> <translation type="unfinished">Pysäytä KAIKKI funktiot!</translation> </message> <message> <location filename="virtualconsole/vcbutton.cpp" line="785"/> <source>Icon</source> <translation>Ikoni</translation> </message> </context> <context> <name>VCButtonProperties</name> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="14"/> <source>Button properties</source> <translation>Napin asetukset</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="362"/> <source>General</source> <translation>Yleinen</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="368"/> <source>Button label</source> <translation>Napin teksti</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="375"/> <source>Text to display on the button</source> <translation>Teksti, joka näytetään napissa</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="382"/> <source>Function</source> <translation>Funktio</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="389"/> <source>The function that this button controls</source> <translation>Funktio, jota tämä nappi ohjaa</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="399"/> <source>Attach a function to this button</source> <translation>Liitä funktio tähän nappiin</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="419"/> <source>Detach the button&apos;s function attachment</source> <translation>Poista funktio tästä napista</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="126"/> <source>Key combination</source> <translation>Näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="184"/> <source>Keyboard combination that toggles this button</source> <translation>Näppäinyhdistelmä, joka kytkee tämän napin päälle/pois</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="164"/> <source>Set a key combination for this button</source> <translation>Aseta näppäinyhdistelmä tälle napille</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="144"/> <source>Remove the button&apos;s keyboard shortcut key</source> <translation>Poista näppäinyhdistelmä tästä napista</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="284"/> <source>External Input</source> <translation>Ulkoinen ohjaus</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="323"/> <source>Input Universe</source> <translation>Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="313"/> <source>The input universe that sends data to this widget</source> <translation>Sisääntulon universumi, joka lähettää komentoja tälle napille</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="290"/> <source>Input Channel</source> <translation>Sisääntulokanava</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="330"/> <source>The particular input channel within the input universe that sends data to this widget</source> <translation>Sisääntulon universumissa oleva kanava, joka lähettää komentoja tälle napille</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="303"/> <source>Choose an external input universe &amp; channel that this button should listen to.</source> <translation>Valitse ulkoinen sisääntulouniversumi ja -kanava, jota tämä nappi kuuntelee.</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="59"/> <source>Toggle Blackout</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="74"/> <source>Stop All Functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="81"/> <source>Fade time:</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="197"/> <source>Adjust function intensity when it is running</source> <translation>Aseta funktion ajonaikainen intensiteetti</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="200"/> <source>Adjust Function Intensity</source> <translation>Aseta funktion intensiteettiä</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="215"/> <source>Function&apos;s adjusted intensity percentage when run</source> <translation>Funktion ajonaikainen intensiteetti prosentteina</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="265"/> <source>Attributes</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="306"/> <source>Choose...</source> <translation>Valitse...</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="340"/> <source>When toggled, you can click an external button to assign it to this virtual console button.</source> <translation>Alaskytkettynä voit painaa ulkoista kontrollinappia kytkeäksesi sen tähän virtuaalinappiin.</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="343"/> <source>Auto Detect</source> <translation>Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="30"/> <source>On button press...</source> <translation>Kun nappia painetaan...</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="36"/> <source>Toggle the assigned function on/off with this button</source> <translation>Kytke nappiin liitetty funktio vuorottain päälle/pois</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="39"/> <source>Toggle function on/off</source> <translation>Kytke funktio vuorottain päälle/pois</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="49"/> <source>Flash the assigned function with this button</source> <translation>Väläytä liitettyä funktiota painamalla nappi alas</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.ui" line="52"/> <source>Flash function (only for scenes)</source> <translation>Väläytä funktiota (käytössä vain tilanteille)</translation> </message> <message> <location filename="virtualconsole/vcbuttonproperties.cpp" line="139"/> <source>No function</source> <translation>Ei funktiota</translation> </message> </context> <context> <name>VCClockProperties</name> <message> <location filename="virtualconsole/vcclockproperties.ui" line="14"/> <source>Clock properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="24"/> <source>Clock type</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="30"/> <source>Stopwatch</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="37"/> <source>h</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="47"/> <source>Countdown</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="54"/> <source>m</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="64"/> <source>s</source> <translation type="unfinished">sek</translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="80"/> <source>Clock</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="93"/> <source>Schedule</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="159"/> <source>Function</source> <translation type="unfinished">Funktio</translation> </message> <message> <location filename="virtualconsole/vcclockproperties.ui" line="164"/> <source>Time</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCCueList</name> <message> <location filename="virtualconsole/vccuelist.cpp" line="100"/> <source>Link</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="193"/> <source>Show/Hide crossfade sliders</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="203"/> <source>Play/Stop Cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="212"/> <source>Go to previous step in the list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="221"/> <source>Go to next step in the list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="229"/> <source>Cue list</source> <translation>Cue lista</translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="981"/> <source>Fade In</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="981"/> <source>Fade Out</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="981"/> <source>Duration</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelist.cpp" line="981"/> <source>Notes</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCCueListProperties</name> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="14"/> <source>Cue list properties</source> <translation>Cue-listan asetukset</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="20"/> <source>Cue list name</source> <translation>Cue-listan nimi</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="37"/> <source>The name of the cue list widget</source> <translation>Muokattavan cue-lista-komponentin nimi</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="51"/> <source>Cue List</source> <oldsource>Cues</oldsource> <translation type="unfinished">Cue</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="57"/> <source>Chaser</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="64"/> <source>The chaser function to use as cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="74"/> <source>Choose the chaser function to use as the steps for the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="91"/> <source>Detach current chaser from the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="122"/> <source>Playback</source> <translation type="unfinished">Toisto</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="271"/> <source>Next Cue</source> <translation>Seuraava cue</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="196"/> <location filename="virtualconsole/vccuelistproperties.ui" line="345"/> <location filename="virtualconsole/vccuelistproperties.ui" line="494"/> <source>Key Combination</source> <translation>Näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="136"/> <location filename="virtualconsole/vccuelistproperties.ui" line="285"/> <location filename="virtualconsole/vccuelistproperties.ui" line="434"/> <source>External Input</source> <translation>Ulkoinen ohjaus</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="142"/> <location filename="virtualconsole/vccuelistproperties.ui" line="291"/> <location filename="virtualconsole/vccuelistproperties.ui" line="440"/> <location filename="virtualconsole/vccuelistproperties.ui" line="581"/> <location filename="virtualconsole/vccuelistproperties.ui" line="641"/> <source>Input universe</source> <translation>Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="298"/> <source>Input universe for skipping to the next cue</source> <translation>Sisääntulouniversumi seuraavaan cueen hyppäämistä varten</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="156"/> <location filename="virtualconsole/vccuelistproperties.ui" line="305"/> <location filename="virtualconsole/vccuelistproperties.ui" line="454"/> <location filename="virtualconsole/vccuelistproperties.ui" line="595"/> <location filename="virtualconsole/vccuelistproperties.ui" line="655"/> <source>Input channel</source> <translation>Sisääntulon kanava</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="312"/> <source>Input channel for skipping to the next cue</source> <translation>Sisääntulokanava seuraavaan cueen hyppäämistä varten</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="319"/> <source>When toggled, you can click an external button to assign it as the control that skips to the next cue.</source> <translation>Alaskytkettynä voit painaa ulkoista kontrollinappia kytkeäksesi sen seuraavaan cueen hyppäämistä varten.</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="173"/> <location filename="virtualconsole/vccuelistproperties.ui" line="322"/> <location filename="virtualconsole/vccuelistproperties.ui" line="471"/> <location filename="virtualconsole/vccuelistproperties.ui" line="612"/> <location filename="virtualconsole/vccuelistproperties.ui" line="672"/> <source>Auto Detect</source> <translation>Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="332"/> <source>Choose an input universe/channel for skipping to the next cue</source> <translation>Valitse sisääntulouniversumi/kanava seuraavaan cueen hyppäämistä varten</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="186"/> <location filename="virtualconsole/vccuelistproperties.ui" line="335"/> <location filename="virtualconsole/vccuelistproperties.ui" line="484"/> <location filename="virtualconsole/vccuelistproperties.ui" line="625"/> <location filename="virtualconsole/vccuelistproperties.ui" line="685"/> <source>Choose...</source> <translation>Valitse...</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="420"/> <source>Previous Cue</source> <translation>Edellinen cue</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="540"/> <source>The key combination used to step to the previous cue</source> <translation>Näppäinyhdistelmä, jolla voidaan siirtyä edelliseen cueen</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="523"/> <source>Bind a key combination to skip to the previous cue</source> <translation>Aseta näppäinyhdistelmä, jolla voidaan siirtyä edelliseen cueen</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="447"/> <source>Input universe for skipping to the previous cue</source> <translation>Sisääntulouniversumi edelliseen cueen hyppäämistä varten</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="461"/> <source>Input channel for skipping to the previous cue</source> <translation>Sisääntulokanava edelliseen cueen hyppäämistä varten</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="468"/> <source>When toggled, you can click an external button to assign it as the control that skips to the previous cue.</source> <translation>Alaskytkettynä voit painaa ulkoista kontrollinappia kytkeäksesi sen edelliseen cueen hyppäämistä varten.</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="481"/> <source>Choose an input universe/channel for skipping to the previous cue</source> <translation>Valitse sisääntulouniversumi/kanava edelliseen cueen hyppäämistä varten</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="242"/> <source>The key combination used to stop the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="225"/> <source>Bind a key combination to stop the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="149"/> <location filename="virtualconsole/vccuelistproperties.ui" line="588"/> <location filename="virtualconsole/vccuelistproperties.ui" line="648"/> <source>Input universe for stopping the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="163"/> <location filename="virtualconsole/vccuelistproperties.ui" line="602"/> <location filename="virtualconsole/vccuelistproperties.ui" line="662"/> <source>Input channel for stopping the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="170"/> <location filename="virtualconsole/vccuelistproperties.ui" line="609"/> <location filename="virtualconsole/vccuelistproperties.ui" line="669"/> <source>When toggled, you can click an external button to assign it as the control that stops the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="183"/> <location filename="virtualconsole/vccuelistproperties.ui" line="622"/> <location filename="virtualconsole/vccuelistproperties.ui" line="682"/> <source>Choose an input universe/channel for stopping the cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="569"/> <source>Crossfade</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="575"/> <source>Left Slider</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="635"/> <source>Right Slider</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="391"/> <source>The key combination used to step to the next cue</source> <translation>Näppäinyhdistelmä, jolla voidaan siirtyä seuraavaan cueen</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="357"/> <source>Bind a key combination to skip to the next cue</source> <translation>Aseta näppäinyhdistelmä, jolla voidaan siirtyä seuraavaan cueen</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.ui" line="208"/> <location filename="virtualconsole/vccuelistproperties.ui" line="374"/> <location filename="virtualconsole/vccuelistproperties.ui" line="506"/> <source>Clear the key binding</source> <translation>Poista näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vccuelistproperties.cpp" line="223"/> <source>No function</source> <translation type="unfinished">Ei funktiota</translation> </message> </context> <context> <name>VCFrame</name> <message> <location filename="virtualconsole/vcframe.cpp" line="350"/> <location filename="virtualconsole/vcframe.cpp" line="464"/> <source>Page: %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframe.cpp" line="1232"/> <source>Add</source> <translation>Lisää</translation> </message> </context> <context> <name>VCFrameProperties</name> <message> <location filename="virtualconsole/vcframeproperties.ui" line="14"/> <source>Frame Properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="22"/> <source>Frame name</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="38"/> <source>General</source> <translation type="unfinished">Yleinen</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="44"/> <source>Appearance</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="56"/> <source>Accept child widgets</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="69"/> <source>Allow resizing</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="82"/> <source>Show header</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="95"/> <source>Show enable button</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="107"/> <source>External Input - Enable</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="160"/> <source>When toggled, you can move an external control to assign it to this frame.</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="192"/> <source>The key combination used to enable/disable the frame</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="202"/> <source>Bind a key combination to enable/disable the frame</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="261"/> <source>Pages</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="267"/> <source>Enable</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="276"/> <source>Clone first page widgets</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="289"/> <source>External Input - Next page</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="588"/> <source>Pages circular scrolling</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="113"/> <location filename="virtualconsole/vcframeproperties.ui" line="295"/> <location filename="virtualconsole/vcframeproperties.ui" line="403"/> <source>Input universe</source> <translation type="unfinished">Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="120"/> <location filename="virtualconsole/vcframeproperties.ui" line="302"/> <location filename="virtualconsole/vcframeproperties.ui" line="410"/> <source>The input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="130"/> <location filename="virtualconsole/vcframeproperties.ui" line="312"/> <location filename="virtualconsole/vcframeproperties.ui" line="420"/> <source>Input channel</source> <translation type="unfinished">Sisääntulon kanava</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="137"/> <location filename="virtualconsole/vcframeproperties.ui" line="319"/> <location filename="virtualconsole/vcframeproperties.ui" line="427"/> <source>The particular input channel within the input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="173"/> <location filename="virtualconsole/vcframeproperties.ui" line="329"/> <location filename="virtualconsole/vcframeproperties.ui" line="380"/> <source>Choose an external input universe &amp; channel that this widget should listen to</source> <translation type="unfinished">Valitse sisääntulon universumi ja kanava, joilla tätä liukua voidaan ohjata</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="176"/> <location filename="virtualconsole/vcframeproperties.ui" line="332"/> <location filename="virtualconsole/vcframeproperties.ui" line="383"/> <source>Choose...</source> <translation type="unfinished">Valitse...</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="339"/> <source>When toggled, you can move an external slider/knob to assign it to this widget.</source> <oldsource>When toggled, you can move an external slider/knob to assign it to this virtual console slider.</oldsource> <translation type="unfinished">Alaskytkettynä, voit liikuttaa ulkoista kontrollia kytkeäksesi sen tähän liukuun.</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="163"/> <location filename="virtualconsole/vcframeproperties.ui" line="342"/> <location filename="virtualconsole/vcframeproperties.ui" line="440"/> <source>Auto Detect</source> <translation type="unfinished">Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="374"/> <source>External Input - Previous page</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="437"/> <source>When toggled, you can move an external slider/knob to assign it to this frame.</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="453"/> <source>Number of pages:</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="186"/> <location filename="virtualconsole/vcframeproperties.ui" line="460"/> <location filename="virtualconsole/vcframeproperties.ui" line="519"/> <source>Key Combination</source> <translation type="unfinished">Näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="466"/> <source>Bind a key combination to skip to the next frame page</source> <oldsource>Bind a key combination to skip to the next cue</oldsource> <translation type="unfinished">Aseta näppäinyhdistelmä, jolla voidaan siirtyä seuraavaan cueen</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="222"/> <location filename="virtualconsole/vcframeproperties.ui" line="486"/> <location filename="virtualconsole/vcframeproperties.ui" line="545"/> <source>Clear the key binding</source> <translation type="unfinished">Poista näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="506"/> <source>The key combination used to go to the next frame page</source> <oldsource>The key combination used to step to the next cue</oldsource> <translation type="unfinished">Näppäinyhdistelmä, jolla voidaan siirtyä seuraavaan cueen</translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="525"/> <source>Bind a key combination to skip to the previous frame page</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcframeproperties.ui" line="565"/> <source>The key combination used to go to the previous frame page</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCLabel</name> <message> <location filename="virtualconsole/vclabel.cpp" line="43"/> <source>Label</source> <translation>Etiketti</translation> </message> <message> <location filename="virtualconsole/vclabel.cpp" line="76"/> <source>Rename Label</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vclabel.cpp" line="76"/> <source>Caption:</source> <translation type="unfinished">Teksti:</translation> </message> </context> <context> <name>VCMatrix</name> <message> <location filename="virtualconsole/vcmatrix.cpp" line="168"/> <source>Animation %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrix.cpp" line="577"/> <source>End Color Reset</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrix.cpp" line="615"/> <source>Start color Red component</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrix.cpp" line="617"/> <source>Start color Green component</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrix.cpp" line="619"/> <source>Start color Blue component</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrix.cpp" line="631"/> <source>End color Red component</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrix.cpp" line="633"/> <source>End color Green component</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrix.cpp" line="635"/> <source>End color Blue component</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCMatrixPresetSelection</name> <message> <location filename="virtualconsole/vcmatrixpresetselection.ui" line="14"/> <source>Select an animation preset</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixpresetselection.ui" line="32"/> <source>Pattern</source> <translation type="unfinished">Kuvio</translation> </message> <message> <location filename="virtualconsole/vcmatrixpresetselection.ui" line="50"/> <source>Properties</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCMatrixProperties</name> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="14"/> <source>Animation widget properties</source> <oldsource>RGB Matrix properties</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="38"/> <source>General</source> <translation type="unfinished">Yleinen</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="46"/> <source>The function that this widget controls</source> <oldsource>The function that this matrix controls</oldsource> <translation type="unfinished">Funktio, jota tämä nappi ohjaa</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="56"/> <source>Widget name</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="63"/> <source>RGB Matrix Function</source> <oldsource>Matrix Function</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="70"/> <source>Detach the matrix function attachment</source> <oldsource>Detach the button&apos;s function attachment</oldsource> <translation type="unfinished">Poista funktio tästä napista</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="90"/> <source>Attach a function to this widget</source> <oldsource>Attach a function to this button</oldsource> <translation type="unfinished">Liitä funktio tähän nappiin</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="110"/> <source>Text to display on the widget</source> <oldsource>Text to display on the button</oldsource> <translation type="unfinished">Teksti, joka näytetään napissa</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="117"/> <source>Apply color and preset changes immediately</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="124"/> <source>Show Label</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="131"/> <source>Show Slider</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="138"/> <source>Show Start Color Button</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="145"/> <source>Show End Color Button</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="152"/> <source>Show Preset Combo</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="161"/> <source>Slider External Input</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="167"/> <location filename="virtualconsole/vcmatrixproperties.ui" line="351"/> <source>Input universe</source> <translation type="unfinished">Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="174"/> <source>The input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="184"/> <location filename="virtualconsole/vcmatrixproperties.ui" line="344"/> <source>Input channel</source> <translation type="unfinished">Sisääntulon kanava</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="191"/> <source>The particular input channel within the input universe that sends data to this widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="214"/> <source>Choose an external input universe &amp; channel that this widget should listen to</source> <translation type="unfinished">Valitse sisääntulon universumi ja kanava, joilla tätä liukua voidaan ohjata</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="217"/> <location filename="virtualconsole/vcmatrixproperties.ui" line="314"/> <source>Choose...</source> <translation type="unfinished">Valitse...</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="224"/> <source>When toggled, you can move an external slider/knob to assign it to the animation widget slider.</source> <oldsource>When toggled, you can move an external slider/knob to assign it to this virtual console slider.</oldsource> <translation type="unfinished">Alaskytkettynä, voit liikuttaa ulkoista kontrollia kytkeäksesi sen tähän liukuun.</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="227"/> <location filename="virtualconsole/vcmatrixproperties.ui" line="324"/> <source>Auto Detect</source> <translation type="unfinished">Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="254"/> <source>Custom Controls</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="372"/> <source> Add start color knobs</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="394"/> <source> Add end color knobs</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="405"/> <source> Add end color reset</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="438"/> <source> Remove</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="416"/> <source> Add preset</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="263"/> <source>Type</source> <translation type="unfinished">Tyyppi</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="268"/> <source>Value</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="361"/> <source> Add start color</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="383"/> <source> Add end color</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="455"/> <source>Key combination</source> <translation type="unfinished">Näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="470"/> <source>Remove the control&apos;s keyboard shortcut key</source> <oldsource>Remove the button&apos;s keyboard shortcut key</oldsource> <translation type="unfinished">Poista näppäinyhdistelmä tästä napista</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="490"/> <source>Set a key combination for this control</source> <oldsource>Set a key combination for this button</oldsource> <translation type="unfinished">Aseta näppäinyhdistelmä tälle napille</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="510"/> <source>Keyboard combination that toggles this control</source> <oldsource>Keyboard combination that toggles this button</oldsource> <translation type="unfinished">Näppäinyhdistelmä, joka kytkee tämän napin päälle/pois</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="282"/> <source>External Input</source> <translation type="unfinished">Ulkoinen ohjaus</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="301"/> <source>The particular input channel within the input universe that sends data to this control</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="311"/> <source>Choose an external input universe &amp; channel that this control should listen to</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="321"/> <source>When toggled, you can move an external button to assign it to this control</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="334"/> <source>The input universe that sends data to this control</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.ui" line="427"/> <source> Add text</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="143"/> <source>No function</source> <translation type="unfinished">Ei funktiota</translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="219"/> <source>Start Color</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="225"/> <source>Start Color Knob</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="231"/> <source>End Color</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="237"/> <source>End Color Knob</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="243"/> <source>End Color Reset</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="248"/> <source>Animation</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="270"/> <location filename="virtualconsole/vcmatrixproperties.cpp" line="404"/> <source>Text</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcmatrixproperties.cpp" line="403"/> <source>Enter a text</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCPropertiesEditor</name> <message> <location filename="virtualconsole/vcproperties.ui" line="14"/> <source>Virtual Console Settings</source> <oldsource>Virtual Console properties</oldsource> <translation type="unfinished">Virtuaalikonsolin asetukset</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="43"/> <location filename="virtualconsole/vcproperties.ui" line="69"/> <source>Widget grid layout X resolution</source> <translation>Komponenttien vaakaresoluutio ruudukossa</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="765"/> <source>Choose...</source> <translation>Valitse...</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="24"/> <source>General</source> <translation type="unfinished">Yleinen</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="30"/> <source>Virtual Console Size</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="36"/> <source>Width</source> <translation type="unfinished">Leveys</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="62"/> <source>Height</source> <translation type="unfinished">Korkeus</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="104"/> <source>Tap Modifier</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="110"/> <source>Key</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="117"/> <source>The keyboard key that turns button clicks to taps</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="128"/> <source>Widgets</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="140"/> <source>Widgets default properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="516"/> <source>Button size</source> <oldsource>Button size:</oldsource> <translation type="unfinished">Painikkeiden koko</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="247"/> <source>Solo frame size</source> <oldsource>Solo frame size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="226"/> <source>Slider size</source> <oldsource>Slider size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="549"/> <source>Speed dial size</source> <oldsource>Speed dial size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="162"/> <source>XY Pad size</source> <oldsource>XY Pad size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="523"/> <source>Cue List size</source> <oldsource>Cue List size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="332"/> <source>Frame size</source> <oldsource>Frame size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="169"/> <source>Speed dial value</source> <oldsource>Speed dial value:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="572"/> <source>Button status style</source> <oldsource>Button status style:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="506"/> <source>LED</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="254"/> <source>Border</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="233"/> <source>Audio triggers size</source> <oldsource>Audio triggers size:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="365"/> <location filename="virtualconsole/vcproperties.ui" line="451"/> <location filename="virtualconsole/vcproperties.ui" line="589"/> <location filename="virtualconsole/vcproperties.ui" line="612"/> <source>px</source> <translation type="unfinished">px</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="579"/> <source>Animation size</source> <oldsource>RGB Matrix size</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="629"/> <source>Grand Master</source> <translation>Grand Master</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="635"/> <source>Channels</source> <translation>Kanavat</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="641"/> <source>Apply Grand Master only to Intensity channels.</source> <translation>Käytä Grand Masteria vain intensiteettikanaville.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="644"/> <source>Intensity</source> <translation>Intensiteetti</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="651"/> <source>Apply Grand Master to all channels.</source> <translation>Käytä Grand Masteria kaikille kanaville.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="654"/> <source>All channels</source> <translation>Kaikki</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="664"/> <source>Values</source> <translation>Arvot</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="670"/> <source>Make Grand Master reduce levels by a percentage.</source> <translation>Grand Master vähentää kanavien arvoja prosentuaalisesti.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="673"/> <source>Reduce</source> <translation>Vähennä</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="680"/> <source>Make Grand Master limit the maximum channel values.</source> <translation>Grand Master rajoittaa kanavien maksimiarvoja.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="683"/> <source>Limit</source> <translation>Rajoita</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="693"/> <source>External Input</source> <translation>Ulkoinen ohjaus</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="699"/> <source>Input Universe</source> <translation>Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="706"/> <source>Input universe for Grand Master slider.</source> <translation>Grand Masterin sisääntulouniversumi.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="716"/> <source>Input Channel</source> <translation>Sisääntulokanava</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="723"/> <source>Input channel for Grand Master slider.</source> <translation>Grand Masterin sisääntulokanava.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="746"/> <source>When toggled, you can move an external slider/knob to assign it to the Grand Master slider.</source> <translation>Alaskytkettynä voit liikuttaa ulkoista kontrollia kytkeäksesi sen Grand Masteriin.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="749"/> <source>Auto Detect</source> <translation>Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="762"/> <source>Choose an external input universe &amp; channel that the Grand Master slider should listen to.</source> <translation>Valitse ulkoinen sisääntulouniversumi ja -kanava, jota Grand Masterin tulee totella.</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="788"/> <source>Slider movement</source> <translation type="unfinished">Liu&apos;un liike</translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="794"/> <source>Normal</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcproperties.ui" line="801"/> <source>Inverted</source> <translation type="unfinished">Käänteinen</translation> </message> <message> <location filename="virtualconsole/vcpropertieseditor.cpp" line="460"/> <source>%1: Unknown</source> <translation>%1: Tuntematon</translation> </message> <message> <location filename="virtualconsole/vcpropertieseditor.cpp" line="476"/> <source>Unknown</source> <translation>Tuntematon</translation> </message> </context> <context> <name>VCSlider</name> <message> <location filename="virtualconsole/vcslider.cpp" line="210"/> <source>Slider %1</source> <translation type="unfinished">Liuku %1</translation> </message> </context> <context> <name>VCSliderProperties</name> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="14"/> <source>Slider properties</source> <translation>Liu&apos;un asetukset</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="27"/> <source>General</source> <translation>Yleinen</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="74"/> <source>Name of the slider</source> <translation>Liukukomponentin nimi</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="33"/> <source>Value display style</source> <translation>Arvon näyttötapa</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="39"/> <source>Show exact DMX values</source> <translation>Näytä tarkat DMX tai aika-arvot</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="52"/> <source>Show value as percentage</source> <translation>Näytä arvo prosentteina</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="55"/> <source>Percentage</source> <translation>Prosentti</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="83"/> <source>Slider movement</source> <translation>Liu&apos;un liike</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="89"/> <source>Normal</source> <translation>Normaali</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="99"/> <source>Inverted</source> <translation>Käänteinen</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="109"/> <source>External Input</source> <translation>Ulkoinen ohjaus</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="115"/> <source>Input universe</source> <translation>Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="122"/> <source>The input universe that sends data to this widget</source> <translation>Sisääntulon universumi, josta ohjataan tätä liukua</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="132"/> <source>Input channel</source> <translation>Sisääntulon kanava</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="139"/> <source>The particular input channel within the input universe that sends data to this widget</source> <translation>Sisääntulon universumin kanava, joka ohjaa tätä liukua</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="162"/> <source>Choose an external input universe &amp; channel that this widget should listen to</source> <oldsource>Choose the external input universe &amp; channel that this widget should listen to</oldsource> <translation>Valitse sisääntulon universumi ja kanava, joilla tätä liukua voidaan ohjata</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="165"/> <source>Choose...</source> <translation>Valitse...</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="172"/> <source>When toggled, you can move an external slider/knob to assign it to this virtual console slider.</source> <translation>Alaskytkettynä, voit liikuttaa ulkoista kontrollia kytkeäksesi sen tähän liukuun.</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="175"/> <source>Auto Detect</source> <translation>Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="251"/> <source>Value range</source> <translation>Arvoalue</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="257"/> <source>Low limit</source> <translation>Alaraja</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="274"/> <source>High limit</source> <translation>Yläraja</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="245"/> <source>Level</source> <translation>Taso</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="264"/> <source>Lowest DMX value that can be set with this slider</source> <translation>Alin DMX-arvo, joka tällä liu&apos;ulla voidaan asettaa</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="437"/> <source>Intensity</source> <translation type="unfinished">Intensiteetti</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="458"/> <source>Gobo/Effect/Macro</source> <oldsource>Gobo/Effect</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="492"/> <source>Playback</source> <translation>Toisto</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="498"/> <source>Function</source> <translation>Funktio</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="504"/> <source>Function that is attached to the slider</source> <translation>Liukuun liitetty funktio</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="514"/> <source>Attach a function to the slider</source> <translation>Liitä funktio liukuun</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="534"/> <source>Detach the current function from the slider</source> <translation>Poista funktio liu&apos;usta</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="570"/> <source>Make the slider control a function</source> <translation>Aseta liuku ohjaamaan funktiota</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="573"/> <source>Switch to Playback Mode</source> <translation>Vaihda toisto-tilaan</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="42"/> <source>Actual</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="67"/> <source>Widget name</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="201"/> <source>Widget appearance</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="207"/> <source>Slider</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="224"/> <source>Knob</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="281"/> <source>Highest DMX value that can be set with this slider</source> <translation>Ylin mahdollinen DMX-arvo, joka liu&apos;ulla voidaan asettaa</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="310"/> <source>Set value range from the selected capability</source> <translation>Ota arvot valitusta valaisimen esiasetuksesta</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="313"/> <source>From capability</source> <translation>Ota esiasetuksesta</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="333"/> <source>Name</source> <translation>Nimi</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="338"/> <source>Type</source> <translation>Tyyppi</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="343"/> <source>Range</source> <translation>Arvoalue</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="353"/> <source>Select all channels</source> <translation>Valitse kaikki kanavat</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="356"/> <source>All</source> <translation>Kaikki</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="363"/> <source>Unselect everything</source> <translation>Poista kaikki valinnat</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="366"/> <location filename="virtualconsole/vcsliderproperties.ui" line="427"/> <source>None</source> <translation>Ei mitään</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="373"/> <source>Invert selection</source> <translation>Käännä valinnat</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="376"/> <source>Invert</source> <translation>Käänteinen</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="396"/> <source>Choose channels by channel group</source> <translation>Valitse kanavat ryhmän mukaan</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="399"/> <source>By group...</source> <translation>Ryhmän mukaan...</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="408"/> <source>Monitor the selected channels and update the slider level</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="421"/> <source>Click &amp;&amp; Go</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="444"/> <source>RGB</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="451"/> <source>CMY</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="481"/> <source>Make the slider control the level of a set of channels</source> <translation>Aseta liuku ohjaamaan tiettyjen kanavien tasoa</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="484"/> <source>Switch to Level Mode</source> <translation>Vaihda taso-tilaan</translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="581"/> <source>Submaster</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="587"/> <source>Slider submaster mode is active</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="610"/> <source>Make the slider act as a submaster</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.ui" line="613"/> <source>Switch to Submaster Mode</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.cpp" line="685"/> <source>Select channels by group</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.cpp" line="686"/> <source>Select a channel group</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcsliderproperties.cpp" line="742"/> <source>No function</source> <translation>Ei funktiota</translation> </message> </context> <context> <name>VCSpeedDial</name> <message> <location filename="virtualconsole/vcspeeddial.cpp" line="58"/> <source>Duration</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCSpeedDialProperties</name> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="14"/> <source>Speed Dial Properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="24"/> <source>Speed Dial Name</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="31"/> <source>Title of the dial</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="42"/> <source>Functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="79"/> <source>Function</source> <translation type="unfinished">Funktio</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="84"/> <source>Fade In *</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="87"/> <source>Multiplier applied before time is sent as Fade In Time to the function.</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="92"/> <source>Fade Out *</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="95"/> <source>Multiplier applied before time is sent as Fade Out Time to the function.</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="100"/> <source>Duration * (+tap)</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="103"/> <source>Multiplier applied before time is sent as Duration to the function.</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="111"/> <source>Add functions to be controlled</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="128"/> <source>Remove selected functions</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="159"/> <source>Input</source> <translation type="unfinished">Sisääntulo</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="165"/> <source>Absolute Value</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="171"/> <location filename="virtualconsole/vcspeeddialproperties.ui" line="258"/> <source>Input Universe</source> <translation type="unfinished">Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="185"/> <location filename="virtualconsole/vcspeeddialproperties.ui" line="268"/> <source>Input Channel</source> <translation type="unfinished">Sisääntulokanava</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="199"/> <location filename="virtualconsole/vcspeeddialproperties.ui" line="278"/> <source>Auto Detect</source> <translation type="unfinished">Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="209"/> <location filename="virtualconsole/vcspeeddialproperties.ui" line="288"/> <source>Choose...</source> <translation type="unfinished">Valitse...</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="216"/> <source>Range</source> <translation type="unfinished">Arvoalue</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="223"/> <location filename="virtualconsole/vcspeeddialproperties.ui" line="230"/> <source>s</source> <translation type="unfinished">sek</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="246"/> <source>Tap</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="252"/> <source>External Input</source> <translation type="unfinished">Ulkoinen ohjaus</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="298"/> <source>Key combination</source> <translation type="unfinished">Näppäinyhdistelmä</translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="304"/> <source>Keyboard combination to control the dial tap</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="314"/> <source>Set a key combination for this dial</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="334"/> <source>Remove the dial&apos;s keyboard shortcut key</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="374"/> <source>Appearance</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="382"/> <source>Show plus and minus buttons</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="389"/> <source>Show the central dial</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="396"/> <source>Show the tap button</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="403"/> <source>Show the hours field</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="410"/> <source>Show the minutes field</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="417"/> <source>Show the seconds field</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="424"/> <source>Show the milliseconds field</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcspeeddialproperties.ui" line="431"/> <source>Show the infinite option</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCWidget</name> <message> <location filename="virtualconsole/vcwidget.cpp" line="145"/> <source>Button</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="146"/> <source>Slider</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="147"/> <source>XYPad</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="148"/> <source>Frame</source> <translation type="unfinished">Kehys</translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="149"/> <source>Solo frame</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="150"/> <source>Speed dial</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="151"/> <source>Cue list</source> <translation type="unfinished">Cue lista</translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="152"/> <source>Label</source> <translation type="unfinished">Etiketti</translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="153"/> <source>Audio Triggers</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="154"/> <source>Animation</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="157"/> <location filename="virtualconsole/vcwidget.cpp" line="159"/> <source>Unknown</source> <translation type="unfinished">Tuntematon</translation> </message> <message> <location filename="virtualconsole/vcwidget.cpp" line="511"/> <source>This widget has no properties</source> <translation>Tällä komponentilla ei ole ominaisuuksia</translation> </message> </context> <context> <name>VCWidgetSelection</name> <message> <location filename="virtualconsole/vcwidgetselection.ui" line="14"/> <source>Virtual Console widget selection</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcwidgetselection.ui" line="23"/> <source>Name</source> <translation type="unfinished">Nimi</translation> </message> <message> <location filename="virtualconsole/vcwidgetselection.ui" line="28"/> <source>Type</source> <translation type="unfinished">Tyyppi</translation> </message> </context> <context> <name>VCXYPadArea</name> <message> <location filename="virtualconsole/vcxypadarea.cpp" line="258"/> <source>Shift: fine, Ctrl:10x</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VCXYPadFixtureEditor</name> <message> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="13"/> <source>XY Pad Fixture</source> <translation>XY-pinnan valaisin</translation> </message> <message> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="19"/> <source>Horizontal X-Axis</source> <translation>Vaakasuuntainen X-akseli</translation> </message> <message> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="25"/> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="81"/> <source>Minimum</source> <translation>Minimi</translation> </message> <message> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="32"/> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="49"/> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="88"/> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="105"/> <source>%</source> <translation>%</translation> </message> <message> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="42"/> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="98"/> <source>Maximum</source> <translation>Maksimi</translation> </message> <message> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="65"/> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="121"/> <source>Reverse</source> <translation>Käänteinen</translation> </message> <message> <location filename="virtualconsole/vcxypadfixtureeditor.ui" line="75"/> <source>Vertical Y-Axis</source> <translation>Pystysuuntainen Y-akseli</translation> </message> </context> <context> <name>VCXYPadProperties</name> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="14"/> <source>XY Pad Properties</source> <translation>XY-pinnan ominaisuudet</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="301"/> <source>XY Pad Name</source> <translation>XY-pinnan nimi</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="308"/> <source>The name of this XY Pad</source> <translation>Muokattavan XY-pinnan nimi</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="24"/> <source>Fixtures</source> <translation type="unfinished">Valaisimet</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="30"/> <source>List of fixtures that are controlled by this pad</source> <translation>Lista valaisimista, joita voidaan ohjata tällä pinnalla</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="55"/> <source>Fixture</source> <translation>Valaisin</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="60"/> <source>X-Axis</source> <translation>X-akseli</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="65"/> <source>Y-Axis</source> <translation>Y-akseli</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="73"/> <source>Add fixture(s) to the pad</source> <translation>Lisää valaisimia tälle pinnalle</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="93"/> <source>Remove selected fixture(s) from the pad</source> <translation>Poista valitut valaisimet tältä pinnalta</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="113"/> <source>Edit the selected fixture&apos;s axis</source> <translation>Muokkaa valitun valaisimen akseleita</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="147"/> <source>Input</source> <translation type="unfinished">Sisääntulo</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="153"/> <source>Pan / Horizontal Axis</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="159"/> <location filename="virtualconsole/vcxypadproperties.ui" line="226"/> <source>Input universe</source> <translation type="unfinished">Sisääntulon universumi</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="173"/> <location filename="virtualconsole/vcxypadproperties.ui" line="240"/> <source>Input channel</source> <translation type="unfinished">Sisääntulon kanava</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="200"/> <location filename="virtualconsole/vcxypadproperties.ui" line="267"/> <source>Auto Detect</source> <translation type="unfinished">Automaattinen tunnistus</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="210"/> <location filename="virtualconsole/vcxypadproperties.ui" line="277"/> <source>Choose...</source> <translation type="unfinished">Valitse...</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="220"/> <source>Tilt / Vertical Axis</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="315"/> <source>Y-Axis slider movement</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="321"/> <source>Normal</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.ui" line="331"/> <source>Inverted</source> <translation type="unfinished">Käänteinen</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.cpp" line="227"/> <source>Remove fixtures</source> <translation>Poista valaisimia</translation> </message> <message> <location filename="virtualconsole/vcxypadproperties.cpp" line="228"/> <source>Do you want to remove the selected fixtures?</source> <translation>Haluatko poistaa valitut valaisimet?</translation> </message> </context> <context> <name>VideoEditor</name> <message> <location filename="videoeditor.ui" line="14"/> <source>Video Editor</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="79"/> <source>Video name</source> <oldsource>Video name:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="200"/> <source>File name</source> <oldsource>File name:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="100"/> <source>Duration</source> <oldsource>Duration:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="93"/> <source>Resolution</source> <oldsource>Resolution:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="86"/> <source>Audio codec</source> <oldsource>Audio codec:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="107"/> <source>Video codec</source> <oldsource>Video codec:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="170"/> <source>Set an arbitrary URL for this Video</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="229"/> <source>Name of the function being edited</source> <translation type="unfinished">Muokattavan funktion nimi</translation> </message> <message> <location filename="videoeditor.ui" line="114"/> <source>Preview</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="121"/> <source>Output Screen</source> <oldsource>Output Screen:</oldsource> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="236"/> <source>Video output</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="242"/> <source>Windowed</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="252"/> <source>Fullscreen</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="262"/> <source>Playback mode</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.ui" line="268"/> <source>Single shot</source> <translation type="unfinished">Kertalaukaus</translation> </message> <message> <location filename="videoeditor.ui" line="278"/> <source>Loop</source> <translation type="unfinished">Silmukka</translation> </message> <message> <location filename="videoeditor.cpp" line="130"/> <source>Open Video File</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.cpp" line="138"/> <source>Video Files (%1)</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.cpp" line="140"/> <source>All Files (*.*)</source> <translation type="unfinished">Kaikki tiedostot (*.*)</translation> </message> <message> <location filename="videoeditor.cpp" line="142"/> <source>All Files (*)</source> <translation type="unfinished">Kaikki tiedostot (*)</translation> </message> <message> <location filename="videoeditor.cpp" line="171"/> <source>Video source URL</source> <translation type="unfinished"></translation> </message> <message> <location filename="videoeditor.cpp" line="172"/> <source>Enter a URL:</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VideoItem</name> <message> <location filename="showmanager/videoitem.cpp" line="50"/> <source>Fullscreen</source> <translation type="unfinished"></translation> </message> <message> <location filename="showmanager/videoitem.cpp" line="166"/> <source>Screen %1</source> <translation type="unfinished"></translation> </message> </context> <context> <name>VirtualConsole</name> <message> <location filename="virtualconsole/virtualconsole.cpp" line="370"/> <source>Cut</source> <translation>Leikkaa</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="373"/> <source>Copy</source> <translation>Kopioi</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="376"/> <source>Paste</source> <translation>Liitä</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="380"/> <source>Delete</source> <translation>Poista</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="406"/> <location filename="virtualconsole/virtualconsole.cpp" line="420"/> <location filename="virtualconsole/virtualconsole.cpp" line="433"/> <source>Default</source> <translation>Oletus</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="430"/> <source>Font</source> <translation type="unfinished">Kirjasin</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="443"/> <source>Sunken</source> <translation>Upotettu</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="446"/> <source>Raised</source> <translation>Nostettu</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="449"/> <source>None</source> <translation>Ei mitään</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="477"/> <source>&amp;Add</source> <translation>&amp;Lisää</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="498"/> <source>&amp;Edit</source> <translation>&amp;Muokkaa</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="302"/> <source>New Button</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="308"/> <source>New Slider</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="314"/> <source>New Knob</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="317"/> <source>New Speed Dial</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="320"/> <source>New XY pad</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="323"/> <source>New Cue list</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="326"/> <source>New Frame</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="329"/> <source>New Solo frame</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="332"/> <source>New Label</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="335"/> <source>New Audio Triggers</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="338"/> <source>New Clock</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="363"/> <source>Virtual Console Settings</source> <translation type="unfinished">Virtuaalikonsolin asetukset</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="383"/> <source>Widget Properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="386"/> <source>Rename Widget</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="400"/> <source>Background Color</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="403"/> <source>Background Image</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="417"/> <source>Font Colour</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="460"/> <source>Bring to front</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="463"/> <source>Send to back</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="510"/> <source>&amp;Background</source> <translation>T&amp;austa</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="518"/> <source>&amp;Foreground</source> <translation>E&amp;dusta</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="525"/> <source>F&amp;ont</source> <translation>&amp;Kirjasin</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="532"/> <source>F&amp;rame</source> <translation>K&amp;ehys</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="540"/> <source>Stacking &amp;order</source> <translation>Pinoamis&amp;järjestys</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="1259"/> <source>Images</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="305"/> <source>New Button Matrix</source> <translation type="unfinished">Uusi nappimatriisi</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="311"/> <source>New Slider Matrix</source> <translation type="unfinished">Uusi liukumatriisi</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="341"/> <source>New Animation</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="881"/> <source>Knob %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="1150"/> <source>Do you wish to delete the selected widgets?</source> <translation>Haluatko poistaa valitut komponentit?</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="1151"/> <source>Delete widgets</source> <translation>Poista komponentit</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="1204"/> <source>Rename widgets</source> <translation>Nimeä komponentit</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="1204"/> <source>Caption:</source> <translation>Teksti:</translation> </message> <message> <location filename="virtualconsole/virtualconsole.cpp" line="1257"/> <source>Select background image</source> <translation>Valitse taustakuva</translation> </message> </context> </TS>
peternewman/qlcplus
ui/src/qlcplus_fi_FI.ts
TypeScript
apache-2.0
315,616
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_55) on Fri Jun 20 06:34:21 EDT 2014 --> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title>Uses of Class org.apache.solr.rest.SolrConfigRestApi (Solr 4.9.0 API)</title> <meta name="date" content="2014-06-20"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.solr.rest.SolrConfigRestApi (Solr 4.9.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/solr/rest/SolrConfigRestApi.html" title="class in org.apache.solr.rest">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/solr/rest/class-use/SolrConfigRestApi.html" target="_top">Frames</a></li> <li><a href="SolrConfigRestApi.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.solr.rest.SolrConfigRestApi" class="title">Uses of Class<br>org.apache.solr.rest.SolrConfigRestApi</h2> </div> <div class="classUseContainer">No usage of org.apache.solr.rest.SolrConfigRestApi</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/solr/rest/SolrConfigRestApi.html" title="class in org.apache.solr.rest">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/solr/rest/class-use/SolrConfigRestApi.html" target="_top">Frames</a></li> <li><a href="SolrConfigRestApi.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2014 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
BibAlex/bhl_rails_4_solr
docs/solr-core/org/apache/solr/rest/class-use/SolrConfigRestApi.html
HTML
apache-2.0
4,769
<!DOCTYPE html> <!-- @license Copyright (C) 2016 The Android Open Source Project 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. --> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> <title>gr-account-label</title> <script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> <script src="../../../bower_components/web-component-tester/browser.js"></script> <link rel="import" href="../../../test/common-test-setup.html"/> <script src="../../../scripts/util.js"></script> <link rel="import" href="gr-account-label.html"> <script>void(0);</script> <test-fixture id="basic"> <template> <gr-account-label></gr-account-label> </template> </test-fixture> <script> suite('gr-account-label tests', () => { let element; setup(() => { stub('gr-rest-api-interface', { getConfig() { return Promise.resolve({}); }, getLoggedIn() { return Promise.resolve(false); }, }); element = fixture('basic'); element._config = { user: { anonymous_coward_name: 'Anonymous Coward', }, }; }); test('null guard', () => { assert.doesNotThrow(() => { element.account = null; }); }); test('missing email', () => { assert.equal('', element._computeEmailStr({name: 'foo'})); }); test('computed fields', () => { assert.equal(element._computeAccountTitle( { name: 'Andrew Bonventre', email: 'andybons+gerrit@gmail.com', }), 'Andrew Bonventre <andybons+gerrit@gmail.com>'); assert.equal(element._computeAccountTitle( {name: 'Andrew Bonventre'}), 'Andrew Bonventre'); assert.equal(element._computeAccountTitle( { email: 'andybons+gerrit@gmail.com', }), 'Anonymous <andybons+gerrit@gmail.com>'); assert.equal(element._computeShowEmailClass( { name: 'Andrew Bonventre', email: 'andybons+gerrit@gmail.com', }), ''); assert.equal(element._computeShowEmailClass( { email: 'andybons+gerrit@gmail.com', }), 'showEmail'); assert.equal(element._computeShowEmailClass({name: 'Andrew Bonventre'}), ''); assert.equal(element._computeShowEmailClass(undefined), ''); assert.equal( element._computeEmailStr({name: 'test', email: 'test'}), '(test)'); assert.equal(element._computeEmailStr({email: 'test'}, ''), 'test'); }); suite('_computeName', () => { test('not showing anonymous', () => { const account = {name: 'Wyatt'}; assert.deepEqual(element._computeName(account, null), 'Wyatt'); }); test('showing anonymous but no config', () => { const account = {}; assert.deepEqual(element._computeName(account, null), 'Anonymous'); }); test('test for Anonymous Coward user and replace with Anonymous', () => { const config = { user: { anonymous_coward_name: 'Anonymous Coward', }, }; const account = {}; assert.deepEqual(element._computeName(account, config), 'Anonymous'); }); test('test for anonymous_coward_name', () => { const config = { user: { anonymous_coward_name: 'TestAnon', }, }; const account = {}; assert.deepEqual(element._computeName(account, config), 'TestAnon'); }); }); }); </script>
WANdisco/gerrit
polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.html
HTML
apache-2.0
4,082
## FFPOJO - Flat File POJO Parser ## [![Build Status](https://travis-ci.org/ffpojo/ffpojo.svg)](https://travis-ci.org/ffpojo/ffpojo) The **FFPOJO Project** is a **Flat-File Parser**, POJO based, library for Java applications. It's a **Object-Oriented** approach to work to flat-files, because the libray is based on **POJOs** and an **Object-Flat-Mapping (OFM)**, using **Java Annotations**, **XML** or **both**. When used together, the XML mapping **overrides** the annotations. The FFPOJO library can work to positional and delimited flat-files, and provides many features like: * Annotations and/or XML mappings, with overridding (like the JPA api) * Uses a "Metadata Container" pattern, that caches metadata information in static way to improve performance on parsing * Simple text-to-pojo and pojo-to-text parsing * Easy custom-type conversion when reading or writing, through the decorator API * Full object-oriented flat-file reader that supports complex files with Header, Body and Trailer definitions * File system flat-file reader developed with NIO, that performs 25% faster than regular buffered reader * Record processor layer, that works in "Push" model and supports single-threaded or multi-threaded file processing * Full object-oriented flat-file writer * Lightweight, no dependence to any other framework or API ### Starting Points ### * [Releases](https://github.com/ffpojo/ffpojo/tags) * [Getting Started](#getting-started) * [Samples](#samples) * [XML Schema](https://github.com/ffpojo/ffpojo/blob/master/readme-ffpojo-ofm.xsd) --- #### Getting Started Tutorial <a id="getting-started"/> #### This is a samples based tutorial, that shows the most important features of FFPOJO in a hurry. To run the sample codes you will need to download the sample text file resources, that are used in the codes. Download full samples in project named **ffpojo-samples**. ##### Building The Project ##### When comming to GitHub this project was migrated to Maven, then building the project is very simple, default maven style. This project also have no dependencies, so thats simplier at most. The build process is shown below: 1. Install Apache Maven (version 2+) 1. Append the Maven bin path to your PATH environment variable 1. Open the command line and go to the ffpojo folder that have the "pom.xml" file 1. Enter the command below: `mvn clean install` 1. Now its just pick-up the generated jar file at the "target" folder. --- ##### Metadata Definitions ##### To describe your flat-file records and fields you must use **Java Annotations and/or XML**. If used both, the XML information will override the annotations on a **class level**. It means that you can't override a single field, but you can override an entire record class. --- ##### Record Class ##### The record class is a Plain-Old-Java-Object that represents a line in a flat-file. One record can be Positional or Delimited (not both). The only rule is that the record class must be in JavaBeans standard, providing one getter (pojo-to-text parsing) and one setter (text-to-pojo parsing) for each field. --- ##### Record Field ##### The record field is record class attribute that represents a field-token in a flat-file. Positional records has Positional Fields and Delimited Records has Delimited Fields (we can't mix cats and dogs). By convention, the annotation metadata for fields must appear in the **GETTER METHODS**. --- ##### Object-Flat-Mapping XML Schema ##### If you choose to map your ffpojos using XML, it must be valid according to the [ffpojo-ofm.xsd](https://github.com/ffpojo/ffpojo/blob/master/readme-ffpojo-ofm.xsd) schema. --- ##### Object-Flat-Mapping XML Example ##### ```xml <ffpojo-mappings xmlns="http://www.ffpojo.org/ofm"> <ffpojo class="com.domain.pkg.Customer"> <positional> <positional-field name="name" initial-position="1" final-position="5"/> <positional-field name="address" initial-position="6" final-position="10"/> </positional> </ffpojo> <ffpojo class="com.domain.pkg.Employee"> <delimited delimiter=";"> <delimited-field name="id" position-index="1" decorator-class="com.domain.pkg.MyLongDecorator"/> <delimited-field name="endereco" position-index="2"/> </delimited> </ffpojo> </ffpojo-mappings> ``` --- #### Index of Samples <a id="samples"/> #### 1. [Simple Positional Record Parsing Example](#example-1) 1. [Simple Delimited Record Parsing Example](#example-2) 1. [Positional Record Parsing With Decorator Example](#example-3) 1. [Simple File System Flat File Reader Example](#example-4) 1. [Simple Input Stream Flat File Reader Example](#example-5) 1. [File System Flat File Reader With Header And Trailer Example](#example-6) 1. [Simple File System Flat File Reader With Default Flat File Processor Example](#example-7) 1. [Simple File System Flat File Reader With Thread Pool Flat File Processor Example](#example-8) 1. [Simple File System Flat File Reader With Thread Pool Flat File Processor And Error Handler Example](#example-9) 1. [Simple File System Flat File Writer Example](#example-10) --- ##### 1 - Simple Positional Record Parsing Example <a id="example-1"/> ##### ```java // package and imports omitted public class SimplePositionalRecordParsingExample { private static final String INPUT_TXT_RESOURCE_CLASSPATH = "SimplePositionalRecordParsingExampleInput.txt"; //change here (make sure you have permission to write in the specified path): private static final String OUTPUT_TXT_OS_PATH = "C:/Users/gibaholms/Desktop/SimplePositionalRecordParsingExampleOutput.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } public static void main(String[] args) { SimplePositionalRecordParsingExample example = new SimplePositionalRecordParsingExample(); try { System.out.println("Making POJO from TXT..."); example.readCustomersFromText(); System.out.println("Making TXT from POJO..."); example.writeCustomersToText(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomersFromText() throws IOException, FFPojoException { FFPojoHelper ffpojo = FFPojoHelper.getInstance(); BufferedReader textFileReader = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(INPUT_TXT_RESOURCE_CLASSPATH))); String line; while ( (line = textFileReader.readLine()) != null) { Customer cust = ffpojo.createFromText(Customer.class, line); System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); } textFileReader.close(); } public void writeCustomersToText() throws IOException, FFPojoException { FFPojoHelper ffpojo = FFPojoHelper.getInstance(); File file = new File(OUTPUT_TXT_OS_PATH); file.createNewFile(); BufferedWriter textFileWriter = new BufferedWriter(new FileWriter(file)); List<Customer> customers = createCustomersMockList(); for (int i = 0; i < customers.size(); i++) { String line = ffpojo.parseToText(customers.get(i)); textFileWriter.write(line); if (i < customers.size() - 1) { textFileWriter.newLine(); } } textFileWriter.close(); } private static List<Customer> createCustomersMockList() { List<Customer> customers = new ArrayList<Customer>(); { Customer cust = new Customer(); cust.setId(98456L); cust.setName("Axel Rose"); cust.setEmail("axl@thehost.com"); customers.add(cust); } { Customer cust = new Customer(); cust.setId(65478L); cust.setName("Bono Vox"); cust.setEmail("bono@thehost.com"); customers.add(cust); } { Customer cust = new Customer(); cust.setId(78425L); cust.setName("Bob Marley"); cust.setEmail("marley@thehost.com"); customers.add(cust); } return customers; } } ``` --- ##### 2 - Simple Delimited Record Parsing Example <a id="example-2"/> ##### ```java // package and imports omitted public class SimpleDelimitedRecordParsingExample { private static final String INPUT_TXT_RESOURCE_CLASSPATH = "SimpleDelimitedRecordParsingExampleInput.txt"; //change here (make sure you have permission to write in the specified path): private static final String OUTPUT_TXT_OS_PATH = "C:/Users/gibaholms/Desktop/SimpleDelimitedRecordParsingExampleOutput.txt"; @DelimitedRecord(delimiter = "|") public static class Customer { private Long id; private String name; private String email; @DelimitedField(positionIndex = 1) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @DelimitedField(positionIndex = 2) public String getName() { return name; } public void setName(String name) { this.name = name; } @DelimitedField(positionIndex = 3) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } public static void main(String[] args) { SimpleDelimitedRecordParsingExample example = new SimpleDelimitedRecordParsingExample(); try { System.out.println("Making POJO from TXT..."); example.readCustomersFromText(); System.out.println("Making TXT from POJO..."); example.writeCustomersToText(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomersFromText() throws IOException, FFPojoException { FFPojoHelper ffpojo = FFPojoHelper.getInstance(); BufferedReader textFileReader = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(INPUT_TXT_RESOURCE_CLASSPATH))); String line; while ( (line = textFileReader.readLine()) != null) { Customer cust = ffpojo.createFromText(Customer.class, line); System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); } textFileReader.close(); } public void writeCustomersToText() throws IOException, FFPojoException { FFPojoHelper ffpojo = FFPojoHelper.getInstance(); File file = new File(OUTPUT_TXT_OS_PATH); file.createNewFile(); BufferedWriter textFileWriter = new BufferedWriter(new FileWriter(file)); List<Customer> customers = createCustomersMockList(); for (int i = 0; i < customers.size(); i++) { String line = ffpojo.parseToText(customers.get(i)); textFileWriter.write(line); if (i < customers.size() - 1) { textFileWriter.newLine(); } } textFileWriter.close(); } private static List<Customer> createCustomersMockList() { List<Customer> customers = new ArrayList<Customer>(); { Customer cust = new Customer(); cust.setId(98456L); cust.setName("Axel Rose"); cust.setEmail("axl@thehost.com"); customers.add(cust); } { Customer cust = new Customer(); cust.setId(65478L); cust.setName("Bono Vox"); cust.setEmail("bono@thehost.com"); customers.add(cust); } { Customer cust = new Customer(); cust.setId(78425L); cust.setName("Bob Marley"); cust.setEmail("marley@thehost.com"); customers.add(cust); } return customers; } } ``` --- ##### 3 - Positional Record Parsing With Decorator Example <a id="example-3"/> ##### ```java // package and imports omitted public class PositionalRecordParsingWithDecoratorExample { private static final String INPUT_TXT_RESOURCE_CLASSPATH = "PositionalRecordParsingWithDecoratorExampleInput.txt"; //change here (make sure you have permission to write in the specified path): private static final String OUTPUT_TXT_OS_PATH = "C:/Users/gibaholms/Desktop/PositionalRecordParsingWithDecoratorExampleOutput.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; private Date birthDate; @PositionalField(initialPosition = 1, finalPosition = 5, decorator = LongDecorator.class) public Long getId() { return id; } public void setId(Long id) { this.id = id; } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @PositionalField(initialPosition = 56, finalPosition = 65, decorator = DateDecorator.class) public Date getBirthDate() { return birthDate; } public void setBirthDate(Date birthDate) { this.birthDate = birthDate; } } public static class LongDecorator extends DefaultFieldDecorator { @Override public Object fromString(String str) { return Long.valueOf(str); } } public static class DateDecorator implements FieldDecorator<Date> { private static final SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); public Date fromString(String str) throws FieldDecoratorException { try { return sdf.parse(str); } catch (ParseException e) { throw new FieldDecoratorException("Error while parsing date field from string: " + str, e); } } public String toString(Date obj) { Date date = (Date)obj; return sdf.format(date); } } public static void main(String[] args) { PositionalRecordParsingWithDecoratorExample example = new PositionalRecordParsingWithDecoratorExample(); try { System.out.println("Making POJO from TXT..."); example.readCustomersFromText(); System.out.println("Making TXT from POJO..."); example.writeCustomersToText(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomersFromText() throws IOException, FFPojoException { FFPojoHelper ffpojo = FFPojoHelper.getInstance(); BufferedReader textFileReader = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(INPUT_TXT_RESOURCE_CLASSPATH))); String line; while ( (line = textFileReader.readLine()) != null) { Customer cust = ffpojo.createFromText(Customer.class, line); System.out.printf("[%d][%s][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail(), cust.getBirthDate()); } textFileReader.close(); } public void writeCustomersToText() throws IOException, FFPojoException { FFPojoHelper ffpojo = FFPojoHelper.getInstance(); File file = new File(OUTPUT_TXT_OS_PATH); file.createNewFile(); BufferedWriter textFileWriter = new BufferedWriter(new FileWriter(file)); List<Customer> customers = createCustomersMockList(); for (int i = 0; i < customers.size(); i++) { String line = ffpojo.parseToText(customers.get(i)); textFileWriter.write(line); if (i < customers.size() - 1) { textFileWriter.newLine(); } } textFileWriter.close(); } private static List<Customer> createCustomersMockList() { List<Customer> customers = new ArrayList<Customer>(); { Customer cust = new Customer(); cust.setId(98456L); cust.setName("Axel Rose"); cust.setEmail("axl@thehost.com"); cust.setBirthDate(new Date()); customers.add(cust); } { Customer cust = new Customer(); cust.setId(65478L); cust.setName("Bono Vox"); cust.setEmail("bono@thehost.com"); cust.setBirthDate(new Date()); customers.add(cust); } { Customer cust = new Customer(); cust.setId(78425L); cust.setName("Bob Marley"); cust.setEmail("marley@thehost.com"); cust.setBirthDate(new Date()); customers.add(cust); } return customers; } } ``` --- ##### 4 - Simple File System Flat File Reader Example <a id="example-4"/> ##### ```java // package and imports omitted public class SimpleFileSystemFlatFileReaderExample { //copy the file "SimpleFileSystemFlatFileReaderExample.txt" (make sure you have permission to read in the specified path): private static final String INPUT_TXT_OS_PATH = "C:/Users/gholms/Desktop/SimpleFileSystemFlatFileReaderExample.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } public static void main(String[] args) { SimpleFileSystemFlatFileReaderExample example = new SimpleFileSystemFlatFileReaderExample(); try { System.out.println("Making POJO from file system TXT FILE..."); example.readCustomers(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomers() throws IOException, FFPojoException { File inputFile = new File(INPUT_TXT_OS_PATH); if (!inputFile.exists()) { throw new IllegalStateException("File not found: " + INPUT_TXT_OS_PATH); } FlatFileReaderDefinition ffDefinition = new FlatFileReaderDefinition(Customer.class); FlatFileReader ffReader = new FileSystemFlatFileReader(inputFile, ffDefinition); for (Object record : ffReader) { Customer cust = (Customer)record; System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); } ffReader.close(); } } ``` --- ##### 5 - Simple Input Stream Flat File Reader Example <a id="example-5"/> ##### ```java // package and imports omitted public class SimpleInputStreamFlatFileReaderExample { private static final String INPUT_TXT_RESOURCE_CLASSPATH = "SimpleInputStreamFlatFileReaderExample.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } public static void main(String[] args) { SimpleInputStreamFlatFileReaderExample example = new SimpleInputStreamFlatFileReaderExample(); try { System.out.println("Making POJO from file system TXT FILE..."); example.readCustomers(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomers() throws IOException, FFPojoException { InputStream inputStream = getClass().getClassLoader().getResourceAsStream(INPUT_TXT_RESOURCE_CLASSPATH); FlatFileReaderDefinition ffDefinition = new FlatFileReaderDefinition(Customer.class); FlatFileReader ffReader = new InputStreamFlatFileReader(inputStream, ffDefinition); for (Object record : ffReader) { Customer cust = (Customer)record; System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); } ffReader.close(); } } ``` --- ##### 6 - File System Flat File Reader With Header And Trailer Example <a id="example-6"/> ##### ```java // package and imports omitted public class FileSystemFlatFileReaderWithHeaderAndTrailerExample { //copy the file "FileSystemFlatFileReaderWithHeaderAndTrailerExample.txt" (make sure you have permission to read in the specified path): private static final String INPUT_TXT_OS_PATH = "C:/Users/gholms/Desktop/FileSystemFlatFileReaderWithHeaderAndTrailerExample.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } @PositionalRecord public static class Header { private Long controlNumber; private Date processDate; @PositionalField(initialPosition = 1, finalPosition = 10) public Long getControlNumber() { return controlNumber; } public void setControlNumber(Long controlNumber) { this.controlNumber = controlNumber; } // must use a String setter or a FieldDecorator public void setControlNumber(String controlNumber) { this.controlNumber = Long.valueOf(controlNumber); } @PositionalField(initialPosition = 11, finalPosition = 20, decorator = DateDecorator.class) public Date getProcessDate() { return processDate; } public void setProcessDate(Date processDate) { this.processDate = processDate; } } @PositionalRecord public static class Trailer { private Integer recordsCount; @PositionalField(initialPosition = 1, finalPosition = 4) public Integer getRecordsCount() { return recordsCount; } public void setRecordsCount(Integer recordsCount) { this.recordsCount = recordsCount; } // must use a String setter or a FieldDecorator public void setRecordsCount(String recordsCount) { this.recordsCount = Integer.valueOf(recordsCount); } } public static class DateDecorator implements FieldDecorator<Date> { private static final SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); public Date fromString(String str) throws FieldDecoratorException { try { return sdf.parse(str); } catch (ParseException e) { throw new FieldDecoratorException("Error while parsing date field from string: " + str, e); } } public String toString(Date obj) { Date date = (Date)obj; return sdf.format(date); } } public static void main(String[] args) { FileSystemFlatFileReaderWithHeaderAndTrailerExample example = new FileSystemFlatFileReaderWithHeaderAndTrailerExample(); try { System.out.println("Making POJO from file system TXT FILE..."); example.readCustomers(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomers() throws IOException, FFPojoException { File inputFile = new File(INPUT_TXT_OS_PATH); if (!inputFile.exists()) { throw new IllegalStateException("File not found: " + INPUT_TXT_OS_PATH); } FlatFileReaderDefinition ffDefinition = new FlatFileReaderDefinition(Customer.class); ffDefinition.setHeader(Header.class); ffDefinition.setTrailer(Trailer.class); FlatFileReader ffReader = new FileSystemFlatFileReader(inputFile, ffDefinition); for (Object record : ffReader) { RecordType recordType = ffReader.getRecordType(); if (recordType == RecordType.HEADER) { System.out.print("HEADER FOUND: "); Header header = (Header)record; System.out.printf("[%d][%s]\n", header.getControlNumber(), header.getProcessDate()); } else if (recordType == RecordType.BODY) { Customer cust = (Customer)record; System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); } else if (recordType == RecordType.TRAILER) { System.out.print("TRAILER FOUND: "); Trailer trailer = (Trailer)record; System.out.printf("[%d]\n", trailer.getRecordsCount()); } } ffReader.close(); } } ``` --- ##### 7 - Simple File System Flat File Reader With Default Flat File Processor Example <a id="example-7"/> ##### ```java // package and imports omitted public class SimpleFileSystemFlatFileReaderWithDefaultFlatFileProcessorExample { //copy the file "SimpleFileSystemFlatFileReaderWithDefaultFlatFileProcessorExample.txt" (make sure you have permission to read in the specified path): private static final String INPUT_TXT_OS_PATH = "C:/Users/gholms/Desktop/SimpleFileSystemFlatFileReaderWithDefaultFlatFileProcessorExample.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } public static class CustomerRecordProcessor implements RecordProcessor { public void processBody(RecordEvent event) { Customer cust = (Customer)event.getRecord(); System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); } public void processHeader(RecordEvent event) { // blank } public void processTrailer(RecordEvent event) { // blank } } public static void main(String[] args) { SimpleFileSystemFlatFileReaderWithDefaultFlatFileProcessorExample example = new SimpleFileSystemFlatFileReaderWithDefaultFlatFileProcessorExample(); try { System.out.println("Making POJO from file system TXT FILE..."); example.readCustomers(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomers() throws IOException, FFPojoException { File inputFile = new File(INPUT_TXT_OS_PATH); if (!inputFile.exists()) { throw new IllegalStateException("File not found: " + INPUT_TXT_OS_PATH); } FlatFileReaderDefinition ffDefinition = new FlatFileReaderDefinition(Customer.class); FlatFileReader ffReader = new FileSystemFlatFileReader(inputFile, ffDefinition); FlatFileProcessor ffProcessor = new DefaultFlatFileProcessor(ffReader); ffProcessor.processFlatFile(new CustomerRecordProcessor()); ffReader.close(); } } ``` --- ##### 8 - Simple File System Flat File Reader With Thread Pool Flat File Processor Example <a id="example-8"/> ##### ```java // package and imports omitted public class SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorExample { //copy the file "SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorExample.txt" (make sure you have permission to read in the specified path): private static final String INPUT_TXT_OS_PATH = "C:/Users/gholms/Desktop/SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorExample.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } // processor class must be thread-safe ! public static class CustomerRecordProcessor implements RecordProcessor { public void processBody(RecordEvent event) { Customer cust = (Customer)event.getRecord(); System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); } public void processHeader(RecordEvent event) { // blank } public void processTrailer(RecordEvent event) { // blank } } public static void main(String[] args) { SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorExample example = new SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorExample(); try { System.out.println("Making POJO from file system TXT FILE..."); example.readCustomers(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomers() throws IOException, FFPojoException { File inputFile = new File(INPUT_TXT_OS_PATH); if (!inputFile.exists()) { throw new IllegalStateException("File not found: " + INPUT_TXT_OS_PATH); } FlatFileReaderDefinition ffDefinition = new FlatFileReaderDefinition(Customer.class); FlatFileReader ffReader = new FileSystemFlatFileReader(inputFile, ffDefinition); FlatFileProcessor ffProcessor = new ThreadPoolFlatFileProcessor(ffReader, 5); ffProcessor.processFlatFile(new CustomerRecordProcessor()); ffReader.close(); } } ``` --- ##### 9 - Simple File System Flat File Reader With Thread Pool Flat File Processor And Error Handler Example <a id="example-9"/> ##### ```java // package and imports omitted public class SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorAndErrorHandlerExample { //copy the file "SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorAndErrorHandlerExample.txt" (make sure you have permission to read in the specified path): private static final String INPUT_TXT_OS_PATH = "C:/Users/gholms/Desktop/SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorAndErrorHandlerExample.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } // processor class must be thread-safe ! public static class CustomerRecordProcessor extends DefaultRecordProcessor { public void processBody(RecordEvent event) throws RecordProcessorException { Customer cust = (Customer)event.getRecord(); System.out.printf("[%d][%s][%s]\n", cust.getId(), cust.getName(), cust.getEmail()); throw new RecordProcessorException("An error occurred !!!"); } } public static class CustomerErrorHandler implements ErrorHandler { public void error(RecordProcessorException exception) throws RecordProcessorException { System.out.println("ErrorHandler executed !"); } } public static void main(String[] args) { SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorAndErrorHandlerExample example = new SimpleFileSystemFlatFileReaderWithThreadPoolFlatFileProcessorAndErrorHandlerExample(); try { System.out.println("Making POJO from file system TXT FILE..."); example.readCustomers(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void readCustomers() throws IOException, FFPojoException { File inputFile = new File(INPUT_TXT_OS_PATH); if (!inputFile.exists()) { throw new IllegalStateException("File not found: " + INPUT_TXT_OS_PATH); } FlatFileReaderDefinition ffDefinition = new FlatFileReaderDefinition(Customer.class); FlatFileReader ffReader = new FileSystemFlatFileReader(inputFile, ffDefinition); FlatFileProcessor ffProcessor = new ThreadPoolFlatFileProcessor(ffReader, 5); ffProcessor.setErrorHandler(new CustomerErrorHandler()); ffProcessor.processFlatFile(new CustomerRecordProcessor()); ffReader.close(); } } ``` --- ##### 10 - Simple File System Flat File Writer Example <a id="example-10"/> ##### ```java // package and imports omitted public class SimpleFileSystemFlatFileWriterExample { //change here (make sure you have permission to write in the specified path): private static final String OUTPUT_TXT_OS_PATH = "C:/Users/gibaholms/Desktop/SimpleFileSystemFlatFileWriterExample.txt"; @PositionalRecord public static class Customer { private Long id; private String name; private String email; @PositionalField(initialPosition = 1, finalPosition = 5) public Long getId() { return id; } public void setId(Long id) { this.id = id; } // must use a String setter or a FieldDecorator public void setId(String id) { this.id = Long.valueOf(id); } @PositionalField(initialPosition = 6, finalPosition = 25) public String getName() { return name; } public void setName(String name) { this.name = name; } @PositionalField(initialPosition = 26, finalPosition = 55) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } public static void main(String[] args) { SimplePositionalRecordParsingExample example = new SimplePositionalRecordParsingExample(); try { System.out.println("Making TXT from POJO..."); example.writeCustomersToText(); System.out.println("END !"); } catch (IOException e) { e.printStackTrace(); } catch (FFPojoException e) { e.printStackTrace(); } } public void writeCustomersToText() throws IOException, FFPojoException { File file = new File(OUTPUT_TXT_OS_PATH); FlatFileWriter ffWriter = new FileSystemFlatFileWriter(file, true); List<Customer> customers = createCustomersMockList(); ffWriter.writeRecordList(customers); ffWriter.close(); } private static List<Customer> createCustomersMockList() { List<Customer> customers = new ArrayList<Customer>(); { Customer cust = new Customer(); cust.setId(98456L); cust.setName("Axel Rose"); cust.setEmail("axl@thehost.com"); customers.add(cust); } { Customer cust = new Customer(); cust.setId(65478L); cust.setName("Bono Vox"); cust.setEmail("bono@thehost.com"); customers.add(cust); } { Customer cust = new Customer(); cust.setId(78425L); cust.setName("Bob Marley"); cust.setEmail("marley@thehost.com"); customers.add(cust); } return customers; } } ```
ffpojo/ffpojo
readme.md
Markdown
apache-2.0
35,865
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_91) on Thu Jun 30 16:22:00 BST 2016 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class org.apache.taverna.activities.rest.HTTPRequest (Apache Taverna Common Activities 2.1.0-incubating API)</title> <meta name="date" content="2016-06-30"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.taverna.activities.rest.HTTPRequest (Apache Taverna Common Activities 2.1.0-incubating API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/taverna/activities/rest/class-use/HTTPRequest.html" target="_top">Frames</a></li> <li><a href="HTTPRequest.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.taverna.activities.rest.HTTPRequest" class="title">Uses of Class<br>org.apache.taverna.activities.rest.HTTPRequest</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">HTTPRequest</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.apache.taverna.activities.rest">org.apache.taverna.activities.rest</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.apache.taverna.activities.rest"> <!-- --> </a> <h3>Uses of <a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">HTTPRequest</a> in <a href="../../../../../../org/apache/taverna/activities/rest/package-summary.html">org.apache.taverna.activities.rest</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/apache/taverna/activities/rest/package-summary.html">org.apache.taverna.activities.rest</a> that return <a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">HTTPRequest</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">HTTPRequest</a></code></td> <td class="colLast"><span class="typeNameLabel">RESTActivityConfigurationBean.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/taverna/activities/rest/RESTActivityConfigurationBean.html#getRequest--">getRequest</a></span>()</code>&nbsp;</td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/apache/taverna/activities/rest/package-summary.html">org.apache.taverna.activities.rest</a> with parameters of type <a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">HTTPRequest</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">RESTActivityConfigurationBean.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/taverna/activities/rest/RESTActivityConfigurationBean.html#setRequest-org.apache.taverna.activities.rest.HTTPRequest-">setRequest</a></span>(<a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">HTTPRequest</a>&nbsp;request)</code>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/apache/taverna/activities/rest/HTTPRequest.html" title="class in org.apache.taverna.activities.rest">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/taverna/activities/rest/class-use/HTTPRequest.html" target="_top">Frames</a></li> <li><a href="HTTPRequest.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2015&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> </body> </html>
apache/incubator-taverna-site
content/javadoc/taverna-common-activities/org/apache/taverna/activities/rest/class-use/HTTPRequest.html
HTML
apache-2.0
8,292
package liquibase.database.core; import java.math.BigInteger; import liquibase.CatalogAndSchema; import liquibase.database.AbstractJdbcDatabase; import liquibase.database.DatabaseConnection; import liquibase.database.OfflineConnection; import liquibase.statement.core.RawSqlStatement; import liquibase.structure.DatabaseObject; import liquibase.structure.core.Index; import liquibase.structure.core.Table; import liquibase.structure.core.View; import liquibase.exception.DatabaseException; import liquibase.exception.UnexpectedLiquibaseException; import liquibase.executor.ExecutorService; import liquibase.statement.core.GetViewDefinitionStatement; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import liquibase.logging.LogFactory; /** * Encapsulates MS-SQL database support. */ public class MSSQLDatabase extends AbstractJdbcDatabase { public static final String PRODUCT_NAME = "Microsoft SQL Server"; protected Set<String> systemTablesAndViews = new HashSet<String>(); private static Pattern CREATE_VIEW_AS_PATTERN = Pattern.compile("(?im)^\\s*(CREATE|ALTER)\\s+VIEW\\s+(\\S+)\\s+?AS\\s*", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); @Override public String getShortName() { return "mssql"; } public MSSQLDatabase() { super.setCurrentDateTimeFunction("GETDATE()"); super.sequenceNextValueFunction = "NEXT VALUE FOR %s"; systemTablesAndViews.add("syscolumns"); systemTablesAndViews.add("syscomments"); systemTablesAndViews.add("sysdepends"); systemTablesAndViews.add("sysfilegroups"); systemTablesAndViews.add("sysfiles"); systemTablesAndViews.add("sysfiles1"); systemTablesAndViews.add("sysforeignkeys"); systemTablesAndViews.add("sysfulltextcatalogs"); systemTablesAndViews.add("sysfulltextnotify"); systemTablesAndViews.add("sysindexes"); systemTablesAndViews.add("sysindexkeys"); systemTablesAndViews.add("sysmembers"); systemTablesAndViews.add("sysobjects"); systemTablesAndViews.add("syspermissions"); systemTablesAndViews.add("sysproperties"); systemTablesAndViews.add("sysprotects"); systemTablesAndViews.add("sysreferences"); systemTablesAndViews.add("systypes"); systemTablesAndViews.add("sysusers"); systemTablesAndViews.add("sysdiagrams"); systemTablesAndViews.add("syssegments"); systemTablesAndViews.add("sysconstraints"); super.quotingStartCharacter ="["; super.quotingEndCharacter="]"; } @Override public int getPriority() { return PRIORITY_DEFAULT; } @Override protected String getDefaultDatabaseProductName() { return "SQL Server"; } @Override public Integer getDefaultPort() { return 1433; } @Override public Set<String> getSystemViews() { return systemTablesAndViews; } @Override protected Set<String> getSystemTables() { return systemTablesAndViews; } @Override public boolean supportsInitiallyDeferrableColumns() { return false; } @Override public boolean supportsSequences() { try { if (this.getDatabaseMajorVersion() >= 11) { return true; } } catch (DatabaseException e) { return false; } return false; } @Override public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException { String databaseProductName = conn.getDatabaseProductName(); return PRODUCT_NAME.equalsIgnoreCase(databaseProductName) || "SQLOLEDB".equalsIgnoreCase(databaseProductName); } @Override public String getDefaultDriver(String url) { if (url.startsWith("jdbc:sqlserver")) { return "com.microsoft.sqlserver.jdbc.SQLServerDriver"; } else if (url.startsWith("jdbc:jtds:sqlserver")) { return "net.sourceforge.jtds.jdbc.Driver"; } return null; } @Override protected String getAutoIncrementClause() { return "IDENTITY"; } @Override protected boolean generateAutoIncrementStartWith(BigInteger startWith) { return true; } @Override protected boolean generateAutoIncrementBy(BigInteger incrementBy) { return true; } @Override protected String getAutoIncrementStartWithClause() { return "%d"; } @Override protected String getAutoIncrementByClause() { return "%d"; } @Override public String getDefaultCatalogName() { if (getConnection() == null) { return null; } try { return getConnection().getCatalog(); } catch (DatabaseException e) { throw new UnexpectedLiquibaseException(e); } } @Override protected String getConnectionSchemaName() { if (getConnection() == null || getConnection() instanceof OfflineConnection) { return null; } try { return ExecutorService.getInstance().getExecutor(this).queryForObject(new RawSqlStatement("select schema_name()"), String.class); } catch (Exception e) { LogFactory.getLogger().info("Error getting default schema", e); } return null; } @Override public String getConcatSql(String... values) { StringBuffer returnString = new StringBuffer(); for (String value : values) { returnString.append(value).append(" + "); } return returnString.toString().replaceFirst(" \\+ $", ""); } @Override public String escapeIndexName(String catalogName, String schemaName, String indexName) { // MSSQL server does not support the schema name for the index - return super.escapeObjectName(indexName, Index.class); } @Override public String escapeTableName(String catalogName, String schemaName, String tableName) { return escapeObjectName(null, schemaName, tableName, Table.class); } // protected void dropForeignKeys(Connection conn) throws DatabaseException { // Statement dropStatement = null; // PreparedStatement fkStatement = null; // ResultSet rs = null; // try { // dropStatement = conn.createStatement(); // // fkStatement = conn.prepareStatement("select TABLE_NAME, CONSTRAINT_NAME from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE='FOREIGN KEY' AND TABLE_CATALOG=?"); // fkStatement.setString(1, getDefaultCatalogName()); // rs = fkStatement.executeQuery(); // while (rs.next()) { // DropForeignKeyConstraintChange dropFK = new DropForeignKeyConstraintChange(); // dropFK.setBaseTableName(rs.getString("TABLE_NAME")); // dropFK.setConstraintName(rs.getString("CONSTRAINT_NAME")); // // try { // dropStatement.execute(dropFK.generateStatements(this)[0]); // } catch (UnsupportedChangeException e) { // throw new DatabaseException(e.getMessage()); // } // } // } catch (SQLException e) { // throw new DatabaseException(e); // } finally { // try { // if (dropStatement != null) { // dropStatement.close(); // } // if (fkStatement != null) { // fkStatement.close(); // } // if (rs != null) { // rs.close(); // } // } catch (SQLException e) { // throw new DatabaseException(e); // } // } // // } @Override public boolean supportsTablespaces() { return true; } @Override public boolean isSystemObject(DatabaseObject example) { if (example.getSchema() == null || example.getSchema().getName() == null) { return super.isSystemObject(example); } if (example instanceof Table && example.getSchema().getName().equals("sys")) { return true; } if (example instanceof View && example.getSchema().getName().equals("sys")) { return true; } return super.isSystemObject(example); } public String generateDefaultConstraintName(String tableName, String columnName) { return "DF_" + tableName + "_" + columnName; } @Override public String escapeObjectName(String objectName, Class<? extends DatabaseObject> objectType) { if (objectName == null) { return null; } if (objectName.contains("(")) { //probably a function return objectName; } return this.quotingStartCharacter+objectName+this.quotingEndCharacter; } @Override public String getDateLiteral(String isoDate) { return super.getDateLiteral(isoDate).replace(' ', 'T'); } @Override public boolean supportsRestrictForeignKeys() { return false; } @Override public boolean supportsDropTableCascadeConstraints() { return false; } @Override public String getViewDefinition(CatalogAndSchema schema, String viewName) throws DatabaseException { schema = schema.customize(this); List<String> defLines = (List<String>) ExecutorService.getInstance().getExecutor(this).queryForList(new GetViewDefinitionStatement(schema.getCatalogName(), schema.getSchemaName(), viewName), String.class); StringBuffer sb = new StringBuffer(); for (String defLine : defLines) { sb.append(defLine); } String definition = sb.toString(); String finalDef =definition.replaceAll("\\r\\n", "\n").trim(); String selectOnly = CREATE_VIEW_AS_PATTERN.matcher(finalDef).replaceFirst(""); if (selectOnly.equals(finalDef)) { return "FULL_DEFINITION: " + finalDef; } selectOnly = selectOnly.trim(); /**handle views that end up as '(select XYZ FROM ABC);' */ if (selectOnly.startsWith("(") && (selectOnly.endsWith(")") || selectOnly.endsWith(");"))) { selectOnly = selectOnly.replaceFirst("^\\(", ""); selectOnly = selectOnly.replaceFirst("\\);?$", ""); } return selectOnly; } /** * SQLServer does not support specifying the database name as a prefix to the object name * @return */ @Override public String escapeViewName(String catalogName, String schemaName, String viewName) { return escapeObjectName(null, schemaName, viewName, View.class); } @Override public String getJdbcSchemaName(CatalogAndSchema schema) { String schemaName = super.getJdbcSchemaName(schema); if (schemaName != null && ! isCaseSensitive()) { schemaName = schemaName.toLowerCase(); } return schemaName; } @Override public boolean isCaseSensitive() { if (caseSensitive == null) { try { if (getConnection() != null) { String catalog = getConnection().getCatalog(); String sql = String.format("SELECT CONVERT(varchar(100), DATABASEPROPERTYEX('%s', 'COLLATION'))", catalog); String collation = ExecutorService.getInstance().getExecutor(this).queryForObject(new RawSqlStatement(sql), String.class); caseSensitive = ! collation.contains("_CI_"); } } catch (Exception e) { LogFactory.getLogger().warning("Cannot determine case sensitivity from MSSQL", e); } } if (caseSensitive == null) { return false; } else { return caseSensitive.booleanValue(); } } }
gquintana/liquibase
liquibase-core/src/main/java/liquibase/database/core/MSSQLDatabase.java
Java
apache-2.0
12,030
// Copyright 2022 Google LLC // // 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 // // https://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. // Generated code. DO NOT EDIT! namespace Google.Cloud.DataLabeling.V1Beta1.Snippets { // [START datalabeling_v1beta1_generated_DataLabelingService_ExportData_sync] using Google.Cloud.DataLabeling.V1Beta1; using Google.LongRunning; public sealed partial class GeneratedDataLabelingServiceClientSnippets { /// <summary>Snippet for ExportData</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ExportDataRequestObject() { // Create client DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.Create(); // Initialize request argument(s) ExportDataRequest request = new ExportDataRequest { DatasetName = DatasetName.FromProjectDataset("[PROJECT]", "[DATASET]"), AnnotatedDatasetAsAnnotatedDatasetName = AnnotatedDatasetName.FromProjectDatasetAnnotatedDataset("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]"), Filter = "", OutputConfig = new OutputConfig(), UserEmailAddress = "", }; // Make the request Operation<ExportDataOperationResponse, ExportDataOperationMetadata> response = dataLabelingServiceClient.ExportData(request); // Poll until the returned long-running operation is complete Operation<ExportDataOperationResponse, ExportDataOperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result ExportDataOperationResponse result = completedResponse.Result; // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation<ExportDataOperationResponse, ExportDataOperationMetadata> retrievedResponse = dataLabelingServiceClient.PollOnceExportData(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result ExportDataOperationResponse retrievedResult = retrievedResponse.Result; } } } // [END datalabeling_v1beta1_generated_DataLabelingService_ExportData_sync] }
googleapis/google-cloud-dotnet
apis/Google.Cloud.DataLabeling.V1Beta1/Google.Cloud.DataLabeling.V1Beta1.GeneratedSnippets/DataLabelingServiceClient.ExportDataRequestObjectSnippet.g.cs
C#
apache-2.0
3,120
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ package org.elasticsearch.xpack.ml.action; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockLevel; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import org.elasticsearch.xpack.core.ml.action.PutJobAction; import org.elasticsearch.xpack.core.ml.action.UpdateJobAction; import org.elasticsearch.xpack.ml.job.JobManager; public class TransportUpdateJobAction extends TransportMasterNodeAction<UpdateJobAction.Request, PutJobAction.Response> { private final JobManager jobManager; @Inject public TransportUpdateJobAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, JobManager jobManager) { super(UpdateJobAction.NAME, transportService, clusterService, threadPool, actionFilters, UpdateJobAction.Request::new, indexNameExpressionResolver, PutJobAction.Response::new, ThreadPool.Names.SAME); this.jobManager = jobManager; } @Override protected void masterOperation(Task task, UpdateJobAction.Request request, ClusterState state, ActionListener<PutJobAction.Response> listener) { jobManager.updateJob(request, listener); } @Override protected ClusterBlockException checkBlock(UpdateJobAction.Request request, ClusterState state) { return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE); } }
nknize/elasticsearch
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateJobAction.java
Java
apache-2.0
2,337
package com.sino.scaffold.bean.acl; import org.nutz.dao.entity.annotation.Column; import org.nutz.dao.entity.annotation.Comment; import org.nutz.dao.entity.annotation.Name; import org.nutz.dao.entity.annotation.Table; import com.sino.scaffold.bean.Entity; /** * * @author kerbores * * @email kerbores@gmail.com * */ @Table("t_permission") @Comment("权限表") public class Permission extends Entity { /** * */ private static final long serialVersionUID = 1L; @Column("p_name") @Name @Comment("权限名称") private String name; @Column("p_url") @Comment("权限对应url") private String url; @Column("p_icon") @Comment("菜单icon") private String icon; @Column("p_desc") @Comment("描述") private String description; @Column("installed") @Comment("内置标识") private boolean installed; @Column("p_is_menu") @Comment("是否菜单标识") private boolean menu; @Column("p_need") @Comment("前置权限ID") private String needPermission; @Column("p_hilight_key") @Comment("菜单高亮关键字,如果是菜单的时候此字段建议填写") private String hilightKey; @Column("p_level") @Comment("权限级别,0为顶级菜单儿") private int level = 0; /** * @return the description */ public String getDescription() { return description; } public String getHilightKey() { return hilightKey; } /** * @return the icon */ public String getIcon() { return icon; } /** * @return the level */ public int getLevel() { return level; } /** * @return the name */ public String getName() { return name; } public String getNeedPermission() { return needPermission; } /** * @return the url */ public String getUrl() { return url; } /** * @return the installed */ public boolean isInstalled() { return installed; } public boolean isMenu() { return menu; } /** * @param description * the description to set */ public void setDescription(String description) { this.description = description; } public void setHilightKey(String hilightKey) { this.hilightKey = hilightKey; } /** * @param icon * the icon to set */ public void setIcon(String icon) { this.icon = icon; } /** * @param installed * the installed to set */ public void setInstalled(boolean installed) { this.installed = installed; } /** * @param level * the level to set */ public void setLevel(int level) { this.level = level; } public void setMenu(boolean menu) { this.menu = menu; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } public void setNeedPermission(String needPermission) { this.needPermission = needPermission; } /** * @param url * the url to set */ public void setUrl(String url) { this.url = url; } }
Kerbores/Falsework
boot-nutz-vue/src/main/java/com/sino/scaffold/bean/acl/Permission.java
Java
apache-2.0
2,903
# =============================================================================== # Copyright 2015 Jake Ross # # 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. # =============================================================================== # ============= enthought library imports ======================= import six from pyface.action.menu_manager import MenuManager from pyface.tasks.traits_dock_pane import TraitsDockPane from traits.api import Int, Property, Button, Instance from traits.has_traits import MetaHasTraits from traitsui.api import ( View, UItem, VGroup, InstanceEditor, HGroup, VSplit, Handler, TabularEditor, TreeEditor, ) from traitsui.menu import Action from traitsui.tabular_adapter import TabularAdapter from traitsui.tree_node import TreeNode from uncertainties import nominal_value, std_dev from pychron.core.configurable_tabular_adapter import ConfigurableMixin from pychron.core.helpers.color_generators import colornames from pychron.core.helpers.formatting import floatfmt from pychron.core.ui.enum_editor import myEnumEditor from pychron.core.ui.qt.tree_editor import PipelineEditor from pychron.core.ui.table_configurer import TableConfigurer from pychron.core.ui.tabular_editor import myTabularEditor from pychron.envisage.browser.view import PaneBrowserView from pychron.envisage.icon_button_editor import icon_button_editor from pychron.pipeline.engine import Pipeline, PipelineGroup, NodeGroup from pychron.pipeline.nodes import FindReferencesNode from pychron.pipeline.nodes.base import BaseNode from pychron.pipeline.nodes.data import DataNode, InterpretedAgeNode from pychron.pipeline.nodes.figure import IdeogramNode, SpectrumNode, SeriesNode from pychron.pipeline.nodes.filter import FilterNode, MSWDFilterNode from pychron.pipeline.nodes.find import FindFluxMonitorsNode from pychron.pipeline.nodes.fit import ( FitIsotopeEvolutionNode, FitBlanksNode, FitICFactorNode, FitFluxNode, ) from pychron.pipeline.nodes.grouping import GroupingNode, SubGroupingNode from pychron.pipeline.nodes.persist import PDFNode, DVCPersistNode from pychron.pipeline.nodes.review import ReviewNode from pychron.pipeline.tasks.tree_node import ( SeriesTreeNode, PDFTreeNode, GroupingTreeNode, SpectrumTreeNode, IdeogramTreeNode, FilterTreeNode, DataTreeNode, DBSaveTreeNode, FindTreeNode, FitTreeNode, PipelineTreeNode, ReviewTreeNode, PipelineGroupTreeNode, NodeGroupTreeNode, ) from pychron.pipeline.template import ( PipelineTemplate, PipelineTemplateGroup, PipelineTemplateRoot, ) from pychron.pychron_constants import PLUSMINUS_ONE_SIGMA, LIGHT_RED, LIGHT_YELLOW class TemplateTreeNode(TreeNode): def get_icon(self, obj, is_expanded): icon = obj.icon if not icon: icon = super(TemplateTreeNode, self).get_icon(obj, is_expanded) return icon def node_adder(name): def wrapper(obj, info, o): # print name, info.object f = getattr(info.object, name) f(o) return wrapper class PipelineHandlerMeta(MetaHasTraits): def __new__(cls, *args, **kwargs): klass = MetaHasTraits.__new__(cls, *args, **kwargs) for t in ( "review", "pdf_figure", "iso_evo_persist", "data", "filter", "mswd_filter", "ideogram", "spectrum", "series", "isotope_evolution", "blanks", "detector_ic", "flux", "find_blanks", "find_airs", "icfactor", "push", "audit", "inverse_isochron", "grouping", "graph_grouping", "subgrouping", "set_interpreted_age", "interpreted_ages", ): name = "add_{}".format(t) setattr(klass, name, node_adder(name)) for c in ("isotope_evolution", "blanks", "ideogram", "spectrum", "icfactors"): name = "chain_{}".format(c) setattr(klass, name, node_adder(name)) return klass class PipelineHandler(six.with_metaclass(PipelineHandlerMeta, Handler)): def save_template(self, info, obj): info.object.save_pipeline_template() def review_node(self, info, obj): info.object.review_node(obj) def delete_node(self, info, obj): info.object.remove_node(obj) def enable(self, info, obj): self._toggle_enable(info, obj, True) def disable(self, info, obj): self._toggle_enable(info, obj, False) def enable_permanent(self, info, obj): self._toggle_permanent(info, obj, True) def disable_permanent(self, info, obj): self._toggle_permanent(info, obj, False) def toggle_skip_configure(self, info, obj): obj.skip_configure = not obj.skip_configure info.object.update_needed = True def configure(self, info, obj): info.object.configure(obj) def move_up(self, info, obj): info.object.pipeline.move_up(obj) info.object.selected = obj def move_down(self, info, obj): info.object.pipeline.move_down(obj) info.object.selected = obj def _toggle_permanent(self, info, obj, state): info.object.set_review_permanent(state) self._toggle_enable(info, obj, state) def _toggle_enable(self, info, obj, state): obj.enabled = state info.object.refresh_all_needed = True info.object.update_needed = True class PipelinePane(TraitsDockPane): name = "Pipeline" id = "pychron.pipeline.pane" def traits_view(self): def enable_disable_menu_factory(): return MenuManager( Action( name="Enable", action="enable", visible_when="not object.enabled" ), Action(name="Disable", action="disable", visible_when="object.enabled"), Action( name="Enable Permanent", action="enable_permanent", visible_when="not object.enabled", ), Action( name="Disable Permanent", action="disable_permanent", visible_when="object.enabled", ), name="Enable/Disable", ) def menu_factory(*actions): return MenuManager( Action(name="Configure", action="configure"), Action( name="Enable Auto Configure", action="toggle_skip_configure", visible_when="object.skip_configure", ), Action( name="Disable Auto Configure", action="toggle_skip_configure", visible_when="not object.skip_configure", ), Action(name="Move Up", action="move_up"), Action(name="Move Down", action="move_down"), Action(name="Delete", action="delete_node"), Action(name="Save Template", action="save_template"), *actions ) def add_menu_factory(): fig_menu = MenuManager( Action(name="Add Inverse Isochron", action="add_inverse_isochron"), Action(name="Add Ideogram", action="add_ideogram"), Action(name="Add Spectrum", action="add_spectrum"), Action(name="Add Series", action="add_series"), name="Figure", ) grp_menu = MenuManager( Action(name="Add Grouping", action="add_grouping"), Action(name="Add Graph Grouping", action="add_graph_grouping"), Action(name="Add SubGrouping", action="add_subgrouping"), name="Grouping", ) filter_menu = MenuManager( Action(name="Add Filter", action="add_filter"), Action(name="Add MSWD Filter", action="add_mswd_filter"), name="Filter", ) return MenuManager( Action(name="Add Unknowns", action="add_data"), Action(name="Add Interpreted Ages", action="add_interpreted_ages"), grp_menu, filter_menu, fig_menu, Action(name="Add Set IA", action="add_set_interpreted_age"), Action(name="Add Review", action="add_review"), Action(name="Add Audit", action="add_audit"), Action(name="Add Push"), name="Add", ) def fit_menu_factory(): return MenuManager( Action(name="Isotope Evolution", action="add_isotope_evolution"), Action(name="Blanks", action="add_blanks"), Action(name="IC Factor", action="add_icfactor"), Action(name="Detector IC", enabled=False, action="add_detector_ic"), Action(name="Flux", enabled=False, action="add_flux"), name="Fit", ) def save_menu_factory(): return MenuManager( Action(name="Save PDF Figure", action="add_pdf_figure"), Action(name="Save Iso Evo", action="add_iso_evo_persist"), Action(name="Save Blanks", action="add_blanks_persist"), Action(name="Save ICFactor", action="add_icfactor_persist"), name="Save", ) def find_menu_factory(): return MenuManager( Action(name="Blanks", action="add_find_blanks"), Action(name="Airs", action="add_find_airs"), name="Find", ) def chain_menu_factory(): return MenuManager( Action(name="Chain Ideogram", action="chain_ideogram"), Action( name="Chain Isotope Evolution", action="chain_isotope_evolution" ), Action(name="Chain Spectrum", action="chain_spectrum"), Action(name="Chain Blanks", action="chain_blanks"), Action(name="Chain ICFactors", action="chain_icfactors"), name="Chain", ) # ------------------------------------------------ def data_menu_factory(): return menu_factory( enable_disable_menu_factory(), add_menu_factory(), fit_menu_factory(), chain_menu_factory(), find_menu_factory(), ) def filter_menu_factory(): return menu_factory( enable_disable_menu_factory(), add_menu_factory(), fit_menu_factory(), chain_menu_factory(), ) def figure_menu_factory(): return menu_factory( enable_disable_menu_factory(), add_menu_factory(), fit_menu_factory(), chain_menu_factory(), save_menu_factory(), ) def ffind_menu_factory(): return menu_factory( Action(name="Review", action="review_node"), enable_disable_menu_factory(), add_menu_factory(), fit_menu_factory(), ) nodes = [ PipelineGroupTreeNode( node_for=[PipelineGroup], children="pipelines", auto_open=True ), PipelineTreeNode( node_for=[Pipeline], children="nodes", icon_open="", label="name", auto_open=True, ), NodeGroupTreeNode( node_for=[NodeGroup], children="nodes", auto_open=True, label="name" ), DataTreeNode( node_for=[DataNode, InterpretedAgeNode], menu=data_menu_factory() ), FilterTreeNode( node_for=[FilterNode, MSWDFilterNode], menu=filter_menu_factory() ), IdeogramTreeNode(node_for=[IdeogramNode], menu=figure_menu_factory()), SpectrumTreeNode(node_for=[SpectrumNode], menu=figure_menu_factory()), SeriesTreeNode(node_for=[SeriesNode], menu=figure_menu_factory()), PDFTreeNode(node_for=[PDFNode], menu=menu_factory()), GroupingTreeNode( node_for=[GroupingNode, SubGroupingNode], menu=data_menu_factory() ), DBSaveTreeNode(node_for=[DVCPersistNode], menu=data_menu_factory()), FindTreeNode( node_for=[FindReferencesNode, FindFluxMonitorsNode], menu=ffind_menu_factory(), ), FitTreeNode( node_for=[ FitIsotopeEvolutionNode, FitICFactorNode, FitBlanksNode, FitFluxNode, ], menu=ffind_menu_factory(), ), ReviewTreeNode(node_for=[ReviewNode], menu=enable_disable_menu_factory()), PipelineTreeNode(node_for=[BaseNode], label="name"), ] editor = PipelineEditor( nodes=nodes, editable=False, selected="selected", dclick="dclicked", hide_root=True, lines_mode="off", show_disabled=True, refresh_all_icons="refresh_all_needed", update="update_needed", ) tnodes = [ TreeNode(node_for=[PipelineTemplateRoot], children="groups"), TemplateTreeNode( node_for=[PipelineTemplateGroup], label="name", children="templates" ), TemplateTreeNode( node_for=[ PipelineTemplate, ], label="name", ), ] teditor = TreeEditor( nodes=tnodes, editable=False, selected="selected_pipeline_template", dclick="dclicked_pipeline_template", hide_root=True, lines_mode="off", ) v = View( VSplit( UItem("pipeline_template_root", editor=teditor), VGroup( HGroup( icon_button_editor( "run_needed", "start", visible_when="run_enabled" ), icon_button_editor( "run_needed", "edit-redo-3", visible_when="resume_enabled" ), icon_button_editor("add_pipeline", "add"), ), UItem("pipeline_group", editor=editor), ), ), handler=PipelineHandler(), ) return v class BaseAnalysesAdapter(TabularAdapter, ConfigurableMixin): font = "arial 10" rundate_text = Property record_id_width = Int(80) tag_width = Int(50) sample_width = Int(80) def _get_rundate_text(self): try: r = self.item.rundate.strftime("%m-%d-%Y %H:%M") except AttributeError: r = "" return r def get_bg_color(self, obj, trait, row, column=0): if self.item.tag == "invalid": c = "#C9C5C5" elif self.item.is_omitted(): c = "#FAC0C0" else: c = super(BaseAnalysesAdapter, self).get_bg_color(obj, trait, row, column) return c class UnknownsAdapter(BaseAnalysesAdapter): columns = [ ("Run ID", "record_id"), ("Sample", "sample"), ("Age", "age"), ("Comment", "comment"), ("Tag", "tag"), ("GroupID", "group_id"), ] all_columns = [ ("RunDate", "rundate"), ("Run ID", "record_id"), ("Aliquot", "aliquot"), ("Step", "step"), ("UUID", "display_uuid"), ("Sample", "sample"), ("Project", "project"), ("RepositoryID", "repository_identifier"), ("Age", "age"), ("Age {}".format(PLUSMINUS_ONE_SIGMA), "age_error"), ("F", "f"), ("F {}".format(PLUSMINUS_ONE_SIGMA), "f_error"), ("Saved J", "j"), ("Saved J {}".format(PLUSMINUS_ONE_SIGMA), "j_error"), ("Model J", "model_j"), ("Model J {}".format(PLUSMINUS_ONE_SIGMA), "model_j_error"), ("Model J Kind", "model_j_kind"), ("Comment", "comment"), ("Tag", "tag"), ("GroupID", "group_id"), ("GraphID", "graph_id"), ] age_width = Int(70) error_width = Int(60) graph_id_width = Int(30) age_text = Property age_error_text = Property j_error_text = Property j_text = Property f_error_text = Property f_text = Property model_j_error_text = Property model_j_text = Property def __init__(self, *args, **kw): super(UnknownsAdapter, self).__init__(*args, **kw) # self._ncolors = len(colornames) self.set_colors(colornames) def set_colors(self, colors): self._colors = colors self._ncolors = len(colors) def get_menu(self, obj, trait, row, column): grp = MenuManager( Action(name="Group Selected", action="unknowns_group_by_selected"), Action(name="Aux Group Selected", action="unknowns_aux_group_by_selected"), Action(name="Group by Sample", action="unknowns_group_by_sample"), Action(name="Group by Aliquot", action="unknowns_group_by_aliquot"), Action(name="Group by Identifier", action="unknowns_group_by_identifier"), Action(name="Clear Group", action="unknowns_clear_grouping"), Action(name="Clear All Group", action="unknowns_clear_all_grouping"), name="Plot Grouping", ) return MenuManager( Action(name="Recall", action="recall_unknowns"), Action( name="Graph Group Selected", action="unknowns_graph_group_by_selected" ), Action(name="Save Analysis Group", action="save_analysis_group"), Action(name="Toggle Status", action="unknowns_toggle_status"), Action(name="Configure", action="configure_unknowns"), Action(name="Play Video...", action="play_analysis_video"), grp, ) def _get_f_text(self): r = floatfmt(self.item.f, n=4) return r def _get_f_error_text(self): r = floatfmt(self.item.f_err, n=4) return r def _get_j_text(self): r = floatfmt(nominal_value(self.item.j), n=8) return r def _get_j_error_text(self): r = floatfmt(std_dev(self.item.j), n=8) return r def _get_model_j_text(self): r = "" if self.item.modeled_j: r = floatfmt(nominal_value(self.item.modeled_j), n=8) return r def _get_model_j_error_text(self): r = "" if self.item.modeled_j: r = floatfmt(std_dev(self.item.modeled_j), n=8) return r def _get_age_text(self): r = floatfmt(nominal_value(self.item.uage), n=3) return r def _get_age_error_text(self): r = floatfmt(std_dev(self.item.uage), n=4) return r def get_text_color(self, obj, trait, row, column=0): color = "black" item = getattr(obj, trait)[row] gid = item.group_id or item.aux_id cid = gid % self._ncolors if self._ncolors else 0 try: color = self._colors[cid] except IndexError: pass return color class ReferencesAdapter(BaseAnalysesAdapter): columns = [("Run ID", "record_id"), ("Comment", "comment")] all_columns = [ ("RunDate", "rundate"), ("Run ID", "record_id"), ("Aliquot", "aliquot"), ("UUID", "display_uuid"), ("Sample", "sample"), ("Project", "project"), ("RepositoryID", "repository_identifier"), ("Comment", "comment"), ("Tag", "tag"), ] def get_menu(self, object, trait, row, column): return MenuManager( Action(name="Recall", action="recall_references"), Action(name="Configure", action="configure_references"), ) class AnalysesPaneHandler(Handler): def unknowns_group_by_sample(self, info, obj): obj = info.ui.context["object"] obj.unknowns_group_by("sample") def unknowns_group_by_identifier(self, info, obj): obj = info.ui.context["object"] obj.unknowns_group_by("identifier") def unknowns_group_by_aliquot(self, info, obj): obj = info.ui.context["object"] obj.unknowns_group_by("aliquot") def unknowns_graph_group_by_selected(self, info, obj): obj = info.ui.context["object"] obj.group_selected("graph_id") def unknowns_group_by_selected(self, info, obj): obj = info.ui.context["object"] obj.group_selected("group_id") def unknowns_aux_group_by_selected(self, info, obj): obj = info.ui.context["object"] obj.group_selected("aux_id") def unknowns_clear_grouping(self, info, obj): obj = info.ui.context["object"] obj.unknowns_clear_grouping() def unknowns_clear_all_grouping(self, info, obj): obj = info.ui.context["object"] obj.unknowns_clear_all_grouping() def unknowns_toggle_status(self, info, obj): obj = info.ui.context["object"] obj.unknowns_toggle_status() def save_analysis_group(self, info, obj): obj = info.ui.context["object"] obj.save_analysis_group() def play_analysis_video(self, info, obj): obj = info.ui.context["object"] obj.play_analysis_video() def recall_unknowns(self, info, obj): obj = info.ui.context["object"] obj.recall_unknowns() def recall_references(self, info, obj): obj = info.ui.context["object"] obj.recall_references() def configure_unknowns(self, info, obj): pane = info.ui.context["pane"] pane.configure_unknowns() def configure_references(self, info, obj): pane = info.ui.context["pane"] pane.configure_references() class UnknownsTableConfigurer(TableConfigurer): id = "unknowns_pane" class ReferencesTableConfigurer(TableConfigurer): id = "references_pane" class AnalysesPane(TraitsDockPane): name = "Analyses" id = "pychron.pipeline.analyses" unknowns_adapter = Instance(UnknownsAdapter) unknowns_table_configurer = Instance(UnknownsTableConfigurer, ()) references_adapter = Instance(ReferencesAdapter) references_table_configurer = Instance(ReferencesTableConfigurer, ()) def configure_unknowns(self): self.unknowns_table_configurer.edit_traits() def configure_references(self): self.references_table_configurer.edit_traits() def _unknowns_adapter_default(self): a = UnknownsAdapter() self.unknowns_table_configurer.set_adapter(a) return a def _references_adapter_default(self): a = ReferencesAdapter() self.references_table_configurer.set_adapter(a) return a def traits_view(self): v = View( VGroup( UItem( "object.selected.unknowns", width=200, editor=TabularEditor( adapter=self.unknowns_adapter, update="refresh_table_needed", multi_select=True, column_clicked="object.selected.column_clicked", # drag_external=True, # drop_factory=self.model.drop_factory, dclicked="dclicked_unknowns", selected="selected_unknowns", operations=["delete"], ), ), UItem( "object.selected.references", visible_when="object.selected.references", editor=TabularEditor( adapter=self.references_adapter, update="refresh_table_needed", # drag_external=True, multi_select=True, dclicked="dclicked_references", selected="selected_references", operations=["delete"], ), ), ), handler=AnalysesPaneHandler(), ) return v class RepositoryTabularAdapter(TabularAdapter): columns = [("Name", "name"), ("Ahead", "ahead"), ("Behind", "behind")] def get_menu(self, obj, trait, row, column): return MenuManager( Action(name="Refresh Status", action="refresh_repository_status"), Action(name="Get Changes", action="pull"), Action(name="Share Changes", action="push"), Action(name="Delete Local Changes", action="delete_local_changes"), ) def get_bg_color(self, obj, trait, row, column=0): if self.item.behind: c = LIGHT_RED elif self.item.ahead: c = LIGHT_YELLOW else: c = "white" return c class RepositoryPaneHandler(Handler): def refresh_repository_status(self, info, obj): obj.refresh_repository_status() def pull(self, info, obj): obj.pull() def push(self, info, obj): obj.push() def delete_local_changes(self, info, obj): obj.delete_local_changes() obj.refresh_repository_status() class RepositoryPane(TraitsDockPane): name = "Repositories" id = "pychron.pipeline.repository" def traits_view(self): v = View( UItem( "object.repositories", editor=myTabularEditor( adapter=RepositoryTabularAdapter(), editable=False, multi_select=True, refresh="object.refresh_needed", selected="object.selected_repositories", ), ), handler=RepositoryPaneHandler(), ) return v class EditorOptionsPane(TraitsDockPane): name = "Editor Options" id = "pychron.pipeline.editor_options" def traits_view(self): v = View( UItem( "object.active_editor_options", style="custom", editor=InstanceEditor() ) ) return v class BrowserPane(TraitsDockPane, PaneBrowserView): id = "pychron.browser.pane" name = "Analysis Selection" class SearcherPane(TraitsDockPane): name = "Search" id = "pychron.browser.searcher.pane" add_search_entry_button = Button def _add_search_entry_button_fired(self): self.model.add_search_entry() def traits_view(self): v = View( VGroup( HGroup( UItem("search_entry"), UItem( "search_entry", editor=myEnumEditor(name="search_entries"), width=-35, ), icon_button_editor("pane.add_search_entry_button", "add"), ), UItem( "object.table.analyses", editor=myTabularEditor( adapter=self.model.table.tabular_adapter, operations=["move", "delete"], column_clicked="object.table.column_clicked", refresh="object.table.refresh_needed", selected="object.table.selected", dclicked="object.table.dclicked", ), ), ) ) return v # ============= EOF =============================================
USGSDenverPychron/pychron
pychron/pipeline/tasks/panes.py
Python
apache-2.0
28,668
const Cc = Components.classes; const Ci = Components.interfaces; const Cr = Components.results; const Cu = Components.utils; const CC = Components.Constructor; const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1", "nsIBinaryInputStream", "setInputStream"); const ProtocolProxyService = CC("@mozilla.org/network/protocol-proxy-service;1", "nsIProtocolProxyService"); var sts = Cc["@mozilla.org/network/socket-transport-service;1"] .getService(Ci.nsISocketTransportService); function launchConnection(socks_vers, socks_port, dest_host, dest_port, dns) { var pi_flags = 0; if (dns == 'remote') pi_flags = Ci.nsIProxyInfo.TRANSPARENT_PROXY_RESOLVES_HOST; var pps = new ProtocolProxyService(); var pi = pps.newProxyInfo(socks_vers, 'localhost', socks_port, pi_flags, -1, null); var trans = sts.createTransport(null, 0, dest_host, dest_port, pi); var input = trans.openInputStream(Ci.nsITransport.OPEN_BLOCKING,0,0); var output = trans.openOutputStream(Ci.nsITransport.OPEN_BLOCKING,0,0); var bin = new BinaryInputStream(input); var data = bin.readBytes(5); if (data == 'PING!') { print('client: got ping, sending pong.'); output.write('PONG!', 5); } else { print('client: wrong data from server:', data); output.write('Error: wrong data received.', 27); } output.close(); } for each (var arg in arguments) { print('client: running test', arg); test = arg.split('|'); launchConnection(test[0], parseInt(test[1]), test[2], parseInt(test[3]), test[4]); }
wilebeast/FireFox-OS
B2G/gecko/netwerk/test/unit/socks_client_subprocess.js
JavaScript
apache-2.0
1,633
class EventSerializer < Serializer def self.serialize(event, container=nil) @serializers = { transaction_open: method(:serialize_transaction_open), invoice_push: method(:serialize_invoice_push), transformation_add: method(:serialize_transformation_add), transformation_destroy: method(:serialize_transformation_destroy), transaction_associate_rule: method(:serialize_transaction_associate_rule), transaction_add_invoice: method(:serialize_transaction_add_invoice), transaction_bind_source: method(:serialize_transaction_bind_source), transaction_destroy: method(:serialize_transaction_destroy), } @serializers.fetch(event.event_type.to_sym, lambda { |o| {} }).call(event) end def self.serialize_transaction_open(event) { user: { id: event.transaction_open_event.user.id, email: event.transaction_open_event.user.email, }, transaction: { url: Rails.application.routes.url_helpers.api_v1_transaction_path(event.transaction_open_event.transact.public_id) }, }.merge(serialize_any(event)) end def self.serialize_transaction_destroy(event) { transaction: { id: event.transaction_destroy_event.transaction_id }, }.merge(serialize_any(event)) end def self.serialize_invoice_push(event) { }.merge(serialize_any(event)) end def self.serialize_transformation_add(event) { transformation: { url: Rails.application.routes.url_helpers.api_v1_transformation_path(event.transformation_add_event.transformation.public_id) } }.merge(serialize_any(event)) end def self.serialize_transformation_destroy(event) { transformation: { id: event.transformation_destroy_event.public_id }, }.merge(serialize_any(event)) end def self.serialize_transaction_associate_rule(event) {}.tap do |o| o[:transaction] = { id: event.transaction_associate_rule_event.transact.public_id, url: Rails.application.routes.url_helpers.api_v1_transaction_path(event.transaction_associate_rule_event.transact.public_id), } if event.transaction_associate_rule_event.transact o[:rule] = { reference: event.transaction_associate_rule_event.rule.reference } if event.transaction_associate_rule_event.rule o[:transformation] = { name: event.transaction_associate_rule_event.transformation.name } if event.transaction_associate_rule_event.transformation end.merge(serialize_any(event)) end def self.serialize_transaction_add_invoice(event) {}.tap do |o| o[:transaction] = { id: event.transaction_add_invoice_event.transact.public_id, url: Rails.application.routes.url_helpers.api_v1_transaction_path(event.transaction_add_invoice_event.transact.public_id), } if event.transaction_add_invoice_event.transact o[:invoice] = { id: event.transaction_add_invoice_event.invoice.public_id, url: Rails.application.routes.url_helpers.api_v1_invoice_path(event.transaction_add_invoice_event.invoice.public_id), } if event.transaction_add_invoice_event.invoice o[:document] = { id: event.transaction_add_invoice_event.document.public_id, url: Rails.application.routes.url_helpers.api_v1_document_path(event.transaction_add_invoice_event.document.public_id), } if event.transaction_add_invoice_event.document end.merge(serialize_any(event)) end def self.serialize_transaction_bind_source(event) {}.tap do |o| o[:transaction] = { id: event.transaction_bind_source_event.transact.public_id, url: Rails.application.routes.url_helpers.api_v1_transaction_path(event.transaction_bind_source_event.transact.public_id), } if event.transaction_bind_source_event.transact o[:source] = event.transaction_bind_source_event.source end.merge(serialize_any(event)) end def self.serialize_any(e) { id: e.public_id, event_type: e.event_type } end end
Xalgorithms/xa-elegans
app/serializers/event_serializer.rb
Ruby
apache-2.0
4,008
package com.beecavegames.poker.bot.strategies; import com.beecavegames.poker.PokerSeat; import com.beecavegames.poker.PokerTable; import com.beecavegames.poker.bot.PokerBot; import com.beecavegames.poker.fsm.Event; public class BailStrategy extends AbstractPlayStrategy { private static final long serialVersionUID = 1907002434105093275L; public double betToStackRatio; public double minHandStrength; @Override public Event call(PokerBot bot, PokerSeat seat, PokerTable table) { double bsr = seat.bet.divide(bot.getBalance()).doubleValue(); if (bsr > betToStackRatio && seat.getWinPercentage()<minHandStrength) { return Event.FOLD; } else { return null; } } }
sgmiller/hiveelements
gameelements/src/main/java/poker/bot/strategies/BailStrategy.java
Java
apache-2.0
686
/** * 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.pulsar.broker.authentication.metrics; import io.prometheus.client.Counter; public class AuthenticationMetrics { private static final Counter authSuccessMetrics = Counter.build() .name("pulsar_authentication_success_count") .help("Pulsar authentication success") .labelNames("provider_name", "auth_method") .register(); private static final Counter authFailuresMetrics = Counter.build() .name("pulsar_authentication_failures_count") .help("Pulsar authentication failures") .labelNames("provider_name", "auth_method", "reason") .register(); /** * Log authenticate success event to the authentication metrics. * @param providerName The short class name of the provider * @param authMethod Authentication method name */ public static void authenticateSuccess(String providerName, String authMethod) { authSuccessMetrics.labels(providerName, authMethod).inc(); } /** * Log authenticate failure event to the authentication metrics. * @param providerName The short class name of the provider * @param authMethod Authentication method name. * @param reason Failure reason. */ public static void authenticateFailure(String providerName, String authMethod, String reason) { authFailuresMetrics.labels(providerName, authMethod, reason).inc(); } }
massakam/pulsar
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/metrics/AuthenticationMetrics.java
Java
apache-2.0
2,257
/** * 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.metamodel.query; import junit.framework.TestCase; import org.apache.metamodel.DataContext; import org.apache.metamodel.MetaModelException; import org.apache.metamodel.QueryPostprocessDataContext; import org.apache.metamodel.data.CachingDataSetHeader; import org.apache.metamodel.data.DataSet; import org.apache.metamodel.data.DataSetHeader; import org.apache.metamodel.data.DefaultRow; import org.apache.metamodel.data.InMemoryDataSet; import org.apache.metamodel.data.Row; import org.apache.metamodel.data.SimpleDataSetHeader; import org.apache.metamodel.schema.Column; import org.apache.metamodel.schema.ColumnType; import org.apache.metamodel.schema.MutableColumn; import org.apache.metamodel.schema.MutableSchema; import org.apache.metamodel.schema.MutableTable; import org.apache.metamodel.schema.Schema; import org.apache.metamodel.schema.Table; import org.apache.metamodel.schema.TableType; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; public class FilterItemTest extends TestCase { public void testExpressionBasedFilter() throws Exception { FilterItem filterItem = new FilterItem("foobar"); assertEquals("foobar", filterItem.getExpression()); try { filterItem.evaluate(null); fail("Exception should have been thrown"); } catch (Exception e) { assertEquals("Expression-based filters cannot be manually evaluated", e.getMessage()); } Column col1 = new MutableColumn("Col1", ColumnType.VARCHAR); assertEquals("SELECT Col1 WHERE foobar", new Query().select(col1).where(filterItem).toString()); assertEquals("SELECT Col1 WHERE YEAR(Col1) = 2008", new Query().select(col1).where("YEAR(Col1) = 2008") .toString()); } public void testToSqlWhereItem() throws Exception { MutableColumn col1 = new MutableColumn("Col1", ColumnType.VARCHAR); SelectItem selectItem = new SelectItem(col1); FilterItem c = new FilterItem(selectItem, OperatorType.DIFFERENT_FROM, null); assertEquals("Col1 IS NOT NULL", c.toString()); try { c = new FilterItem(selectItem, OperatorType.GREATER_THAN, null); fail("Exception should have been thrown"); } catch (IllegalArgumentException e) { assertEquals("Can only use EQUALS or DIFFERENT_FROM operator with null-operand", e.getMessage()); } c = new FilterItem(selectItem, OperatorType.DIFFERENT_FROM, "foo"); assertEquals("Col1 <> 'foo'", c.toString()); c = new FilterItem(selectItem, OperatorType.DIFFERENT_FROM, "'bar'"); // this will be rewritten so it's not an issue even though it look like // it needs an escape-char assertEquals("Col1 <> ''bar''", c.toSql()); c = new FilterItem(selectItem, OperatorType.DIFFERENT_FROM, "foo's bar"); // the same applies here assertEquals("Col1 <> 'foo's bar'", c.toSql()); col1.setType(ColumnType.FLOAT); c = new FilterItem(selectItem, OperatorType.EQUALS_TO, 423); assertEquals("Col1 = 423", c.toString()); c = new FilterItem(selectItem, OperatorType.EQUALS_TO, 423426235423.42); assertEquals("Col1 = 423426235423.42", c.toString()); c = new FilterItem(selectItem, OperatorType.EQUALS_TO, true); assertEquals("Col1 = 1", c.toString()); c = new FilterItem(selectItem, OperatorType.GREATER_THAN_OR_EQUAL, 123); assertEquals("Col1 >= 123", c.toString()); c = new FilterItem(selectItem, OperatorType.LESS_THAN_OR_EQUAL, 123); assertEquals("Col1 <= 123", c.toString()); Column timeColumn = new MutableColumn("TimeCol", ColumnType.TIME); selectItem = new SelectItem(timeColumn); c = new FilterItem(selectItem, OperatorType.GREATER_THAN, "02:30:05.000"); assertEquals("TimeCol > TIME '02:30:05'", c.toString()); Column dateColumn = new MutableColumn("DateCol", ColumnType.DATE); c = new FilterItem(new SelectItem(dateColumn), OperatorType.GREATER_THAN, "2000-12-31"); assertEquals("DateCol > DATE '2000-12-31'", c.toString()); } public void testToStringTimeStamp() throws Exception { Column timestampColumn = new MutableColumn("TimestampCol", ColumnType.TIMESTAMP); FilterItem c = new FilterItem(new SelectItem(timestampColumn), OperatorType.LESS_THAN, "2000-12-31 02:30:05.007"); assertEquals("TimestampCol < TIMESTAMP '2000-12-31 02:30:05'", c.toString()); c = new FilterItem(new SelectItem(timestampColumn), OperatorType.LESS_THAN, "2000-12-31 02:30:05"); assertEquals("TimestampCol < TIMESTAMP '2000-12-31 02:30:05'", c.toString()); Column dateColumn = new MutableColumn("DateCol", ColumnType.DATE); c = new FilterItem(new SelectItem(timestampColumn), OperatorType.GREATER_THAN, new SelectItem(dateColumn)); assertEquals("TimestampCol > DateCol", c.toString()); } public void testEvaluateStrings() throws Exception { Column col1 = new MutableColumn("Col1", ColumnType.VARCHAR); Column col2 = new MutableColumn("Col2", ColumnType.VARCHAR); SelectItem s1 = new SelectItem(col1); SelectItem s2 = new SelectItem(col2); SelectItem[] selectItems = new SelectItem[] { s1, s2 }; SimpleDataSetHeader header = new SimpleDataSetHeader(selectItems); Row row; FilterItem c; row = new DefaultRow(header, new Object[] { "foo", "bar" }); c = new FilterItem(s1, OperatorType.DIFFERENT_FROM, s2); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { "aaa", "bbb" }); c = new FilterItem(s1, OperatorType.GREATER_THAN, s2); assertFalse(c.evaluate(row)); c = new FilterItem(s1, OperatorType.LESS_THAN, s2); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { "aaa", "aaa" }); c = new FilterItem(s1, OperatorType.EQUALS_TO, s2); assertTrue(c.evaluate(row)); c = new FilterItem(s1, OperatorType.LIKE, s2); row = new DefaultRow(header, new Object[] { "foobar", "fo%b%r" }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { "foobbdbafsdfr", "fo%b%r" }); assertTrue(c.evaluate(row)); } public void testEvaluateNull() throws Exception { Column col1 = new MutableColumn("Col1", ColumnType.INTEGER); Column col2 = new MutableColumn("Col2", ColumnType.DECIMAL); SelectItem s1 = new SelectItem(col1); SelectItem s2 = new SelectItem(col2); SelectItem[] selectItems = new SelectItem[] { s1, s2 }; CachingDataSetHeader header = new CachingDataSetHeader(selectItems); FilterItem c = new FilterItem(s1, OperatorType.EQUALS_TO, null); Row row = new DefaultRow(header, new Object[] { 1, 1 }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { null, 1 }); assertTrue(c.evaluate(row)); c = new FilterItem(s1, OperatorType.EQUALS_TO, 1); row = new DefaultRow(header, new Object[] { 1, 1 }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { null, 1 }); assertFalse(c.evaluate(row)); c = new FilterItem(s1, OperatorType.DIFFERENT_FROM, 5); row = new DefaultRow(header, new Object[] { 1, 1 }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { null, 1 }); assertTrue(c.evaluate(row)); c = new FilterItem(s1, OperatorType.GREATER_THAN, s2); row = new DefaultRow(header, new Object[] { 5, 1 }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { null, 1 }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { 1, null }); assertFalse(c.evaluate(row)); c = new FilterItem(s1, OperatorType.GREATER_THAN_OR_EQUAL, s2); row = new DefaultRow(header, new Object[] { 5, 1 }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { 1, 5 }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { 5, 5 }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { null, 1 }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { 1, null }); assertFalse(c.evaluate(row)); c = new FilterItem(s1, OperatorType.LESS_THAN_OR_EQUAL, s2); row = new DefaultRow(header, new Object[] { 1, 5 }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { 5, 1 }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { 1, 1 }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { null, 1 }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { 1, null }); assertFalse(c.evaluate(row)); c = new FilterItem(s1, OperatorType.EQUALS_TO, s2); row = new DefaultRow(header, new Object[] { 1, null }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { null, null }); assertTrue(c.evaluate(row)); } public void testEvaluateDates() throws Exception { Column col1 = new MutableColumn("Col1", ColumnType.DATE); SelectItem s1 = new SelectItem(col1); SelectItem[] selectItems = new SelectItem[] { s1 }; CachingDataSetHeader header = new CachingDataSetHeader(selectItems); long currentTimeMillis = System.currentTimeMillis(); FilterItem c = new FilterItem(s1, OperatorType.LESS_THAN, new java.sql.Date(currentTimeMillis)); Row row = new DefaultRow(header, new Object[] { new java.sql.Date(currentTimeMillis) }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { new java.sql.Date(currentTimeMillis + 10000000) }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { new java.sql.Date(currentTimeMillis - 10000000) }); assertTrue(c.evaluate(row)); } public void testEvaluateBooleans() throws Exception { Column col1 = new MutableColumn("Col1", ColumnType.BIT); SelectItem s1 = new SelectItem(col1); SelectItem[] selectItems = new SelectItem[] { s1 }; DataSetHeader header = new SimpleDataSetHeader(selectItems); FilterItem c = new FilterItem(s1, OperatorType.EQUALS_TO, true); Row row = new DefaultRow(header, new Object[] { true }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { false }); assertFalse(c.evaluate(row)); c = new FilterItem(s1, OperatorType.EQUALS_TO, false); row = new DefaultRow(header, new Object[] { true }); assertFalse(c.evaluate(row)); row = new DefaultRow(header, new Object[] { false }); assertTrue(c.evaluate(row)); c = new FilterItem(s1, OperatorType.GREATER_THAN, false); row = new DefaultRow(header, new Object[] { true }); assertTrue(c.evaluate(row)); row = new DefaultRow(header, new Object[] { false }); assertFalse(c.evaluate(row)); } /** * Tests that the following (general) rules apply to the object: * <p/> * <li>the hashcode is the same when run twice on an unaltered object</li> * <li>if o1.equals(o2) then this condition must be true: o1.hashCode() == * 02.hashCode() */ public void testEqualsAndHashCode() throws Exception { Column col1 = new MutableColumn("Col1", ColumnType.BIT); FilterItem c1 = new FilterItem(new SelectItem(col1), OperatorType.EQUALS_TO, true); FilterItem c2 = new FilterItem(new SelectItem(col1), OperatorType.EQUALS_TO, true); assertEquals(c1, c2); assertEquals(c1.hashCode(), c2.hashCode()); c2 = new FilterItem(new SelectItem(col1), OperatorType.GREATER_THAN, true); assertFalse(c1.equals(c2)); assertFalse(c1.hashCode() == c2.hashCode()); Column col2 = new MutableColumn("Col2", ColumnType.VARBINARY); c2 = new FilterItem(new SelectItem(col2), OperatorType.EQUALS_TO, true); assertFalse(c1.equals(c2)); assertFalse(c1.hashCode() == c2.hashCode()); } public void testOrFilterItem() throws Exception { Column col1 = new MutableColumn("Col1", ColumnType.VARCHAR); SelectItem s1 = new SelectItem(col1); FilterItem c1 = new FilterItem(s1, OperatorType.EQUALS_TO, "foo"); FilterItem c2 = new FilterItem(s1, OperatorType.EQUALS_TO, "bar"); FilterItem c3 = new FilterItem(s1, OperatorType.EQUALS_TO, "foobar"); FilterItem filter = new FilterItem(c1, c2, c3); assertEquals("(Col1 = 'foo' OR Col1 = 'bar' OR Col1 = 'foobar')", filter.toString()); DataSetHeader header = new SimpleDataSetHeader(new SelectItem[] { s1 }); assertTrue(filter.evaluate(new DefaultRow(header, new Object[] { "foo" }))); assertTrue(filter.evaluate(new DefaultRow(header, new Object[] { "bar" }))); assertTrue(filter.evaluate(new DefaultRow(header, new Object[] { "foobar" }))); assertFalse(filter.evaluate(new DefaultRow(header, new Object[] { "foob" }))); } public void testAndFilterItem() throws Exception { Column col1 = new MutableColumn("Col1", ColumnType.VARCHAR); SelectItem s1 = new SelectItem(col1); FilterItem c1 = new FilterItem(s1, OperatorType.LIKE, "foo%"); FilterItem c2 = new FilterItem(s1, OperatorType.LIKE, "%bar"); FilterItem c3 = new FilterItem(s1, OperatorType.DIFFERENT_FROM, "foobar"); FilterItem filter = new FilterItem(LogicalOperator.AND, c1, c2, c3); assertEquals("(Col1 LIKE 'foo%' AND Col1 LIKE '%bar' AND Col1 <> 'foobar')", filter.toString()); SelectItem[] items = new SelectItem[] { s1 }; CachingDataSetHeader header = new CachingDataSetHeader(items); assertTrue(filter.evaluate(new DefaultRow(header, new Object[] { "foo bar" }))); assertTrue(filter.evaluate(new DefaultRow(header, new Object[] { "foosenbar" }))); assertFalse(filter.evaluate(new DefaultRow(header, new Object[] { "foo" }))); assertFalse(filter.evaluate(new DefaultRow(header, new Object[] { "hello world" }))); assertFalse(filter.evaluate(new DefaultRow(header, new Object[] { "foobar" }))); } // Ticket #410 public void testOrFilterItemWithoutSelectingActualItmes() throws Exception { // define the schema final MutableSchema schema = new MutableSchema("s"); MutableTable table = new MutableTable("persons", TableType.TABLE, schema); schema.addTable(table); final Column col1 = new MutableColumn("name", ColumnType.VARCHAR, table, 1, true); final Column col2 = new MutableColumn("role", ColumnType.VARCHAR, table, 2, true); final Column col3 = new MutableColumn("column_number", ColumnType.INTEGER, table, 3, true); table.addColumn(col1); table.addColumn(col2); table.addColumn(col3); Query q = new Query(); q.select(col3); q.from(col1.getTable()); SelectItem selectItem1 = new SelectItem(col1); SelectItem selectItem2 = new SelectItem(col2); FilterItem item1 = new FilterItem(selectItem1, OperatorType.EQUALS_TO, "kasper"); FilterItem item2 = new FilterItem(selectItem2, OperatorType.EQUALS_TO, "user"); q.where(new FilterItem(item1, item2)); assertEquals( "SELECT persons.column_number FROM s.persons WHERE (persons.name = 'kasper' OR persons.role = 'user')", q.toString()); DataContext dc = new QueryPostprocessDataContext() { @Override public DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows) { // we expect 3 columns to be materialized because the query has column references in both SELECT and WHERE clause assertEquals(3, columns.length); assertEquals("column_number", columns[0].getName()); assertEquals("name", columns[1].getName()); assertEquals("role", columns[2].getName()); SelectItem[] selectItems = new SelectItem[] { new SelectItem(col1), new SelectItem(col2), new SelectItem(col3) }; DataSetHeader header = new CachingDataSetHeader(selectItems); List<Row> rows = new LinkedList<Row>(); rows.add(new DefaultRow(header, new Object[] { "foo", "bar", 1 })); rows.add(new DefaultRow(header, new Object[] { "kasper", "developer", 2 })); rows.add(new DefaultRow(header, new Object[] { "admin", "admin", 3 })); rows.add(new DefaultRow(header, new Object[] { "elikeon", "user", 4 })); rows.add(new DefaultRow(header, new Object[] { "someuser", "user", 5 })); rows.add(new DefaultRow(header, new Object[] { "hmm", "what-the", 6 })); return new InMemoryDataSet(header, rows); } @Override protected String getMainSchemaName() throws MetaModelException { return "s"; } @Override protected Schema getMainSchema() throws MetaModelException { return schema; } }; DataSet result = dc.executeQuery(q); List<Object[]> objectArrays = result.toObjectArrays(); assertEquals(3, objectArrays.size()); assertEquals(2, objectArrays.get(0)[0]); assertEquals(4, objectArrays.get(1)[0]); assertEquals(5, objectArrays.get(2)[0]); } public void testInOperandSql() throws Exception { SelectItem selectItem = new SelectItem(new MutableColumn("foo", ColumnType.VARCHAR, null, 1, null, null, true, null, false, null)); Object operand = new String[] { "foo", "bar" }; assertEquals("foo IN ('foo' , 'bar')", new FilterItem(selectItem, OperatorType.IN, operand).toSql()); operand = Arrays.asList("foo", "bar", "baz"); assertEquals("foo IN ('foo' , 'bar' , 'baz')", new FilterItem(selectItem, OperatorType.IN, operand).toSql()); operand = "foo"; assertEquals("foo IN ('foo')", new FilterItem(selectItem, OperatorType.IN, operand).toSql()); operand = new ArrayList<Object>(); assertEquals("foo IN ()", new FilterItem(selectItem, OperatorType.IN, operand).toSql()); } public void testInOperandEvaluate() throws Exception { SelectItem selectItem = new SelectItem(new MutableColumn("foo", ColumnType.VARCHAR, null, 1, null, null, true, null, false, null)); Object operand = new String[] { "foo", "bar" }; FilterItem filterItem = new FilterItem(selectItem, OperatorType.IN, operand); SelectItem[] selectItems = new SelectItem[] { selectItem }; DataSetHeader header = new CachingDataSetHeader(selectItems); assertTrue(filterItem.evaluate(new DefaultRow(header, new Object[] { "foo" }))); assertTrue(filterItem.evaluate(new DefaultRow(header, new Object[] { "bar" }))); assertFalse(filterItem.evaluate(new DefaultRow(header, new Object[] { "foobar" }))); } }
rafaelgarrote/metamodel
core/src/test/java/org/apache/metamodel/query/FilterItemTest.java
Java
apache-2.0
20,420
/* * Copyright 2000-2015 JetBrains s.r.o. * * 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 com.intellij.vcs.log.data; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.progress.Task; import com.intellij.openapi.progress.impl.ProgressManagerImpl; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Pair; import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.Consumer; import com.intellij.util.Function; import com.intellij.util.NotNullFunction; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.ui.UIUtil; import com.intellij.vcs.log.*; import com.intellij.vcs.log.graph.GraphCommit; import com.intellij.vcs.log.graph.GraphCommitImpl; import com.intellij.vcs.log.graph.PermanentGraph; import com.intellij.vcs.log.impl.RequirementsImpl; import com.intellij.vcs.log.util.StopWatch; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; public class VcsLogRefresherImpl implements VcsLogRefresher { private static final Logger LOG = Logger.getInstance(VcsLogRefresherImpl.class); @NotNull private final Project myProject; @NotNull private final VcsLogHashMap myHashMap; @NotNull private final Map<VirtualFile, VcsLogProvider> myProviders; @NotNull private final VcsUserRegistryImpl myUserRegistry; @NotNull private final Map<Integer, VcsCommitMetadata> myTopCommitsDetailsCache; @NotNull private final Consumer<Exception> myExceptionHandler; private final int myRecentCommitCount; @NotNull private final SingleTaskController<RefreshRequest, DataPack> mySingleTaskController; @NotNull private volatile DataPack myDataPack = DataPack.EMPTY; public VcsLogRefresherImpl(@NotNull final Project project, @NotNull VcsLogHashMap hashMap, @NotNull Map<VirtualFile, VcsLogProvider> providers, @NotNull final VcsUserRegistryImpl userRegistry, @NotNull Map<Integer, VcsCommitMetadata> topCommitsDetailsCache, @NotNull final Consumer<DataPack> dataPackUpdateHandler, @NotNull Consumer<Exception> exceptionHandler, int recentCommitsCount) { myProject = project; myHashMap = hashMap; myProviders = providers; myUserRegistry = userRegistry; myTopCommitsDetailsCache = topCommitsDetailsCache; myExceptionHandler = exceptionHandler; myRecentCommitCount = recentCommitsCount; mySingleTaskController = new SingleTaskController<RefreshRequest, DataPack>(new Consumer<DataPack>() { @Override public void consume(@NotNull DataPack dataPack) { myDataPack = dataPack; dataPackUpdateHandler.consume(dataPack); } }) { @Override protected void startNewBackgroundTask() { VcsLogRefresherImpl.this.startNewBackgroundTask(new MyRefreshTask(myDataPack)); } }; } protected void startNewBackgroundTask(@NotNull final Task.Backgroundable refreshTask) { UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { LOG.debug("Starting a background task..."); ((ProgressManagerImpl)ProgressManager.getInstance()).runProcessWithProgressAsynchronously(refreshTask); } }); } @NotNull public DataPack getCurrentDataPack() { return myDataPack; } @NotNull @Override public DataPack readFirstBlock() { try { LogInfo data = loadRecentData(new CommitCountRequirements(myRecentCommitCount).asMap(myProviders.keySet())); Collection<List<GraphCommit<Integer>>> commits = data.getCommits(); Map<VirtualFile, Set<VcsRef>> refs = data.getRefs(); List<GraphCommit<Integer>> compoundList = multiRepoJoin(commits); compoundList = compoundList.subList(0, Math.min(myRecentCommitCount, compoundList.size())); myDataPack = DataPack.build(compoundList, refs, myProviders, myHashMap, false); mySingleTaskController.request(RefreshRequest.RELOAD_ALL); // build/rebuild the full log in background return myDataPack; } catch (VcsException e) { myExceptionHandler.consume(e); return DataPack.EMPTY; } } @NotNull private LogInfo loadRecentData(@NotNull final Map<VirtualFile, VcsLogProvider.Requirements> requirements) throws VcsException { final StopWatch sw = StopWatch.start("loading commits"); final LogInfo logInfo = new LogInfo(); new ProviderIterator() { @Override public void each(@NotNull VirtualFile root, @NotNull VcsLogProvider provider) throws VcsException { VcsLogProvider.DetailedLogData data = provider.readFirstBlock(root, requirements.get(root)); storeUsersAndDetails(data.getCommits()); logInfo.put(root, compactCommits(data.getCommits(), root)); logInfo.put(root, data.getRefs()); sw.rootCompleted(root); } }.iterate(getProvidersForRoots(requirements.keySet())); myUserRegistry.flush(); sw.report(); return logInfo; } @NotNull private Map<VirtualFile, VcsLogProvider> getProvidersForRoots(@NotNull Set<VirtualFile> roots) { return ContainerUtil.map2Map(roots, new Function<VirtualFile, Pair<VirtualFile, VcsLogProvider>>() { @Override public Pair<VirtualFile, VcsLogProvider> fun(VirtualFile root) { return Pair.create(root, myProviders.get(root)); } }); } @Override public void refresh(@NotNull Collection<VirtualFile> rootsToRefresh) { if (!rootsToRefresh.isEmpty()) { mySingleTaskController.request(new RefreshRequest(rootsToRefresh)); } } @NotNull private static <T extends GraphCommit<Integer>> List<T> multiRepoJoin(@NotNull Collection<List<T>> commits) { StopWatch sw = StopWatch.start("multi-repo join"); List<T> joined = new VcsLogMultiRepoJoiner<Integer, T>().join(commits); sw.report(); return joined; } @NotNull private List<GraphCommit<Integer>> compactCommits(@NotNull List<? extends TimedVcsCommit> commits, @NotNull final VirtualFile root) { StopWatch sw = StopWatch.start("compacting commits"); List<GraphCommit<Integer>> map = ContainerUtil.map(commits, new Function<TimedVcsCommit, GraphCommit<Integer>>() { @NotNull @Override public GraphCommit<Integer> fun(@NotNull TimedVcsCommit commit) { return compactCommit(commit, root); } }); myHashMap.flush(); sw.report(); return map; } @NotNull private GraphCommitImpl<Integer> compactCommit(@NotNull TimedVcsCommit commit, @NotNull final VirtualFile root) { List<Integer> parents = ContainerUtil.map(commit.getParents(), new NotNullFunction<Hash, Integer>() { @NotNull @Override public Integer fun(Hash hash) { return myHashMap.getCommitIndex(hash, root); } }); return new GraphCommitImpl<Integer>(myHashMap.getCommitIndex(commit.getId(), root), parents, commit.getTimestamp()); } private void storeUsersAndDetails(@NotNull Collection<? extends VcsCommitMetadata> metadatas) { for (VcsCommitMetadata detail : metadatas) { myUserRegistry.addUser(detail.getAuthor()); myUserRegistry.addUser(detail.getCommitter()); myTopCommitsDetailsCache.put(myHashMap.getCommitIndex(detail.getId(), detail.getRoot()), detail); } } private class MyRefreshTask extends Task.Backgroundable { @NotNull private DataPack myCurrentDataPack; @NotNull private final LogInfo myLoadedInfo = new LogInfo(); MyRefreshTask(@NotNull DataPack currentDataPack) { super(VcsLogRefresherImpl.this.myProject, "Refreshing History...", false); myCurrentDataPack = currentDataPack; } @Override public void run(@NotNull ProgressIndicator indicator) { LOG.debug("Refresh task started"); indicator.setIndeterminate(true); DataPack dataPack = myCurrentDataPack; while (true) { List<RefreshRequest> requests = mySingleTaskController.popRequests(); Collection<VirtualFile> rootsToRefresh = getRootsToRefresh(requests); LOG.debug("Requests: " + requests + ". roots to refresh: " + rootsToRefresh); if (rootsToRefresh.isEmpty()) { mySingleTaskController.taskCompleted(dataPack); break; } dataPack = doRefresh(rootsToRefresh); } } @NotNull private Collection<VirtualFile> getRootsToRefresh(@NotNull List<RefreshRequest> requests) { Collection<VirtualFile> rootsToRefresh = ContainerUtil.newArrayList(); for (RefreshRequest request : requests) { if (request == RefreshRequest.RELOAD_ALL) { myCurrentDataPack = DataPack.EMPTY; return myProviders.keySet(); } rootsToRefresh.addAll(request.rootsToRefresh); } return rootsToRefresh; } @NotNull private DataPack doRefresh(@NotNull Collection<VirtualFile> roots) { StopWatch sw = StopWatch.start("refresh"); PermanentGraph<Integer> permanentGraph = myCurrentDataPack.isFull() ? myCurrentDataPack.getPermanentGraph() : null; Map<VirtualFile, Set<VcsRef>> currentRefs = myCurrentDataPack.getRefsModel().getAllRefsByRoot(); try { if (permanentGraph != null) { int commitCount = myRecentCommitCount; for (int attempt = 0; attempt <= 1; attempt++) { loadLogAndRefs(roots, currentRefs, commitCount); List<? extends GraphCommit<Integer>> compoundLog = multiRepoJoin(myLoadedInfo.getCommits()); Map<VirtualFile, Set<VcsRef>> allNewRefs = getAllNewRefs(myLoadedInfo, currentRefs); List<GraphCommit<Integer>> joinedFullLog = join(compoundLog, permanentGraph.getAllCommits(), currentRefs, allNewRefs); if (joinedFullLog == null) { commitCount *= 5; } else { return DataPack.build(joinedFullLog, allNewRefs, myProviders, myHashMap, true); } } // couldn't join => need to reload everything; if 5000 commits is still not enough, it's worth reporting: LOG.info("Couldn't join " + commitCount / 5 + " recent commits to the log (" + permanentGraph.getAllCommits().size() + " commits)"); } return loadFullLog(); } catch (Exception e) { myExceptionHandler.consume(e); return DataPack.EMPTY; } finally { sw.report(); } } @NotNull private Map<VirtualFile, Set<VcsRef>> getAllNewRefs(@NotNull LogInfo newInfo, @NotNull Map<VirtualFile, Set<VcsRef>> previousRefs) { Map<VirtualFile, Set<VcsRef>> result = ContainerUtil.newHashMap(); for (VirtualFile root : previousRefs.keySet()) { Set<VcsRef> newInfoRefs = newInfo.getRefs(root); result.put(root, newInfoRefs != null ? newInfoRefs : previousRefs.get(root)); } return result; } private void loadLogAndRefs(@NotNull Collection<VirtualFile> roots, @NotNull Map<VirtualFile, Set<VcsRef>> prevRefs, int commitCount) throws VcsException { LogInfo logInfo = loadRecentData(prepareRequirements(roots, commitCount, prevRefs)); for (VirtualFile root : roots) { myLoadedInfo.put(root, logInfo.getCommits(root)); myLoadedInfo.put(root, logInfo.getRefs(root)); } } @NotNull private Map<VirtualFile, VcsLogProvider.Requirements> prepareRequirements(@NotNull Collection<VirtualFile> roots, int commitCount, @NotNull Map<VirtualFile, Set<VcsRef>> prevRefs) { Map<VirtualFile, VcsLogProvider.Requirements> requirements = ContainerUtil.newHashMap(); for (VirtualFile root : roots) { requirements.put(root, new RequirementsImpl(commitCount, true, ContainerUtil.notNullize(prevRefs.get(root)))); } return requirements; } @Nullable private List<GraphCommit<Integer>> join(@NotNull List<? extends GraphCommit<Integer>> recentCommits, @NotNull List<GraphCommit<Integer>> fullLog, @NotNull Map<VirtualFile, Set<VcsRef>> previousRefs, @NotNull Map<VirtualFile, Set<VcsRef>> newRefs) { StopWatch sw = StopWatch.start("joining new commits"); Function<VcsRef, Integer> ref2Int = new Function<VcsRef, Integer>() { @Override public Integer fun(@NotNull VcsRef ref) { return myHashMap.getCommitIndex(ref.getCommitHash(), ref.getRoot()); } }; Collection<Integer> prevRefIndices = ContainerUtil.map(ContainerUtil.concat(previousRefs.values()), ref2Int); Collection<Integer> newRefIndices = ContainerUtil.map(ContainerUtil.concat(newRefs.values()), ref2Int); try { List<GraphCommit<Integer>> commits = new VcsLogJoiner<Integer, GraphCommit<Integer>>().addCommits(fullLog, prevRefIndices, recentCommits, newRefIndices).first; sw.report(); return commits; } catch (VcsLogRefreshNotEnoughDataException e) { // valid case: e.g. another developer merged a long-developed branch, or we just didn't pull for a long time LOG.info(e); } catch (IllegalStateException e) { // it happens from time to time, but we don't know why, and can hardly debug it. LOG.info(e); } return null; } @NotNull private DataPack loadFullLog() throws VcsException { StopWatch sw = StopWatch.start("full log reload"); LogInfo logInfo = readFullLogFromVcs(); List<? extends GraphCommit<Integer>> graphCommits = multiRepoJoin(logInfo.getCommits()); DataPack dataPack = DataPack.build(graphCommits, logInfo.getRefs(), myProviders, myHashMap, true); sw.report(); return dataPack; } @NotNull private LogInfo readFullLogFromVcs() throws VcsException { final StopWatch sw = StopWatch.start("read full log from VCS"); final LogInfo logInfo = new LogInfo(); new ProviderIterator() { @Override void each(@NotNull final VirtualFile root, @NotNull VcsLogProvider provider) throws VcsException { final List<GraphCommit<Integer>> graphCommits = ContainerUtil.newArrayList(); VcsLogProvider.LogData data = provider.readAllHashes(root, new Consumer<TimedVcsCommit>() { @Override public void consume(@NotNull TimedVcsCommit commit) { graphCommits.add(compactCommit(commit, root)); } }); logInfo.put(root, graphCommits); logInfo.put(root, data.getRefs()); myUserRegistry.addUsers(data.getUsers()); sw.rootCompleted(root); } }.iterate(myProviders); myUserRegistry.flush(); sw.report(); return logInfo; } } private static class RefreshRequest { private static final RefreshRequest RELOAD_ALL = new RefreshRequest(Collections.<VirtualFile>emptyList()) { @Override public String toString() { return "RELOAD_ALL"; } }; private final Collection<VirtualFile> rootsToRefresh; RefreshRequest(@NotNull Collection<VirtualFile> rootsToRefresh) { this.rootsToRefresh = rootsToRefresh; } @Override public String toString() { return "{" + rootsToRefresh + "}"; } } private static abstract class ProviderIterator { abstract void each(@NotNull VirtualFile root, @NotNull VcsLogProvider provider) throws VcsException; final void iterate(@NotNull Map<VirtualFile, VcsLogProvider> providers) throws VcsException { for (Map.Entry<VirtualFile, VcsLogProvider> entry : providers.entrySet()) { each(entry.getKey(), entry.getValue()); } } } private static class CommitCountRequirements implements VcsLogProvider.Requirements { private final int myCommitCount; public CommitCountRequirements(int commitCount) { myCommitCount = commitCount; } @Override public int getCommitCount() { return myCommitCount; } @NotNull Map<VirtualFile, VcsLogProvider.Requirements> asMap(@NotNull Collection<VirtualFile> roots) { return ContainerUtil.map2Map(roots, new Function<VirtualFile, Pair<VirtualFile, VcsLogProvider.Requirements>>() { @Override public Pair<VirtualFile, VcsLogProvider.Requirements> fun(VirtualFile root) { return Pair.<VirtualFile, VcsLogProvider.Requirements>create(root, CommitCountRequirements.this); } }); } } @SuppressWarnings("StringConcatenationInsideStringBufferAppend") private static class LogInfo { private final Map<VirtualFile, Set<VcsRef>> myRefs = ContainerUtil.newHashMap(); private final Map<VirtualFile, List<GraphCommit<Integer>>> myCommits = ContainerUtil.newHashMap(); void put(@NotNull VirtualFile root, @NotNull List<GraphCommit<Integer>> commits) { myCommits.put(root, commits); } void put(@NotNull VirtualFile root, @NotNull Set<VcsRef> refs) { myRefs.put(root, refs); } @NotNull Collection<List<GraphCommit<Integer>>> getCommits() { return myCommits.values(); } List<GraphCommit<Integer>> getCommits(@NotNull VirtualFile root) { return myCommits.get(root); } @NotNull Map<VirtualFile, Set<VcsRef>> getRefs() { return myRefs; } public Set<VcsRef> getRefs(@NotNull VirtualFile root) { return myRefs.get(root); } } }
Soya93/Extract-Refactoring
platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogRefresherImpl.java
Java
apache-2.0
18,836
package de.yogularm.minecraft.itemfinder.region; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import com.google.common.collect.ImmutableList; /** * Represents the terrain of one minecraft world */ public class World { private List<Dimension> dimensions = ImmutableList.of(); private LevelInfo forgeData; private Path path; private String gameDirName; private boolean isLoaded; public World(Path path, String gameDirName) { this.path = path; this.gameDirName = gameDirName; } public void load(ProgressListener progressListener) throws IOException, InterruptedException { forgeData = new LevelInfo(path.resolve("level.dat")); ImmutableList.Builder<Dimension> builder = new ImmutableList.Builder<>(); tryAddDimension(builder, "Overworld", path); tryAddDimension(builder, "Nether", path.resolve("DIM-1")); tryAddDimension(builder, "End", path.resolve("DIM1")); dimensions = builder.build(); // load actual data ProgressReporter progressReporter = new ProgressReporter(progressListener); for (Dimension dimension : dimensions) { progressReporter.onAction("Loading " + dimension.getName() + "..."); ProgressListener subListener = progressReporter.startSubtask(1.0 / dimensions.size()); dimension.loadRegions(subListener); progressReporter.incProgress(1.0 / dimensions.size()); } isLoaded = true; } public boolean isLoaded() { return isLoaded; } private void tryAddDimension(ImmutableList.Builder<Dimension> list, String name, Path path) { Path regionPath = path.resolve("region"); if (Files.isDirectory(regionPath)) list.add(new Dimension(regionPath, forgeData, name)); } public List<Dimension> getDimensions() { return dimensions; } public String getWorldName() { return path.getFileName().toString(); } public String getGameDirName() { return gameDirName; } public String getDisplayName() { return getWorldName() + (gameDirName.length() > 0 ? " (" + getGameDirName() + ")" : ""); } @Override public String toString() { return getDisplayName(); } }
Yogu/itemfinder
src/main/java/de/yogularm/minecraft/itemfinder/region/World.java
Java
apache-2.0
2,112
/* * Copyright 2003-2009 the original author or authors. * * 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 org.codehaus.groovy.transform.sc.transformers; import org.codehaus.groovy.ast.ClassHelper; import org.codehaus.groovy.ast.ClassNode; import org.codehaus.groovy.ast.FieldNode; import org.codehaus.groovy.ast.MethodNode; import org.codehaus.groovy.ast.expr.BinaryExpression; import org.codehaus.groovy.ast.expr.Expression; import org.codehaus.groovy.ast.expr.MethodCallExpression; import org.codehaus.groovy.ast.expr.TupleExpression; import org.codehaus.groovy.ast.expr.VariableExpression; import org.codehaus.groovy.ast.stmt.EmptyStatement; import org.codehaus.groovy.classgen.asm.MopWriter; import org.codehaus.groovy.syntax.Token; import org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor; import org.codehaus.groovy.transform.stc.StaticTypesMarker; import java.util.List; import static org.objectweb.asm.Opcodes.ACC_PUBLIC; import static org.objectweb.asm.Opcodes.ACC_SYNTHETIC; public class MethodCallExpressionTransformer { private final StaticCompilationTransformer staticCompilationTransformer; public MethodCallExpressionTransformer(StaticCompilationTransformer staticCompilationTransformer) { this.staticCompilationTransformer = staticCompilationTransformer; } Expression transformMethodCallExpression(final MethodCallExpression expr) { ClassNode superCallReceiver = expr.getNodeMetaData(StaticTypesMarker.SUPER_MOP_METHOD_REQUIRED); if (superCallReceiver!=null) { return transformMethodCallExpression(transformToMopSuperCall(superCallReceiver, expr)); } Expression objectExpression = expr.getObjectExpression(); ClassNode type = staticCompilationTransformer.getTypeChooser().resolveType(objectExpression, staticCompilationTransformer.getClassNode()); if (isCallOnClosure(expr)) { FieldNode field = staticCompilationTransformer.getClassNode().getField(expr.getMethodAsString()); if (field != null) { VariableExpression vexp = new VariableExpression(field); MethodCallExpression result = new MethodCallExpression( vexp, "call", staticCompilationTransformer.transform(expr.getArguments()) ); result.setImplicitThis(false); result.setSourcePosition(expr); result.setSafe(expr.isSafe()); result.setSpreadSafe(expr.isSpreadSafe()); result.setMethodTarget(StaticTypeCheckingVisitor.CLOSURE_CALL_VARGS); return result; } } if (type != null && type.isArray()) { String method = expr.getMethodAsString(); ClassNode componentType = type.getComponentType(); if ("getAt".equals(method)) { Expression arguments = expr.getArguments(); if (arguments instanceof TupleExpression) { List<Expression> argList = ((TupleExpression) arguments).getExpressions(); if (argList.size() == 1) { Expression indexExpr = argList.get(0); ClassNode argType = staticCompilationTransformer.getTypeChooser().resolveType(indexExpr, staticCompilationTransformer.getClassNode()); ClassNode indexType = ClassHelper.getWrapper(argType); if (componentType.isEnum() && ClassHelper.Number_TYPE == indexType) { // workaround for generated code in enums which use .next() returning a Number indexType = ClassHelper.Integer_TYPE; } if (argType != null && ClassHelper.Integer_TYPE == indexType) { BinaryExpression binaryExpression = new BinaryExpression( objectExpression, Token.newSymbol("[", indexExpr.getLineNumber(), indexExpr.getColumnNumber()), indexExpr ); binaryExpression.putNodeMetaData(StaticTypesMarker.INFERRED_TYPE, componentType); return staticCompilationTransformer.transform(binaryExpression); } } } } else if ("putAt".equals(method)) { Expression arguments = expr.getArguments(); if (arguments instanceof TupleExpression) { List<Expression> argList = ((TupleExpression) arguments).getExpressions(); if (argList.size() == 2) { Expression indexExpr = argList.get(0); Expression objExpr = argList.get(1); ClassNode argType = staticCompilationTransformer.getTypeChooser().resolveType(indexExpr, staticCompilationTransformer.getClassNode()); if (argType != null && ClassHelper.Integer_TYPE == ClassHelper.getWrapper(argType)) { BinaryExpression arrayGet = new BinaryExpression( objectExpression, Token.newSymbol("[", indexExpr.getLineNumber(), indexExpr.getColumnNumber()), indexExpr ); arrayGet.putNodeMetaData(StaticTypesMarker.INFERRED_TYPE, componentType); BinaryExpression assignment = new BinaryExpression( arrayGet, Token.newSymbol("=", objExpr.getLineNumber(), objExpr.getColumnNumber()), objExpr ); return staticCompilationTransformer.transform(assignment); } } } } } return staticCompilationTransformer.superTransform(expr); } private MethodCallExpression transformToMopSuperCall(final ClassNode superCallReceiver, final MethodCallExpression expr) { MethodNode mn = expr.getNodeMetaData(StaticTypesMarker.DIRECT_METHOD_CALL_TARGET); String mopName = MopWriter.getMopMethodName(mn, false); MethodNode direct = new MethodNode( mopName, ACC_PUBLIC | ACC_SYNTHETIC, mn.getReturnType(), mn.getParameters(), mn.getExceptions(), EmptyStatement.INSTANCE ); direct.setDeclaringClass(superCallReceiver); MethodCallExpression result = new MethodCallExpression( new VariableExpression("this"), mopName, expr.getArguments() ); result.setImplicitThis(true); result.setSpreadSafe(false); result.setSafe(false); result.setSourcePosition(expr); result.setMethodTarget(direct); return result; } private boolean isCallOnClosure(final MethodCallExpression expr) { return expr.isImplicitThis() && expr.getNodeMetaData(StaticTypesMarker.DIRECT_METHOD_CALL_TARGET) == StaticTypeCheckingVisitor.CLOSURE_CALL_VARGS && !"call".equals(expr.getMethodAsString()); } }
komalsukhani/debian-groovy2
src/main/org/codehaus/groovy/transform/sc/transformers/MethodCallExpressionTransformer.java
Java
apache-2.0
7,966
/* Copyright 2020 The Knative Authors 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 depcheck defines a test utility for ensuring certain packages don't // take on heavy dependencies. package depcheck import ( "fmt" "sort" "strings" "testing" "golang.org/x/tools/go/packages" ) type node struct { importpath string consumers map[string]struct{} } type graph map[string]node func (g graph) contains(name string) bool { _, ok := g[name] return ok } func (g graph) order() []string { order := make(sort.StringSlice, 0, len(g)) for k := range g { order = append(order, k) } order.Sort() return order } // path constructs an examplary path that looks something like: // knative.dev/pkg/apis/duck // knative.dev/pkg/apis # Also: [knative.dev/pkg/kmeta knative.dev/pkg/tracker] // k8s.io/api/core/v1 // See the failing example in the test file. func (g graph) path(name string) []string { n := g[name] // Base case. if len(n.consumers) == 0 { return []string{name} } // Inductive step. consumers := make(sort.StringSlice, 0, len(n.consumers)) for k := range n.consumers { consumers = append(consumers, k) } consumers.Sort() base := g.path(consumers[0]) if len(base) > 1 { // Don't decorate the first entry, which is always an entrypoint. if len(consumers) > 1 { // Attach other consumers to the last entry in base. base = append(base[:len(base)-1], fmt.Sprintf("%s # Also: %v", consumers[0], consumers[1:])) } } return append(base, name) } func buildGraph(importpath string, buildFlags ...string) (graph, error) { g := make(graph, 1) pkgs, err := packages.Load(&packages.Config{ Mode: packages.NeedName | packages.NeedFiles | packages.NeedCompiledGoFiles | packages.NeedImports | packages.NeedDeps | packages.NeedModule, BuildFlags: buildFlags, }, importpath) if err != nil { return nil, err } packages.Visit(pkgs, func(pkg *packages.Package) bool { g[pkg.PkgPath] = node{ importpath: pkg.PkgPath, consumers: make(map[string]struct{}), } return pkg.Module != nil }, func(pkg *packages.Package) { for _, imp := range pkg.Imports { if _, ok := g[imp.PkgPath]; ok { g[imp.PkgPath].consumers[pkg.PkgPath] = struct{}{} } } }) return g, nil } // CheckNoDependency checks that the given import paths (ip) does not // depend (transitively) on certain banned imports. func CheckNoDependency(ip string, banned []string, buildFlags ...string) error { g, err := buildGraph(ip, buildFlags...) if err != nil { return fmt.Errorf("buildGraph(%q) = %w", ip, err) } for _, dip := range banned { if g.contains(dip) { return fmt.Errorf("%s depends on banned dependency %s\n%s", ip, dip, strings.Join(g.path(dip), "\n")) } } return nil } // AssertNoDependency checks that the given import paths (the keys) do not // depend (transitively) on certain banned imports (the values) func AssertNoDependency(t *testing.T, banned map[string][]string, buildFlags ...string) { t.Helper() for ip, banned := range banned { t.Run(ip, func(t *testing.T) { if err := CheckNoDependency(ip, banned, buildFlags...); err != nil { t.Error("CheckNoDependency() =", err) } }) } } // CheckOnlyDependencies checks that the given import path only // depends (transitively) on certain allowed imports. // Note: while perhaps counterintuitive we allow the value to be a superset // of the actual imports to that folks can use a constant that holds blessed // import paths. func CheckOnlyDependencies(ip string, allowed map[string]struct{}, buildFlags ...string) error { g, err := buildGraph(ip, buildFlags...) if err != nil { return fmt.Errorf("buildGraph(%q) = %w", ip, err) } for _, name := range g.order() { if _, ok := allowed[name]; !ok { return fmt.Errorf("dependency %s of %s is not explicitly allowed\n%s", name, ip, strings.Join(g.path(name), "\n")) } } return nil } // AssertOnlyDependencies checks that the given import paths (the keys) only // depend (transitively) on certain allowed imports (the values). // Note: while perhaps counterintuitive we allow the value to be a superset // of the actual imports to that folks can use a constant that holds blessed // import paths. func AssertOnlyDependencies(t *testing.T, allowed map[string][]string, buildFlags ...string) { t.Helper() for ip, allow := range allowed { // Always include our own package in the set of allowed dependencies. allowed := make(map[string]struct{}, len(allow)+1) for _, x := range append(allow, ip) { allowed[x] = struct{}{} } t.Run(ip, func(t *testing.T) { if err := CheckOnlyDependencies(ip, allowed, buildFlags...); err != nil { t.Error("CheckOnlyDependencies() =", err) } }) } }
knative/serving
vendor/knative.dev/pkg/depcheck/depcheck.go
GO
apache-2.0
5,205
$packageName = 'ums' $installerType = 'exe' $silentArgs = '/S' # hack to workaround limitation with chocopkgup/ketarin $url = 'http://sourceforge.net/projects/unimediaserver/files/Official%20Releases/Windows/UMS-5.0.0-Java7.exe/download' $validExitCodes = @(0) Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" -validExitCodes $validExitCodes
dtgm/chocolatey-packages
automatic/_output/ums/5.0.0/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
375
/* * 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 test.retry; // // IDL:Retry:1.0 // public abstract class RetryPOA extends org.omg.PortableServer.Servant implements org.omg.CORBA.portable.InvokeHandler, RetryOperations { static final String[] _ob_ids_ = { "IDL:Retry:1.0", "IDL:Test:1.0" }; public Retry _this() { return RetryHelper.narrow(super._this_object()); } public Retry _this(org.omg.CORBA.ORB orb) { return RetryHelper.narrow(super._this_object(orb)); } public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId) { return _ob_ids_; } public org.omg.CORBA.portable.OutputStream _invoke(String opName, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { final String[] _ob_names = { "aMethod", "get_count", "raise_exception" }; int _ob_left = 0; int _ob_right = _ob_names.length; int _ob_index = -1; while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(opName); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } if(_ob_index == -1 && opName.charAt(0) == '_') { _ob_left = 0; _ob_right = _ob_names.length; String _ob_ami_op = opName.substring(1); while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(_ob_ami_op); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } } switch(_ob_index) { case 0: // aMethod return _OB_op_aMethod(in, handler); case 1: // get_count return _OB_op_get_count(in, handler); case 2: // raise_exception return _OB_op_raise_exception(in, handler); } throw new org.omg.CORBA.BAD_OPERATION(); } private org.omg.CORBA.portable.OutputStream _OB_op_aMethod(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; aMethod(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_get_count(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; int _ob_r = get_count(); out = handler.createReply(); out.write_ulong(_ob_r); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_raise_exception(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; int _ob_a0 = in.read_ulong(); boolean _ob_a1 = in.read_boolean(); raise_exception(_ob_a0, _ob_a1); out = handler.createReply(); return out; } }
apache/geronimo-yoko
yoko-core/src/test/java/test/retry/RetryPOA.java
Java
apache-2.0
4,450
package br.com.empresa.infrastructure.config; import java.util.EnumSet; import java.util.List; import javax.servlet.DispatcherType; import javax.servlet.FilterRegistration; import javax.servlet.ServletContext; import javax.servlet.ServletException; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; import org.springframework.validation.beanvalidation.MethodValidationPostProcessor; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.multipart.commons.CommonsMultipartResolver; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.util.ISO8601DateFormat; import com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module; import com.fasterxml.jackson.datatype.joda.JodaModule; import gumga.framework.security.GumgaRequestFilter; @Configuration @EnableWebMvc @ComponentScan(basePackages = {"br.com.empresa.presentation.web", "gumga.framework"}) @Import(Application.class) public class WebConfig extends WebMvcConfigurerAdapter implements WebApplicationInitializer { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { configurer.enable(); } private MappingJackson2HttpMessageConverter jacksonConverter() { ObjectMapper mapper = new ObjectMapper(); mapper.registerModule(new Hibernate4Module()); mapper.registerModule(new JodaModule()); mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); mapper.setDateFormat(new ISO8601DateFormat()); mapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE); mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY); MappingJackson2HttpMessageConverter jacksonConverter = new MappingJackson2HttpMessageConverter(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); jacksonConverter.setObjectMapper(mapper); return jacksonConverter; } @Override public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { converters.add(jacksonConverter()); super.configureMessageConverters(converters); } @Override public void onStartup(ServletContext servletContext) throws ServletException { servletContext.setInitParameter("javax.servlet.jsp.jstl.fmt.localizationContext", "messages"); EnumSet<DispatcherType> dispatcherTypes = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD); CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter(); characterEncodingFilter.setEncoding("UTF-8"); characterEncodingFilter.setForceEncoding(true); FilterRegistration.Dynamic characterEncoding = servletContext.addFilter("characterEncoding", characterEncodingFilter); characterEncoding.addMappingForUrlPatterns(dispatcherTypes, true, "/*"); } @Bean public static MethodValidationPostProcessor methodValidationPostProcessor(LocalValidatorFactoryBean validator) { final MethodValidationPostProcessor methodValidationPostProcessor = new MethodValidationPostProcessor(); methodValidationPostProcessor.setValidator(validator); return methodValidationPostProcessor; } @Bean public static LocalValidatorFactoryBean validator() { return new LocalValidatorFactoryBean(); } @Bean public static CommonsMultipartResolver multipartResolver() { CommonsMultipartResolver resolver = new CommonsMultipartResolver(); resolver.setMaxUploadSize(1024 * 1024 * 1024); return resolver; } @Bean public GumgaRequestFilter gumgaRequestFilter() { return new GumgaRequestFilter("br.com.empresa.piloto"); } @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(gumgaRequestFilter()); } }
GUMGA/piloto
piloto-infrastructure/src/main/java/br/com/empresa/infrastructure/config/WebConfig.java
Java
apache-2.0
4,931
/* * Copyright 2006-2008 the original author or authors. * * 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 com.easyjf.core.support; import java.util.Collection; import com.easyjf.core.dao.GenericDAO; import com.easyjf.core.support.query.IQueryObject; import com.easyjf.web.tools.IQuery; import com.easyjf.web.tools.PageList; public class GenericPageList extends PageList { protected String scope; protected Class cls; public GenericPageList(Class cls,IQueryObject queryObject,GenericDAO dao) { this(cls,queryObject.getQuery(),queryObject.getParameters(),dao); } public GenericPageList(Class cls, String scope, Collection paras, GenericDAO dao) { this.cls = cls; this.scope = scope; IQuery query = new GenericQuery(dao); query.setParaValues(paras); this.setQuery(query); } /** * 查询 * * @param currentPage * 当前页数 * @param pageSize * 一页的查询个数 */ public void doList(int currentPage, int pageSize) { String totalSql = "select COUNT(obj) from " + cls.getName() + " obj where " + scope; super.doList(pageSize, currentPage, totalSql, scope); } }
youjava/easyjweb
src/ext/src/main/java/com/easyjf/core/support/GenericPageList.java
Java
apache-2.0
1,718
from java.lang import Long, Object from clamp import clamp_base, Constant TestBase = clamp_base("org") class ConstSample(TestBase, Object): myConstant = Constant(Long(1234), Long.TYPE)
jythontools/clamp
tests/integ/clamp_samples/const_.py
Python
apache-2.0
191
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.client.node; import com.google.common.collect.ImmutableSet; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.GenericAction; import org.elasticsearch.action.support.ActionFilter; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.client.AbstractClientHeadersTests; import org.elasticsearch.client.Client; import org.elasticsearch.client.support.Headers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; import java.util.Collections; import java.util.HashMap; /** * */ public class NodeClientHeadersTests extends AbstractClientHeadersTests { private static final ActionFilters EMPTY_FILTERS = new ActionFilters(Collections.<ActionFilter>emptySet()); @Override protected Client buildClient(Settings headersSettings, GenericAction[] testedActions) { Settings settings = HEADER_SETTINGS; Headers headers = new Headers(settings); Actions actions = new Actions(settings, threadPool, testedActions); return new NodeClient(settings, threadPool, headers, actions); } private static class Actions extends HashMap<GenericAction, TransportAction> { private Actions(Settings settings, ThreadPool threadPool, GenericAction[] actions) { for (GenericAction action : actions) { put(action, new InternalTransportAction(settings, action.name(), threadPool)); } } } private static class InternalTransportAction extends TransportAction { private InternalTransportAction(Settings settings, String actionName, ThreadPool threadPool) { super(settings, actionName, threadPool, EMPTY_FILTERS); } @Override protected void doExecute(ActionRequest request, ActionListener listener) { listener.onFailure(new InternalException(actionName, request)); } } }
vvcephei/elasticsearch
core/src/test/java/org/elasticsearch/client/node/NodeClientHeadersTests.java
Java
apache-2.0
2,853
package org.kie.server.integrationtests; import org.junit.BeforeClass; import org.junit.Test; import org.kie.server.api.model.KieContainerResource; import org.kie.server.api.model.ReleaseId; import org.kie.server.api.model.ServiceResponse; public class RuleFlowIntegrationTest extends KieServerBaseIntegrationTest { private static ReleaseId releaseId = new ReleaseId("org.kie.server.testing", "ruleflow-group", "1.0.0.Final"); @BeforeClass public static void buildAndDeployArtifacts() { buildAndDeployCommonMavenParent(); buildAndDeployMavenProject(ClassLoader.class.getResource("/kjars-sources/ruleflow-group").getFile()); } @Test public void testExecuteSimpleRuleFlowProcess() { assertSuccess(client.createContainer("ruleflow", new KieContainerResource("ruleflow", releaseId))); String payload = "<batch-execution lookup=\"defaultKieSession\">\n" + " <set-global identifier=\"list\" out-identifier=\"output-list\">\n" + " <java.util.ArrayList/>\n" + " </set-global>\n" + " <start-process processId=\"simple-ruleflow\"/>\n" + " <fire-all-rules/>\n" + " <get-global identifier=\"list\" out-identifier=\"output-list\"/>\n" + "</batch-execution>\n"; ServiceResponse<String> response = client.executeCommands("ruleflow", payload); assertSuccess(response); String result = response.getResult(); assertResultContainsStringRegex(result, ".*<string>Rule from first ruleflow group executed</string>\\s*<string>Rule from second ruleflow group executed</string>.*"); } }
hxf0801/droolsjbpm-integration
kie-server-parent/kie-server-tests/kie-server-rest-tests/src/test/java/org/kie/server/integrationtests/RuleFlowIntegrationTest.java
Java
apache-2.0
1,706
// bdlat_enumfunctions.h -*-C++-*- // ---------------------------------------------------------------------------- // NOTICE // // This component is not up to date with current BDE coding standards, and // should not be used as an example for new development. // ---------------------------------------------------------------------------- #ifndef INCLUDED_BDLAT_ENUMFUNCTIONS #define INCLUDED_BDLAT_ENUMFUNCTIONS #include <bsls_ident.h> BSLS_IDENT("$Id: $") //@PURPOSE: Provide a namespace defining enumeration functions. // //@CLASSES: // bdlat_EnumFunctions: namespace for calling enumeration functions // //@SEE_ALSO: // //@DESCRIPTION: The 'bdlat_EnumFunctions' 'namespace' provided in this // component defines parameterized functions that expose "enumeration" behavior // for "enumeration" types. See the package-level documentation for a full // description of "enumeration" types. The functions in this namespace allow // users to: //.. // o load an enumeration value from an integer value ('fromInt'). // o load an enumeration value from a string value ('fromString'). // o load an integer value from an enumeration value ('toInt'). // o load a string value from an enumeration value ('toString'). //.. // Also, the meta-function 'IsEnumeration' contains a compile-time constant // 'VALUE' that is non-zero if the parameterized 'TYPE' exposes "enumeration" // behavior through the 'bdlat_EnumFunctions' 'namespace'. // // This component specializes all of these functions for types that have the // 'bdlat_TypeTraitBasicEnumeration' trait. // // Types that do not have the 'bdlat_TypeTraitBasicEnumeration' trait may have // the functions in the 'bdlat_EnumFunctions' 'namespace' specialized for them. // An example of this is provided in the 'Usage' section of this document. // ///Usage ///----- // The following snippets of code illustrate the usage of this component. // Suppose you had a C++ 'enum' type called 'MyEnum': //.. // #include <bdlat_enumfunctions.h> // #include <bdlb_string.h> // #include <sstream> // #include <string> // // namespace BloombergLP { // // namespace mine { // // enum MyEnum { // RED = 1, // GREEN = 2, // BLUE = 3 // }; //.. // We can now make 'MyEnum' expose "enumeration" behavior by implementing all // the necessary 'bdlat_enum*' functions for 'MyEnum' inside the 'mine' // namespace. First we should forward declare all the functions that we will // implement inside the 'mine' namespace: //.. // // MANIPULATORS // // int bdlat_enumFromInt(MyEnum *result, int number); // // Load into the specified 'result' the enumerator matching the // // specified 'number'. Return 0 on success, and a non-zero value // // with no effect on 'result' if 'number' does not match any // // enumerator. // // int bdlat_enumFromString(MyEnum *result, // const char *string, int stringLength); // // Load into the specified 'result' the enumerator matching the // // specified 'string' of the specified 'stringLength'. Return 0 on // // success, and a non-zero value with no effect on 'result' if // // 'string' and 'stringLength' do not match any enumerator. // // // ACCESSORS // // void bdlat_enumToInt(int *result, const MyEnum& value); // // Return the integer representation exactly matching the // // enumerator name corresponding to the specified enumeration // // 'value'. // // void bdlat_enumToString(bsl::string *result, const MyEnum& value); // // Return the string representation exactly matching the enumerator // // name corresponding to the specified enumeration 'value'. // // } // close namespace mine //.. // Next, we provide the definitions for each of these functions: //.. // // MANIPULATORS // // inline // int mine::bdlat_enumFromInt(MyEnum *result, int number) // { // enum { SUCCESS = 0, NOT_FOUND = -1 }; // // switch (number) { // case RED: { // *result = RED; // // return SUCCESS; // } // case GREEN: { // *result = GREEN; // // return SUCCESS; // } // case BLUE: { // *result = BLUE; // // return SUCCESS; // } // default: { // return NOT_FOUND; // } // } // } // // inline // int mine::bdlat_enumFromString(MyEnum *result, // const char *string, // int stringLength) // { // enum { SUCCESS = 0, NOT_FOUND = -1 }; // // if (bdlb::String::areEqualCaseless("red", // string, // stringLength)) { // *result = RED; // // return SUCCESS; // } // // if (bdlb::String::areEqualCaseless("green", // string, // stringLength)) { // *result = GREEN; // // return SUCCESS; // } // // if (bdlb::String::areEqualCaseless("blue", // string, // stringLength)) { // *result = BLUE; // // return SUCCESS; // } // // return NOT_FOUND; // } // // // ACCESSORS // // void mine::bdlat_enumToInt(int *result, const MyEnum& value) // { // *result = static_cast<int>(value); // } // // void mine::bdlat_enumToString(bsl::string *result, const MyEnum& value) // { // switch (value) { // case RED: { // *result = "RED"; // } break; // case GREEN: { // *result = "GREEN"; // } break; // case BLUE: { // *result = "BLUE"; // } break; // default: { // *result = "UNKNOWN"; // } break; // } // } //.. // Finally, we need to specialize the 'IsEnum' meta-function in the // 'bdlat_EnumFunctions' namespace for the 'mine::MyEnum' type. This makes the // 'bdlat' infrastructure recognize 'MyEnum' as an enumeration abstraction: //.. // namespace bdlat_EnumFunctions { // // template <> // struct IsEnumeration<mine::MyEnum> { // enum { VALUE = 1 }; // }; // // } // close namespace 'bdlat_EnumFunctions' // } // close namespace 'BloombergLP' //.. // The 'bdlat' infrastructure (and any component that uses this infrastructure) // will now recognize 'MyEnum' as an "enumeration" type. For example, suppose // we have the following XML data: //.. // <?xml version='1.0' encoding='UTF-8' ?> // <MyEnum>GREEN</MyEnum> //.. // Using the 'balxml_decoder' component, we can load this XML data into a // 'MyEnum' object: //.. // #include <balxml_decoder.h> // // void decodeMyEnumFromXML(bsl::istream& inputData) // { // using namespace BloombergLP; // // MyEnum object = 0; // // balxml::DecoderOptions options; // balxml::MiniReader reader; // balxml::ErrorInfo errInfo; // // balxml::Decoder decoder(&options, &reader, &errInfo); // int result = decoder.decode(inputData, &object); // // assert(0 == result); // assert(GREEN == object); // } //.. // Note that the 'bdlat' framework can be used for functionality other than // encoding/decoding into XML. When 'mine::MyEnum' is plugged into the // framework, then it will be automatically usable within the framework. For // example, the following snippets of code will convert a string from a stream // and load it into a 'mine::MyEnum' object: //.. // template <typename TYPE> // void readMyEnum(bsl::istream& stream, TYPE *object) // { // bsl::string value; // stream >> value; // // return bdlat_EnumType::fromString(object, value); // } //.. // Now we have a generic function that takes an input stream and a 'Cusip' // object, and inputs its value. We can use this generic function as follows: //.. // void usageExample() // { // using namespace BloombergLP; // // bsl::stringstream ss; // mine::MyEnum object; // // ss << "GREEN" << bsl::endl << "BROWN" << bsl::endl; // // assert(0 == readMyEnum(ss, &object)); // assert(mine::GREEN == object); // // assert(0 != readMyEnum(ss, &object)); // } //.. #include <bdlscm_version.h> #include <bdlat_bdeatoverrides.h> #include <bdlat_typetraits.h> #include <bslalg_hastrait.h> #include <bslmf_assert.h> #include <bslmf_matchanytype.h> #include <bslmf_metaint.h> #include <bsls_assert.h> #include <bsls_platform.h> #include <bsl_string.h> #if defined(BSLS_PLATFORM_CMP_IBM) // Need a workaround for ADL bug. // IBM xlC will not perform argument-dependent lookup if the function being // called has already been declared and found by ordinary name lookup in // some scope at the point of the template function *definition* (not // instantiation). We work around this bug by not declaring these // functions until *after* the template definitions that call them. # define BDLAT_ENUMFUNCTIONS_HAS_INHIBITED_ADL 1 // Last verified with xlC 12.1 #endif namespace BloombergLP { // ============================= // namespace bdlat_EnumFunctions // ============================= namespace bdlat_EnumFunctions { // This 'namespace' provides functions that expose "enumeration" behavior // for "enumeration" types. See the component-level documentation for more // information. // META-FUNCTIONS #ifndef BDE_OMIT_INTERNAL_DEPRECATED template <class TYPE> bslmf::MetaInt<0> isEnumerationMetaFunction(const TYPE&); // This function can be overloaded to support partial specialization // (Sun5.2 compiler is unable to partially specialize the 'struct' // below). Note that this function is has no definition and should not // be called at runtime. // // This function is *DEPRECATED*. User's should specialize the // 'IsEnumeration' meta-function. #endif // BDE_OMIT_INTERNAL_DEPRECATED template <class TYPE> struct IsEnumeration { // This 'struct' should be specialized for third-party types that need // to expose "enumeration" behavior. See the component-level // documentation for further information. enum { //ARB:VALUE VALUE = bslalg::HasTrait<TYPE, bdlat_TypeTraitBasicEnumeration>::VALUE #ifndef BDE_OMIT_INTERNAL_DEPRECATED || BSLMF_METAINT_TO_BOOL(isEnumerationMetaFunction( bslmf::TypeRep<TYPE>::rep())) #endif // BDE_OMIT_INTERNAL_DEPRECATED }; }; // MANIPULATORS template <class TYPE> int fromInt(TYPE *result, int number); // Load into the specified 'result' the enumerator matching the // specified 'number'. Return 0 on success, and a non-zero value with // no effect on 'result' if 'number' does not match any enumerator. template <class TYPE> int fromString(TYPE *result, const char *string, int stringLength); // Load into the specified 'result' the enumerator matching the // specified 'string' of the specified 'stringLength'. Return 0 on // success, and a non-zero value with no effect on 'result' if 'string' // and 'stringLength' do not match any enumerator. // ACCESSORS template <class TYPE> void toInt(int *result, const TYPE& value); // Return the integer representation exactly matching the enumerator // name corresponding to the specified enumeration 'value'. template <class TYPE> void toString(bsl::string *result, const TYPE& value); // Return the string representation exactly matching the enumerator // name corresponding to the specified enumeration 'value'. #if ! defined(BDLAT_ENUMFUNCTIONS_HAS_INHIBITED_ADL) // OVERLOADABLE FUNCTIONS // The following functions should be overloaded for other types (in their // respective namespaces). The following functions are the default // implementations (for 'bas_codegen.pl'-generated types). Do *not* call // these functions directly. Use the functions above instead. // MANIPULATORS template <class TYPE> int bdlat_enumFromInt(TYPE *result, int number); template <class TYPE> int bdlat_enumFromString(TYPE *result, const char *string, int stringLength); // ACCESSORS template <class TYPE> void bdlat_enumToInt(int *result, const TYPE& value); template <class TYPE> void bdlat_enumToString(bsl::string *result, const TYPE& value); #endif } // close namespace bdlat_EnumFunctions // ============================================================================ // INLINE FUNCTION DEFINITIONS // ============================================================================ // ----------------------------- // namespace bdlat_EnumFunctions // ----------------------------- // MANIPULATORS template <class TYPE> inline int bdlat_EnumFunctions::fromInt(TYPE *result, int number) { return bdlat_enumFromInt(result, number); } template <class TYPE> inline int bdlat_EnumFunctions::fromString(TYPE *result, const char *string, int stringLength) { return bdlat_enumFromString(result, string, stringLength); } // ACCESSORS template <class TYPE> inline void bdlat_EnumFunctions::toInt(int *result, const TYPE& value) { bdlat_enumToInt(result, value); } template <class TYPE> inline void bdlat_EnumFunctions::toString(bsl::string *result, const TYPE& value) { bdlat_enumToString(result, value); } // ------------------------------------------------------ // namespace bdlat_EnumFunctions (OVERLOADABLE FUNCTIONS) // ------------------------------------------------------ #if defined(BDLAT_ENUMFUNCTIONS_HAS_INHIBITED_ADL) namespace bdlat_EnumFunctions { // IBM xlC will not perform argument-dependent lookup if the function being // called has already been declared and found by ordinary name lookup in // some scope at the point of the template function *definition* (not // instantiation). We work around this bug by not declaring these // functions until *after* the template definitions that call them. // OVERLOADABLE FUNCTIONS // The following functions should be overloaded for other types (in their // respective namespaces). The following functions are the default // implementations (for 'bas_codegen.pl'-generated types). Do *not* call // these functions directly. Use the functions above instead. // MANIPULATORS template <typename TYPE> int bdlat_enumFromInt(TYPE *result, int number); template <typename TYPE> int bdlat_enumFromString(TYPE *result, const char *string, int stringLength); // ACCESSORS template <typename TYPE> void bdlat_enumToInt(int *result, const TYPE& value); template <typename TYPE> void bdlat_enumToString(bsl::string *result, const TYPE& value); } // Close namespace bdlat_EnumFunctions #endif // MANIPULATORS template <class TYPE> inline int bdlat_EnumFunctions::bdlat_enumFromInt(TYPE *result, int number) { BSLMF_ASSERT(bdlat_IsBasicEnumeration<TYPE>::value); typedef typename bdlat_BasicEnumerationWrapper<TYPE>::Wrapper Wrapper; return Wrapper::fromInt(result, number); } template <class TYPE> inline int bdlat_EnumFunctions::bdlat_enumFromString(TYPE *result, const char *string, int stringLength) { BSLMF_ASSERT( (bslalg::HasTrait<TYPE, bdlat_TypeTraitBasicEnumeration>::VALUE)); typedef typename bdlat_BasicEnumerationWrapper<TYPE>::Wrapper Wrapper; return Wrapper::fromString(result, string, stringLength); } // ACCESSORS template <class TYPE> inline void bdlat_EnumFunctions::bdlat_enumToInt(int *result, const TYPE& value) { BSLMF_ASSERT( (bslalg::HasTrait<TYPE, bdlat_TypeTraitBasicEnumeration>::VALUE)); *result = static_cast<int>(value); } template <class TYPE> inline void bdlat_EnumFunctions::bdlat_enumToString(bsl::string *result, const TYPE& value) { BSLMF_ASSERT( (bslalg::HasTrait<TYPE, bdlat_TypeTraitBasicEnumeration>::VALUE)); typedef typename bdlat_BasicEnumerationWrapper<TYPE>::Wrapper Wrapper; *result = Wrapper::toString(value); } } // close enterprise namespace #endif // ---------------------------------------------------------------------------- // Copyright 2015 Bloomberg Finance L.P. // // 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. // ----------------------------- END-OF-FILE ----------------------------------
che2/bde
groups/bdl/bdlat/bdlat_enumfunctions.h
C
apache-2.0
17,798
# Copyright 2016 Google LLC All rights reserved. # # 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. """Parent client for calling the Cloud Spanner API. This is the base from which all interactions with the API occur. In the hierarchy of API concepts * a :class:`~google.cloud.spanner_v1.client.Client` owns an :class:`~google.cloud.spanner_v1.instance.Instance` * a :class:`~google.cloud.spanner_v1.instance.Instance` owns a :class:`~google.cloud.spanner_v1.database.Database` """ from google.api_core.gapic_v1 import client_info # pylint: disable=line-too-long from google.cloud.spanner_admin_database_v1.gapic.database_admin_client import ( # noqa DatabaseAdminClient, ) from google.cloud.spanner_admin_instance_v1.gapic.instance_admin_client import ( # noqa InstanceAdminClient, ) # pylint: enable=line-too-long from google.cloud._http import DEFAULT_USER_AGENT from google.cloud.client import ClientWithProject from google.cloud.spanner_v1 import __version__ from google.cloud.spanner_v1._helpers import _metadata_with_prefix from google.cloud.spanner_v1.instance import DEFAULT_NODE_COUNT from google.cloud.spanner_v1.instance import Instance _CLIENT_INFO = client_info.ClientInfo(client_library_version=__version__) SPANNER_ADMIN_SCOPE = "https://www.googleapis.com/auth/spanner.admin" class InstanceConfig(object): """Named configurations for Spanner instances. :type name: str :param name: ID of the instance configuration :type display_name: str :param display_name: Name of the instance configuration """ def __init__(self, name, display_name): self.name = name self.display_name = display_name @classmethod def from_pb(cls, config_pb): """Construct an instance from the equvalent protobuf. :type config_pb: :class:`~google.spanner.v1.spanner_instance_admin_pb2.InstanceConfig` :param config_pb: the protobuf to parse :rtype: :class:`InstanceConfig` :returns: an instance of this class """ return cls(config_pb.name, config_pb.display_name) class Client(ClientWithProject): """Client for interacting with Cloud Spanner API. .. note:: Since the Cloud Spanner API requires the gRPC transport, no ``_http`` argument is accepted by this class. :type project: :class:`str` or :func:`unicode <unicode>` :param project: (Optional) The ID of the project which owns the instances, tables and data. If not provided, will attempt to determine from the environment. :type credentials: :class:`OAuth2Credentials <oauth2client.client.OAuth2Credentials>` or :data:`NoneType <types.NoneType>` :param credentials: (Optional) The OAuth2 Credentials to use for this client. If not provided, defaults to the Google Application Default Credentials. :type user_agent: str :param user_agent: (Optional) The user agent to be used with API request. Defaults to :const:`DEFAULT_USER_AGENT`. :raises: :class:`ValueError <exceptions.ValueError>` if both ``read_only`` and ``admin`` are :data:`True` """ _instance_admin_api = None _database_admin_api = None _SET_PROJECT = True # Used by from_service_account_json() SCOPE = (SPANNER_ADMIN_SCOPE,) """The scopes required for Google Cloud Spanner.""" def __init__(self, project=None, credentials=None, user_agent=DEFAULT_USER_AGENT): # NOTE: This API has no use for the _http argument, but sending it # will have no impact since the _http() @property only lazily # creates a working HTTP object. super(Client, self).__init__( project=project, credentials=credentials, _http=None ) self.user_agent = user_agent @property def credentials(self): """Getter for client's credentials. :rtype: :class:`OAuth2Credentials <oauth2client.client.OAuth2Credentials>` :returns: The credentials stored on the client. """ return self._credentials @property def project_name(self): """Project name to be used with Spanner APIs. .. note:: This property will not change if ``project`` does not, but the return value is not cached. The project name is of the form ``"projects/{project}"`` :rtype: str :returns: The project name to be used with the Cloud Spanner Admin API RPC service. """ return "projects/" + self.project @property def instance_admin_api(self): """Helper for session-related API calls.""" if self._instance_admin_api is None: self._instance_admin_api = InstanceAdminClient( credentials=self.credentials, client_info=_CLIENT_INFO ) return self._instance_admin_api @property def database_admin_api(self): """Helper for session-related API calls.""" if self._database_admin_api is None: self._database_admin_api = DatabaseAdminClient( credentials=self.credentials, client_info=_CLIENT_INFO ) return self._database_admin_api def copy(self): """Make a copy of this client. Copies the local data stored as simple types but does not copy the current state of any open connections with the Cloud Bigtable API. :rtype: :class:`.Client` :returns: A copy of the current client. """ return self.__class__( project=self.project, credentials=self._credentials, user_agent=self.user_agent, ) def list_instance_configs(self, page_size=None, page_token=None): """List available instance configurations for the client's project. .. _RPC docs: https://cloud.google.com/spanner/docs/reference/rpc/\ google.spanner.admin.instance.v1#google.spanner.admin.\ instance.v1.InstanceAdmin.ListInstanceConfigs See `RPC docs`_. :type page_size: int :param page_size: (Optional) Maximum number of results to return. :type page_token: str :param page_token: (Optional) Token for fetching next page of results. :rtype: :class:`~google.api_core.page_iterator.Iterator` :returns: Iterator of :class:`~google.cloud.spanner_v1.instance.InstanceConfig` resources within the client's project. """ metadata = _metadata_with_prefix(self.project_name) path = "projects/%s" % (self.project,) page_iter = self.instance_admin_api.list_instance_configs( path, page_size=page_size, metadata=metadata ) page_iter.next_page_token = page_token page_iter.item_to_value = _item_to_instance_config return page_iter def instance( self, instance_id, configuration_name=None, display_name=None, node_count=DEFAULT_NODE_COUNT, ): """Factory to create a instance associated with this client. :type instance_id: str :param instance_id: The ID of the instance. :type configuration_name: string :param configuration_name: (Optional) Name of the instance configuration used to set up the instance's cluster, in the form: ``projects/<project>/instanceConfigs/<config>``. **Required** for instances which do not yet exist. :type display_name: str :param display_name: (Optional) The display name for the instance in the Cloud Console UI. (Must be between 4 and 30 characters.) If this value is not set in the constructor, will fall back to the instance ID. :type node_count: int :param node_count: (Optional) The number of nodes in the instance's cluster; used to set up the instance's cluster. :rtype: :class:`~google.cloud.spanner_v1.instance.Instance` :returns: an instance owned by this client. """ return Instance(instance_id, self, configuration_name, node_count, display_name) def list_instances(self, filter_="", page_size=None, page_token=None): """List instances for the client's project. See https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1#google.spanner.admin.database.v1.InstanceAdmin.ListInstances :type filter_: string :param filter_: (Optional) Filter to select instances listed. See the ``ListInstancesRequest`` docs above for examples. :type page_size: int :param page_size: (Optional) Maximum number of results to return. :type page_token: str :param page_token: (Optional) Token for fetching next page of results. :rtype: :class:`~google.api_core.page_iterator.Iterator` :returns: Iterator of :class:`~google.cloud.spanner_v1.instance.Instance` resources within the client's project. """ metadata = _metadata_with_prefix(self.project_name) path = "projects/%s" % (self.project,) page_iter = self.instance_admin_api.list_instances( path, page_size=page_size, metadata=metadata ) page_iter.item_to_value = self._item_to_instance page_iter.next_page_token = page_token return page_iter def _item_to_instance(self, iterator, instance_pb): """Convert an instance protobuf to the native object. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that is currently in use. :type instance_pb: :class:`~google.spanner.admin.instance.v1.Instance` :param instance_pb: An instance returned from the API. :rtype: :class:`~google.cloud.spanner_v1.instance.Instance` :returns: The next instance in the page. """ return Instance.from_pb(instance_pb, self) def _item_to_instance_config(iterator, config_pb): # pylint: disable=unused-argument """Convert an instance config protobuf to the native object. :type iterator: :class:`~google.api_core.page_iterator.Iterator` :param iterator: The iterator that is currently in use. :type config_pb: :class:`~google.spanner.admin.instance.v1.InstanceConfig` :param config_pb: An instance config returned from the API. :rtype: :class:`~google.cloud.spanner_v1.instance.InstanceConfig` :returns: The next instance config in the page. """ return InstanceConfig.from_pb(config_pb)
dhermes/google-cloud-python
spanner/google/cloud/spanner_v1/client.py
Python
apache-2.0
11,355
package org.ovirt.engine.core.common.queries; public enum ImportCandidateSourceEnum { KVM, VMWARE; public int getValue() { return this.ordinal(); } public static ImportCandidateSourceEnum forValue(int value) { return values()[value]; } }
jbeecham/ovirt-engine
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ImportCandidateSourceEnum.java
Java
apache-2.0
281
/* * Copyright (C) 2015 Archie L. Cobbs. All rights reserved. */ package io.permazen.tuple; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Objects; class AbstractHas1<V1> implements Tuple, Has1<V1> { final V1 v1; protected AbstractHas1(V1 v1) { this.v1 = v1; } @Override public V1 getValue1() { return this.v1; } @Override public int getSize() { return 1; } @Override public List<Object> asList() { return Collections.unmodifiableList(Arrays.<Object>asList(this.v1)); } // Object @Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append('<'); this.addValues(buf); buf.append('>'); return buf.toString(); } @Override public boolean equals(Object obj) { if (obj == this) return true; if (obj == null || obj.getClass() != this.getClass()) return false; return this.compareValues(obj); } @Override public int hashCode() { return Objects.hashCode(this.v1); } /** * Add values in string form to the buffer. Used to implement {@link #toString}. * Each value should be preceded by the string {@code ", "}. * Subclasses must first invoke {@code super.addValues()}. */ void addValues(StringBuilder buf) { buf.append(this.v1); } /** * Compare values for equality. Used to implement {@link #equals equals()}. * Subclasses must remember to include an invocation of {@code super.compareValues()}. * * @param obj other object which is guaranteed to have the same Java type as this instance */ boolean compareValues(Object obj) { final AbstractHas1<?> that = (AbstractHas1<?>)obj; return Objects.equals(this.v1, that.v1); } }
permazen/permazen
permazen-util/src/main/java/io/permazen/tuple/AbstractHas1.java
Java
apache-2.0
1,919
/* * Copyright (C) 2015 Archie L. Cobbs. All rights reserved. */ package io.permazen; import io.permazen.annotation.JField; import io.permazen.annotation.JMapField; import io.permazen.annotation.PermazenType; import io.permazen.test.TestSupport; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Set; import org.testng.Assert; import org.testng.annotations.Test; /** * This test just proves that fields with the same name can have different types in different * classes as long as they are not both indexed. */ public class FieldTypesConflictTest extends TestSupport { @Test public void testFieldTypesNoConflict() { final Permazen jdb = BasicTest.getPermazen(FieldTypes1.class, FieldTypes2.class, FieldTypes3.class); FieldTypes1 ft1; FieldTypes2 ft2; FieldTypes3 ft3; final JTransaction jtx1 = jdb.createTransaction(true, ValidationMode.AUTOMATIC); JTransaction.setCurrent(jtx1); try { ft1 = jtx1.create(FieldTypes1.class); ft2 = jtx1.create(FieldTypes2.class); ft3 = jtx1.create(FieldTypes3.class); ft1.setField1(123); ft1.setField2(null); ft1.getField3().add("ft1.field3"); ft2.getField1().add("ft2.field1"); ft2.setField2(456); ft2.setField3(ft2); ft3.setField1(ft1); ft3.getField2().add("ft3.field3"); ft3.setField3(789); jtx1.commit(); } finally { JTransaction.setCurrent(null); } final JTransaction jtx2 = jdb.createTransaction(true, ValidationMode.AUTOMATIC); JTransaction.setCurrent(jtx2); try { ft1 = jtx2.get(ft1); ft2 = jtx2.get(ft2); ft3 = jtx2.get(ft3); Assert.assertEquals(ft1.getField1(), 123); Assert.assertNull(ft1.getField2()); Assert.assertEquals(ft1.getField3(), Arrays.asList("ft1.field3")); Assert.assertEquals(ft2.getField1(), Arrays.asList("ft2.field1")); Assert.assertEquals(ft2.getField2(), 456); Assert.assertSame(ft2.getField3(), ft2); Assert.assertSame(ft3.getField1(), ft1); Assert.assertEquals(ft3.getField2(), Arrays.asList("ft3.field3")); Assert.assertEquals(ft3.getField3(), 789); jtx2.commit(); } finally { JTransaction.setCurrent(null); } } @Test public void testFieldTypesConflict() { try { BasicTest.getPermazen(Conflictor1.class, Conflictor2.class); assert false : "expected exception"; } catch (IllegalArgumentException e) { // expected } try { BasicTest.getPermazen(Conflictor3.class, Conflictor4.class); assert false : "expected exception"; } catch (IllegalArgumentException e) { // expected } } @Test public void testFieldTypesNoConflict2() { BasicTest.getPermazen(NonConflictor1.class, NonConflictor2.class); } // Model Classes @PermazenType public abstract static class FieldTypes1 implements JObject { public abstract int getField1(); public abstract void setField1(int x); public abstract JObject getField2(); public abstract void setField2(JObject x); public abstract List<String> getField3(); public abstract Counter getField4(); } @PermazenType public abstract static class FieldTypes2 implements JObject { public abstract List<String> getField1(); public abstract int getField2(); public abstract void setField2(int x); public abstract JObject getField3(); public abstract void setField3(JObject x); public abstract Map<Short, Double> getField4(); } @PermazenType public abstract static class FieldTypes3 implements JObject { public abstract JObject getField1(); public abstract void setField1(JObject x); public abstract List<String> getField2(); public abstract int getField3(); public abstract void setField3(int x); public abstract Set<FieldTypes3> getField4(); } // Conflicting Model Classes @PermazenType public abstract static class Conflictor1 implements JObject { @JField(indexed = true) public abstract int getField1(); public abstract void setField1(int x); } @PermazenType public abstract static class Conflictor2 implements JObject { @JField(indexed = true) public abstract String getField1(); public abstract void setField1(String x); } // Note map key fields must be congruent, even if only value field is indexed (because the key is part of the index) @PermazenType public abstract static class Conflictor3 implements JObject { @JMapField(value = @JField(indexed = true)) public abstract Map<Float, String> getField1(); } @PermazenType public abstract static class Conflictor4 implements JObject { @JMapField(value = @JField(indexed = true)) public abstract Map<Double, String> getField1(); } // But map value fields can be different, if only key field is indexed @PermazenType public abstract static class NonConflictor1 implements JObject { @JMapField(key = @JField(indexed = true)) public abstract Map<String, Float> getField1(); } @PermazenType public abstract static class NonConflictor2 implements JObject { @JMapField(key = @JField(indexed = true)) public abstract Map<String, Double> getField1(); } }
permazen/permazen
permazen-main/src/test/java/io/permazen/FieldTypesConflictTest.java
Java
apache-2.0
5,747
package net.finmath.montecarlo; import java.text.DecimalFormat; import org.apache.commons.math3.complex.Complex; import org.junit.Test; import net.finmath.stochastic.RandomVariable; import net.finmath.time.TimeDiscretization; import net.finmath.time.TimeDiscretizationFromArray; /** * We test the Variance Gamma process Monte Carlo implementation by estimating the characteristic function. * * @author Alessandro Gnoatto * */ public class VarianceGammaTest { static final DecimalFormat formatterReal2 = new DecimalFormat("+#,##00.0000;-#"); @Test public void testCharacteristicFunction() { // The parameters final int seed = 53252; final int numberOfFactors = 1; final int numberOfPaths = 10000; final double lastTime = 10; final double dt = 0.1; // Create the time discretization final TimeDiscretization timeDiscretization = new TimeDiscretizationFromArray(0.0, (int)(lastTime/dt), dt); final double sigma = 0.25; final double nu = 0.1; final double theta = 0.4; final VarianceGammaProcess varianceGamma = new VarianceGammaProcess(sigma, nu, theta, timeDiscretization, numberOfFactors, numberOfPaths, seed); //Initialize process RandomVariable process = varianceGamma.getIncrement(0, 0).mult(0.0); final Complex z = new Complex(1.0,-1.0); //Sum over increments to construct the process path for(int i = 0; i< timeDiscretization.getNumberOfTimeSteps()-1; i++) { final Complex monteCarloCF = characteristicFunctionByMonteCarlo(z, process); final RandomVariable increment = varianceGamma.getIncrement(i, 0); process = process.add(increment); final Complex exactCF = getCharacteristicFunction(timeDiscretization.getTime(i),z,varianceGamma); System.out.println(formatterReal2.format(exactCF.getReal()) + "\t" +formatterReal2.format(exactCF.getImaginary()) + "\t" + "\t" + formatterReal2.format(monteCarloCF.getReal()) + "\t" +formatterReal2.format(monteCarloCF.getImaginary())); } } public Complex characteristicFunctionByMonteCarlo(final Complex zeta, final RandomVariable processAtTime) { final int states = processAtTime.getRealizations().length; Complex runningSum = new Complex(0.0,0.0); for(int i = 0; i< states; i++) { runningSum = runningSum.add((Complex.I.multiply(zeta.multiply(processAtTime.get(i)))).exp()); } return runningSum.divide(states); } /* * Helper method to compute the characteristic function in closed form. */ public Complex getCharacteristicFunction(final double time, final Complex zeta, final VarianceGammaProcess process) { final double nu = process.getNu(); final double sigma = process.getSigma(); final double theta = process.getTheta(); final Complex numerator = Complex.ONE; final Complex denominator = (Complex.ONE).subtract(Complex.I.multiply(zeta.multiply(theta*nu))).add(zeta.multiply(zeta).multiply(sigma*sigma*0.5*nu)); return (((numerator.divide(denominator)).log()).multiply(time/nu)).exp(); } }
finmath/finmath-lib
src/test/java8/net/finmath/montecarlo/VarianceGammaTest.java
Java
apache-2.0
2,965
/** * 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.reef.wake.remote.transport.netty; import io.netty.channel.ChannelInboundHandlerAdapter; /** * Factory that creates a Netty channel handler */ interface NettyChannelHandlerFactory { /** * Creates a channel inbound handler * * @return a channel inbound handler adapter */ ChannelInboundHandlerAdapter createChannelInboundHandler(); }
beysims/reef
lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/remote/transport/netty/NettyChannelHandlerFactory.java
Java
apache-2.0
1,182
goog.provide('nclosure.examples.animals.IAnimal'); /** * This is the base animal interface that will be inherited by all animals. * * @interface */ nclosure.examples.animals.IAnimal = function() {}; /** * Makes the animal talk in its own special way */ nclosure.examples.animals.IAnimal.prototype.talk = goog.abstractMethod;
rakyll/nclosure
examples/animals/ianimal.js
JavaScript
apache-2.0
337
<?php /* * Copyright 2014 Google Inc. * * 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. */ namespace Google\Service\DataLabeling; class GoogleCloudDatalabelingV1beta1ImageClassificationConfig extends \Google\Model { /** * @var bool */ public $allowMultiLabel; /** * @var string */ public $annotationSpecSet; /** * @var string */ public $answerAggregationType; /** * @param bool */ public function setAllowMultiLabel($allowMultiLabel) { $this->allowMultiLabel = $allowMultiLabel; } /** * @return bool */ public function getAllowMultiLabel() { return $this->allowMultiLabel; } /** * @param string */ public function setAnnotationSpecSet($annotationSpecSet) { $this->annotationSpecSet = $annotationSpecSet; } /** * @return string */ public function getAnnotationSpecSet() { return $this->annotationSpecSet; } /** * @param string */ public function setAnswerAggregationType($answerAggregationType) { $this->answerAggregationType = $answerAggregationType; } /** * @return string */ public function getAnswerAggregationType() { return $this->answerAggregationType; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(GoogleCloudDatalabelingV1beta1ImageClassificationConfig::class, 'Google_Service_DataLabeling_GoogleCloudDatalabelingV1beta1ImageClassificationConfig');
googleapis/google-api-php-client-services
src/DataLabeling/GoogleCloudDatalabelingV1beta1ImageClassificationConfig.php
PHP
apache-2.0
1,957
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_60) on Mon Mar 28 17:12:20 AEST 2016 --> <title>Uses of Interface org.apache.river.fiddler.Fiddler (River-Internet vtrunk API Documentation (internals))</title> <meta name="date" content="2016-03-28"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Interface org.apache.river.fiddler.Fiddler (River-Internet vtrunk API Documentation (internals))"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/river/fiddler/class-use/Fiddler.html" target="_top">Frames</a></li> <li><a href="Fiddler.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Interface org.apache.river.fiddler.Fiddler" class="title">Uses of Interface<br>org.apache.river.fiddler.Fiddler</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.apache.river.fiddler">org.apache.river.fiddler</a></td> <td class="colLast"> <div class="block">Provides the server side of an implementation of the lookup discovery service (see <code><a href="../../../../../net/jini/discovery/LookupDiscoveryService.html" title="interface in net.jini.discovery"><code>LookupDiscoveryService</code></a></code>).</div> </td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.apache.river.fiddler"> <!-- --> </a> <h3>Uses of <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a> in <a href="../../../../../org/apache/river/fiddler/package-summary.html">org.apache.river.fiddler</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> <caption><span>Classes in <a href="../../../../../org/apache/river/fiddler/package-summary.html">org.apache.river.fiddler</a> that implement <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>(package private) class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/ActivatableFiddlerImpl.html" title="class in org.apache.river.fiddler">ActivatableFiddlerImpl</a></span></code> <div class="block">Convenience class intended for use with the <a href="../../../../../org/apache/river/start/ServiceStarter.html" title="class in org.apache.river.start"><code>ServiceStarter</code></a> framework to start an implementation of Fiddler that is activatable, and which will log its state information to persistent storage.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>(package private) class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerImpl.html" title="class in org.apache.river.fiddler">FiddlerImpl</a></span></code> <div class="block">This class is the server side of an implementation of the lookup discovery service.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>(package private) class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/NonActivatableFiddlerImpl.html" title="class in org.apache.river.fiddler">NonActivatableFiddlerImpl</a></span></code> <div class="block">Convenience class intended for use with the <a href="../../../../../org/apache/river/start/ServiceStarter.html" title="class in org.apache.river.start"><code>ServiceStarter</code></a> framework to start an implementation of Fiddler that is not activatable, but which will log its state information to persistent storage.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>(package private) class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/TransientFiddlerImpl.html" title="class in org.apache.river.fiddler">TransientFiddlerImpl</a></span></code> <div class="block">Convenience class intended for use with the <a href="../../../../../org/apache/river/start/ServiceStarter.html" title="class in org.apache.river.start"><code>ServiceStarter</code></a> framework to start a <i>transient</i> (non-activatable, non-persistent) implementation of Fiddler.</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> <caption><span>Fields in <a href="../../../../../org/apache/river/fiddler/package-summary.html">org.apache.river.fiddler</a> declared as <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>private <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerImpl.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerImpl.html#innerProxy">innerProxy</a></span></code> <div class="block">The inner proxy (stub or dynamic proxy) to this server</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>(package private) <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerRegistration.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.html#server">server</a></span></code> <div class="block">The reference through which communication occurs between the client-side and the server-side of the lookup discovery service</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>(package private) <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.html#server">server</a></span></code> <div class="block">The reference through which communication occurs between the client-side and the server-side of the lookup discovery service</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>(package private) <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLeaseMap.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLeaseMap.html#server">server</a></span></code> <div class="block">The reference to the back-end server of the lookup discovery service</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>(package private) <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLease.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.html#server">server</a></span></code> <div class="block">The reference to the back-end server of the lookup discovery service that granted this lease (the granting entity).</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>(package private) <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerAdminProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerAdminProxy.html#server">server</a></span></code> <div class="block">The reference through which communication occurs between the client-side and the server-side of the lookup discovery service</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../org/apache/river/fiddler/package-summary.html">org.apache.river.fiddler</a> that return <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.html#check-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">check</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerRegistration.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.html#check-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.core.event.EventRegistration-">check</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event">EventRegistration</a>&nbsp;eventReg)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerRegistration.ConstrainableFiddlerRegistration.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.ConstrainableFiddlerRegistration.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerProxy.ConstrainableFiddlerProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.ConstrainableFiddlerProxy.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLeaseMap.ConstrainableFiddlerLeaseMap.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLeaseMap.ConstrainableFiddlerLeaseMap.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLease.ConstrainableFiddlerLease.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.ConstrainableFiddlerLease.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerAdminProxy.ConstrainableFiddlerAdminProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerAdminProxy.ConstrainableFiddlerAdminProxy.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>(package private) <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLease.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.html#getServer--">getServer</a></span>()</code> <div class="block">Returns a reference to the back-end server of the lookup discovery service that granted this lease.</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../org/apache/river/fiddler/package-summary.html">org.apache.river.fiddler</a> with parameters of type <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>private static boolean</code></td> <td class="colLast"><span class="typeNameLabel">ProxyVerifier.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/ProxyVerifier.html#check-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">check</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;innerProxy, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.html#check-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">check</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerRegistration.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.html#check-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.core.event.EventRegistration-">check</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event">EventRegistration</a>&nbsp;eventReg)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private static boolean</code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLease.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.html#check-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.id.Uuid-">check</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;serverID, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerRegistration.ConstrainableFiddlerRegistration.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.ConstrainableFiddlerRegistration.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerProxy.ConstrainableFiddlerProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.ConstrainableFiddlerProxy.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLeaseMap.ConstrainableFiddlerLeaseMap.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLeaseMap.ConstrainableFiddlerLeaseMap.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLease.ConstrainableFiddlerLease.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.ConstrainableFiddlerLease.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerAdminProxy.ConstrainableFiddlerAdminProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerAdminProxy.ConstrainableFiddlerAdminProxy.html#constrainServer-org.apache.river.fiddler.Fiddler-net.jini.core.constraint.MethodConstraints-">constrainServer</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;constraints)</code> <div class="block">Returns a copy of the given server proxy having the client method constraints that result after the specified method mapping is applied to the given client method constraints.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../../../../../org/apache/river/fiddler/FiddlerAdminProxy.html" title="class in org.apache.river.fiddler">FiddlerAdminProxy</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerAdminProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerAdminProxy.html#createAdminProxy-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">createAdminProxy</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code> <div class="block">Public static factory method that creates and returns an instance of <code>FiddlerAdminProxy</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../../org/apache/river/fiddler/FiddlerLease.html" title="class in org.apache.river.fiddler">FiddlerLease</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerLease.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.html#createLease-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.id.Uuid-net.jini.id.Uuid-long-">createLease</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;serverID, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;leaseID, long&nbsp;expiration)</code> <div class="block">Public static factory method that creates and returns an instance of <code>FiddlerLease</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.html" title="class in org.apache.river.fiddler">FiddlerRegistration</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerRegistration.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.html#createRegistration-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.core.event.EventRegistration-">createRegistration</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event">EventRegistration</a>&nbsp;eventReg)</code> <div class="block">Public static factory method that creates and returns an instance of <code>FiddlerRegistration</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../../org/apache/river/fiddler/FiddlerProxy.html" title="class in org.apache.river.fiddler">FiddlerProxy</a></code></td> <td class="colLast"><span class="typeNameLabel">FiddlerProxy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.html#createServiceProxy-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">createServiceProxy</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code> <div class="block">Public static factory method that creates and returns an instance of <code>FiddlerProxy</code>.</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> <caption><span>Constructors in <a href="../../../../../org/apache/river/fiddler/package-summary.html">org.apache.river.fiddler</a> with parameters of type <a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerAdminProxy.ConstrainableFiddlerAdminProxy.html#ConstrainableFiddlerAdminProxy-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.core.constraint.MethodConstraints-">ConstrainableFiddlerAdminProxy</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;methodConstraints)</code> <div class="block">Constructs a new <code>ConstrainableFiddlerAdminProxy</code> instance.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.ConstrainableFiddlerLease.html#ConstrainableFiddlerLease-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.id.Uuid-net.jini.id.Uuid-long-net.jini.core.constraint.MethodConstraints-">ConstrainableFiddlerLease</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;serverID, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;leaseID, long&nbsp;expiration, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;methodConstraints)</code> <div class="block">Constructs a new <code>ConstrainableFiddlerLease</code> instance.</div> </td> </tr> <tr class="altColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLeaseMap.ConstrainableFiddlerLeaseMap.html#ConstrainableFiddlerLeaseMap-org.apache.river.fiddler.Fiddler-org.apache.river.fiddler.FiddlerLease-long-net.jini.core.constraint.MethodConstraints-">ConstrainableFiddlerLeaseMap</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../org/apache/river/fiddler/FiddlerLease.html" title="class in org.apache.river.fiddler">FiddlerLease</a>&nbsp;lease, long&nbsp;duration, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;methodConstraints)</code> <div class="block">Constructs a new <code>ConstrainableFiddlerLeaseMap</code> instance.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.ConstrainableFiddlerProxy.html#ConstrainableFiddlerProxy-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.core.constraint.MethodConstraints-">ConstrainableFiddlerProxy</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;methodConstraints)</code> <div class="block">Constructs a new <code>ConstrainableFiddlerProxy</code> instance.</div> </td> </tr> <tr class="altColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.ConstrainableFiddlerRegistration.html#ConstrainableFiddlerRegistration-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.core.event.EventRegistration-net.jini.core.constraint.MethodConstraints-">ConstrainableFiddlerRegistration</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event">EventRegistration</a>&nbsp;eventReg, <a href="../../../../../net/jini/core/constraint/MethodConstraints.html" title="interface in net.jini.core.constraint">MethodConstraints</a>&nbsp;methodConstraints)</code> <div class="block">Constructs a new <code>ConstrainableFiddlerRegistration</code> instance.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerAdminProxy.html#FiddlerAdminProxy-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">FiddlerAdminProxy</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code> <div class="block">Constructs a new instance of FiddlerAdminProxy.</div> </td> </tr> <tr class="altColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLease.html#FiddlerLease-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.id.Uuid-net.jini.id.Uuid-long-">FiddlerLease</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;serverID, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;leaseID, long&nbsp;expiration)</code> <div class="block">Constructs a proxy to the lease the Fiddler implementation of the lookup discovery service places on a client's requested registration.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerLeaseMap.html#FiddlerLeaseMap-org.apache.river.fiddler.Fiddler-org.apache.river.fiddler.FiddlerLease-long-">FiddlerLeaseMap</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../org/apache/river/fiddler/FiddlerLease.html" title="class in org.apache.river.fiddler">FiddlerLease</a>&nbsp;lease, long&nbsp;duration)</code> <div class="block">Constructs a new instance of FiddlerLeaseMap.</div> </td> </tr> <tr class="altColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerProxy.html#FiddlerProxy-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">FiddlerProxy</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code> <div class="block">Constructs a new instance of FiddlerProxy.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/FiddlerRegistration.html#FiddlerRegistration-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-net.jini.core.event.EventRegistration-">FiddlerRegistration</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;server, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;registrationID, <a href="../../../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event">EventRegistration</a>&nbsp;eventReg)</code> <div class="block">Constructs a new instance of FiddlerRegistration.</div> </td> </tr> <tr class="altColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/ProxyVerifier.html#ProxyVerifier-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-">ProxyVerifier</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;innerProxy, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID)</code> <div class="block">Constructs an instance of <code>TrustVerifier</code> that can be used to determine whether or not a given proxy is equivalent in trust, content, and function to the service's <code>innerProxy</code> referenced in the class constructed here.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/river/fiddler/ProxyVerifier.html#ProxyVerifier-org.apache.river.fiddler.Fiddler-net.jini.id.Uuid-boolean-">ProxyVerifier</a></span>(<a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Fiddler</a>&nbsp;innerProxy, <a href="../../../../../net/jini/id/Uuid.html" title="class in net.jini.id">Uuid</a>&nbsp;proxyID, boolean&nbsp;check)</code>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/river/fiddler/Fiddler.html" title="interface in org.apache.river.fiddler">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/river/fiddler/class-use/Fiddler.html" target="_top">Frames</a></li> <li><a href="Fiddler.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright 2007-2013, multiple authors.<br>Licensed under the <a href=http://www.apache.org/licenses/LICENSE-2.0 target=child >Apache License, Version 2.0</a>, see the <a href=../../../../../doc-files/NOTICE target=child >NOTICE</a> file for attributions.</small></p> </body> </html>
pfirmstone/JGDMS
JGDMS/src/site/resources/old-static-site/doc/internals/org/apache/river/fiddler/class-use/Fiddler.html
HTML
apache-2.0
44,666
/* * Copyright 2016 OpenMarket Ltd * * 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 im.vector.activity; import android.content.Intent; import android.os.Bundle; import org.matrix.androidsdk.MXSession; import im.vector.Matrix; import im.vector.R; import im.vector.fragments.VectorSettingsPreferencesFragment; /** * Displays the client settings. */ public class VectorSettingsActivity extends MXCActionBarActivity { // session private MXSession mSession; // the UI items private VectorSettingsPreferencesFragment mFragment; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = getIntent(); mSession = getSession(intent); if (null == mSession) { mSession = Matrix.getInstance(VectorSettingsActivity.this).getDefaultSession(); } if (mSession == null) { finish(); return; } setContentView(R.layout.activity_vector_settings); // display the fragment mFragment = VectorSettingsPreferencesFragment.newInstance(mSession.getMyUserId()); getFragmentManager().beginTransaction().replace(R.id.vector_settings_page, mFragment).commit(); } @Override protected void onActivityResult(int requestCode, int resultCode, final Intent data) { super.onActivityResult(requestCode, resultCode, data); // pass the result to the fragment mFragment.onActivityResult(requestCode, resultCode, data); } }
floviolleau/vector-android
vector/src/main/java/im/vector/activity/VectorSettingsActivity.java
Java
apache-2.0
2,063
require 'slim' set :markdown_engine, :redcarpet set :markdown, fenced_code_blocks: true, tables: true, no_intra_emphasis: true, with_toc_data: true require 'lib/lexer_habitat_studio' activate :vegas ### # Page options, layouts, aliases and proxies ### # Per-page layout changes: # # With no layout page '/*.xml', layout: false page '/*.json', layout: false page '/*.txt', layout: false page '/blog/feed.xml', layout: false # With alternative layout page 'about/*', layout: :sidebar, locals: { sidebar_layout: 'about' } page 'docs/*', layout: :sidebar, locals: { sidebar_layout: 'docs' } page 'legal/*', layout: :sidebar, locals: { sidebar_layout: 'legal' } page 'tutorials/index.html', layout: :tutorials page 'tutorials/get-started/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'get_started' } page 'tutorials/download/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'download' } page 'tutorials/sample-app/linux/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'sample_app_linux' } page 'tutorials/sample-app/windows/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'sample_app_windows' } page 'tutorials/sample-app/mac/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'sample_app_mac' } page 'tutorials/sample-app/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'sample_app' } page 'tutorials/build-your-own/index.html', layout: :tutorials_sidebar, locals: { sidebar_layout: 'build_web_app'} page 'tutorials/build-your-own/ruby/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'build_web_app_ruby'} page 'tutorials/build-your-own/node/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'build_web_app_node'} page 'tutorials/build-your-own/gradle/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'build_web_app_gradle'} page 'tutorials/build-your-own/aspnet-core/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'build_web_app_aspnet-core'} page '/blog/index.html', layout: :blog_index page '/demo/packaging-system/steps/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'demo_packaging_system'} page '/demo/build-system/steps/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'demo_build_system'} page '/demo/process-supervisor/steps/*', layout: :tutorials_sidebar, locals: { sidebar_layout: 'demo_process_supervisor'} page 'get-started/*', layout: :get_started page 'guides/index.html', layout: :get_started page 'guides/rails/*', layout: :sidebar, locals: { sidebar_layout: 'guide_rails' } activate :blog do |blog| blog.prefix = 'blog' blog.layout = 'layouts/blog_post' blog.permalink = '{year}/{month}/{title}.html' blog.default_extension = '.md' blog.summary_separator = /READMORE/ blog.summary_length = 250 blog.paginate = true blog.per_page = 10 blog.page_link = 'page/{num}' blog.taglink = ':tag.html' blog.tag_template = 'blog/tag.html' blog.calendar_template = 'blog/calendar.html' end ### # Helpers ### # Methods defined in the helpers block are available in templates require 'lib/sidebar_helpers' require 'lib/blog_helpers' helpers SidebarHelpers helpers BlogHelpers helpers do def layout_class layout = current_page.options.fetch(:layout, nil) if layout == :sidebar 'has-sidebar' elsif layout == :try 'try-hab' elsif layout == :blog_post 'blogs' elsif layout == :blog_index 'has-sidebar' elsif layout == :tutorials 'tutorials' else '' end end def path_starts_with?(path) current_page.path.start_with?(path) end def github_app_url ENV['GITHUB_APP_URL'] || 'https://github.com/apps/habitat-builder' end def builder_web_url ENV['BUILDER_WEB_URL'] || 'https://bldr.habitat.sh' end def github_www_source_url ENV['GITHUB_WWW_SOURCE_URL'] || 'https://github.com/habitat-sh/habitat/tree/master/www/source' end def render_markdown(text) Kramdown::Document.new(text).to_html end end configure :development do # Reload the browser automatically whenever files change activate :livereload end configure :build do # Asset hash to defeat caching between builds activate :asset_hash, :ignore => [/habitat-social.jpg/] end activate :autoprefixer activate :directory_indexes set :trailing_slash, false activate :s3_sync do |s3_sync| s3_sync.path_style = false s3_sync.region = ENV['AWS_DEFAULT_REGION'] end ### # Redirects ### redirect 'about/index.html', to: '/about/announcement/' redirect 'docs/build-packages-overview.html', to: '/docs/developing-packages#plan-builds/' redirect 'docs/get-habitat.html', to: '/tutorials/download/' redirect 'docs/try.html', to: '/docs/install-habitat/' redirect 'download/index.html', to: '/docs/install-habitat/' redirect 'downloads/index.html', to: '/docs/install-habitat/' redirect 'try/index.html', to: '/tutorials/get-started/demo/' redirect 'try/index.html', to: '/learn/' redirect 'try/2/index.html', to: '/learn/' redirect 'try/3/index.html', to: '/learn/' redirect 'try/4/index.html', to: '/learn/' redirect 'try/5/index.html', to: '/learn/' redirect 'try/6/index.html', to: '/learn/' redirect 'try/7/index.html', to: '/learn/' redirect 'try/8/index.html', to: '/learn/' redirect 'try/9/index.html', to: '/learn/' redirect 'try/10/index.html', to: '/learn/' redirect 'tutorials/index.html', to: '/learn/' redirect 'tutorials/download/index.html', to: '/docs/install-habitat/' redirect 'tutorials/download/configure-workstation/index.html', to: '/docs/install-habitat/#configure-workstation' redirect 'tutorials/getting-started/linux/add-hooks/index.html', to: '/learn/' redirect 'tutorials/getting-started/linux/basic-concepts/index.html', to: '/learn/' redirect 'tutorials/getting-started/linux/create-plan/index.html', to: '/learn/' redirect 'tutorials/getting-started/linux/configure-plan/index.html', to: '/learn/' redirect 'tutorials/getting-started/linux/process-build/index.html', to: '/learn/' redirect 'tutorials/getting-started/linux/setup-environment/index.html', to: '/learn/' redirect 'tutorials/getting-started/mac/add-hooks/index.html', to: '/learn/' redirect 'tutorials/getting-started/mac/basic-concepts/index.html', to: '/learn/' redirect 'tutorials/getting-started/mac/create-plan/index.html', to: '/learn/' redirect 'tutorials/getting-started/mac/configure-plan/index.html', to: '/learn/' redirect 'tutorials/getting-started/mac/process-build/index.html', to: '/learn/' redirect 'tutorials/getting-started/mac/setup-environment/index.html', to: '/learn/' redirect 'tutorials/getting-started/windows/add-hooks/index.html', to: '/learn/' redirect 'tutorials/getting-started/windows/basic-concepts/index.html', to: '/learn/' redirect 'tutorials/getting-started/windows/create-plan/index.html', to: '/learn/' redirect 'tutorials/getting-started/windows/configure-plan/index.html', to: '/learn/' redirect 'tutorials/getting-started/windows/process-build/index.html', to: '/learn/' redirect 'tutorials/getting-started/windows/setup-environment/index.html', to: '/learn/' redirect 'tutorials/sample-app/basic-concepts/index.html', to: '/tutorials/sample-app/' redirect 'docs/overview/index.html', to: '/docs/' redirect 'docs/create-packages-overview/index.html', to: '/docs/developing-packages/' redirect 'docs/create-plans/index.html', to: '/docs/developing-packages/#write-plans' redirect 'docs/create-packages-configure/index.html', to: '/docs/developing-packages#add-configuration' redirect 'docs/create-packages-build/index.html', to: '/docs/developing-packages#plan-builds' redirect 'docs/create-packages-debugging/index.html', to: '/docs/developing-packages#debug-builds' redirect 'docs/create-packages-binary-only/index.html', to: '/docs/best-practices#binary-wrapper' redirect 'docs/run-packages-overview/index.html', to: '/docs/using-habitat#using-packages' redirect 'docs/run-packages-service-groups/index.html', to: '/docs/using-habitat#service-groups' redirect 'docs/run-packages-topologies/index.html', to: '/docs/using-habitat#topologies' redirect 'docs/run-packages-apply-config-updates/index.html', to: '/docs/using-habitat#config-updates' redirect 'docs/run-packages-upload-files/index.html', to: '/docs/using-habitat#file-uploads' redirect 'docs/run-packages-security/index.html', to: '/docs/using-habitat#using-encryption' redirect 'docs/run-packages-binding/index.html', to: '/docs/developing-packages#pkg-binds' redirect 'docs/run-packages-update-strategy/index.html', to: '/docs/using-habitat#using-updates' redirect 'docs/run-packages-multiple-services/index.html', to: '/docs/using-habitat#using-packages' redirect 'docs/run-packages-export/index.html', to: '/docs/developing-packages#pkg-binds' redirect 'docs/run-packages-monitoring/index.html', to: '/docs/using-habitat#monitor-services-through-the-http-api' redirect 'docs/share-packages-overview/index.html', to: '/docs/developing-packages#sharing-pkgs' redirect 'docs/continuous-deployment-overview/index.html', to: '/docs/' redirect 'docs/container-orchestration/index.html', to: '/docs/best-practices#container-orchestration' redirect 'docs/container-orchestration-ecs/index.html', to: '/docs/best-practices#ecs-and-habitat' redirect 'docs/container-orchestration-mesos/index.html', to: '/docs/best-practices#mesos-dcos' redirect 'docs/container-orchestration-kubernetes/index.html', to: '/docs/best-practices#kubernetes' redirect 'docs/internals-overview/index.html', to: '/docs/internals/' redirect 'docs/internals-supervisor/index.html', to: '/docs/internals/#supervisor-internals' redirect 'docs/internals-leader-election/index.html', to: '/docs/internals#election-internals' redirect 'docs/internals-crypto/index.html', to: '/docs/internals#crypto-internals' redirect 'docs/internals-bootstrapping/index.html', to: '/docs/internals#bootstrap-internals' redirect 'docs/reference/habitat-cli/index.html', to: '/docs/habitat-cli' redirect 'docs/reference/plan-syntax/index.html', to: '/docs/reference' redirect 'docs/reference/basic-settings/index.html', to: '/docs/reference/#plan-settings' redirect 'docs/reference/callbacks/index.html', to: '/docs/reference/#reference-callbacks' redirect 'docs/reference/build-variables/index.html', to: '/docs/reference/#plan-variables' redirect 'docs/reference/hooks/index.html', to: '/docs/reference/#reference-hooks' redirect 'docs/reference/runtime-settings/index.html', to: '/docs/reference/#template-data' redirect 'docs/reference/utility-functions/index.html', to: '/docs/reference/#utility-functions' redirect 'docs/reference/environment-vars/index.html', to: '/docs/reference/#environment-variables' redirect 'docs/reference/package-contents/index.html', to: '/docs/reference/#package-contents' redirect 'docs/reference/log-keys/index.html', to: '/docs/reference/#sup-log-keys' redirect 'docs/reference/habitat-infographics/index.html', to: '/docs/diagrams' redirect 'docs/contribute-help-build/index.html', to: '/docs/contribute' redirect 'docs/concepts-scaffolding/index.html', to: '/docs/glossary/#glossary-scaffolding' redirect 'docs/concepts-supervisor/index.html', to: '/docs/glossary/#glossary-supervisor' redirect 'docs/concepts-plans/index.html', to: '/docs/glossary/#glossary-plan' redirect 'docs/concepts-packages/index.html', to: '/docs/glossary/#glossary-packages' redirect 'docs/concepts-keys/index.html', to: '/docs/glossary/#glossary-keys' redirect 'docs/concepts-studio/index.html', to: '/docs/glossary/#glossary-studio' redirect 'docs/concepts-services/index.html', to: '/docs/glossary/#glossary-services' redirect 'docs/concepts-depot/index.html', to: '/docs/glossary/#glossary-builder' redirect 'docs/concepts-overview/index.html', to: '/docs/glossary/' redirect 'get-started/index.html', to: '/learn/' redirect 'kubernetes/index.html', to: '/get-started/kubernetes/' redirect 'demo/index.html', to: '/learn/' redirect 'demo/packaging-system/index.html', to: '/demo/packaging-system/steps/1' redirect 'demo/build-system/index.html', to: '/demo/build-system/steps/1' redirect 'demo/process-supervisor/index.html', to: '/demo/process-supervisor/steps/1' redirect 'legal/index.html', to: '/legal/licensing' redirect 'cloudfoundry/index.html', to: '/get-started/cloudfoundry' redirect 'pricing/index.html', to: '/enterprise'
georgemarshall/habitat
www/config.rb
Ruby
apache-2.0
12,210
# API Docs - v4.2.4 ## Core ### and *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the results of AND operation for all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> and(<BOOL> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that needs to be AND operation.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">BOOL</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from cscStream#window.lengthBatch(10) select and(isFraud) as isFraudTransaction insert into alertStream; ``` <p style="word-wrap: break-word">This will returns the result for AND operation of isFraud values as a boolean value for event chunk expiry by window length batch.</p> ### avg *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Calculates the average for all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <DOUBLE> avg(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that need to be averaged.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream#window.timeBatch select avg(temp) as avgTemp insert into barStream; ``` <p style="word-wrap: break-word">avg(temp) returns the average temp value for all the events based on their arrival and expiry.</p> ### count *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the count of all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <LONG> count() ``` <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream#window.timeBatch(10 sec) select count() as count insert into barStream; ``` <p style="word-wrap: break-word">This will return the count of all the events for time batch in 10 seconds.</p> ### distinctCount *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the count of distinct occurrences for a given arg.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <LONG> distinctCount(<INT|LONG|DOUBLE|FLOAT|STRING> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that should be counted.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select distinctcount(pageID) as count insert into barStream; ``` <p style="word-wrap: break-word">distinctcount(pageID) for the following output returns 3.<br>&nbsp;"WEB_PAGE_1"<br>&nbsp;"WEB_PAGE_1"<br>&nbsp;"WEB_PAGE_2"<br>&nbsp;"WEB_PAGE_3"<br>&nbsp;"WEB_PAGE_1"<br>&nbsp;"WEB_PAGE_2"</p> ### max *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the maximum value for all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT> max(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that needs to be compared to find the maximum value.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream#window.timeBatch(10 sec) select max(temp) as maxTemp insert into barStream; ``` <p style="word-wrap: break-word">max(temp) returns the maximum temp value recorded for all the events based on their arrival and expiry.</p> ### maxForever *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">This is the attribute aggregator to store the maximum value for a given attribute throughout the lifetime of the query regardless of any windows in-front.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT> maxForever(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that needs to be compared to find the maximum value.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from inputStream select maxForever(temp) as max insert into outputStream; ``` <p style="word-wrap: break-word">maxForever(temp) returns the maximum temp value recorded for all the events throughout the lifetime of the query.</p> ### min *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the minimum value for all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT> min(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that needs to be compared to find the minimum value.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from inputStream select min(temp) as minTemp insert into outputStream; ``` <p style="word-wrap: break-word">min(temp) returns the minimum temp value recorded for all the events based on their arrival and expiry.</p> ### minForever *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">This is the attribute aggregator to store the minimum value for a given attribute throughout the lifetime of the query regardless of any windows in-front.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT> minForever(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that needs to be compared to find the minimum value.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from inputStream select minForever(temp) as max insert into outputStream; ``` <p style="word-wrap: break-word">minForever(temp) returns the minimum temp value recorded for all the events throughoutthe lifetime of the query.</p> ### or *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the results of OR operation for all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> or(<BOOL> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that needs to be OR operation.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">BOOL</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from cscStream#window.lengthBatch(10) select or(isFraud) as isFraudTransaction insert into alertStream; ``` <p style="word-wrap: break-word">This will returns the result for OR operation of isFraud values as a boolean value for event chunk expiry by window length batch.</p> ### stdDev *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the calculated standard deviation for all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <DOUBLE> stdDev(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that should be used to calculate the standard deviation.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from inputStream select stddev(temp) as stdTemp insert into outputStream; ``` <p style="word-wrap: break-word">stddev(temp) returns the calculated standard deviation of temp for all the events based on their arrival and expiry.</p> ### sum *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Returns the sum for all the events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <LONG|DOUBLE> sum(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The value that needs to be summed.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from inputStream select sum(volume) as sumOfVolume insert into outputStream; ``` <p style="word-wrap: break-word">This will returns the sum of volume values as a long value for each event arrival and expiry.</p> ### unionSet *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#aggregate-function">(Aggregate Function)</a>* <p style="word-wrap: break-word">Union multiple sets. <br>&nbsp;This attribute aggregator maintains a union of sets. The given input set is put into the union set and the union set is returned.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <OBJECT> unionSet(<OBJECT> set) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">set</td> <td style="vertical-align: top; word-wrap: break-word">The java.util.Set object that needs to be added into the union set.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from stockStream select createSet(symbol) as initialSet insert into initStream from initStream#window.timeBatch(10 sec) select unionSet(initialSet) as distinctSymbols insert into distinctStockStream; ``` <p style="word-wrap: break-word">distinctStockStream will return the set object which contains the distinct set of stock symbols received during a sliding window of 10 seconds.</p> ### UUID *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Generates a UUID (Universally Unique Identifier).</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <STRING> UUID() ``` <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from TempStream select convert(roomNo, 'string') as roomNo, temp, UUID() as messageID insert into RoomTempStream; ``` <p style="word-wrap: break-word">This will converts a room number to string, introducing a message ID to each event asUUID() returns a34eec40-32c2-44fe-8075-7f4fde2e2dd8<br><br>from TempStream<br>select convert(roomNo, 'string') as roomNo, temp, UUID() as messageID<br>insert into RoomTempStream;</p> ### cast *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Converts the first parameter according to the cast.to parameter. Incompatible arguments cause Class Cast exceptions if further processed. This function is used with map extension that returns attributes of the object type. You can use this function to cast the object to an accurate and concrete type.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> cast(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> to.be.caster, <STRING> cast.to) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">to.be.caster</td> <td style="vertical-align: top; word-wrap: break-word">This specifies the attribute to be casted.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">cast.to</td> <td style="vertical-align: top; word-wrap: break-word">A string constant parameter expressing the cast to type using one of the following strings values: int, long, float, double, string, bool.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select symbol as name, cast(temp, 'double') as temp insert into barStream; ``` <p style="word-wrap: break-word">This will cast the fooStream temp field value into 'double' format.</p> ### coalesce *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Returns the value of the first input parameter that is not null, and all input parameters have to be on the same type.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> coalesce(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> args) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">args</td> <td style="vertical-align: top; word-wrap: break-word">This function accepts one or more parameters. They can belong to any one of the available types. All the specified parameters should be of the same type.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select coalesce('123', null, '789') as value insert into barStream; ``` <p style="word-wrap: break-word">This will returns first null value 123.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select coalesce(null, 76, 567) as value insert into barStream; ``` <p style="word-wrap: break-word">This will returns first null value 76.</p> <span id="example-3" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 3</span> ``` from fooStream select coalesce(null, null, null) as value insert into barStream; ``` <p style="word-wrap: break-word">This will returns null as there are no notnull values.</p> ### convert *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Converts the first input parameter according to the convertedTo parameter.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT|STRING|BOOL> convert(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL> to.be.converted, <STRING> converted.to) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">to.be.converted</td> <td style="vertical-align: top; word-wrap: break-word">This specifies the value to be converted.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">converted.to</td> <td style="vertical-align: top; word-wrap: break-word">A string constant parameter to which type the attribute need to be converted using one of the following strings values: 'int', 'long', 'float', 'double', 'string', 'bool'.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select convert(temp, 'double') as temp insert into barStream; ``` <p style="word-wrap: break-word">This will convert fooStream temp value into 'double'.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select convert(temp, 'int') as temp insert into barStream; ``` <p style="word-wrap: break-word">This will convert fooStream temp value into 'int' (value = "convert(45.9, 'int') returns 46").</p> ### createSet *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Includes the given input parameter in a java.util.HashSet and returns the set. </p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <OBJECT> createSet(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL> input) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">input</td> <td style="vertical-align: top; word-wrap: break-word">The input that needs to be added into the set.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from stockStream select createSet(symbol) as initialSet insert into initStream; ``` <p style="word-wrap: break-word">For every incoming stockStream event, the initStream stream will produce a set object having only one element: the symbol in the incoming stockStream.</p> ### currentTimeMillis *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Returns the current timestamp of siddhi application in milliseconds.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <LONG> currentTimeMillis() ``` <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select symbol as name, currentTimeMillis() as eventTimestamp insert into barStream; ``` <p style="word-wrap: break-word">This will extract current siddhi application timestamp.</p> ### default *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Checks if the 'attribute' parameter is null and if so returns the value of the 'default' parameter</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> default(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> attribute, <INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> default) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">attribute</td> <td style="vertical-align: top; word-wrap: break-word">The attribute that could be null.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">default</td> <td style="vertical-align: top; word-wrap: break-word">The default value that will be used when 'attribute' parameter is null</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from TempStream select default(temp, 0.0) as temp, roomNum insert into StandardTempStream; ``` <p style="word-wrap: break-word">This will replace TempStream's temp attribute with default value if the temp is null.</p> ### eventTimestamp *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Returns the timestamp of the processed event.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <LONG> eventTimestamp() ``` <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select symbol as name, eventTimestamp() as eventTimestamp insert into barStream; ``` <p style="word-wrap: break-word">This will extract current events timestamp.</p> ### ifThenElse *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Evaluates the 'condition' parameter and returns value of the 'if.expression' parameter if the condition is true, or returns value of the 'else.expression' parameter if the condition is false. Here both 'if.expression' and 'else.expression' should be of the same type.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> ifThenElse(<BOOL> condition, <INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> if.expression, <INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> else.expression) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">condition</td> <td style="vertical-align: top; word-wrap: break-word">This specifies the if then else condition value.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">BOOL</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">if.expression</td> <td style="vertical-align: top; word-wrap: break-word">This specifies the value to be returned if the value of the condition parameter is true.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">else.expression</td> <td style="vertical-align: top; word-wrap: break-word">This specifies the value to be returned if the value of the condition parameter is false.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @info(name = 'query1') from sensorEventStream select sensorValue, ifThenElse(sensorValue>35,'High','Low') as status insert into outputStream; ``` <p style="word-wrap: break-word">This will returns High if sensorValue = 50.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` @info(name = 'query1') from sensorEventStream select sensorValue, ifThenElse(voltage < 5, 0, 1) as status insert into outputStream; ``` <p style="word-wrap: break-word">This will returns 1 if voltage= 12.</p> <span id="example-3" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 3</span> ``` @info(name = 'query1') from userEventStream select userName, ifThenElse(password == 'admin', true, false) as passwordState insert into outputStream; ``` <p style="word-wrap: break-word">This will returns passwordState as true if password = admin.</p> ### instanceOfBoolean *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Checks whether the parameter is an instance of Boolean or not.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> instanceOfBoolean(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The parameter to be checked.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select instanceOfBoolean(switchState) as state insert into barStream; ``` <p style="word-wrap: break-word">This will return true if the value of switchState is true.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select instanceOfBoolean(value) as state insert into barStream; ``` <p style="word-wrap: break-word">if the value = 32 then this will returns false as the value is not an instance of the boolean.</p> ### instanceOfDouble *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Checks whether the parameter is an instance of Double or not.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> instanceOfDouble(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The parameter to be checked.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select instanceOfDouble(value) as state insert into barStream; ``` <p style="word-wrap: break-word">This will return true if the value field format is double ex : 56.45.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select instanceOfDouble(switchState) as state insert into barStream; ``` <p style="word-wrap: break-word">if the switchState = true then this will returns false as the value is not an instance of the double.</p> ### instanceOfFloat *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Checks whether the parameter is an instance of Float or not.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> instanceOfFloat(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The parameter to be checked.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select instanceOfFloat(value) as state insert into barStream; ``` <p style="word-wrap: break-word">This will return true if the value field format is float ex : 56.45f.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select instanceOfFloat(switchState) as state insert into barStream; ``` <p style="word-wrap: break-word">if the switchState = true then this will returns false as the value is an instance of the boolean not a float.</p> ### instanceOfInteger *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Checks whether the parameter is an instance of Integer or not.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> instanceOfInteger(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The parameter to be checked.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select instanceOfInteger(value) as state insert into barStream; ``` <p style="word-wrap: break-word">This will return true if the value field format is integer.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select instanceOfInteger(switchState) as state insert into barStream; ``` <p style="word-wrap: break-word">if the switchState = true then this will returns false as the value is an instance of the boolean not a long.</p> ### instanceOfLong *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Checks whether the parameter is an instance of Long or not.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> instanceOfLong(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The parameter to be checked.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select instanceOfLong(value) as state insert into barStream; ``` <p style="word-wrap: break-word">This will return true if the value field format is long ex : 56456l.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select instanceOfLong(switchState) as state insert into barStream; ``` <p style="word-wrap: break-word">if the switchState = true then this will returns false as the value is an instance of the boolean not a long.</p> ### instanceOfString *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Checks whether the parameter is an instance of String or not.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <BOOL> instanceOfString(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">The parameter to be checked.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT<br>STRING<br>BOOL<br>OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream select instanceOfString(value) as state insert into barStream; ``` <p style="word-wrap: break-word">This will return true if the value field format is string ex : 'test'.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream select instanceOfString(switchState) as state insert into barStream; ``` <p style="word-wrap: break-word">if the switchState = true then this will returns false as the value is an instance of the boolean not a string.</p> ### maximum *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Returns the maximum value of the input parameters.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT> maximum(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">This function accepts one or more parameters. They can belong to any one of the available types. All the specified parameters should be of the same type.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @info(name = 'query1') from inputStream select maximum(price1, price2, price3) as max insert into outputStream; ``` <p style="word-wrap: break-word">This will returns the maximum value of the input parameters price1, price2, price3.</p> ### minimum *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Returns the minimum value of the input parameters.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT|LONG|DOUBLE|FLOAT> minimum(<INT|LONG|DOUBLE|FLOAT> arg) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">arg</td> <td style="vertical-align: top; word-wrap: break-word">This function accepts one or more parameters. They can belong to any one of the available types. All the specified parameters should be of the same type.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>DOUBLE<br>FLOAT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @info(name = 'query1') from inputStream select maximum(price1, price2, price3) as max insert into outputStream; ``` <p style="word-wrap: break-word">This will returns the minimum value of the input parameters price1, price2, price3.</p> ### sizeOfSet *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#function">(Function)</a>* <p style="word-wrap: break-word">Returns the size of an object of type java.util.Set.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` <INT> sizeOfSet(<OBJECT> set) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">set</td> <td style="vertical-align: top; word-wrap: break-word">The set object. This parameter should be of type java.util.Set. A set object may be created by the 'set' attribute aggregator in Siddhi. </td> <td style="vertical-align: top"></td> <td style="vertical-align: top">OBJECT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from stockStream select initSet(symbol) as initialSet insert into initStream; ;from initStream#window.timeBatch(10 sec) select union(initialSet) as distinctSymbols insert into distinctStockStream; from distinctStockStream select sizeOfSet(distinctSymbols) sizeOfSymbolSet insert into sizeStream; ``` <p style="word-wrap: break-word">The sizeStream stream will output the number of distinct stock symbols received during a sliding window of 10 seconds.</p> ### pol2Cart *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#stream-function">(Stream Function)</a>* <p style="word-wrap: break-word">The pol2Cart function calculating the cartesian coordinates x & y for the given theta, rho coordinates and adding them as new attributes to the existing events.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` pol2Cart(<DOUBLE> theta, <DOUBLE> rho, <DOUBLE> z) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">theta</td> <td style="vertical-align: top; word-wrap: break-word">The theta value of the coordinates.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">DOUBLE</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">rho</td> <td style="vertical-align: top; word-wrap: break-word">The rho value of the coordinates.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">DOUBLE</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">z</td> <td style="vertical-align: top; word-wrap: break-word">z value of the cartesian coordinates.</td> <td style="vertical-align: top">If z value is not given, drop the third parameter of the output.</td> <td style="vertical-align: top">DOUBLE</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from PolarStream#pol2Cart(theta, rho) select x, y insert into outputStream ; ``` <p style="word-wrap: break-word">This will return cartesian coordinates (4.99953024681082, 0.06853693328228748) for theta: 0.7854 and rho: 5.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from PolarStream#pol2Cart(theta, rho, 3.4) select x, y, z insert into outputStream ; ``` <p style="word-wrap: break-word">This will return cartesian coordinates (4.99953024681082, 0.06853693328228748, 3.4)for theta: 0.7854 and rho: 5 and z: 3.4.</p> ### log *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#stream-processor">(Stream Processor)</a>* <p style="word-wrap: break-word">The logger logs the message on the given priority with or without processed event.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` log(<STRING> priority, <STRING> log.message, <BOOL> is.event.logged) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">priority</td> <td style="vertical-align: top; word-wrap: break-word">The priority/type of this log message (INFO, DEBUG, WARN, FATAL, ERROR, OFF, TRACE).</td> <td style="vertical-align: top">INFO</td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">log.message</td> <td style="vertical-align: top; word-wrap: break-word">This message will be logged.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">is.event.logged</td> <td style="vertical-align: top; word-wrap: break-word">To log the processed event.</td> <td style="vertical-align: top">true</td> <td style="vertical-align: top">BOOL</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` from fooStream#log("INFO", "Sample Event :", true) select * insert into barStream; ``` <p style="word-wrap: break-word">This will log as INFO with the message "Sample Event :" + fooStream:events.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` from fooStream#log("Sample Event :", true) select * insert into barStream; ``` <p style="word-wrap: break-word">This will logs with default log level as INFO.</p> <span id="example-3" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 3</span> ``` from fooStream#log("Sample Event :", fasle) select * insert into barStream; ``` <p style="word-wrap: break-word">This will only log message.</p> <span id="example-4" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 4</span> ``` from fooStream#log(true) select * insert into barStream; ``` <p style="word-wrap: break-word">This will only log fooStream:events.</p> <span id="example-5" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 5</span> ``` from fooStream#log("Sample Event :") select * insert into barStream; ``` <p style="word-wrap: break-word">This will log message and fooStream:events.</p> ### batch *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A window that holds an incoming events batch. When a new set of events arrives, the previously arrived old events will be expired. Batch window can be used to aggregate events that comes in batches.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` batch() ``` <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define stream consumerItemStream (itemId string, price float) from consumerItemStream#window.batch() select price, str:groupConcat(itemId) as itemIds group by price insert into outputStream; ``` <p style="word-wrap: break-word">This will output comma separated items IDs that have the same price for each incoming batch of events.</p> ### cron *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">This window returns events processed periodically as the output in time-repeating patterns, triggered based on time passing.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` cron(<STRING> cron.expression) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">cron.expression</td> <td style="vertical-align: top; word-wrap: break-word">The cron expression that represents a time schedule.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define window cseEventWindow (symbol string, price float, volume int)cron('*/5 * * * * ?'); @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol,price,volume insert into outputStream ; ``` <p style="word-wrap: break-word">This will processed events as the output every 5 seconds.</p> ### externalTime *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A sliding time window based on external time. It holds events that arrived during the last windowTime period from the external timestamp, and gets updated on every monotonically increasing timestamp.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` externalTime(<LONG> timestamp, <INT|LONG|TIME> window.time) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">timestamp</td> <td style="vertical-align: top; word-wrap: break-word">The time which the window determines as current time and will act upon. The value of this parameter should be monotonically increasing.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">LONG</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">window.time</td> <td style="vertical-align: top; word-wrap: break-word">The sliding time period for which the window should hold events.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>TIME</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define window cseEventWindow (symbol string, price float, volume int) externalTime(eventTime, 20 sec) output expired events; @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol, sum(price) as price insert expired events into outputStream ; ``` <p style="word-wrap: break-word">processing events arrived within the last 20 seconds from the eventTime and output expired events.</p> ### externalTimeBatch *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A batch (tumbling) time window based on external time, that holds events arrived during windowTime periods, and gets updated for every windowTime.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` externalTimeBatch(<LONG> timestamp, <INT|LONG|TIME> window.time, <INT|LONG|TIME> start.time, <INT|LONG|TIME> timeout) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">timestamp</td> <td style="vertical-align: top; word-wrap: break-word">The time which the window determines as current time and will act upon. The value of this parameter should be monotonically increasing.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">LONG</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">window.time</td> <td style="vertical-align: top; word-wrap: break-word">The batch time period for which the window should hold events.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>TIME</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">start.time</td> <td style="vertical-align: top; word-wrap: break-word">User defined start time. This could either be a constant (of type int, long or time) or an attribute of the corresponding stream (of type long). If an attribute is provided, initial value of attribute would be considered as startTime.</td> <td style="vertical-align: top">Timestamp of first event</td> <td style="vertical-align: top">INT<br>LONG<br>TIME</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">timeout</td> <td style="vertical-align: top; word-wrap: break-word">Time to wait for arrival of new event, before flushing and giving output for events belonging to a specific batch.</td> <td style="vertical-align: top">System waits till an event from next batch arrives to flush current batch</td> <td style="vertical-align: top">INT<br>LONG<br>TIME</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define window cseEventWindow (symbol string, price float, volume int) externalTimeBatch(eventTime, 1 sec) output expired events; @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol, sum(price) as price insert expired events into outputStream ; ``` <p style="word-wrap: break-word">This will processing events that arrive every 1 seconds from the eventTime.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` define window cseEventWindow (symbol string, price float, volume int) externalTimeBatch(eventTime, 20 sec, 0) output expired events; ``` <p style="word-wrap: break-word">This will processing events that arrive every 1 seconds from the eventTime. Starts on 0th millisecond of an hour.</p> <span id="example-3" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 3</span> ``` define window cseEventWindow (symbol string, price float, volume int) externalTimeBatch(eventTime, 2 sec, eventTimestamp, 100) output expired events; ``` <p style="word-wrap: break-word">This will processing events that arrive every 2 seconds from the eventTim. Considers the first event's eventTimestamp value as startTime. Waits 100 milliseconds for the arrival of a new event before flushing current batch.</p> ### frequent *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">This window returns the latest events with the most frequently occurred value for a given attribute(s). Frequency calculation for this window processor is based on Misra-Gries counting algorithm.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` frequent(<INT> event.count, <STRING> attribute) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">event.count</td> <td style="vertical-align: top; word-wrap: break-word">The number of most frequent events to be emitted to the stream.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">attribute</td> <td style="vertical-align: top; word-wrap: break-word">The attributes to group the events. If no attributes are given, the concatenation of all the attributes of the event is considered.</td> <td style="vertical-align: top">The concatenation of all the attributes of the event is considered.</td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @info(name = 'query1') from purchase[price >= 30]#window.frequent(2) select cardNo, price insert all events into PotentialFraud; ``` <p style="word-wrap: break-word">This will returns the 2 most frequent events.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` @info(name = 'query1') from purchase[price >= 30]#window.frequent(2, cardNo) select cardNo, price insert all events into PotentialFraud; ``` <p style="word-wrap: break-word">This will returns the 2 latest events with the most frequently appeared card numbers.</p> ### length *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A sliding length window that holds the last windowLength events at a given time, and gets updated for each arrival and expiry.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` length(<INT> window.length) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">window.length</td> <td style="vertical-align: top; word-wrap: break-word">The number of events that should be included in a sliding length window.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define window cseEventWindow (symbol string, price float, volume int) length(10) output all events; @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol, sum(price) as price insert all events into outputStream ; ``` <p style="word-wrap: break-word">This will processing 10 events and out put all events.</p> ### lengthBatch *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A batch (tumbling) length window that holds a number of events specified as the windowLength. The window is updated each time a batch of events that equals the number specified as the windowLength arrives.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` lengthBatch(<INT> window.length) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">window.length</td> <td style="vertical-align: top; word-wrap: break-word">The number of events the window should tumble.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define window cseEventWindow (symbol string, price float, volume int) lengthBatch(10) output all events; @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol, sum(price) as price insert all events into outputStream ; ``` <p style="word-wrap: break-word">This will processing 10 events as a batch and out put all events.</p> ### lossyFrequent *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">This window identifies and returns all the events of which the current frequency exceeds the value specified for the supportThreshold parameter.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` lossyFrequent(<DOUBLE> support.threshold, <DOUBLE> error.bound, <STRING> attribute) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">support.threshold</td> <td style="vertical-align: top; word-wrap: break-word">The support threshold value.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">DOUBLE</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">error.bound</td> <td style="vertical-align: top; word-wrap: break-word">The error bound value.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">DOUBLE</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">attribute</td> <td style="vertical-align: top; word-wrap: break-word">The attributes to group the events. If no attributes are given, the concatenation of all the attributes of the event is considered.</td> <td style="vertical-align: top">The concatenation of all the attributes of the event is considered.</td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define stream purchase (cardNo string, price float); define window purchaseWindow (cardNo string, price float) lossyFrequent(0.1, 0.01); @info(name = 'query0') from purchase[price >= 30] insert into purchaseWindow; @info(name = 'query1') from purchaseWindow select cardNo, price insert all events into PotentialFraud; ``` <p style="word-wrap: break-word">lossyFrequent(0.1, 0.01) returns all the events of which the current frequency exceeds 0.1, with an error bound of 0.01.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` define stream purchase (cardNo string, price float); define window purchaseWindow (cardNo string, price float) lossyFrequent(0.3, 0.05, cardNo); @info(name = 'query0') from purchase[price >= 30] insert into purchaseWindow; @info(name = 'query1') from purchaseWindow select cardNo, price insert all events into PotentialFraud; ``` <p style="word-wrap: break-word">lossyFrequent(0.3, 0.05, cardNo) returns all the events of which the cardNo attributes frequency exceeds 0.3, with an error bound of 0.05.</p> ### sort *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">This window holds a batch of events that equal the number specified as the windowLength and sorts them in the given order.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` sort(<INT> window.length, <STRING> attribute, <STRING> order) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">window.length</td> <td style="vertical-align: top; word-wrap: break-word">The size of the window length.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">attribute</td> <td style="vertical-align: top; word-wrap: break-word">The attribute that should be checked for the order.</td> <td style="vertical-align: top">The concatenation of all the attributes of the event is considered.</td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">order</td> <td style="vertical-align: top; word-wrap: break-word">The order define as "asc" or "desc".</td> <td style="vertical-align: top">asc</td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define stream cseEventStream (symbol string, price float, volume long); define window cseEventWindow (symbol string, price float, volume long) sort(2,volume, 'asc'); @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select volume insert all events into outputStream ; ``` <p style="word-wrap: break-word">sort(5, price, 'asc') keeps the events sorted by price in the ascending order. Therefore, at any given time, the window contains the 5 lowest prices.</p> ### time *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A sliding time window that holds events that arrived during the last windowTime period at a given time, and gets updated for each event arrival and expiry.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` time(<INT|LONG|TIME> window.time) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">window.time</td> <td style="vertical-align: top; word-wrap: break-word">The sliding time period for which the window should hold events.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>TIME</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define window cseEventWindow (symbol string, price float, volume int) time(20) output all events; @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol, sum(price) as price insert all events into outputStream ; ``` <p style="word-wrap: break-word">This will processing events that arrived within the last 20 milliseconds.</p> ### timeBatch *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A batch (tumbling) time window that holds events that arrive during window.time periods, and gets updated for each window.time.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` timeBatch(<INT|LONG|TIME> window.time, <INT> start.time) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">window.time</td> <td style="vertical-align: top; word-wrap: break-word">The batch time period for which the window should hold events.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>TIME</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">start.time</td> <td style="vertical-align: top; word-wrap: break-word">This specifies an offset in milliseconds in order to start the window at a time different to the standard time.</td> <td style="vertical-align: top">Timestamp of first event</td> <td style="vertical-align: top">INT</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define window cseEventWindow (symbol string, price float, volume int) timeBatch(20 sec) output all events; @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol, sum(price) as price insert all events into outputStream ; ``` <p style="word-wrap: break-word">This will processing events arrived every 20 seconds as a batch and out put all events.</p> ### timeLength *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#window">(Window)</a>* <p style="word-wrap: break-word">A sliding time window that, at a given time holds the last window.length events that arrived during last window.time period, and gets updated for every event arrival and expiry.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` timeLength(<INT|LONG|TIME> window.time, <INT> window.length) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">window.time</td> <td style="vertical-align: top; word-wrap: break-word">The sliding time period for which the window should hold events.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT<br>LONG<br>TIME</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">window.length</td> <td style="vertical-align: top; word-wrap: break-word">The number of events that should be be included in a sliding length window..</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">INT</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` define stream cseEventStream (symbol string, price float, volume int); define window cseEventWindow (symbol string, price float, volume int) timeLength(2 sec, 10); @info(name = 'query0') from cseEventStream insert into cseEventWindow; @info(name = 'query1') from cseEventWindow select symbol, price, volume insert all events into outputStream; ``` <p style="word-wrap: break-word">window.timeLength(2 sec, 10) holds the last 10 events that arrived during last 2 seconds and gets updated for every event arrival and expiry.</p> ## Sink ### inMemory *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#sink">(Sink)</a>* <p style="word-wrap: break-word">In-memory transport that can communicate with other in-memory transports within the same JVM, itis assumed that the publisher and subscriber of a topic uses same event schema (stream definition).</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` @sink(type="inMemory", topic="<STRING>", @map(...))) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">topic</td> <td style="vertical-align: top; word-wrap: break-word">Event will be delivered to allthe subscribers of the same topic</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @sink(type='inMemory', @map(type='passThrough')) define stream BarStream (symbol string, price float, volume long) ``` <p style="word-wrap: break-word">In this example BarStream uses inMemory transport which emit the Siddhi events internally without using external transport and transformation.</p> ### log *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#sink">(Sink)</a>* <p style="word-wrap: break-word">This is a sink that can be used as a logger. This will log the output events in the output stream with user specified priority and a prefix</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` @sink(type="log", priority="<STRING>", prefix="<STRING>", @map(...))) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">priority</td> <td style="vertical-align: top; word-wrap: break-word">This will set the logger priority i.e log level. Accepted values are INFO, DEBUG, WARN, FATAL, ERROR, OFF, TRACE</td> <td style="vertical-align: top">INFO</td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> <tr> <td style="vertical-align: top">prefix</td> <td style="vertical-align: top; word-wrap: break-word">This will be the prefix to the output message. If the output stream has event [2,4] and the prefix is given as "Hello" then the log will show "Hello : [2,4]"</td> <td style="vertical-align: top">default prefix will be <Siddhi App Name> : <Stream Name></td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">Yes</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @sink(type='log', prefix='My Log', priority='DEBUG'), define stream BarStream (symbol string, price float, volume long) ``` <p style="word-wrap: break-word">In this example BarStream uses log sink and the prefix is given as My Log. Also the priority is set to DEBUG.</p> <span id="example-2" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 2</span> ``` @sink(type='log', priority='DEBUG'), define stream BarStream (symbol string, price float, volume long) ``` <p style="word-wrap: break-word">In this example BarStream uses log sink and the priority is set to DEBUG. User has not specified prefix so the default prefix will be in the form &lt;Siddhi App Name&gt; : &lt;Stream Name&gt;</p> <span id="example-3" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 3</span> ``` @sink(type='log', prefix='My Log'), define stream BarStream (symbol string, price float, volume long) ``` <p style="word-wrap: break-word">In this example BarStream uses log sink and the prefix is given as My Log. User has not given a priority so it will be set to default INFO.</p> <span id="example-4" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 4</span> ``` @sink(type='log'), define stream BarStream (symbol string, price float, volume long) ``` <p style="word-wrap: break-word">In this example BarStream uses log sink. The user has not given prefix or priority so they will be set to their default values.</p> ## Sinkmapper ### passThrough *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#sink-mapper">(Sink Mapper)</a>* <p style="word-wrap: break-word">Pass-through mapper passed events (Event[]) through without any mapping or modifications.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` @sink(..., @map(type="passThrough") ``` <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @sink(type='inMemory', @map(type='passThrough')) define stream BarStream (symbol string, price float, volume long); ``` <p style="word-wrap: break-word">In the following example BarStream uses passThrough outputmapper which emit Siddhi event directly without any transformation into sink.</p> ## Source ### inMemory *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#source">(Source)</a>* <p style="word-wrap: break-word">In-memory source that can communicate with other in-memory sinks within the same JVM, it is assumed that the publisher and subscriber of a topic uses same event schema (stream definition).</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` @source(type="inMemory", topic="<STRING>", @map(...))) ``` <span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span> <table> <tr> <th>Name</th> <th style="min-width: 20em">Description</th> <th>Default Value</th> <th>Possible Data Types</th> <th>Optional</th> <th>Dynamic</th> </tr> <tr> <td style="vertical-align: top">topic</td> <td style="vertical-align: top; word-wrap: break-word">Subscribes to sent on the given topic.</td> <td style="vertical-align: top"></td> <td style="vertical-align: top">STRING</td> <td style="vertical-align: top">No</td> <td style="vertical-align: top">No</td> </tr> </table> <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @source(type='inMemory', @map(type='passThrough')) define stream BarStream (symbol string, price float, volume long) ``` <p style="word-wrap: break-word">In this example BarStream uses inMemory transport which passes the received event internally without using external transport.</p> ## Sourcemapper ### passThrough *<a target="_blank" href="https://wso2.github.io/siddhi/documentation/siddhi-4.0/#source-mapper">(Source Mapper)</a>* <p style="word-wrap: break-word">Pass-through mapper passed events (Event[]) through without any mapping or modifications.</p> <span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span> ``` @source(..., @map(type="passThrough") ``` <span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span> <span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span> ``` @source(type='tcp', @map(type='passThrough')) define stream BarStream (symbol string, price float, volume long); ``` <p style="word-wrap: break-word">In this example BarStream uses passThrough inputmapper which passes the received Siddhi event directly without any transformation into source.</p>
ksdperera/siddhi
docs/api/4.2.4.md
Markdown
apache-2.0
100,432
/* * $Header: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/BaseForm.java,v 1.1.1.1 2002/07/18 16:48:22 remm Exp $ * $Revision: 1.1.1.1 $ * $Date: 2002/07/18 16:48:22 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Struts", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.webapp.admin.users; import javax.management.ObjectName; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; /** * Base class for form beans for the user administration * options. * * @author Craig R. McClanahan * @version $Revision: 1.1.1.1 $ $Date: 2002/07/18 16:48:22 $ * @since 4.1 */ public class BaseForm extends ActionForm { // ----------------------------------------------------- Instance Variables // ------------------------------------------------------------- Properties /** * The MBean Name of UserDatabase containing this object. */ private String databaseName = null; public String getDatabaseName() { if ((this.databaseName == null) && (this.objectName != null)) { try { ObjectName oname = new ObjectName(this.objectName); this.databaseName = oname.getDomain() + ":" + "type=UserDatabase,database=" + oname.getKeyProperty("database"); } catch (Throwable t) { this.databaseName = null; } } return (this.databaseName); } public void setDatabaseName(String databaseName) { if ((databaseName != null) && (databaseName.length() < 1)) { this.databaseName = null; } else { this.databaseName = databaseName; } } /** * The node label to be displayed in the user interface. */ private String nodeLabel = null; public String getNodeLabel() { return (this.nodeLabel); } public void setNodeLabel(String nodeLabel) { this.nodeLabel = nodeLabel; } /** * The MBean object name of this object. A null or zero-length * value indicates that this is a new object. */ private String objectName = null; public String getObjectName() { return (this.objectName); } public void setObjectName(String objectName) { if ((objectName != null) && (objectName.length() < 1)) { this.objectName = null; } else { this.objectName = objectName; } } // --------------------------------------------------------- Public Methods /** * Reset all properties to their default values. * * @param mapping The mapping used to select this instance * @param request The servlet request we are processing */ public void reset(ActionMapping mapping, HttpServletRequest request) { databaseName = null; nodeLabel = null; objectName = null; } }
devjin24/howtomcatworks
bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/BaseForm.java
Java
apache-2.0
5,654
package org.apache.commons.jcs3.auxiliary; /* * 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. */ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import org.apache.commons.jcs3.log.Log; import org.apache.commons.jcs3.log.LogManager; /** * Used to monitor and repair any failed connection for the lateral cache service. By default the * monitor operates in a failure driven mode. That is, it goes into a wait state until there is an * error. Upon the notification of a connection error, the monitor changes to operate in a time * driven mode. That is, it attempts to recover the connections on a periodic basis. When all failed * connections are restored, it changes back to the failure driven mode. */ public abstract class AbstractAuxiliaryCacheMonitor extends Thread { /** The logger */ protected final Log log = LogManager.getLog( this.getClass() ); /** How long to wait between runs */ protected static long idlePeriod = 20 * 1000; /** * Must make sure AbstractAuxiliaryCacheMonitor is started before any error can be detected! */ protected AtomicBoolean allright = new AtomicBoolean(true); /** * shutdown flag */ private final AtomicBoolean shutdown = new AtomicBoolean(false); /** Synchronization helper lock */ private final Lock lock = new ReentrantLock(); /** Synchronization helper condition */ private final Condition trigger = lock.newCondition(); /** * Constructor * * @param name the thread name */ public AbstractAuxiliaryCacheMonitor(final String name) { super(name); } /** * Configures the idle period between repairs. * <p> * @param idlePeriod The new idlePeriod value */ public static void setIdlePeriod( final long idlePeriod ) { if ( idlePeriod > AbstractAuxiliaryCacheMonitor.idlePeriod ) { AbstractAuxiliaryCacheMonitor.idlePeriod = idlePeriod; } } /** * Notifies the cache monitor that an error occurred, and kicks off the error recovery process. */ public void notifyError() { if (allright.compareAndSet(true, false)) { signalTrigger(); } } /** * Notifies the cache monitor that the service shall shut down */ public void notifyShutdown() { if (shutdown.compareAndSet(false, true)) { signalTrigger(); } } // Trigger continuation of loop private void signalTrigger() { try { lock.lock(); trigger.signal(); } finally { lock.unlock(); } } /** * Clean up all resources before shutdown */ protected abstract void dispose(); /** * do actual work */ protected abstract void doWork(); /** * Main processing method for the AbstractAuxiliaryCacheMonitor object */ @Override public void run() { do { if ( allright.get() ) { log.debug( "ERROR DRIVEN MODE: allright = true, cache monitor will wait for an error." ); } else { log.debug( "ERROR DRIVEN MODE: allright = false cache monitor running." ); } if ( allright.get() ) { // Failure driven mode. try { lock.lock(); trigger.await(); // wake up only if there is an error. } catch ( final InterruptedException ignore ) { //no op, this is expected } finally { lock.unlock(); } } // check for requested shutdown if ( shutdown.get() ) { log.info( "Shutting down cache monitor" ); dispose(); return; } // The "allright" flag must be false here. // Simply presume we can fix all the errors until proven otherwise. allright.set(true); log.debug( "Cache monitor running." ); doWork(); try { // don't want to sleep after waking from an error // run immediately and sleep here. log.debug( "Cache monitor sleeping for {0} between runs.", idlePeriod ); Thread.sleep( idlePeriod ); } catch ( final InterruptedException ex ) { // ignore; } } while ( true ); } }
apache/commons-jcs
commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheMonitor.java
Java
apache-2.0
5,842
/** * @provides phabricator-remarkup-css */ .phabricator-remarkup { line-height: 1.51em; word-break: break-word; } .phabricator-remarkup p { margin: 0 0 12px; } .PhabricatorMonospaced, .phabricator-remarkup .remarkup-code-block .remarkup-code { font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; } .platform-windows .PhabricatorMonospaced, .platform-windows .phabricator-remarkup .remarkup-code-block .remarkup-code { font: 12px/15px "Menlo", "Consolas", "Monaco", monospace; } .phabricator-remarkup .remarkup-code-block { margin: 12px 0; white-space: pre; } .phabricator-remarkup .remarkup-code-header { padding: 6px 12px; font-size: 13px; font-weight: bold; background: rgba({$alphablue},0.08); display: inline-block; border-top-left-radius: 3px; border-top-right-radius: 3px; } .phabricator-remarkup .code-block-counterexample .remarkup-code-header { background-color: {$sh-redbackground}; } .phabricator-remarkup .remarkup-code-block .remarkup-code-header + pre { border-top-left-radius: 0; } .phabricator-remarkup .remarkup-code-block pre { background: rgba({$alphablue},0.08); display: block; color: #000; overflow: auto; padding: 12px; border-radius: 3px; white-space: pre-wrap; } .phabricator-remarkup kbd { display: inline-block; min-width: 1em; padding: 4px 5px 5px; font-weight: normal; font-size: 0.8rem; text-align: center; text-decoration: none; line-height: 0.6rem; border-radius: 3px; box-shadow: inset 0 -1px 0 rgba({$alphablue},0.08); user-select: none; background: {$lightgreybackground}; border: 1px solid {$lightgreyborder}; } .phabricator-remarkup .kbd-join { padding: 0 4px; color: {$lightgreytext}; } .phabricator-remarkup pre.remarkup-counterexample { background-color: {$sh-redbackground}; } .phabricator-remarkup tt.remarkup-monospaced { color: #000; background: rgba({$alphablue},0.1); padding: 1px 4px; border-radius: 3px; white-space: pre-wrap; } /* NOTE: You can currently produce this with [[link | `name`]]. Restore the link color. */ .phabricator-remarkup a tt.remarkup-monospaced { color: {$anchor}; } .phabricator-remarkup .remarkup-header tt.remarkup-monospaced { font-weight: normal; } .phabricator-remarkup ul.remarkup-list { list-style: disc; margin: 12px 0 12px 30px; } .phabricator-remarkup ol.remarkup-list { list-style: decimal; margin: 12px 0 12px 30px; } .phabricator-remarkup ol ol.remarkup-list { list-style: upper-alpha; } .phabricator-remarkup ol ol ol.remarkup-list { list-style: lower-alpha; } .phabricator-remarkup ol ol ol ol.remarkup-list { list-style: lower-roman; } .phabricator-remarkup .remarkup-list-with-checkmarks .remarkup-checked-item, .phabricator-remarkup .remarkup-list-with-checkmarks .remarkup-unchecked-item { list-style: none; margin-left: -18px; } .phabricator-remarkup .remarkup-list-with-checkmarks input { margin-right: 4px; opacity: 1; } .phabricator-remarkup .remarkup-list-with-checkmarks .remarkup-checked-item { text-decoration: line-through; color: {$lightgreytext}; } .phabricator-remarkup ul.remarkup-list ol.remarkup-list, .phabricator-remarkup ul.remarkup-list ul.remarkup-list, .phabricator-remarkup ol.remarkup-list ol.remarkup-list, .phabricator-remarkup ol.remarkup-list ul.remarkup-list { margin: 4px 0 4px 24px; } .phabricator-remarkup .remarkup-list-item { line-height: 1.7em; } .phabricator-remarkup li.phantom-item, .phabricator-remarkup li.phantom-item { list-style-type: none; } .phabricator-remarkup h1.remarkup-header { font-size: 24px; line-height: 1.625em; margin: 24px 0 4px; } .phabricator-remarkup h2.remarkup-header { font-size: 20px; line-height: 1.5em; margin: 20px 0 4px; } .phabricator-remarkup h3.remarkup-header { font-size: 18px; line-height: 1.375em; margin: 20px 0 4px; } .phabricator-remarkup h4.remarkup-header { font-size: 16px; line-height: 1.25em; margin: 12px 0 4px; } .phabricator-remarkup h5.remarkup-header { font-size: 15px; line-height: 1.125em; margin: 8px 0 4px; } .phabricator-remarkup h6.remarkup-header { font-size: 14px; line-height: 1em; margin: 4px 0; } .phabricator-remarkup blockquote { border-left: 3px solid {$sh-blueborder}; color: {$darkbluetext}; font-style: italic; margin: 4px 0 12px 0; padding: 8px 12px; background-color: {$lightbluebackground}; } .phabricator-remarkup blockquote *:last-child { margin-bottom: 0; } .phabricator-remarkup blockquote blockquote { background-color: rgba(175,175,175, .1); } .phabricator-remarkup blockquote em { /* In blockquote bodies, default text is italic so emphasized text should be normal. */ font-style: normal; } .phabricator-remarkup blockquote div.remarkup-reply-head { font-style: normal; padding-bottom: 4px; } .phabricator-remarkup blockquote div.remarkup-reply-head em { /* In blockquote headers, default text is normal so emphasized text should be italic. See T10686. */ font-style: italic; } .phabricator-remarkup blockquote div.remarkup-reply-head .phui-tag-core { background-color: transparent; border: none; padding: 0; color: {$darkbluetext}; } .phabricator-remarkup img.remarkup-proxy-image { max-width: 640px; max-height: 640px; } .phabricator-remarkup audio { display: block; margin: 16px auto; min-width: 240px; width: 50%; } video.phabricator-media { background: {$greybackground}; } .phabricator-remarkup video { display: block; margin: 0 auto; max-width: 95%; } .phabricator-remarkup-mention-exists { font-weight: bold; background: #e6f3ff; } .phabricator-remarkup-mention-disabled { font-weight: bold; background: #dddddd; } .phui-remarkup-preview .phabricator-remarkup-mention-unknown, .aphront-panel-preview .phabricator-remarkup-mention-unknown { font-weight: bold; background: #ffaaaa; } .phabricator-remarkup .phriction-link { font-weight: bold; } .phabricator-remarkup .phriction-link-missing { color: {$red}; text-decoration: underline; } .phabricator-remarkup .phriction-link-lock { color: {$greytext}; } .phabricator-remarkup-mention-nopermission .phui-tag-core { background: {$lightgreybackground}; color: {$lightgreytext}; } .phabricator-remarkup .remarkup-note { margin: 16px 0; padding: 12px; border-left: 3px solid {$blue}; background: {$lightblue}; } .phabricator-remarkup .remarkup-warning { margin: 16px 0; padding: 12px; border-left: 3px solid {$yellow}; background: {$lightyellow}; } .phabricator-remarkup .remarkup-important { margin: 16px 0; padding: 12px; border-left: 3px solid {$red}; background: {$lightred}; } .phabricator-remarkup .remarkup-note .remarkup-monospaced, .phabricator-remarkup .remarkup-important .remarkup-monospaced, .phabricator-remarkup .remarkup-warning .remarkup-monospaced { background-color: rgba(150,150,150,.2); } .phabricator-remarkup .remarkup-note-word { font-weight: bold; color: {$darkbluetext}; } .phabricator-remarkup-toc { float: right; border-left: 1px solid {$lightblueborder}; background: #fff; width: 160px; padding-left: 8px; margin: 0 0 4px 8px; } .phabricator-remarkup-toc-header { font-size: 13px; line-height: 13px; color: {$darkbluetext}; font-weight: bold; margin-bottom: 4px; } .phabricator-remarkup-toc ul { padding: 0; margin: 0; list-style: none; overflow: hidden; } .phabricator-remarkup-toc ul ul { margin: 0 0 0 8px; } .phabricator-remarkup-toc ul li { padding: 0; margin: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .phabricator-remarkup-embed-layout-right { text-align: right; } .phabricator-remarkup-embed-layout-center { text-align: center; } .phabricator-remarkup-embed-layout-inline { display: inline; } .phabricator-remarkup-embed-float-right { float: right; margin: .5em 1em 0; } .phabricator-remarkup-embed-layout-link { padding: 6px 6px 6px 42px; border-radius: 3px; margin: 0 0 4px; display: inline-block; font-weight: bold; -webkit-font-smoothing: antialiased; border: 1px solid {$lightblueborder}; border-radius: 3px; color: #000; min-width: 256px; position: relative; /*height: 22px;*/ line-height: 20px; } .phabricator-remarkup-embed-layout-icon { font-size: 28px; position: absolute; top: 10px; left: 10px; } .phabricator-remarkup-embed-layout-info { color: {$lightgreytext}; font-size: {$smallerfontsize}; font-weight: normal; margin-left: 8px; } .phabricator-remarkup-embed-layout-link:hover { border-color: {$violet}; cursor: pointer; text-decoration: none; } .phabricator-remarkup-embed-layout-link:hover .phabricator-remarkup-embed-layout-icon { color: {$violet}; } .phabricator-remarkup-embed-layout-info-block { display: block; } .embed-download-form { display: inline-block; padding: 0; margin: 0; } .phabricator-remarkup-embed-layout-link .phabricator-remarkup-embed-layout-download { color: {$lightgreytext}; border: none; background: rgba(0, 0, 0, 0); box-shadow: none; outline: 0; padding: 0; margin: 0; text-align: left; text-shadow: none; border-radius: 0; font: inherit; display: inline; min-width: 0; font-weight: normal !important; } .phabricator-remarkup-embed-layout-download:hover { color: {$anchor}; text-decoration: underline; } .phabricator-remarkup-embed-float-left { float: left; margin: .5em 1em 0; } .phabricator-remarkup-embed-image { display: inline-block; border: 3px solid white; box-shadow: 1px 1px 2px rgba({$alphablack}, 0.20); } .phabricator-remarkup-embed-image-full, .phabricator-remarkup-embed-image-wide { display: inline-block; max-width: 100%; } .phabricator-remarkup-embed-image-full img, .phabricator-remarkup-embed-image-wide img { height: auto; max-width: 100%; } .phabricator-remarkup .remarkup-table-wrap { overflow-x: auto; } .phabricator-remarkup table.remarkup-table { border-collapse: separate; border-spacing: 1px; background: {$lightblueborder}; margin: 12px 0; word-break: normal; } .phabricator-remarkup table.remarkup-table th { font-weight: bold; padding: 4px 6px; background: {$lightbluebackground}; } .phabricator-remarkup table.remarkup-table td { background: #ffffff; padding: 3px 6px; } body div.phabricator-remarkup.remarkup-has-toc .phabricator-remarkup-toc + .remarkup-header { margin-top: 0; padding-top: 0; } body .phabricator-standard-page div.phabricator-remarkup *:first-child, body .phabricator-standard-page div.phabricator-remarkup .remarkup-header + * { margin-top: 0; } body div.phabricator-remarkup > *:last-child { margin-bottom: 0; } .remarkup-assist-textarea { border-left-color: {$greyborder}; border-right-color: {$greyborder}; border-bottom-color: {$greyborder}; border-top-color: {$thinblueborder}; border-radius: 0; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; box-shadow: none; -webkit-box-shadow: none; /* Set line height explicitly so the metrics <var /> and the real textarea are forced to the same value. */ line-height: 1.25em; /* Prevent Safari and Chrome users from dragging the textarea any wider, because the top bar won't resize along with it. */ resize: vertical; } var.remarkup-assist-textarea { /* This is an invisible element used to measure the size of text in the textarea so we can float typeaheads over the cursor position. */ display: block; border-color: orange; box-sizing: border-box; padding: 4px 6px; white-space: pre-wrap; visibility: hidden; } .remarkup-assist-textarea:focus { border: 1px solid rgba(82, 168, 236, 0.8); } .remarkup-assist-bar { height: 32px; border-width: 1px 1px 0; border-style: solid; border-top-color: {$greyborder}; border-left-color: {$greyborder}; border-right-color: {$greyborder}; border-top-left-radius: 3px; border-top-right-radius: 3px; padding: 0 4px; background: {$lightbluebackground}; overflow: hidden; } .remarkup-assist-button { display: block; margin-top: 4px; height: 20px; padding: 2px 5px 3px; line-height: 18px; width: 16px; float: left; border-radius: 3px; } .remarkup-assist-button:hover .phui-icon-view.phui-font-fa { color: {$sky}; } .remarkup-assist-button:active { outline: none; } .remarkup-assist-button:focus { outline: none; } .remarkup-assist-separator { display: block; float: left; height: 18px; margin: 7px 6px; width: 0px; border-right: 1px solid {$lightgreyborder}; } .remarkup-interpreter-error { padding: 8px; border: 1px solid {$sh-redborder}; background-color: {$sh-redbackground}; } .remarkup-cowsay { white-space: pre-wrap; } .remarkup-figlet { white-space: pre-wrap; } .remarkup-assist { width: 14px; height: 14px; overflow: hidden; text-align: center; vertical-align: middle; } .remarkup-assist-right { float: right; } .jx-order-mask { background: white; opacity: 1.0; } .phabricator-image-macro-hero { margin: auto; max-width: 95%; } .phabricator-remarkup-macro { height: auto; max-width: 100%; } .remarkup-nav-sequence-arrow { color: {$lightgreytext}; } .phabricator-remarkup hr { background: {$thinblueborder}; margin: 24px 0; clear: both; } .phabricator-remarkup .remarkup-highlight { background-color: {$lightviolet}; padding: 0 4px; } .device .remarkup-assist-nodevice { display: none; } /* - Autocomplete ----------------------------------------------------------- */ .phuix-autocomplete { position: absolute; width: 300px; box-shadow: {$dropshadow}; background: #ffffff; border: 1px solid {$lightgreyborder}; border-radius: 3px; } .phuix-autocomplete-head { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 8px; background: {$lightgreybackground}; color: {$darkgreytext}; border-radius: 3px; } .phuix-autocomplete-head .phui-icon-view { margin-right: 4px; color: {$lightgreytext}; } .phuix-autocomplete-echo { margin-left: 4px; color: {$lightgreytext}; } .phuix-autocomplete-list a.jx-result { display: block; padding: 5px 8px; font-size: {$normalfontsize}; border-top: 1px solid {$thinblueborder}; font-weight: bold; color: {$darkgreytext}; } .phuix-autocomplete-list a.jx-result .phui-icon-view { margin-right: 4px; color: {$lightbluetext}; } .phuix-autocomplete-list a.jx-result:hover { text-decoration: none; background: {$sh-bluebackground}; color: #000; } .phuix-autocomplete-list a.jx-result.focused, .phuix-autocomplete-list a.jx-result.focused:hover { background: {$sh-bluebackground}; color: #000; } /* - Pinned ----------------------------------------------------------------- */ .phui-box.phui-object-box.phui-comment-form-view.remarkup-assist-pinned { position: fixed; background-color: #ffffff; border-top: 1px solid {$lightblueborder}; box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); width: 100%; bottom: 0; left: 0; right: 0; margin: 0; overflow: auto; max-height: 40vh; } .remarkup-assist-pinned-spacer { position: relative; } /* - Preview ---------------------------------------------------------------- */ .remarkup-inline-preview { display: block; position: relative; background: #fff; overflow-y: auto; box-sizing: border-box; width: 100%; resize: vertical; padding: 8px; border: 1px solid {$lightblueborder}; border-top: none; -webkit-font-smoothing: antialiased; } .remarkup-control-fullscreen-mode .remarkup-inline-preview { resize: none; } .remarkup-inline-preview * { resize: none; } .remarkup-assist-button.preview-active { background: {$sky}; } .remarkup-assist-button.preview-active .phui-icon-view { color: #fff; } .remarkup-assist-button.preview-active:hover { text-decoration: none; } .remarkup-assist-button.preview-active:hover .phui-icon-view { color: #fff; } .remarkup-preview-active .remarkup-assist, .remarkup-preview-active .remarkup-assist-separator { opacity: .2; transition: all 100ms cubic-bezier(0.250, 0.250, 0.750, 0.750); transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750); } .remarkup-preview-active .remarkup-assist-button { pointer-events: none; cursor: default; } .remarkup-preview-active .remarkup-assist-button.preview-active { pointer-events: inherit; cursor: pointer; } .remarkup-preview-active .remarkup-assist.fa-eye { opacity: 1; transition: all 100ms cubic-bezier(0.250, 0.250, 0.750, 0.750); transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750); } /* - Fullscreen ------------------------------------------------------------- */ .remarkup-fullscreen-mode { overflow: hidden; } .remarkup-control-fullscreen-mode { position: fixed; border: none; top: 32px; bottom: 32px; left: 64px; right: 64px; border-radius: 3px; box-shadow: 0px 4px 32px #555; } .remarkup-control-fullscreen-mode .remarkup-assist-button { padding: 1px 6px 4px; font-size: 15px; } .remarkup-control-fullscreen-mode .remarkup-assist-button .remarkup-assist { height: 16px; width: 16px; } .aphront-form-input .remarkup-control-fullscreen-mode .remarkup-assist-bar { border: none; border-top-left-radius: 3px; border-top-right-radius: 3px; height: 32px; padding: 4px 8px; background: {$bluebackground}; } .aphront-form-control .remarkup-control-fullscreen-mode textarea.remarkup-assist-textarea { position: absolute; top: 39px; left: 0; right: 0; height: calc(100% - 36px) !important; padding: 16px; font-size: {$biggerfontsize}; line-height: 1.51em; border-width: 1px 0 0 0; outline: none; resize: none; background: #fff !important; } .remarkup-control-fullscreen-mode textarea.remarkup-assist-textarea:focus { border-color: {$thinblueborder}; box-shadow: none; } .remarkup-control-fullscreen-mode .remarkup-inline-preview { font-size: {$biggerfontsize}; border: none; padding: 16px; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; } .remarkup-control-fullscreen-mode .remarkup-assist-button .fa-arrows-alt { color: {$sky}; } .device-phone .remarkup-control-fullscreen-mode { top: 0; bottom: 0; left: 0; right: 0; }
huangjimmy/phabricator-1
webroot/rsrc/css/core/remarkup.css
CSS
apache-2.0
18,339
// Copyright 2015 The Bazel Authors. All rights reserved. // // 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 com.google.devtools.build.lib.bazel.rules.android.ndkcrosstools; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.rules.cpp.CppConfiguration; import com.google.devtools.build.lib.view.config.crosstool.CrosstoolConfig.CToolchain; import com.google.devtools.build.lib.view.config.crosstool.CrosstoolConfig.CompilationMode; import com.google.devtools.build.lib.view.config.crosstool.CrosstoolConfig.CompilationModeFlags; import java.util.List; /** * Crosstool definitions for ARM. These values are based on the setup.mk files in the Android NDK * toolchain directories. */ class ArmCrosstools { private final NdkPaths ndkPaths; private final StlImpl stlImpl; ArmCrosstools(NdkPaths ndkPaths, StlImpl stlImpl) { this.ndkPaths = ndkPaths; this.stlImpl = stlImpl; } ImmutableList<CToolchain.Builder> createCrosstools() { ImmutableList.Builder<CToolchain.Builder> toolchains = ImmutableList.builder(); toolchains.add(createAarch64Toolchain()); // The flags for aarch64 clang 3.5 and 3.6 are the same, they differ only in the LLVM version // given in their tool paths. toolchains.add(createAarch64ClangToolchain("3.5")); toolchains.add(createAarch64ClangToolchain("3.6")); // The Android NDK Make files create several sets of flags base on // arm vs armeabi-v7a vs armeabi-v7a-hard, and arm vs thumb mode, each for gcc 4.8 and 4.9, // resulting in: // arm-linux-androideabi-4.8 // arm-linux-androideabi-4.8-v7a // arm-linux-androideabi-4.8-v7a-hard // arm-linux-androideabi-4.8-thumb // arm-linux-androideabi-4.8-v7a-thumb // arm-linux-androideabi-4.8-v7a-hard-thumb // arm-linux-androideabi-4.9 // arm-linux-androideabi-4.9-v7a // arm-linux-androideabi-4.9-v7a-hard // arm-linux-androideabi-4.9-thumb // arm-linux-androideabi-4.9-v7a-thumb // arm-linux-androideabi-4.9-v7a-hard-thumb // // and similar for the Clang toolchains. // gcc-4.8 for arm doesn't have the gcov-tool. CppConfiguration.Tool[] excludedTools = { CppConfiguration.Tool.GCOVTOOL }; toolchains.addAll(createArmeabiToolchains("4.8", "-fstack-protector", false, excludedTools)); toolchains.addAll(createArmeabiToolchains("4.8", "-fstack-protector", true, excludedTools)); toolchains.addAll(createArmeabiToolchains("4.9", "-fstack-protector-strong", false)); toolchains.addAll(createArmeabiToolchains("4.9", "-fstack-protector-strong", true)); toolchains.addAll(createArmeabiClangToolchain("3.5", false)); toolchains.addAll(createArmeabiClangToolchain("3.5", true)); toolchains.addAll(createArmeabiClangToolchain("3.6", false)); toolchains.addAll(createArmeabiClangToolchain("3.6", true)); return toolchains.build(); } private CToolchain.Builder createAarch64Toolchain() { String toolchainName = "aarch64-linux-android-4.9"; String targetPlatform = "aarch64-linux-android"; CToolchain.Builder toolchain = CToolchain.newBuilder() .setToolchainIdentifier("aarch64-linux-android-4.9") .setTargetSystemName("aarch64-linux-android") .setTargetCpu("arm64-v8a") .setCompiler("gcc-4.9") .addAllToolPath(ndkPaths.createToolpaths(toolchainName, targetPlatform)) .setBuiltinSysroot(ndkPaths.createBuiltinSysroot("arm64")) // Compiler flags .addCompilerFlag("-fpic") .addCompilerFlag("-ffunction-sections") .addCompilerFlag("-funwind-tables") .addCompilerFlag("-fstack-protector-strong") .addCompilerFlag("-no-canonical-prefixes") // Linker flags .addLinkerFlag("-no-canonical-prefixes") // Additional release flags .addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.OPT) .addCompilerFlag("-O2") .addCompilerFlag("-g") .addCompilerFlag("-DNDEBUG") .addCompilerFlag("-fomit-frame-pointer") .addCompilerFlag("-fstrict-aliasing") .addCompilerFlag("-funswitch-loops") .addCompilerFlag("-finline-limit=300")) // Additional debug flags .addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.DBG) .addCompilerFlag("-O0") .addCompilerFlag("-UNDEBUG") .addCompilerFlag("-fno-omit-frame-pointer") .addCompilerFlag("-fno-strict-aliasing")); ndkPaths.addToolchainIncludePaths(toolchain, toolchainName, targetPlatform, "4.9"); stlImpl.addStlImpl(toolchain, "4.9"); return toolchain; } private CToolchain.Builder createAarch64ClangToolchain(String clangVersion) { String toolchainName = "aarch64-linux-android-4.9"; String targetPlatform = "aarch64-linux-android"; String gccToolchain = ndkPaths.createGccToolchainPath(toolchainName); String llvmTriple = "aarch64-none-linux-android"; CToolchain.Builder toolchain = CToolchain.newBuilder() .setToolchainIdentifier("aarch64-linux-android-clang" + clangVersion) .setTargetSystemName("aarch64-linux-android") .setTargetCpu("arm64-v8a") .setCompiler("clang" + clangVersion) .addAllToolPath(ndkPaths.createClangToolpaths(toolchainName, targetPlatform, clangVersion)) .setBuiltinSysroot(ndkPaths.createBuiltinSysroot("arm64")) // Compiler flags .addCompilerFlag("-gcc-toolchain") .addCompilerFlag(gccToolchain) .addCompilerFlag("-target") .addCompilerFlag(llvmTriple) .addCompilerFlag("-ffunction-sections") .addCompilerFlag("-funwind-tables") .addCompilerFlag("-fstack-protector-strong") .addCompilerFlag("-fpic") .addCompilerFlag("-Wno-invalid-command-line-argument") .addCompilerFlag("-Wno-unused-command-line-argument") .addCompilerFlag("-no-canonical-prefixes") // Linker flags .addLinkerFlag("-gcc-toolchain") .addLinkerFlag(gccToolchain) .addLinkerFlag("-target") .addLinkerFlag(llvmTriple) .addLinkerFlag("-no-canonical-prefixes") // Additional release flags .addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.OPT) .addCompilerFlag("-O2") .addCompilerFlag("-g") .addCompilerFlag("-DNDEBUG") .addCompilerFlag("-fomit-frame-pointer") .addCompilerFlag("-fstrict-aliasing")) // Additional debug flags .addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.DBG) .addCompilerFlag("-O0") .addCompilerFlag("-UNDEBUG") .addCompilerFlag("-fno-omit-frame-pointer") .addCompilerFlag("-fno-strict-aliasing")); ndkPaths.addToolchainIncludePaths(toolchain, toolchainName, targetPlatform, "4.9"); stlImpl.addStlImpl(toolchain, "4.9"); return toolchain; } private List<CToolchain.Builder> createArmeabiToolchains( String gccVersion, String stackProtectorFlag, boolean thumb, CppConfiguration.Tool... excludedTools) { ImmutableList<CToolchain.Builder> toolchains = ImmutableList.<CToolchain.Builder>builder() .add(createBaseArmeabiToolchain(thumb, gccVersion, stackProtectorFlag, excludedTools) .setToolchainIdentifier( createArmeabiName("arm-linux-androideabi-%s", gccVersion, thumb)) .setTargetCpu(createArmeabiCpuName("armeabi", thumb)) .addCompilerFlag("-march=armv5te") .addCompilerFlag("-mtune=xscale") .addCompilerFlag("-msoft-float")) .add(createBaseArmeabiToolchain(thumb, gccVersion, stackProtectorFlag, excludedTools) .setToolchainIdentifier( createArmeabiName("arm-linux-androideabi-%s-v7a", gccVersion, thumb)) .setTargetCpu(createArmeabiCpuName("armeabi-v7a", thumb)) .addCompilerFlag("-march=armv7-a") .addCompilerFlag("-mfpu=vfpv3-d16") .addCompilerFlag("-mfloat-abi=softfp") .addLinkerFlag("-march=armv7-a") .addLinkerFlag("-Wl,--fix-cortex-a8")) .add(createBaseArmeabiToolchain(thumb, gccVersion, stackProtectorFlag, excludedTools) .setToolchainIdentifier( createArmeabiName("arm-linux-androideabi-%s-v7a-hard", gccVersion, thumb)) .setTargetCpu(createArmeabiCpuName("armeabi-v7a-hard", thumb)) .addCompilerFlag("-march=armv7-a") .addCompilerFlag("-mfpu=vfpv3-d16") .addCompilerFlag("-mhard-float") .addCompilerFlag("-D_NDK_MATH_NO_SOFTFP=1") .addLinkerFlag("-march=armv7-a") .addLinkerFlag("-Wl,--fix-cortex-a8") .addLinkerFlag("-Wl,--no-warn-mismatch") .addLinkerFlag("-lm_hard")) .build(); stlImpl.addStlImpl(toolchains, gccVersion); return toolchains; } /** * Flags common to arm-linux-androideabi* */ private CToolchain.Builder createBaseArmeabiToolchain( boolean thumb, String gccVersion, String stackProtectorFlag, CppConfiguration.Tool... excludedTools) { String toolchainName = "arm-linux-androideabi-" + gccVersion; String targetPlatform = "arm-linux-androideabi"; CToolchain.Builder toolchain = CToolchain.newBuilder() .setTargetSystemName(targetPlatform) .setCompiler("gcc-" + gccVersion) .addAllToolPath(ndkPaths.createToolpaths(toolchainName, targetPlatform, excludedTools)) .setBuiltinSysroot(ndkPaths.createBuiltinSysroot("arm")) .addCompilerFlag(stackProtectorFlag) // Compiler flags .addCompilerFlag("-fpic") .addCompilerFlag("-ffunction-sections") .addCompilerFlag("-funwind-tables") .addCompilerFlag("-no-canonical-prefixes") // Linker flags .addLinkerFlag("-no-canonical-prefixes"); if (thumb) { toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.OPT) .addCompilerFlag("-mthumb") .addCompilerFlag("-Os") .addCompilerFlag("-g") .addCompilerFlag("-DNDEBUG") .addCompilerFlag("-fomit-frame-pointer") .addCompilerFlag("-fno-strict-aliasing") .addCompilerFlag("-finline-limit=64")); toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.DBG) .addCompilerFlag("-g") .addCompilerFlag("-fno-strict-aliasing") .addCompilerFlag("-finline-limit=64") .addCompilerFlag("-O0") .addCompilerFlag("-UNDEBUG") .addCompilerFlag("-marm") .addCompilerFlag("-fno-omit-frame-pointer")); } else { toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.OPT) .addCompilerFlag("-O2") .addCompilerFlag("-g") .addCompilerFlag("-DNDEBUG") .addCompilerFlag("-fomit-frame-pointer") .addCompilerFlag("-fstrict-aliasing") .addCompilerFlag("-funswitch-loops") .addCompilerFlag("-finline-limit=300")); toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.DBG) .addCompilerFlag("-g") .addCompilerFlag("-funswitch-loops") .addCompilerFlag("-finline-limit=300") .addCompilerFlag("-O0") .addCompilerFlag("-UNDEBUG") .addCompilerFlag("-fno-omit-frame-pointer") .addCompilerFlag("-fno-strict-aliasing")); } ndkPaths.addToolchainIncludePaths(toolchain, toolchainName, targetPlatform, gccVersion); return toolchain; } private List<CToolchain.Builder> createArmeabiClangToolchain(String clangVersion, boolean thumb) { ImmutableList<CToolchain.Builder> toolchains = ImmutableList.<CToolchain.Builder>builder() .add(createBaseArmeabiClangToolchain(clangVersion, thumb) .setToolchainIdentifier( createArmeabiName("arm-linux-androideabi-clang%s", clangVersion, thumb)) .setTargetCpu(createArmeabiCpuName("armeabi", thumb)) .addCompilerFlag("-target") .addCompilerFlag("armv5te-none-linux-androideabi") // LLVM_TRIPLE .addCompilerFlag("-march=armv5te") .addCompilerFlag("-mtune=xscale") .addCompilerFlag("-msoft-float") .addLinkerFlag("-target") // LLVM_TRIPLE .addLinkerFlag("armv5te-none-linux-androideabi")) .add(createBaseArmeabiClangToolchain(clangVersion, thumb) .setToolchainIdentifier( createArmeabiName("arm-linux-androideabi-clang%s-v7a", clangVersion, thumb)) .setTargetCpu(createArmeabiCpuName("armeabi-v7a", thumb)) .addCompilerFlag("-target") .addCompilerFlag("armv7-none-linux-androideabi") // LLVM_TRIPLE .addCompilerFlag("-march=armv7-a") .addCompilerFlag("-mfloat-abi=softfp") .addCompilerFlag("-mfpu=vfpv3-d16") .addLinkerFlag("-target") .addLinkerFlag("armv7-none-linux-androideabi") // LLVM_TRIPLE .addLinkerFlag("-Wl,--fix-cortex-a8")) .add(createBaseArmeabiClangToolchain(clangVersion, thumb) .setToolchainIdentifier( createArmeabiName("arm-linux-androideabi-clang%s-v7a-hard", clangVersion, thumb)) .setTargetCpu(createArmeabiCpuName("armeabi-v7a-hard", thumb)) .addCompilerFlag("-target") .addCompilerFlag("armv7-none-linux-androideabi") // LLVM_TRIPLE .addCompilerFlag("-march=armv7-a") .addCompilerFlag("-mfpu=vfpv3-d16") .addCompilerFlag("-mhard-float") .addCompilerFlag("-D_NDK_MATH_NO_SOFTFP=1") .addLinkerFlag("-target") .addLinkerFlag("armv7-none-linux-androideabi") // LLVM_TRIPLE .addLinkerFlag("-Wl,--fix-cortex-a8") .addLinkerFlag("-Wl,--no-warn-mismatch") .addLinkerFlag("-lm_hard")) .build(); stlImpl.addStlImpl(toolchains, "4.9"); return toolchains; } private CToolchain.Builder createBaseArmeabiClangToolchain(String clangVersion, boolean thumb) { String toolchainName = "arm-linux-androideabi-4.8"; String targetPlatform = "arm-linux-androideabi"; String gccToolchain = ndkPaths.createGccToolchainPath("arm-linux-androideabi-4.8"); CToolchain.Builder toolchain = CToolchain.newBuilder() .setTargetSystemName("arm-linux-androideabi") .setCompiler("clang" + clangVersion) .addAllToolPath(ndkPaths.createClangToolpaths( toolchainName, targetPlatform, clangVersion, // gcc-4.8 arm doesn't have gcov-tool CppConfiguration.Tool.GCOVTOOL)) .setBuiltinSysroot(ndkPaths.createBuiltinSysroot("arm")) // Compiler flags .addCompilerFlag("-gcc-toolchain") .addCompilerFlag(gccToolchain) .addCompilerFlag("-fpic") .addCompilerFlag("-ffunction-sections") .addCompilerFlag("-funwind-tables") .addCompilerFlag("-fstack-protector-strong") .addCompilerFlag("-Wno-invalid-command-line-argument") .addCompilerFlag("-Wno-unused-command-line-argument") .addCompilerFlag("-no-canonical-prefixes") .addCompilerFlag("-fno-integrated-as") // Linker flags .addLinkerFlag("-gcc-toolchain") .addLinkerFlag(gccToolchain) .addLinkerFlag("-no-canonical-prefixes"); if (thumb) { toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.OPT) .addCompilerFlag("-mthumb") .addCompilerFlag("-Os") .addCompilerFlag("-g") .addCompilerFlag("-DNDEBUG") .addCompilerFlag("-fomit-frame-pointer") .addCompilerFlag("-fno-strict-aliasing")); toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.DBG) .addCompilerFlag("-g") .addCompilerFlag("-fno-strict-aliasing") .addCompilerFlag("-O0") .addCompilerFlag("-UNDEBUG") .addCompilerFlag("-marm") .addCompilerFlag("-fno-omit-frame-pointer")); } else { toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.OPT) .addCompilerFlag("-O2") .addCompilerFlag("-g") .addCompilerFlag("-DNDEBUG") .addCompilerFlag("-fomit-frame-pointer") .addCompilerFlag("-fstrict-aliasing")); toolchain.addCompilationModeFlags(CompilationModeFlags.newBuilder() .setMode(CompilationMode.DBG) .addCompilerFlag("-g") .addCompilerFlag("-O0") .addCompilerFlag("-UNDEBUG") .addCompilerFlag("-fno-omit-frame-pointer") .addCompilerFlag("-fno-strict-aliasing")); } ndkPaths.addToolchainIncludePaths(toolchain, toolchainName, targetPlatform, "4.8"); return toolchain; } private static String createArmeabiName(String base, String gccVersion, boolean thumb) { return String.format(base, gccVersion) + (thumb ? "-thumb" : ""); } private static String createArmeabiCpuName(String base, boolean thumb) { return base + (thumb ? "-thumb" : ""); } }
kamalmarhubi/bazel
src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/ArmCrosstools.java
Java
apache-2.0
18,157
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // <auto-generated/> #nullable disable using System.Text.Json; using Azure.Core; namespace Azure.Search.Documents.Indexes.Models { public partial class PhoneticTokenFilter : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Encoder != null) { writer.WritePropertyName("encoder"); writer.WriteStringValue(Encoder.Value.ToSerialString()); } if (ReplaceOriginalTokens != null) { writer.WritePropertyName("replace"); writer.WriteBooleanValue(ReplaceOriginalTokens.Value); } writer.WritePropertyName("@odata.type"); writer.WriteStringValue(ODataType); writer.WritePropertyName("name"); writer.WriteStringValue(Name); writer.WriteEndObject(); } internal static PhoneticTokenFilter DeserializePhoneticTokenFilter(JsonElement element) { PhoneticEncoder? encoder = default; bool? replace = default; string odataType = default; string name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("encoder")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } encoder = property.Value.GetString().ToPhoneticEncoder(); continue; } if (property.NameEquals("replace")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } replace = property.Value.GetBoolean(); continue; } if (property.NameEquals("@odata.type")) { odataType = property.Value.GetString(); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } } return new PhoneticTokenFilter(odataType, name, encoder, replace); } } }
stankovski/azure-sdk-for-net
sdk/search/Azure.Search.Documents/src/Generated/Models/PhoneticTokenFilter.Serialization.cs
C#
apache-2.0
2,523
package com.cattong.sns.impl.facebook; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import com.cattong.commons.LibException; import com.cattong.commons.LibResultCode; import com.cattong.commons.ServiceProvider; import com.cattong.commons.util.ParseUtil; import com.cattong.commons.util.StringUtil; import com.cattong.sns.entity.Photo; public class FacebookPhotoAdapter { public static Photo createPhoto(String jsonString) throws LibException { try { JSONObject json = new JSONObject(jsonString); return createPhoto(json); } catch (JSONException e) { throw new LibException(LibResultCode.JSON_PARSE_ERROR, e); } } public static List<Photo> createPhotoList(String jsonString) throws LibException { try { if (StringUtil.isEquals("{}", jsonString) || StringUtil.isEquals("[]", jsonString)) { return new ArrayList<Photo>(0); } JSONArray jsonArray = new JSONArray(jsonString); int length = jsonArray.length(); List<Photo> photos = new ArrayList<Photo>(length); for (int i = 0; i < length; i++) { photos.add(createPhoto(jsonArray.getJSONObject(i))); } return photos; } catch (JSONException e) { throw new LibException(LibResultCode.JSON_PARSE_ERROR, e); } } public static Photo createPhoto(JSONObject json) throws LibException { if (json == null) { return null; } try { Photo photo = new Photo(); photo.setId(ParseUtil.getRawString("id", json)); photo.setAlbumId(ParseUtil.getRawString("aid", json)); photo.setCaption(ParseUtil.getRawString("name", json)); if (json.has("comments")) { photo.setCommentsCount(json.getJSONObject("comments").getJSONArray("data").length()); } photo.setThumbnailPicture(ParseUtil.getRawString("picture", json)); photo.setOriginalPicture(ParseUtil.getRawString("source", json)); photo.setMiddlePicture(ParseUtil.getRawString("source", json)); if (json.has("images")) { JSONArray imagesArray = json.getJSONArray("images"); photo.setMiddlePicture(ParseUtil.getRawString("source", imagesArray.getJSONObject(1))); } photo.setServiceProvider(ServiceProvider.Facebook); return photo; } catch (JSONException e) { throw new LibException(LibResultCode.JSON_PARSE_ERROR, e); } } }
0359xiaodong/YiBo
YiBoLibrary/src/com/cattong/sns/impl/facebook/FacebookPhotoAdapter.java
Java
apache-2.0
2,404
# # Author:: Adam Jacob (<adam@opscode.com>) # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # 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. # require "spec_helper" describe Chef::Knife::NodeDelete do before(:each) do Chef::Config[:node_name] = "webmonkey.example.com" @knife = Chef::Knife::NodeDelete.new @knife.config = { :print_after => nil } @knife.name_args = [ "adam" ] allow(@knife).to receive(:output).and_return(true) allow(@knife).to receive(:confirm).and_return(true) @node = Chef::Node.new() allow(@node).to receive(:destroy).and_return(true) allow(Chef::Node).to receive(:load).and_return(@node) @stdout = StringIO.new allow(@knife.ui).to receive(:stdout).and_return(@stdout) end describe "run" do it "should confirm that you want to delete" do expect(@knife).to receive(:confirm) @knife.run end it "should load the node" do expect(Chef::Node).to receive(:load).with("adam").and_return(@node) @knife.run end it "should delete the node" do expect(@node).to receive(:destroy).and_return(@node) @knife.run end it "should not print the node" do expect(@knife).not_to receive(:output).with("poop") @knife.run end describe "with -p or --print-after" do it "should pretty print the node, formatted for display" do @knife.config[:print_after] = true expect(@knife).to receive(:format_for_display).with(@node).and_return("poop") expect(@knife).to receive(:output).with("poop") @knife.run end end end end
BackSlasher/chef
spec/unit/knife/node_delete_spec.rb
Ruby
apache-2.0
2,147
/** * 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 org.apache.hadoop.hive.ql.io.parquet.serde; import java.util.HashMap; import java.util.Map; import junit.framework.TestCase; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory; import org.apache.hadoop.io.ArrayWritable; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Writable; import org.junit.Test; public class TestAbstractParquetMapInspector extends TestCase { class TestableAbstractParquetMapInspector extends AbstractParquetMapInspector { public TestableAbstractParquetMapInspector(ObjectInspector keyInspector, ObjectInspector valueInspector) { super(keyInspector, valueInspector); } @Override public Object getMapValueElement(Object o, Object o1) { throw new UnsupportedOperationException("Should not be called"); } } private TestableAbstractParquetMapInspector inspector; @Override public void setUp() { inspector = new TestableAbstractParquetMapInspector(PrimitiveObjectInspectorFactory.javaIntObjectInspector, PrimitiveObjectInspectorFactory.javaIntObjectInspector); } @Test public void testNullMap() { assertEquals("Wrong size", -1, inspector.getMapSize(null)); assertNull("Should be null", inspector.getMap(null)); } @Test public void testNullContainer() { final ArrayWritable map = new ArrayWritable(ArrayWritable.class, null); assertEquals("Wrong size", -1, inspector.getMapSize(map)); assertNull("Should be null", inspector.getMap(map)); } @Test public void testEmptyContainer() { final ArrayWritable map = new ArrayWritable(ArrayWritable.class, new ArrayWritable[0]); assertEquals("Wrong size", 0, inspector.getMapSize(map)); assertNotNull("Should not be null", inspector.getMap(map)); } @Test public void testRegularMap() { final Writable[] entry1 = new Writable[]{new IntWritable(0), new IntWritable(1)}; final Writable[] entry2 = new Writable[]{new IntWritable(2), new IntWritable(3)}; final ArrayWritable map = new ArrayWritable(ArrayWritable.class, new Writable[]{ new ArrayWritable(Writable.class, entry1), new ArrayWritable(Writable.class, entry2)}); final Map<Writable, Writable> expected = new HashMap<Writable, Writable>(); expected.put(new IntWritable(0), new IntWritable(1)); expected.put(new IntWritable(2), new IntWritable(3)); assertEquals("Wrong size", 2, inspector.getMapSize(map)); assertEquals("Wrong result of inspection", expected, inspector.getMap(map)); } @Test public void testHashMap() { final Map<Writable, Writable> map = new HashMap<Writable, Writable>(); map.put(new IntWritable(0), new IntWritable(1)); map.put(new IntWritable(2), new IntWritable(3)); map.put(new IntWritable(4), new IntWritable(5)); map.put(new IntWritable(6), new IntWritable(7)); assertEquals("Wrong size", 4, inspector.getMapSize(map)); assertEquals("Wrong result of inspection", map, inspector.getMap(map)); } }
BUPTAnderson/apache-hive-2.1.1-src
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/serde/TestAbstractParquetMapInspector.java
Java
apache-2.0
3,638
/** * 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.wicketTutorial.localizechoices; import org.apache.wicket.util.tester.WicketTester; import org.junit.Before; import org.junit.Test; import org.wicketTutorial.localizechoices.HomePage; import org.wicketTutorial.localizechoices.WicketApplication; /** * Simple test using the WicketTester */ public class TestHomePage { private WicketTester tester; @Before public void setUp() { tester = new WicketTester(new WicketApplication()); } @Test public void homepageRendersSuccessfully() { //start and render the test page tester.startPage(HomePage.class); //assert rendered page class tester.assertRenderedPage(HomePage.class); } }
eschwert/Wicket-tutorial-examples
LocalizedChoicesExample/src/test/java/org/wicketTutorial/localizechoices/TestHomePage.java
Java
apache-2.0
1,476
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0137)http://demo.Saivi.cn/index.php?g=Wap&m=Index&a=index&token=vemmyj1400164325&wecha_id=oKhaVjqgLaKArgt56avxkHtsuPtI&sgssz=mp.weixin.qq.com --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>{Saivi:$tpl.wxname}</title> <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no"><style> #iframe_screen{ background:#fff; position:absolute; width:100%; height:100%; left:0; top:0; z-index:300000; overflow:hidden; } </style> <meta charset="utf-8"> <link rel="stylesheet" href="http://demo.Saivi.cn/tpl/static/tpl/com/css/idangerous.swiper.css"> <link href="{Saivi::RES}/css/1128/iscroll.css" rel="stylesheet" type="text/css"> <link href="{Saivi::RES}/css/1128/cate.css" rel="stylesheet" type="text/css"> <style></style> <script src="{Saivi::RES}/css/1128/iscroll.js" type="text/javascript"></script><script type="text/javascript">var myScroll; function loaded() { myScroll = new iScroll('wrapper', { snap: true, momentum: false, hScrollbar: false, onScrollEnd: function () { document.querySelector('#indicator > li.active').className = ''; document.querySelector('#indicator > li:nth-child(' + (this.currPageX+1) + ')').className = 'active'; } }); } document.addEventListener('DOMContentLoaded', loaded, false); </script> </head> <body style=""><!--music--> <if condition="$dh['animation'] neq '0'"><iframe id="iframe_screen" src="./tpl/Wap/default/Index_an{Saivi:$dh.animation}.html" frameborder="0"></iframe></if> <if condition="$homeInfo['musicurl'] neq false"> <include file="Index:music"/> </if> <!--music--> <div class="banner"> <div id="wrapper" style="overflow: hidden;"> <div id="scroller" style="width: 1222px; -webkit-transition: -webkit-transform 0ms; transition: -webkit-transform 0ms; -webkit-transform-origin: 0px 0px; -webkit-transform: translate3d(0px, 0px, 0px) scale(1);"> <ul id="thelist"> <volist name="flash" id="so"> <li><p>{Saivi:$so.info}</p><a href="{Saivi:$so.url}"><img src="{Saivi:$so.img}" /></a></li> </volist> </ul> </div> </div> <div id="nav"> <div id="prev" onclick="myScroll.scrollToPage(&#39;prev&#39;, 0,400,2);return false">← prev</div> <ul id="indicator"> <li class="active"></li> </ul> <div id="next" onclick="myScroll.scrollToPage(&#39;next&#39;, 0);return false">next →</div> </div> <div class="clr"></div> </div> <div id="insert1"></div> <div class="device"><a class="arrow-left" href="#"></a><a class="arrow-right" href="#"></a> <div class="swiper-container" style="cursor: -webkit-grab;"> <div class="swiper-wrapper" style="width: 3666px; height: 295px; -webkit-transform: translate3d(-1222px, 0px, 0px); transition: 0s; -webkit-transition: 0s;"> <div class="swiper-slide" style="width: 1222px; height: 295px;"> <div class="content-slide"> <volist name="info" id="vo"> <if condition="$i lt 7"> <a href="<if condition="$vo['url'] eq ''">{Saivi::U('Wap/Index/lists',array('classid'=>$vo['id'],'token'=>$vo['token']))}<else/>{Saivi:$vo.url}</if>"> <div class="mbg"> <p class="ico"><img src="{Saivi:$vo.img}"></p> <p class="title">{Saivi:$vo.name}</p> </div> </a></if></volist></div> </div> <div class="swiper-slide swiper-slide-visible swiper-slide-active" style="width: 1222px; height: 295px;"> <div class="swiper-slide" style="width: 1222px; height: 295px;"> <div class="content-slide"> <volist name="info" id="vo"> <if condition="$i gt 6"> <a href="<if condition="$vo['url'] eq ''">{Saivi::U('Wap/Index/lists',array('classid'=>$vo['id'],'token'=>$vo['token']))}<else/>{Saivi:$vo.url}</if>"> <div class="mbg"> <p class="ico"><img src="{Saivi:$vo.img}"></p> <p class="title">{Saivi:$vo.name}</p> </div> </a></if></volist></div> </div> </div> </div> <div class="pagination"><span class="swiper-pagination-switch swiper-visible-switch swiper-active-switch"></span></div> <script src="{Saivi::RES}/css/1128/jquery-1.10.1.min.js" type="text/javascript"></script><script src="{Saivi::RES}/css/1128/idangerous.swiper-2.1.min.js" type="text/javascript"></script><script> var mySwiper = new Swiper('.swiper-container',{ pagination: '.pagination', loop:true, grabCursor: true, paginationClickable: true }) $('.arrow-left').on('click', function(e){ e.preventDefault() mySwiper.swipePrev() }) $('.arrow-right').on('click', function(e){ e.preventDefault() mySwiper.swipeNext() }) </script><script>var count = document.getElementById("thelist").getElementsByTagName("img").length; var count2 = document.getElementsByClassName("menuimg").length; for(i=0;i<count;i++){ document.getElementById("thelist").getElementsByTagName("img").item(i).style.cssText = " width:"+document.body.clientWidth+"px"; } document.getElementById("scroller").style.cssText = " width:"+document.body.clientWidth*count+"px"; setInterval(function(){ myScroll.scrollToPage('next', 0,400,count); },3500 ); window.onresize = function(){ for(i=0;i<count;i++){ document.getElementById("thelist").getElementsByTagName("img").item(i).style.cssText = " width:"+document.body.clientWidth+"px"; } document.getElementById("scroller").style.cssText = " width:"+document.body.clientWidth*count+"px"; } </script> <div class="copyright"></div> <script src="{Saivi::RES}/css/1128/jquery.min.js" type="text/javascript"></script><script>function displayit(n){ for(i=0;i<4;i++){ if(i==n){ var id='menu_list'+n; if(document.getElementById(id).style.display=='none'){ document.getElementById(id).style.display=''; document.getElementById("plug-wrap").style.display=''; }else{ document.getElementById(id).style.display='none'; document.getElementById("plug-wrap").style.display='none'; } }else{ if($('#menu_list'+i)){ $('#menu_list'+i).css('display','none'); } } } } function closeall(){ var count = document.getElementById("top_menu").getElementsByTagName("ul").length; for(i=0;i<count;i++){ document.getElementById("top_menu").getElementsByTagName("ul").item(i).style.display='none'; } document.getElementById("plug-wrap").style.display='none'; } document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() { WeixinJSBridge.call('hideToolbar'); }); </script> <include file="Index:styleInclude"/><include file="$cateMenuFileName"/> <if condition="ACTION_NAME eq 'index'"> <script type="text/javascript"> window.shareData = { "moduleName":"Index", "moduleID": '0', "imgUrl": "{Saivi:$homeInfo.picurl}", "timeLineLink": "{Saivi::C('site_url')}{Saivi::U(Index/ACTION_NAME,array('token'=>$_GET['token']))}", "sendFriendLink": "{Saivi::C('site_url')}{Saivi::U(Index/ACTION_NAME,array('token'=>$_GET['token']))}", "weiboLink": "{Saivi::C('site_url')}{Saivi::U(Index/ACTION_NAME,array('token'=>$_GET['token']))}", "tTitle": "{Saivi:$homeInfo.title}", "tContent": "{Saivi:$homeInfo.info}" }; </script> <else /> <script type="text/javascript"> window.shareData = { "moduleName":"Index", "moduleID": '1', "imgUrl": "{Saivi:$homeInfo.picurl}", "timeLineLink": "{Saivi::C('site_url')}{Saivi::U(Index/ACTION_NAME,array('token'=>$_GET['token'],'classid'=>$_GET['classid']))}", "sendFriendLink": "{Saivi::C('site_url')}{Saivi::U(MODULE_NAME/ACTION_NAME,array('token'=>$_GET['token'],'classid'=>$_GET['classid']))}", "weiboLink": "{Saivi::C('site_url')}{Saivi::U(MODULE_NAME/ACTION_NAME,array('token'=>$_GET['token'],'classid'=>$_GET['classid']))}", "tTitle": "{Saivi:$homeInfo.title}", "tContent": "{Saivi:$homeInfo.info}" }; </script> </if> {Saivi:$shareScript}<!--chat--> <script type="text/javascript" src="/tpl/Wap/default/common/js/ChatFloat.js"></script> <if condition="$kefu['status'] eq '1'"><a href="{Saivi:$kefu.info2}" id="CustomerChatFloat" style="position: fixed; right: 0px; top: 150px; z-index: 99999; height: 70px; width: 65px; min-width: 65px; background-image: url(/tpl/Wap/default/common/css/img/MobileChatFloat.png); background-size: 65px; background-position: 0px 0px; background-repeat: no-repeat no-repeat;"></a></if> </body> </html>
taobataoma/saivi
tpl/Wap/default/Index_1116.html
HTML
apache-2.0
8,958
package com.starlight36.yar.client; import java.io.IOException; /** * com.starlight36.yar.client.Main */ public class Main { public static void main(String[] args) throws IOException { YarClient client = new YarClient("http://localhost/yar.php"); DummyTimeDto time = client.call("doSomething", DummyTimeDto.class, "Hello"); System.out.println(time.getId()); System.out.println(time.getTime()); client.close(); } }
starlight36/yar-client-java
src/test/java/com/starlight36/yar/client/Main.java
Java
apache-2.0
466
// Copyright 2000-2017 JetBrains s.r.o. // Use of this source code is governed by the Apache 2.0 license that can be // found in the LICENSE file. package com.intellij.refactoring.extractMethod; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.util.Pass; import com.intellij.psi.*; import com.intellij.psi.codeStyle.JavaCodeStyleManager; import com.intellij.psi.search.LocalSearchScope; import com.intellij.psi.search.searches.ReferencesSearch; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.PsiUtil; import com.intellij.refactoring.HelpID; import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.util.CommonRefactoringUtil; import com.intellij.refactoring.util.VariableData; import com.intellij.refactoring.util.duplicates.*; import com.intellij.util.ArrayUtil; import com.intellij.util.IncorrectOperationException; import com.intellij.util.containers.ContainerUtil; import one.util.streamex.StreamEx; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; /** * @author Pavel.Dolgov */ public class JavaDuplicatesExtractMethodProcessor extends ExtractMethodProcessor { private static final Logger LOG = Logger.getInstance(JavaDuplicatesExtractMethodProcessor.class); private static final Pass<ExtractMethodProcessor> USE_SNAPSHOT_TARGET_CLASS = new Pass<ExtractMethodProcessor>() { @Override public void pass(ExtractMethodProcessor processor) {} // it's a dummy but it's required to select the target class }; public JavaDuplicatesExtractMethodProcessor(@NotNull PsiElement[] elements, @NotNull String refactoringName) { this(elements, null, refactoringName); } public JavaDuplicatesExtractMethodProcessor(@NotNull PsiElement[] elements, @Nullable Editor editor, @Nullable String refactoringName) { super(elements[0].getProject(), editor, elements, null, refactoringName, "", HelpID.EXTRACT_METHOD); } public void applyFrom(@NotNull ExtractMethodProcessor from, @NotNull Map<PsiVariable, PsiVariable> variablesMapping) { myMethodName = from.myMethodName != null ? from.myMethodName : "dummyMethodName"; myStatic = from.myStatic; myIsChainedConstructor = from.myIsChainedConstructor; myMethodVisibility = from.myMethodVisibility; myNullability = from.myNullability; myReturnType = from.myReturnType; myOutputVariables = Arrays.stream(from.myOutputVariables) .map(variable -> variablesMapping.getOrDefault(variable, variable)) .toArray(PsiVariable[]::new); myOutputVariable = ArrayUtil.getFirstElement(myOutputVariables); myArtificialOutputVariable = variablesMapping.getOrDefault(from.myArtificialOutputVariable, from.myArtificialOutputVariable); List<VariableData> variableDatum = new ArrayList<>(); List<VariableData> inputVariables = getInputVariables().getInputVariables(); for (int i = 0; i < from.myVariableDatum.length; i++) { VariableData fromData = from.myVariableDatum[i]; PsiVariable mappedVariable = variablesMapping.get(fromData.variable); if (isReferenced(mappedVariable, fromData.variable) && isUnchanged(mappedVariable, fromData.type, inputVariables)) { VariableData newData = fromData.substitute(mappedVariable); variableDatum.add(newData); } } Set<PsiVariable> parameterVariables = ContainerUtil.map2Set(variableDatum, data -> data.variable); for (VariableData data : inputVariables) { if (!parameterVariables.contains(data.variable)) { variableDatum.add(data); } } myVariableDatum = variableDatum.toArray(new VariableData[0]); } private static boolean isUnchanged(PsiVariable fromVariable, PsiType fromType, @NotNull List<VariableData> inputVariables) { for (VariableData data : inputVariables) { if (data.variable == fromVariable) { return data.type != null && data.type.equalsToText(fromType.getCanonicalText()); } } return true; } public boolean prepareFromSnapshot(@NotNull ExtractMethodSnapshot from, boolean showErrorHint) { applyFromSnapshot(from); PsiFile psiFile = myElements[0].getContainingFile(); ExtractMethodSnapshot.SNAPSHOT_KEY.set(psiFile, from); try { if (!prepare(USE_SNAPSHOT_TARGET_CLASS, showErrorHint)) { return false; } } finally { ExtractMethodSnapshot.SNAPSHOT_KEY.set(psiFile, null); } myStatic = from.myStatic; myInputVariables.setFoldingAvailable(from.myFoldable); return true; } private void applyFromSnapshot(@NotNull ExtractMethodSnapshot from) { myMethodName = from.myMethodName; myStatic = from.myStatic; myIsChainedConstructor = from.myIsChainedConstructor; myMethodVisibility = from.myMethodVisibility; myNullability = from.myNullability; myReturnType = from.myReturnType != null ? from.myReturnType.getType() : null; myOutputVariables = StreamEx.of(from.myOutputVariables).map(SmartPsiElementPointer::getElement).toArray(new PsiVariable[0]); LOG.assertTrue(!ArrayUtil.contains(null, myOutputVariables)); myOutputVariable = ArrayUtil.getFirstElement(myOutputVariables); myArtificialOutputVariable = from.myArtificialOutputVariable != null ? from.myArtificialOutputVariable.getElement() : null; myVariableDatum = StreamEx.of(from.myVariableDatum).map(VariableDataSnapshot::getData).toArray(new VariableData[0]); LOG.assertTrue(!ArrayUtil.contains(null, myVariableDatum)); } private boolean isReferenced(@Nullable PsiVariable variable, PsiVariable fromVariable) { return variable == fromVariable || // it's a freshlyDeclaredParameter (variable != null && ReferencesSearch.search(variable, new LocalSearchScope(myElements)).findFirst() != null); } public void applyDefaults(@NotNull String methodName, @PsiModifier.ModifierConstant @NotNull String visibility) { myMethodName = methodName; myVariableDatum = getInputVariables().getInputVariables().toArray(new VariableData[0]); myMethodVisibility = visibility; myArtificialOutputVariable = PsiType.VOID.equals(myReturnType) ? getArtificialOutputVariable() : null; final PsiType returnType = myArtificialOutputVariable != null ? myArtificialOutputVariable.getType() : myReturnType; if (returnType != null) { myReturnType = returnType; } } @Override public void doExtract() { super.chooseAnchor(); super.doExtract(); } public void updateStaticModifier(List<Match> matches) { if (!isStatic() && isCanBeStatic()) { for (Match match : matches) { if (!isInSameFile(match) || !isInSameClass(match)) { PsiUtil.setModifierProperty(myExtractedMethod, PsiModifier.STATIC, true); myStatic = true; break; } } } } public void putExtractedParameters(Map<PsiLocalVariable, ExtractedParameter> extractedParameters) { for (Map.Entry<PsiLocalVariable, ExtractedParameter> entry : extractedParameters.entrySet()) { myInputVariables.foldExtractedParameter(entry.getKey(), entry.getValue().myPattern.getUsage()); } } public boolean prepare(boolean showErrorHint) { return prepare(null, showErrorHint); } private boolean prepare(@Nullable Pass<ExtractMethodProcessor> pass, boolean showErrorHint) { setShowErrorDialogs(false); try { if (super.prepare(pass)) { return true; } final String message = RefactoringBundle.getCannotRefactorMessage( RefactoringBundle.message("is.not.supported.in.the.current.context", myRefactoringName)); LOG.info(message); if (showErrorHint) { CommonRefactoringUtil.showErrorHint(myProject, null, message, myRefactoringName, HelpID.EXTRACT_METHOD); } return false; } catch (PrepareFailedException e) { LOG.info(e); if (showErrorHint) { CommonRefactoringUtil.showErrorHint(myProject, null, e.getMessage(), myRefactoringName, HelpID.EXTRACT_METHOD); } return false; } } @Override public PsiElement processMatch(Match match) throws IncorrectOperationException { boolean inSameFile = isInSameFile(match); if (!inSameFile) { relaxMethodVisibility(match); } boolean inSameClass = isInSameClass(match); PsiElement element = super.processMatch(match); if (!inSameFile || !inSameClass) { PsiMethodCallExpression callExpression = getMatchMethodCallExpression(element); if (callExpression != null) { return updateCallQualifier(callExpression); } } return element; } @Override protected boolean isFoldingApplicable() { return false; } @NotNull private PsiElement updateCallQualifier(PsiMethodCallExpression callExpression) { PsiElementFactory factory = JavaPsiFacade.getElementFactory(myProject); PsiClass psiClass = myExtractedMethod.getContainingClass(); LOG.assertTrue(psiClass != null, "myExtractedMethod.getContainingClass"); PsiReferenceExpression newQualifier = factory.createReferenceExpression(psiClass); callExpression.getMethodExpression().setQualifierExpression(newQualifier); return JavaCodeStyleManager.getInstance(myProject).shortenClassReferences(callExpression); } @NotNull public DuplicatesFinder createDuplicatesFinder() { ReturnValue returnValue = myOutputVariables.length == 1 ? new VariableReturnValue(myOutputVariables[0]) : null; Set<PsiVariable> effectivelyLocal = getEffectivelyLocalVariables(); return new DuplicatesFinder(myElements, myInputVariables, returnValue, Collections.emptyList(), DuplicatesFinder.MatchType.PARAMETRIZED, effectivelyLocal); } private void relaxMethodVisibility(Match match) { if (isInSamePackage(match)) { PsiUtil.setModifierProperty(myExtractedMethod, PsiModifier.PRIVATE, false); } else { PsiUtil.setModifierProperty(myExtractedMethod, PsiModifier.PUBLIC, true); } } private boolean isInSameFile(Match match) { return myExtractedMethod.getContainingFile() == match.getMatchStart().getContainingFile(); } private boolean isInSamePackage(Match match) { PsiFile psiFile = myExtractedMethod.getContainingFile(); PsiFile matchFile = match.getMatchStart().getContainingFile(); return psiFile instanceof PsiJavaFile && matchFile instanceof PsiJavaFile && Objects.equals(((PsiJavaFile)psiFile).getPackageName(), ((PsiJavaFile)matchFile).getPackageName()); } private boolean isInSameClass(Match match) { PsiClass matchClass = PsiTreeUtil.getParentOfType(match.getMatchStart(), PsiClass.class); PsiClass psiClass = PsiTreeUtil.getParentOfType(myExtractedMethod, PsiClass.class); return matchClass != null && PsiTreeUtil.isAncestor(psiClass, matchClass, false); } }
jk1/intellij-community
java/java-impl/src/com/intellij/refactoring/extractMethod/JavaDuplicatesExtractMethodProcessor.java
Java
apache-2.0
10,856
/* * #%L * ELK Reasoner * $Id:$ * $HeadURL:$ * %% * Copyright (C) 2011 - 2016 Department of Computer Science, University of Oxford * %% * 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. * #L% */ package org.semanticweb.elk.reasoner.taxonomy.impl; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; import org.semanticweb.elk.owl.interfaces.ElkEntity; import org.semanticweb.elk.reasoner.taxonomy.hashing.InstanceTaxonomyEqualator; import org.semanticweb.elk.reasoner.taxonomy.hashing.InstanceTaxonomyHasher; import org.semanticweb.elk.reasoner.taxonomy.model.ComparatorKeyProvider; import org.semanticweb.elk.reasoner.taxonomy.model.GenericInstanceNode; import org.semanticweb.elk.reasoner.taxonomy.model.GenericTypeNode; import org.semanticweb.elk.reasoner.taxonomy.model.InstanceNode; import org.semanticweb.elk.reasoner.taxonomy.model.InstanceTaxonomy; import org.semanticweb.elk.reasoner.taxonomy.model.NodeFactory; import org.semanticweb.elk.reasoner.taxonomy.model.NodeStore; import org.semanticweb.elk.reasoner.taxonomy.model.Taxonomy; import org.semanticweb.elk.reasoner.taxonomy.model.TaxonomyNodeFactory; import org.semanticweb.elk.reasoner.taxonomy.model.TypeNode; import org.semanticweb.elk.reasoner.taxonomy.model.UpdateableInstanceTaxonomy; import org.semanticweb.elk.util.collections.LazySetUnion; /** * A generic implementation of instance taxonomy that extends an implementation * of class taxonomy. * * @author Peter Skocovsky * * @param <T> * The type of members of the type nodes in this taxonomy. * @param <I> * The type of members of the instance nodes in this taxonomy. * @param <TN> * The immutable type of type nodes in this taxonomy. * @param <IN> * The immutable type of instance nodes in this taxonomy. * @param <UTN> * The mutable type of type nodes in this taxonomy. * @param <UIN> * The mutable type of instance nodes in this taxonomy. */ public abstract class AbstractUpdateableGenericInstanceTaxonomy<T extends ElkEntity, I extends ElkEntity, TN extends GenericTypeNode<T, I, TN, IN>, IN extends GenericInstanceNode<T, I, TN, IN>, UTN extends UpdateableTaxonomyTypeNode<T, I, TN, IN, UTN, UIN>, UIN extends UpdateableInstanceNode<T, I, TN, IN, UTN, UIN>> extends AbstractUpdateableGenericTaxonomy<T, TN, UTN> implements UpdateableInstanceTaxonomy<T, I> { /** Factory that creates instance nodes. */ private final NodeFactory<I, UIN> instanceNodeFactory_; /** The store containing instance nodes of this taxonomy. */ protected final UpdateableNodeStore<I, UIN> instanceNodeStore_; /** The listeners notified about the changes to instance taxonomy. */ protected final List<InstanceTaxonomy.Listener<T, I>> instanceListeners_; /** * Constructor. * * @param typeNodeStore * Node store for the type nodes. * @param typeNodeFactory * Factory that creates type nodes. * @param instanceNodeStore * Node store for the instance nodes. * @param instanceNodeFactory * Factory that creates instance nodes. * @param topMember * The canonical member of the top node. */ public AbstractUpdateableGenericInstanceTaxonomy( final UpdateableNodeStore<T, UTN> typeNodeStore, final TaxonomyNodeFactory<T, UTN, AbstractDistinctBottomTaxonomy<T, TN, UTN>> typeNodeFactory, final UpdateableNodeStore<I, UIN> instanceNodeStore, final TaxonomyNodeFactory<I, UIN, InstanceTaxonomy<T, I>> instanceNodeFactory, final T topMember) { super(typeNodeStore, typeNodeFactory, topMember); this.instanceNodeStore_ = instanceNodeStore; this.instanceNodeFactory_ = new NodeFactory<I, UIN>() { @Override public UIN createNode(final Iterable<? extends I> members, final int size) { return instanceNodeFactory.createNode(members, size, AbstractUpdateableGenericInstanceTaxonomy.this); } }; this.instanceListeners_ = new ArrayList<InstanceTaxonomy.Listener<T, I>>(); } @Override public ComparatorKeyProvider<? super I> getInstanceKeyProvider() { return instanceNodeStore_.getKeyProvider(); } @Override public InstanceNode<T, I> getInstanceNode(final I elkEntity) { return instanceNodeStore_.getNode(elkEntity); } @Override public Set<? extends InstanceNode<T, I>> getInstanceNodes() { return instanceNodeStore_.getNodes(); } @Override public TypeNode<T, I> getNode(final T elkEntity) { TypeNode<T, I> result = nodeStore_.getNode(elkEntity); if (result == null && getBottomNode().contains(elkEntity)) { result = getBottomNode(); } return result; } @Override public Set<? extends TypeNode<T, I>> getNodes() { return new LazySetUnion<TypeNode<T, I>>(nodeStore_.getNodes(), Collections.singleton(getBottomNode())); } @Override public abstract TN getBottomNode(); @Override public InstanceNode<T, I> getCreateInstanceNode( final Collection<? extends I> instances) { return instanceNodeStore_.getCreateNode(instances, instances.size(), instanceNodeFactory_); } @Override public boolean setCreateDirectTypes(final InstanceNode<T, I> instanceNode, final Iterable<? extends Collection<? extends T>> typeSets) { final UIN node = toInternalInstanceNode(instanceNode); boolean isTypeSetsEmpty = true; for (final Collection<? extends T> superMembers : typeSets) { final UTN superNode = getCreateNode(superMembers); isTypeSetsEmpty = false; addDirectType(superNode, node); } if (node.trySetAllParentsAssigned(true)) { if (!isTypeSetsEmpty) { fireDirectTypeAssignment(instanceNode, instanceNode.getDirectTypeNodes()); } return true; } // else return false; } private void addDirectType(final UTN typeNode, final UIN instanceNode) { instanceNode.addDirectTypeNode(typeNode); typeNode.addDirectInstanceNode(instanceNode); } @Override public boolean removeDirectTypes(final InstanceNode<T, I> instanceNode) { final UIN node = toInternalInstanceNode(instanceNode); if (!node.trySetAllParentsAssigned(false)) { return false; } final List<UTN> directTypes = new ArrayList<UTN>(); synchronized (node) { directTypes.addAll(node.getDirectNonBottomTypeNodes()); for (final UTN typeNode : directTypes) { node.removeDirectTypeNode(typeNode); } } // detaching the removed instance node from all its direct types for (final UTN typeNode : directTypes) { synchronized (typeNode) { typeNode.removeDirectInstanceNode(node); } } fireDirectTypeRemoval(instanceNode, directTypes); return true; } @Override public boolean removeInstanceNode(final I instance) { return instanceNodeStore_.removeNode(instance); } @SuppressWarnings("unchecked") protected UIN toInternalInstanceNode(final InstanceNode<T, I> node) { if (node.getTaxonomy() != this) { throw new IllegalArgumentException( "The sub-node must belong to this taxonomy: " + node); } // By construction, if the node is in this taxonomy, it is of type N. try { return (UIN) node; } catch (final ClassCastException e) { throw new IllegalArgumentException( "The sub-node must belong to this taxonomy: " + node); } } @Override public int hashCode() { return InstanceTaxonomyHasher.hash(this); } @SuppressWarnings("unchecked") @Override public boolean equals(final Object obj) { if (!(obj instanceof Taxonomy<?>)) { return false; } try { return InstanceTaxonomyEqualator.equals(this, (Taxonomy<T>) obj); } catch (ClassCastException e) { return false; } } @Override public boolean addInstanceListener(final NodeStore.Listener<I> listener) { return instanceNodeStore_.addListener(listener); } @Override public boolean removeInstanceListener( final NodeStore.Listener<I> listener) { return instanceNodeStore_.removeListener(listener); } @Override public boolean addInstanceListener( final InstanceTaxonomy.Listener<T, I> listener) { return instanceListeners_.add(listener); } @Override public boolean removeInstanceListener( final InstanceTaxonomy.Listener<T, I> listener) { return instanceListeners_.remove(listener); } protected void fireDirectTypeAssignment( final InstanceNode<T, I> instanceNode, final Collection<? extends TypeNode<T, I>> typeNodes) { for (final InstanceTaxonomy.Listener<T, I> listener : instanceListeners_) { listener.directTypeNodesAppeared(instanceNode); for (final TypeNode<T, I> typeNode : typeNodes) { listener.directInstanceNodesAppeared(typeNode); } } } protected void fireDirectTypeRemoval(final InstanceNode<T, I> instanceNode, final Collection<? extends TypeNode<T, I>> typeNodes) { for (final InstanceTaxonomy.Listener<T, I> listener : instanceListeners_) { listener.directTypeNodesDisappeared(instanceNode); for (final TypeNode<T, I> typeNode : typeNodes) { listener.directInstanceNodesDisappeared(typeNode); } } } }
liveontologies/elk-reasoner
elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/taxonomy/impl/AbstractUpdateableGenericInstanceTaxonomy.java
Java
apache-2.0
9,522
package org.activiti.spring.test.components.scope; import org.flowable.engine.runtime.ProcessInstance; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.util.Assert; import java.io.Serializable; /** * dumb object to demonstrate holding scoped state for the duration of a business process * * @author Josh Long */ public class StatefulObject implements Serializable, InitializingBean { private transient Logger logger = LoggerFactory.getLogger(getClass()); public static final long serialVersionUID = 1L; private String name; private int visitedCount = 0; private long customerId; public long getCustomerId() { return customerId; } @Value("#{processInstance}") transient ProcessInstance processInstance; @Value("#{executionId}") String executionId; @Value("#{processVariables['customerId']}") public void setCustomerId(long customerId) { this.customerId = customerId; logger.info("setting this {} instances 'customerId' to {}. The current executionId is {}", StatefulObject.class.getName(), this.customerId, this.executionId); } public StatefulObject() { } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; StatefulObject that = (StatefulObject) o; if (visitedCount != that.visitedCount) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; return true; } @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + visitedCount; return result; } @Override public String toString() { return "StatefulObject{" + "name='" + name + '\'' + ", visitedCount=" + visitedCount + '}'; } public void increment() { this.visitedCount += 1; } public int getVisitedCount() { return this.visitedCount; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void afterPropertiesSet() throws Exception { Assert.notNull(this.processInstance, "the processInstance should be equal to the currently active processInstance!"); logger.info("the 'processInstance' property is non-null: PI ID#{}", this.processInstance.getId()); } }
robsoncardosoti/flowable-engine
modules/flowable5-spring-test/src/test/java/org/activiti/spring/test/components/scope/StatefulObject.java
Java
apache-2.0
2,646
/** * Copyright (c) 2018 Texas Instruments, Incorporated * * SPDX-License-Identifier: Apache-2.0 */ #include "simplelink_log.h" LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include <zephyr.h> #include <kernel.h> #include <device.h> #include <net/net_if.h> #include <net/wifi_mgmt.h> #include <net/net_offload.h> #ifdef CONFIG_NET_SOCKETS_OFFLOAD #include <net/socket_offload.h> #endif #include <ti/drivers/net/wifi/wlan.h> #include "simplelink_support.h" #include "simplelink_sockets.h" #define SCAN_RETRY_DELAY 2000 /* ms */ #define FC_TIMEOUT K_SECONDS(CONFIG_WIFI_SIMPLELINK_FAST_CONNECT_TIMEOUT) #define SIMPLELINK_IPV4 0x1 #define SIMPLELINK_IPV6 0x2 struct simplelink_data { struct net_if *iface; unsigned char mac[6]; /* Fields for scan API to emulate an asynchronous scan: */ struct k_work_delayable work; scan_result_cb_t cb; int num_results_or_err; int scan_retries; bool initialized; uint8_t mask; }; static struct simplelink_data simplelink_data; static K_SEM_DEFINE(ip_acquired, 0, 1); /* Handle connection events from the SimpleLink Event Handlers: */ static void simplelink_wifi_cb(uint32_t event, struct sl_connect_state *conn) { int status; /* * Once Zephyr wifi_mgmt wifi_status codes are defined, will need * to map from SimpleLink error codes. For now, just return -EIO. */ status = (conn->error ? -EIO : 0); switch (event) { case SL_WLAN_EVENT_CONNECT: /* Only get this event if connect succeeds: */ wifi_mgmt_raise_connect_result_event(simplelink_data.iface, status); break; case SL_WLAN_EVENT_DISCONNECT: /* Could be during a connect, disconnect, or async error: */ wifi_mgmt_raise_disconnect_result_event(simplelink_data.iface, status); break; case SIMPLELINK_WIFI_CB_IPACQUIRED: simplelink_data.mask &= ~SIMPLELINK_IPV4; if ((simplelink_data.mask == 0) && (!simplelink_data.initialized)) { simplelink_data.initialized = true; k_sem_give(&ip_acquired); } break; case SIMPLELINK_WIFI_CB_IPV6ACQUIRED: simplelink_data.mask &= ~SIMPLELINK_IPV6; if ((simplelink_data.mask == 0) && (!simplelink_data.initialized)) { simplelink_data.initialized = true; k_sem_give(&ip_acquired); } break; default: LOG_DBG("Unrecognized mgmt event: 0x%x", event); break; } } static void simplelink_scan_work_handler(struct k_work *work) { if (simplelink_data.num_results_or_err > 0) { int index = 0; struct wifi_scan_result scan_result; /* Iterate over the table, and call the scan_result callback. */ while (index < simplelink_data.num_results_or_err) { z_simplelink_get_scan_result(index, &scan_result); simplelink_data.cb(simplelink_data.iface, 0, &scan_result); /* Yield, to ensure notifications get delivered: */ k_yield(); index++; } /* Sending a NULL entry indicates e/o results, and * triggers the NET_EVENT_WIFI_SCAN_DONE event: */ simplelink_data.cb(simplelink_data.iface, 0, NULL); } else if ((simplelink_data.num_results_or_err == SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN) && (simplelink_data.scan_retries++ < CONFIG_WIFI_SIMPLELINK_MAX_SCAN_RETRIES)) { int32_t delay; /* Try again: */ simplelink_data.num_results_or_err = z_simplelink_start_scan(); simplelink_data.scan_retries++; delay = (simplelink_data.num_results_or_err > 0 ? 0 : SCAN_RETRY_DELAY); if (delay > 0) { LOG_DBG("Retrying scan..."); } k_work_reschedule(&simplelink_data.work, K_MSEC(delay)); } else { /* Encountered an error, or max retries exceeded: */ LOG_ERR("Scan failed: retries: %d; err: %d", simplelink_data.scan_retries, simplelink_data.num_results_or_err); simplelink_data.cb(simplelink_data.iface, -EIO, NULL); } } static int simplelink_mgmt_scan(const struct device *dev, scan_result_cb_t cb) { int err; int status; /* Cancel any previous scan processing in progress: */ k_work_cancel_delayable(&simplelink_data.work); /* "Request" the scan: */ err = z_simplelink_start_scan(); /* Now, launch a delayed work handler to do retries and reporting. * Indicate (to the work handler) either a positive number of results * already returned, or indicate a retry is required: */ if ((err > 0) || (err == SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN)) { int32_t delay = (err > 0 ? 0 : SCAN_RETRY_DELAY); /* Store for later reference by delayed work handler: */ simplelink_data.cb = cb; simplelink_data.num_results_or_err = err; simplelink_data.scan_retries = 0; k_work_reschedule(&simplelink_data.work, K_MSEC(delay)); status = 0; } else { status = -EIO; } return status; } static int simplelink_mgmt_connect(const struct device *dev, struct wifi_connect_req_params *params) { int ret; ret = z_simplelink_connect(params); return ret ? -EIO : ret; } static int simplelink_mgmt_disconnect(const struct device *dev) { int ret; ret = z_simplelink_disconnect(); return ret ? -EIO : ret; } static int simplelink_dummy_get(sa_family_t family, enum net_sock_type type, enum net_ip_protocol ip_proto, struct net_context **context) { LOG_ERR("NET_SOCKETS_OFFLOAD must be configured for this driver"); return -1; } /* Placeholders, until Zepyr IP stack updated to handle a NULL net_offload */ static struct net_offload simplelink_offload = { .get = simplelink_dummy_get, .bind = NULL, .listen = NULL, .connect = NULL, .accept = NULL, .send = NULL, .sendto = NULL, .recv = NULL, .put = NULL, }; static void simplelink_iface_init(struct net_if *iface) { int ret; simplelink_data.iface = iface; simplelink_data.mask = 0; simplelink_data.mask |= IS_ENABLED(CONFIG_NET_IPV4) ? SIMPLELINK_IPV4 : 0; simplelink_data.mask |= IS_ENABLED(CONFIG_NET_IPV6) ? SIMPLELINK_IPV6 : 0; /* Direct socket offload used instead of net offload: */ iface->if_dev->offload = &simplelink_offload; /* Initialize and configure NWP to defaults: */ ret = z_simplelink_init(simplelink_wifi_cb); if (ret) { LOG_ERR("z_simplelink_init failed!"); return; } ret = k_sem_take(&ip_acquired, FC_TIMEOUT); if (ret < 0) { simplelink_data.initialized = false; LOG_ERR("FastConnect timed out connecting to previous AP."); LOG_ERR("Please re-establish WiFi connection."); } /* Grab our MAC address: */ z_simplelink_get_mac(simplelink_data.mac); LOG_DBG("MAC Address %02X:%02X:%02X:%02X:%02X:%02X", simplelink_data.mac[0], simplelink_data.mac[1], simplelink_data.mac[2], simplelink_data.mac[3], simplelink_data.mac[4], simplelink_data.mac[5]); net_if_set_link_addr(iface, simplelink_data.mac, sizeof(simplelink_data.mac), NET_LINK_ETHERNET); #ifdef CONFIG_NET_SOCKETS_OFFLOAD /* Direct socket offload: */ socket_offload_dns_register(&simplelink_dns_ops); simplelink_sockets_init(); #endif } static const struct net_wifi_mgmt_offload simplelink_api = { .iface_api.init = simplelink_iface_init, .scan = simplelink_mgmt_scan, .connect = simplelink_mgmt_connect, .disconnect = simplelink_mgmt_disconnect, }; static int simplelink_init(const struct device *dev) { ARG_UNUSED(dev); /* We use system workqueue to deal with scan retries: */ k_work_init_delayable(&simplelink_data.work, simplelink_scan_work_handler); LOG_DBG("SimpleLink driver Initialized"); return 0; } NET_DEVICE_OFFLOAD_INIT(simplelink, CONFIG_WIFI_SIMPLELINK_NAME, simplelink_init, device_pm_control_nop, &simplelink_data, NULL, CONFIG_WIFI_INIT_PRIORITY, &simplelink_api, CONFIG_WIFI_SIMPLELINK_MAX_PACKET_SIZE);
Vudentz/zephyr
drivers/wifi/simplelink/simplelink.c
C
apache-2.0
7,562
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.FindSymbols; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.AddImport { internal abstract partial class AbstractAddImportFeatureService<TSimpleNameSyntax> { /// <summary> /// SearchScope is used to control where the <see cref="AbstractAddImportFeatureService{TSimpleNameSyntax}"/> /// searches. We search different scopes in different ways. For example we use /// SymbolTreeInfos to search unreferenced projects and metadata dlls. However, /// for the current project we're editing we defer to the compiler to do the /// search. /// </summary> private abstract class SearchScope { public readonly bool Exact; protected readonly AbstractAddImportFeatureService<TSimpleNameSyntax> provider; public readonly CancellationToken CancellationToken; protected SearchScope(AbstractAddImportFeatureService<TSimpleNameSyntax> provider, bool exact, CancellationToken cancellationToken) { this.provider = provider; Exact = exact; CancellationToken = cancellationToken; } protected abstract Task<ImmutableArray<ISymbol>> FindDeclarationsAsync(SymbolFilter filter, SearchQuery query); public abstract SymbolReference CreateReference<T>(SymbolResult<T> symbol) where T : INamespaceOrTypeSymbol; public async Task<ImmutableArray<SymbolResult<ISymbol>>> FindDeclarationsAsync( string name, TSimpleNameSyntax nameNode, SymbolFilter filter) { if (name != null && string.IsNullOrWhiteSpace(name)) { return ImmutableArray<SymbolResult<ISymbol>>.Empty; } using var query = Exact ? SearchQuery.Create(name, ignoreCase: true) : SearchQuery.CreateFuzzy(name); var symbols = await FindDeclarationsAsync(filter, query).ConfigureAwait(false); if (Exact) { // We did an exact, case insensitive, search. Case sensitive matches should // be preferred though over insensitive ones. return symbols.SelectAsArray(s => SymbolResult.Create(s.Name, nameNode, s, weight: s.Name == name ? 0 : 1)); } // TODO(cyrusn): It's a shame we have to compute this twice. However, there's no // great way to store the original value we compute because it happens deep in the // compiler bowels when we call FindDeclarations. var similarityChecker = WordSimilarityChecker.Allocate(name, substringsAreSimilar: false); var result = symbols.SelectAsArray(s => { var areSimilar = similarityChecker.AreSimilar(s.Name, out var matchCost); Debug.Assert(areSimilar); return SymbolResult.Create(s.Name, nameNode, s, matchCost); }); similarityChecker.Free(); return result; } } } }
nguerrera/roslyn
src/Features/Core/Portable/AddImport/SearchScopes/SearchScope.cs
C#
apache-2.0
3,483
/* * Copyright 2014 Effektif GmbH. * * 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 com.effektif.workflow.impl.template; import java.util.HashSet; import java.util.Set; /** * @author Tom Baeyens */ public class Hints { Set<Hint> hints; public Hints add(Hint hint) { if (hints==null) { hints = new HashSet<>(); } hints.add(hint); return this; } public boolean has(Hint hint) { return hints!=null ? hints.contains(hint) : null; } }
jblankendaal/effektif
effektif-workflow-impl/src/main/java/com/effektif/workflow/impl/template/Hints.java
Java
apache-2.0
996
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>discover_yadis (OpenID)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/openid/consumer/discovery.rb, line 366</span> <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">discover_yadis</span>(<span class="ruby-identifier">uri</span>) <span class="ruby-comment cmt"># Discover OpenID services for a URI. Tries Yadis and falls back</span> <span class="ruby-comment cmt"># on old-style &lt;link rel='...'&gt; discovery if Yadis fails.</span> <span class="ruby-comment cmt">#</span> <span class="ruby-comment cmt"># @param uri: normalized identity URL</span> <span class="ruby-comment cmt"># @type uri: str</span> <span class="ruby-comment cmt"># </span> <span class="ruby-comment cmt"># @return: (claimed_id, services)</span> <span class="ruby-comment cmt"># @rtype: (str, list(OpenIDServiceEndpoint))</span> <span class="ruby-comment cmt">#</span> <span class="ruby-comment cmt"># @raises DiscoveryFailure: when discovery fails.</span> <span class="ruby-comment cmt"># Might raise a yadis.discover.DiscoveryFailure if no document</span> <span class="ruby-comment cmt"># came back for that URI at all. I don't think falling back to</span> <span class="ruby-comment cmt"># OpenID 1.0 discovery on the same URL will help, so don't bother</span> <span class="ruby-comment cmt"># to catch it.</span> <span class="ruby-identifier">response</span> = <span class="ruby-constant">Yadis</span>.<span class="ruby-identifier">discover</span>(<span class="ruby-identifier">uri</span>) <span class="ruby-identifier">yadis_url</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">normalized_uri</span> <span class="ruby-identifier">body</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">response_text</span> <span class="ruby-keyword kw">begin</span> <span class="ruby-identifier">openid_services</span> = <span class="ruby-constant">OpenIDServiceEndpoint</span>.<span class="ruby-identifier">from_xrds</span>(<span class="ruby-identifier">yadis_url</span>, <span class="ruby-identifier">body</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Yadis</span><span class="ruby-operator">::</span><span class="ruby-constant">XRDSError</span> <span class="ruby-comment cmt"># Does not parse as a Yadis XRDS file</span> <span class="ruby-identifier">openid_services</span> = [] <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">openid_services</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-comment cmt"># Either not an XRDS or there are no OpenID services.</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">is_xrds</span> <span class="ruby-comment cmt"># if we got the Yadis content-type or followed the Yadis</span> <span class="ruby-comment cmt"># header, re-fetch the document without following the Yadis</span> <span class="ruby-comment cmt"># header, with no Accept header.</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">discover_no_yadis</span>(<span class="ruby-identifier">uri</span>) <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># Try to parse the response as HTML.</span> <span class="ruby-comment cmt"># &lt;link rel=&quot;...&quot;&gt;</span> <span class="ruby-identifier">openid_services</span> = <span class="ruby-constant">OpenIDServiceEndpoint</span>.<span class="ruby-identifier">from_html</span>(<span class="ruby-identifier">yadis_url</span>, <span class="ruby-identifier">body</span>) <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">yadis_url</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_op_or_user_services</span>(<span class="ruby-identifier">openid_services</span>)] <span class="ruby-keyword kw">end</span></pre> </body> </html>
agoragames/ruby-openid-oauth-hybrid
doc/classes/OpenID.src/M000033.html
HTML
apache-2.0
4,658
/* * 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.commons.mail.mocks; import java.io.IOException; import javax.mail.MessagingException; import javax.mail.internet.InternetAddress; import org.apache.commons.mail.MultiPartEmail; /** * Extension of MultiPartEmail Class * (used to allow testing only) * * @since 1.0 */ public class MockMultiPartEmailConcrete extends MultiPartEmail { /** * Retrieve the message content * @return Message Content */ public String getMsg() { try { return this.getPrimaryBodyPart().getContent().toString(); } catch (final IOException | MessagingException msgE) { return null; } } /** */ public void initTest() { this.init(); } /** * @return fromAddress */ @Override public InternetAddress getFromAddress() { return this.fromAddress; } }
apache/commons-email
src/test/java/org/apache/commons/mail/mocks/MockMultiPartEmailConcrete.java
Java
apache-2.0
1,718
## kubectl kubectl controls the Kubernetes cluster manager ### Synopsis kubectl controls the Kubernetes cluster manager. Find more information at https://github.com/GoogleCloudPlatform/kubernetes. ``` kubectl ``` ### Options ``` --alsologtostderr=false: log to standard error as well as files --api-version="": The API version to use when talking to the server -a, --auth-path="": Path to the auth info file. If missing, prompt the user. Only used if using https. --certificate-authority="": Path to a cert. file for the certificate authority. --client-certificate="": Path to a client key file for TLS. --client-key="": Path to a client key file for TLS. --cluster="": The name of the kubeconfig cluster to use --context="": The name of the kubeconfig context to use -h, --help=false: help for kubectl --insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. --kubeconfig="": Path to the kubeconfig file to use for CLI requests. --log_backtrace_at=:0: when logging hits line file:N, emit a stack trace --log_dir=: If non-empty, write log files in this directory --log_flush_frequency=5s: Maximum number of seconds between log flushes --logtostderr=true: log to standard error instead of files --match-server-version=false: Require server version to match client version --namespace="": If present, the namespace scope for this CLI request. --password="": Password for basic authentication to the API server. -s, --server="": The address and port of the Kubernetes API server --stderrthreshold=2: logs at or above this threshold go to stderr --token="": Bearer token for authentication to the API server. --user="": The name of the kubeconfig user to use --username="": Username for basic authentication to the API server. --v=0: log level for V logs --validate=false: If true, use a schema to validate the input before sending it --vmodule=: comma-separated list of pattern=N settings for file-filtered logging ``` ### SEE ALSO * [kubectl api-versions](kubectl_api-versions.md) - Print available API versions. * [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info * [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl create](kubectl_create.md) - Create a resource by filename or stdin * [kubectl delete](kubectl_delete.md) - Delete a resource by filename, stdin, resource and ID, or by resources and label selector. * [kubectl describe](kubectl_describe.md) - Show details of a specific resource * [kubectl exec](kubectl_exec.md) - Execute a command in a container. * [kubectl expose](kubectl_expose.md) - Take a replicated application and expose it as Kubernetes Service * [kubectl get](kubectl_get.md) - Display one or many resources * [kubectl label](kubectl_label.md) - Update the labels on a resource * [kubectl log](kubectl_log.md) - Print the logs for a container in a pod. * [kubectl namespace](kubectl_namespace.md) - SUPERCEDED: Set and view the current Kubernetes namespace * [kubectl port-forward](kubectl_port-forward.md) - Forward one or more local ports to a pod. * [kubectl proxy](kubectl_proxy.md) - Run a proxy to the Kubernetes API server * [kubectl resize](kubectl_resize.md) - Set a new size for a Replication Controller. * [kubectl rolling-update](kubectl_rolling-update.md) - Perform a rolling update of the given ReplicationController. * [kubectl run-container](kubectl_run-container.md) - Run a particular image on the cluster. * [kubectl stop](kubectl_stop.md) - Gracefully shut down a resource by id or filename. * [kubectl update](kubectl_update.md) - Update a resource by filename or stdin. * [kubectl version](kubectl_version.md) - Print the client and server version information. ###### Auto generated by spf13/cobra at 2015-05-01 20:16:42.546735249 +0000 UTC
guoshimin/kubernetes
docs/kubectl.md
Markdown
apache-2.0
4,009
@echo off rem rem Copyright (c) 1999-2011 Luca Garulli @www.orientechnologies.com rem rem Guess ORIENTDB_HOME if not defined set CURRENT_DIR=%cd% if exist "%JAVA_HOME%\bin\java.exe" goto setJavaHome set JAVA="java" goto okJava :setJavaHome set JAVA="%JAVA_HOME%\bin\java" :okJava if not "%ORIENTDB_HOME%" == "" goto gotHome set ORIENTDB_HOME=%CURRENT_DIR% if exist "%ORIENTDB_HOME%\bin\console.bat" goto okHome cd .. set ORIENTDB_HOME=%cd% cd %CURRENT_DIR% :gotHome if exist "%ORIENTDB_HOME%\bin\console.bat" goto okHome echo The ORIENTDB_HOME environment variable is not defined correctly echo This environment variable is needed to run this program goto end :okHome rem Get remaining unshifted command line arguments and save them in the set CMD_LINE_ARGS= :setArgs if ""%1""=="""" goto doneSetArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto setArgs :doneSetArgs call %JAVA% -client -Dorientdb.build.number=@BUILD@ -cp "%ORIENTDB_HOME%\lib\*" com.orientechnologies.orient.graph.console.OGremlinConsole %CMD_LINE_ARGS% :end
cloudsmith/orientdb
graphdb/script/console.bat
Batchfile
apache-2.0
1,082
package org.springside.modules.utils.base.type; import org.springside.modules.utils.base.ExceptionUtil; /** * 适用于异常信息需要变更的情况, 可通过clone(),不经过构造函数(也就避免了获得StackTrace)地从之前定义的静态异常中克隆,再设定新的异常信息 * * @see CloneableException */ public class CloneableRuntimeException extends RuntimeException implements Cloneable { private static final long serialVersionUID = 3984796576627959400L; protected String message; // NOSONAR public CloneableRuntimeException() { super((Throwable) null); } public CloneableRuntimeException(String message) { super((Throwable) null); this.message = message; } public CloneableRuntimeException(String message, Throwable cause) { super(cause); this.message = message; } @Override public CloneableRuntimeException clone() { //NOSONAR try { return (CloneableRuntimeException) super.clone(); } catch (CloneNotSupportedException e) { // NOSONAR return null; } } @Override public String getMessage() { return message; } /** * 简便函数,定义静态异常时使用 */ public CloneableRuntimeException setStackTrace(Class<?> throwClazz, String throwMethod) { ExceptionUtil.setStackTrace(this, throwClazz, throwMethod); return this; } /** * 简便函数, clone并重新设定Message */ public CloneableRuntimeException clone(String message) { CloneableRuntimeException newException = this.clone(); newException.setMessage(message); return newException; } /** * 简便函数, 重新设定Message */ public CloneableRuntimeException setMessage(String message) { this.message = message; return this; } }
mosoft521/springside4
modules/utils/src/main/java/org/springside/modules/utils/base/type/CloneableRuntimeException.java
Java
apache-2.0
1,717
/* * 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 aria.apache.commons.net.io; import java.io.IOException; /** * The CopyStreamException class is thrown by the org.apache.commons.io.Util * copyStream() methods. It stores the number of bytes confirmed to * have been transferred before an I/O error as well as the IOException * responsible for the failure of a copy operation. * * @version $Id: CopyStreamException.java 1299238 2012-03-10 17:12:28Z sebb $ * @see Util */ public class CopyStreamException extends IOException { private static final long serialVersionUID = -2602899129433221532L; private final long totalBytesTransferred; /** * Creates a new CopyStreamException instance. * * @param message A message describing the error. * @param bytesTransferred The total number of bytes transferred before * an exception was thrown in a copy operation. * @param exception The IOException thrown during a copy operation. */ public CopyStreamException(String message, long bytesTransferred, IOException exception) { super(message); initCause(exception); // merge this into super() call once we need 1.6+ totalBytesTransferred = bytesTransferred; } /** * Returns the total number of bytes confirmed to have * been transferred by a failed copy operation. * * @return The total number of bytes confirmed to have * been transferred by a failed copy operation. */ public long getTotalBytesTransferred() { return totalBytesTransferred; } /** * Returns the IOException responsible for the failure of a copy operation. * * @return The IOException responsible for the failure of a copy operation. */ public IOException getIOException() { return (IOException) getCause(); // cast is OK because it was initialised with an IOException } }
AriaLyy/Aria
FtpComponent/src/main/java/aria/apache/commons/net/io/CopyStreamException.java
Java
apache-2.0
2,595
/* Generated by camel build tools - do NOT edit this file! */ package org.apache.camel.component.debezium; import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.spi.ExtendedPropertyConfigurerGetter; import org.apache.camel.spi.PropertyConfigurerGetter; import org.apache.camel.spi.ConfigurerStrategy; import org.apache.camel.spi.GeneratedPropertyConfigurer; import org.apache.camel.util.CaseInsensitiveMap; import org.apache.camel.support.component.PropertyConfigurerSupport; /** * Generated by camel build tools - do NOT edit this file! */ @SuppressWarnings("unchecked") public class DebeziumPostgresEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { DebeziumPostgresEndpoint target = (DebeziumPostgresEndpoint) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "additionalproperties": case "additionalProperties": target.getConfiguration().setAdditionalProperties(property(camelContext, java.util.Map.class, value)); return true; case "binaryhandlingmode": case "binaryHandlingMode": target.getConfiguration().setBinaryHandlingMode(property(camelContext, java.lang.String.class, value)); return true; case "bridgeerrorhandler": case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "columnblacklist": case "columnBlacklist": target.getConfiguration().setColumnBlacklist(property(camelContext, java.lang.String.class, value)); return true; case "columnexcludelist": case "columnExcludeList": target.getConfiguration().setColumnExcludeList(property(camelContext, java.lang.String.class, value)); return true; case "columnincludelist": case "columnIncludeList": target.getConfiguration().setColumnIncludeList(property(camelContext, java.lang.String.class, value)); return true; case "columnpropagatesourcetype": case "columnPropagateSourceType": target.getConfiguration().setColumnPropagateSourceType(property(camelContext, java.lang.String.class, value)); return true; case "columnwhitelist": case "columnWhitelist": target.getConfiguration().setColumnWhitelist(property(camelContext, java.lang.String.class, value)); return true; case "converters": target.getConfiguration().setConverters(property(camelContext, java.lang.String.class, value)); return true; case "databasedbname": case "databaseDbname": target.getConfiguration().setDatabaseDbname(property(camelContext, java.lang.String.class, value)); return true; case "databasehistoryfilefilename": case "databaseHistoryFileFilename": target.getConfiguration().setDatabaseHistoryFileFilename(property(camelContext, java.lang.String.class, value)); return true; case "databasehostname": case "databaseHostname": target.getConfiguration().setDatabaseHostname(property(camelContext, java.lang.String.class, value)); return true; case "databaseinitialstatements": case "databaseInitialStatements": target.getConfiguration().setDatabaseInitialStatements(property(camelContext, java.lang.String.class, value)); return true; case "databasepassword": case "databasePassword": target.getConfiguration().setDatabasePassword(property(camelContext, java.lang.String.class, value)); return true; case "databaseport": case "databasePort": target.getConfiguration().setDatabasePort(property(camelContext, int.class, value)); return true; case "databaseservername": case "databaseServerName": target.getConfiguration().setDatabaseServerName(property(camelContext, java.lang.String.class, value)); return true; case "databasesslcert": case "databaseSslcert": target.getConfiguration().setDatabaseSslcert(property(camelContext, java.lang.String.class, value)); return true; case "databasesslfactory": case "databaseSslfactory": target.getConfiguration().setDatabaseSslfactory(property(camelContext, java.lang.String.class, value)); return true; case "databasesslkey": case "databaseSslkey": target.getConfiguration().setDatabaseSslkey(property(camelContext, java.lang.String.class, value)); return true; case "databasesslmode": case "databaseSslmode": target.getConfiguration().setDatabaseSslmode(property(camelContext, java.lang.String.class, value)); return true; case "databasesslpassword": case "databaseSslpassword": target.getConfiguration().setDatabaseSslpassword(property(camelContext, java.lang.String.class, value)); return true; case "databasesslrootcert": case "databaseSslrootcert": target.getConfiguration().setDatabaseSslrootcert(property(camelContext, java.lang.String.class, value)); return true; case "databasetcpkeepalive": case "databaseTcpkeepalive": target.getConfiguration().setDatabaseTcpkeepalive(property(camelContext, boolean.class, value)); return true; case "databaseuser": case "databaseUser": target.getConfiguration().setDatabaseUser(property(camelContext, java.lang.String.class, value)); return true; case "datatypepropagatesourcetype": case "datatypePropagateSourceType": target.getConfiguration().setDatatypePropagateSourceType(property(camelContext, java.lang.String.class, value)); return true; case "decimalhandlingmode": case "decimalHandlingMode": target.getConfiguration().setDecimalHandlingMode(property(camelContext, java.lang.String.class, value)); return true; case "eventprocessingfailurehandlingmode": case "eventProcessingFailureHandlingMode": target.getConfiguration().setEventProcessingFailureHandlingMode(property(camelContext, java.lang.String.class, value)); return true; case "exceptionhandler": case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true; case "exchangepattern": case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true; case "heartbeatactionquery": case "heartbeatActionQuery": target.getConfiguration().setHeartbeatActionQuery(property(camelContext, java.lang.String.class, value)); return true; case "heartbeatintervalms": case "heartbeatIntervalMs": target.getConfiguration().setHeartbeatIntervalMs(property(camelContext, int.class, value)); return true; case "heartbeattopicsprefix": case "heartbeatTopicsPrefix": target.getConfiguration().setHeartbeatTopicsPrefix(property(camelContext, java.lang.String.class, value)); return true; case "hstorehandlingmode": case "hstoreHandlingMode": target.getConfiguration().setHstoreHandlingMode(property(camelContext, java.lang.String.class, value)); return true; case "includeunknowndatatypes": case "includeUnknownDatatypes": target.getConfiguration().setIncludeUnknownDatatypes(property(camelContext, boolean.class, value)); return true; case "internalkeyconverter": case "internalKeyConverter": target.getConfiguration().setInternalKeyConverter(property(camelContext, java.lang.String.class, value)); return true; case "internalvalueconverter": case "internalValueConverter": target.getConfiguration().setInternalValueConverter(property(camelContext, java.lang.String.class, value)); return true; case "intervalhandlingmode": case "intervalHandlingMode": target.getConfiguration().setIntervalHandlingMode(property(camelContext, java.lang.String.class, value)); return true; case "maxbatchsize": case "maxBatchSize": target.getConfiguration().setMaxBatchSize(property(camelContext, int.class, value)); return true; case "maxqueuesize": case "maxQueueSize": target.getConfiguration().setMaxQueueSize(property(camelContext, int.class, value)); return true; case "maxqueuesizeinbytes": case "maxQueueSizeInBytes": target.getConfiguration().setMaxQueueSizeInBytes(property(camelContext, long.class, value)); return true; case "messagekeycolumns": case "messageKeyColumns": target.getConfiguration().setMessageKeyColumns(property(camelContext, java.lang.String.class, value)); return true; case "offsetcommitpolicy": case "offsetCommitPolicy": target.getConfiguration().setOffsetCommitPolicy(property(camelContext, java.lang.String.class, value)); return true; case "offsetcommittimeoutms": case "offsetCommitTimeoutMs": target.getConfiguration().setOffsetCommitTimeoutMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; case "offsetflushintervalms": case "offsetFlushIntervalMs": target.getConfiguration().setOffsetFlushIntervalMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; case "offsetstorage": case "offsetStorage": target.getConfiguration().setOffsetStorage(property(camelContext, java.lang.String.class, value)); return true; case "offsetstoragefilename": case "offsetStorageFileName": target.getConfiguration().setOffsetStorageFileName(property(camelContext, java.lang.String.class, value)); return true; case "offsetstoragepartitions": case "offsetStoragePartitions": target.getConfiguration().setOffsetStoragePartitions(property(camelContext, int.class, value)); return true; case "offsetstoragereplicationfactor": case "offsetStorageReplicationFactor": target.getConfiguration().setOffsetStorageReplicationFactor(property(camelContext, int.class, value)); return true; case "offsetstoragetopic": case "offsetStorageTopic": target.getConfiguration().setOffsetStorageTopic(property(camelContext, java.lang.String.class, value)); return true; case "pluginname": case "pluginName": target.getConfiguration().setPluginName(property(camelContext, java.lang.String.class, value)); return true; case "pollintervalms": case "pollIntervalMs": target.getConfiguration().setPollIntervalMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; case "providetransactionmetadata": case "provideTransactionMetadata": target.getConfiguration().setProvideTransactionMetadata(property(camelContext, boolean.class, value)); return true; case "publicationautocreatemode": case "publicationAutocreateMode": target.getConfiguration().setPublicationAutocreateMode(property(camelContext, java.lang.String.class, value)); return true; case "publicationname": case "publicationName": target.getConfiguration().setPublicationName(property(camelContext, java.lang.String.class, value)); return true; case "queryfetchsize": case "queryFetchSize": target.getConfiguration().setQueryFetchSize(property(camelContext, int.class, value)); return true; case "retriablerestartconnectorwaitms": case "retriableRestartConnectorWaitMs": target.getConfiguration().setRetriableRestartConnectorWaitMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; case "sanitizefieldnames": case "sanitizeFieldNames": target.getConfiguration().setSanitizeFieldNames(property(camelContext, boolean.class, value)); return true; case "schemablacklist": case "schemaBlacklist": target.getConfiguration().setSchemaBlacklist(property(camelContext, java.lang.String.class, value)); return true; case "schemaexcludelist": case "schemaExcludeList": target.getConfiguration().setSchemaExcludeList(property(camelContext, java.lang.String.class, value)); return true; case "schemaincludelist": case "schemaIncludeList": target.getConfiguration().setSchemaIncludeList(property(camelContext, java.lang.String.class, value)); return true; case "schemarefreshmode": case "schemaRefreshMode": target.getConfiguration().setSchemaRefreshMode(property(camelContext, java.lang.String.class, value)); return true; case "schemawhitelist": case "schemaWhitelist": target.getConfiguration().setSchemaWhitelist(property(camelContext, java.lang.String.class, value)); return true; case "skippedoperations": case "skippedOperations": target.getConfiguration().setSkippedOperations(property(camelContext, java.lang.String.class, value)); return true; case "slotdroponstop": case "slotDropOnStop": target.getConfiguration().setSlotDropOnStop(property(camelContext, boolean.class, value)); return true; case "slotmaxretries": case "slotMaxRetries": target.getConfiguration().setSlotMaxRetries(property(camelContext, int.class, value)); return true; case "slotname": case "slotName": target.getConfiguration().setSlotName(property(camelContext, java.lang.String.class, value)); return true; case "slotretrydelayms": case "slotRetryDelayMs": target.getConfiguration().setSlotRetryDelayMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; case "slotstreamparams": case "slotStreamParams": target.getConfiguration().setSlotStreamParams(property(camelContext, java.lang.String.class, value)); return true; case "snapshotcustomclass": case "snapshotCustomClass": target.getConfiguration().setSnapshotCustomClass(property(camelContext, java.lang.String.class, value)); return true; case "snapshotdelayms": case "snapshotDelayMs": target.getConfiguration().setSnapshotDelayMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; case "snapshotfetchsize": case "snapshotFetchSize": target.getConfiguration().setSnapshotFetchSize(property(camelContext, int.class, value)); return true; case "snapshotincludecollectionlist": case "snapshotIncludeCollectionList": target.getConfiguration().setSnapshotIncludeCollectionList(property(camelContext, java.lang.String.class, value)); return true; case "snapshotlocktimeoutms": case "snapshotLockTimeoutMs": target.getConfiguration().setSnapshotLockTimeoutMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; case "snapshotmaxthreads": case "snapshotMaxThreads": target.getConfiguration().setSnapshotMaxThreads(property(camelContext, int.class, value)); return true; case "snapshotmode": case "snapshotMode": target.getConfiguration().setSnapshotMode(property(camelContext, java.lang.String.class, value)); return true; case "snapshotselectstatementoverrides": case "snapshotSelectStatementOverrides": target.getConfiguration().setSnapshotSelectStatementOverrides(property(camelContext, java.lang.String.class, value)); return true; case "sourcestructversion": case "sourceStructVersion": target.getConfiguration().setSourceStructVersion(property(camelContext, java.lang.String.class, value)); return true; case "statusupdateintervalms": case "statusUpdateIntervalMs": target.getConfiguration().setStatusUpdateIntervalMs(property(camelContext, int.class, value)); return true; case "tableblacklist": case "tableBlacklist": target.getConfiguration().setTableBlacklist(property(camelContext, java.lang.String.class, value)); return true; case "tableexcludelist": case "tableExcludeList": target.getConfiguration().setTableExcludeList(property(camelContext, java.lang.String.class, value)); return true; case "tableignorebuiltin": case "tableIgnoreBuiltin": target.getConfiguration().setTableIgnoreBuiltin(property(camelContext, boolean.class, value)); return true; case "tableincludelist": case "tableIncludeList": target.getConfiguration().setTableIncludeList(property(camelContext, java.lang.String.class, value)); return true; case "tablewhitelist": case "tableWhitelist": target.getConfiguration().setTableWhitelist(property(camelContext, java.lang.String.class, value)); return true; case "timeprecisionmode": case "timePrecisionMode": target.getConfiguration().setTimePrecisionMode(property(camelContext, java.lang.String.class, value)); return true; case "toastedvalueplaceholder": case "toastedValuePlaceholder": target.getConfiguration().setToastedValuePlaceholder(property(camelContext, java.lang.String.class, value)); return true; case "tombstonesondelete": case "tombstonesOnDelete": target.getConfiguration().setTombstonesOnDelete(property(camelContext, boolean.class, value)); return true; case "xminfetchintervalms": case "xminFetchIntervalMs": target.getConfiguration().setXminFetchIntervalMs(property(camelContext, java.time.Duration.class, value).toMillis()); return true; default: return false; } } @Override public Class<?> getOptionType(String name, boolean ignoreCase) { switch (ignoreCase ? name.toLowerCase() : name) { case "additionalproperties": case "additionalProperties": return java.util.Map.class; case "binaryhandlingmode": case "binaryHandlingMode": return java.lang.String.class; case "bridgeerrorhandler": case "bridgeErrorHandler": return boolean.class; case "columnblacklist": case "columnBlacklist": return java.lang.String.class; case "columnexcludelist": case "columnExcludeList": return java.lang.String.class; case "columnincludelist": case "columnIncludeList": return java.lang.String.class; case "columnpropagatesourcetype": case "columnPropagateSourceType": return java.lang.String.class; case "columnwhitelist": case "columnWhitelist": return java.lang.String.class; case "converters": return java.lang.String.class; case "databasedbname": case "databaseDbname": return java.lang.String.class; case "databasehistoryfilefilename": case "databaseHistoryFileFilename": return java.lang.String.class; case "databasehostname": case "databaseHostname": return java.lang.String.class; case "databaseinitialstatements": case "databaseInitialStatements": return java.lang.String.class; case "databasepassword": case "databasePassword": return java.lang.String.class; case "databaseport": case "databasePort": return int.class; case "databaseservername": case "databaseServerName": return java.lang.String.class; case "databasesslcert": case "databaseSslcert": return java.lang.String.class; case "databasesslfactory": case "databaseSslfactory": return java.lang.String.class; case "databasesslkey": case "databaseSslkey": return java.lang.String.class; case "databasesslmode": case "databaseSslmode": return java.lang.String.class; case "databasesslpassword": case "databaseSslpassword": return java.lang.String.class; case "databasesslrootcert": case "databaseSslrootcert": return java.lang.String.class; case "databasetcpkeepalive": case "databaseTcpkeepalive": return boolean.class; case "databaseuser": case "databaseUser": return java.lang.String.class; case "datatypepropagatesourcetype": case "datatypePropagateSourceType": return java.lang.String.class; case "decimalhandlingmode": case "decimalHandlingMode": return java.lang.String.class; case "eventprocessingfailurehandlingmode": case "eventProcessingFailureHandlingMode": return java.lang.String.class; case "exceptionhandler": case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class; case "exchangepattern": case "exchangePattern": return org.apache.camel.ExchangePattern.class; case "heartbeatactionquery": case "heartbeatActionQuery": return java.lang.String.class; case "heartbeatintervalms": case "heartbeatIntervalMs": return int.class; case "heartbeattopicsprefix": case "heartbeatTopicsPrefix": return java.lang.String.class; case "hstorehandlingmode": case "hstoreHandlingMode": return java.lang.String.class; case "includeunknowndatatypes": case "includeUnknownDatatypes": return boolean.class; case "internalkeyconverter": case "internalKeyConverter": return java.lang.String.class; case "internalvalueconverter": case "internalValueConverter": return java.lang.String.class; case "intervalhandlingmode": case "intervalHandlingMode": return java.lang.String.class; case "maxbatchsize": case "maxBatchSize": return int.class; case "maxqueuesize": case "maxQueueSize": return int.class; case "maxqueuesizeinbytes": case "maxQueueSizeInBytes": return long.class; case "messagekeycolumns": case "messageKeyColumns": return java.lang.String.class; case "offsetcommitpolicy": case "offsetCommitPolicy": return java.lang.String.class; case "offsetcommittimeoutms": case "offsetCommitTimeoutMs": return long.class; case "offsetflushintervalms": case "offsetFlushIntervalMs": return long.class; case "offsetstorage": case "offsetStorage": return java.lang.String.class; case "offsetstoragefilename": case "offsetStorageFileName": return java.lang.String.class; case "offsetstoragepartitions": case "offsetStoragePartitions": return int.class; case "offsetstoragereplicationfactor": case "offsetStorageReplicationFactor": return int.class; case "offsetstoragetopic": case "offsetStorageTopic": return java.lang.String.class; case "pluginname": case "pluginName": return java.lang.String.class; case "pollintervalms": case "pollIntervalMs": return long.class; case "providetransactionmetadata": case "provideTransactionMetadata": return boolean.class; case "publicationautocreatemode": case "publicationAutocreateMode": return java.lang.String.class; case "publicationname": case "publicationName": return java.lang.String.class; case "queryfetchsize": case "queryFetchSize": return int.class; case "retriablerestartconnectorwaitms": case "retriableRestartConnectorWaitMs": return long.class; case "sanitizefieldnames": case "sanitizeFieldNames": return boolean.class; case "schemablacklist": case "schemaBlacklist": return java.lang.String.class; case "schemaexcludelist": case "schemaExcludeList": return java.lang.String.class; case "schemaincludelist": case "schemaIncludeList": return java.lang.String.class; case "schemarefreshmode": case "schemaRefreshMode": return java.lang.String.class; case "schemawhitelist": case "schemaWhitelist": return java.lang.String.class; case "skippedoperations": case "skippedOperations": return java.lang.String.class; case "slotdroponstop": case "slotDropOnStop": return boolean.class; case "slotmaxretries": case "slotMaxRetries": return int.class; case "slotname": case "slotName": return java.lang.String.class; case "slotretrydelayms": case "slotRetryDelayMs": return long.class; case "slotstreamparams": case "slotStreamParams": return java.lang.String.class; case "snapshotcustomclass": case "snapshotCustomClass": return java.lang.String.class; case "snapshotdelayms": case "snapshotDelayMs": return long.class; case "snapshotfetchsize": case "snapshotFetchSize": return int.class; case "snapshotincludecollectionlist": case "snapshotIncludeCollectionList": return java.lang.String.class; case "snapshotlocktimeoutms": case "snapshotLockTimeoutMs": return long.class; case "snapshotmaxthreads": case "snapshotMaxThreads": return int.class; case "snapshotmode": case "snapshotMode": return java.lang.String.class; case "snapshotselectstatementoverrides": case "snapshotSelectStatementOverrides": return java.lang.String.class; case "sourcestructversion": case "sourceStructVersion": return java.lang.String.class; case "statusupdateintervalms": case "statusUpdateIntervalMs": return int.class; case "tableblacklist": case "tableBlacklist": return java.lang.String.class; case "tableexcludelist": case "tableExcludeList": return java.lang.String.class; case "tableignorebuiltin": case "tableIgnoreBuiltin": return boolean.class; case "tableincludelist": case "tableIncludeList": return java.lang.String.class; case "tablewhitelist": case "tableWhitelist": return java.lang.String.class; case "timeprecisionmode": case "timePrecisionMode": return java.lang.String.class; case "toastedvalueplaceholder": case "toastedValuePlaceholder": return java.lang.String.class; case "tombstonesondelete": case "tombstonesOnDelete": return boolean.class; case "xminfetchintervalms": case "xminFetchIntervalMs": return long.class; default: return null; } } @Override public Object getOptionValue(Object obj, String name, boolean ignoreCase) { DebeziumPostgresEndpoint target = (DebeziumPostgresEndpoint) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "additionalproperties": case "additionalProperties": return target.getConfiguration().getAdditionalProperties(); case "binaryhandlingmode": case "binaryHandlingMode": return target.getConfiguration().getBinaryHandlingMode(); case "bridgeerrorhandler": case "bridgeErrorHandler": return target.isBridgeErrorHandler(); case "columnblacklist": case "columnBlacklist": return target.getConfiguration().getColumnBlacklist(); case "columnexcludelist": case "columnExcludeList": return target.getConfiguration().getColumnExcludeList(); case "columnincludelist": case "columnIncludeList": return target.getConfiguration().getColumnIncludeList(); case "columnpropagatesourcetype": case "columnPropagateSourceType": return target.getConfiguration().getColumnPropagateSourceType(); case "columnwhitelist": case "columnWhitelist": return target.getConfiguration().getColumnWhitelist(); case "converters": return target.getConfiguration().getConverters(); case "databasedbname": case "databaseDbname": return target.getConfiguration().getDatabaseDbname(); case "databasehistoryfilefilename": case "databaseHistoryFileFilename": return target.getConfiguration().getDatabaseHistoryFileFilename(); case "databasehostname": case "databaseHostname": return target.getConfiguration().getDatabaseHostname(); case "databaseinitialstatements": case "databaseInitialStatements": return target.getConfiguration().getDatabaseInitialStatements(); case "databasepassword": case "databasePassword": return target.getConfiguration().getDatabasePassword(); case "databaseport": case "databasePort": return target.getConfiguration().getDatabasePort(); case "databaseservername": case "databaseServerName": return target.getConfiguration().getDatabaseServerName(); case "databasesslcert": case "databaseSslcert": return target.getConfiguration().getDatabaseSslcert(); case "databasesslfactory": case "databaseSslfactory": return target.getConfiguration().getDatabaseSslfactory(); case "databasesslkey": case "databaseSslkey": return target.getConfiguration().getDatabaseSslkey(); case "databasesslmode": case "databaseSslmode": return target.getConfiguration().getDatabaseSslmode(); case "databasesslpassword": case "databaseSslpassword": return target.getConfiguration().getDatabaseSslpassword(); case "databasesslrootcert": case "databaseSslrootcert": return target.getConfiguration().getDatabaseSslrootcert(); case "databasetcpkeepalive": case "databaseTcpkeepalive": return target.getConfiguration().isDatabaseTcpkeepalive(); case "databaseuser": case "databaseUser": return target.getConfiguration().getDatabaseUser(); case "datatypepropagatesourcetype": case "datatypePropagateSourceType": return target.getConfiguration().getDatatypePropagateSourceType(); case "decimalhandlingmode": case "decimalHandlingMode": return target.getConfiguration().getDecimalHandlingMode(); case "eventprocessingfailurehandlingmode": case "eventProcessingFailureHandlingMode": return target.getConfiguration().getEventProcessingFailureHandlingMode(); case "exceptionhandler": case "exceptionHandler": return target.getExceptionHandler(); case "exchangepattern": case "exchangePattern": return target.getExchangePattern(); case "heartbeatactionquery": case "heartbeatActionQuery": return target.getConfiguration().getHeartbeatActionQuery(); case "heartbeatintervalms": case "heartbeatIntervalMs": return target.getConfiguration().getHeartbeatIntervalMs(); case "heartbeattopicsprefix": case "heartbeatTopicsPrefix": return target.getConfiguration().getHeartbeatTopicsPrefix(); case "hstorehandlingmode": case "hstoreHandlingMode": return target.getConfiguration().getHstoreHandlingMode(); case "includeunknowndatatypes": case "includeUnknownDatatypes": return target.getConfiguration().isIncludeUnknownDatatypes(); case "internalkeyconverter": case "internalKeyConverter": return target.getConfiguration().getInternalKeyConverter(); case "internalvalueconverter": case "internalValueConverter": return target.getConfiguration().getInternalValueConverter(); case "intervalhandlingmode": case "intervalHandlingMode": return target.getConfiguration().getIntervalHandlingMode(); case "maxbatchsize": case "maxBatchSize": return target.getConfiguration().getMaxBatchSize(); case "maxqueuesize": case "maxQueueSize": return target.getConfiguration().getMaxQueueSize(); case "maxqueuesizeinbytes": case "maxQueueSizeInBytes": return target.getConfiguration().getMaxQueueSizeInBytes(); case "messagekeycolumns": case "messageKeyColumns": return target.getConfiguration().getMessageKeyColumns(); case "offsetcommitpolicy": case "offsetCommitPolicy": return target.getConfiguration().getOffsetCommitPolicy(); case "offsetcommittimeoutms": case "offsetCommitTimeoutMs": return target.getConfiguration().getOffsetCommitTimeoutMs(); case "offsetflushintervalms": case "offsetFlushIntervalMs": return target.getConfiguration().getOffsetFlushIntervalMs(); case "offsetstorage": case "offsetStorage": return target.getConfiguration().getOffsetStorage(); case "offsetstoragefilename": case "offsetStorageFileName": return target.getConfiguration().getOffsetStorageFileName(); case "offsetstoragepartitions": case "offsetStoragePartitions": return target.getConfiguration().getOffsetStoragePartitions(); case "offsetstoragereplicationfactor": case "offsetStorageReplicationFactor": return target.getConfiguration().getOffsetStorageReplicationFactor(); case "offsetstoragetopic": case "offsetStorageTopic": return target.getConfiguration().getOffsetStorageTopic(); case "pluginname": case "pluginName": return target.getConfiguration().getPluginName(); case "pollintervalms": case "pollIntervalMs": return target.getConfiguration().getPollIntervalMs(); case "providetransactionmetadata": case "provideTransactionMetadata": return target.getConfiguration().isProvideTransactionMetadata(); case "publicationautocreatemode": case "publicationAutocreateMode": return target.getConfiguration().getPublicationAutocreateMode(); case "publicationname": case "publicationName": return target.getConfiguration().getPublicationName(); case "queryfetchsize": case "queryFetchSize": return target.getConfiguration().getQueryFetchSize(); case "retriablerestartconnectorwaitms": case "retriableRestartConnectorWaitMs": return target.getConfiguration().getRetriableRestartConnectorWaitMs(); case "sanitizefieldnames": case "sanitizeFieldNames": return target.getConfiguration().isSanitizeFieldNames(); case "schemablacklist": case "schemaBlacklist": return target.getConfiguration().getSchemaBlacklist(); case "schemaexcludelist": case "schemaExcludeList": return target.getConfiguration().getSchemaExcludeList(); case "schemaincludelist": case "schemaIncludeList": return target.getConfiguration().getSchemaIncludeList(); case "schemarefreshmode": case "schemaRefreshMode": return target.getConfiguration().getSchemaRefreshMode(); case "schemawhitelist": case "schemaWhitelist": return target.getConfiguration().getSchemaWhitelist(); case "skippedoperations": case "skippedOperations": return target.getConfiguration().getSkippedOperations(); case "slotdroponstop": case "slotDropOnStop": return target.getConfiguration().isSlotDropOnStop(); case "slotmaxretries": case "slotMaxRetries": return target.getConfiguration().getSlotMaxRetries(); case "slotname": case "slotName": return target.getConfiguration().getSlotName(); case "slotretrydelayms": case "slotRetryDelayMs": return target.getConfiguration().getSlotRetryDelayMs(); case "slotstreamparams": case "slotStreamParams": return target.getConfiguration().getSlotStreamParams(); case "snapshotcustomclass": case "snapshotCustomClass": return target.getConfiguration().getSnapshotCustomClass(); case "snapshotdelayms": case "snapshotDelayMs": return target.getConfiguration().getSnapshotDelayMs(); case "snapshotfetchsize": case "snapshotFetchSize": return target.getConfiguration().getSnapshotFetchSize(); case "snapshotincludecollectionlist": case "snapshotIncludeCollectionList": return target.getConfiguration().getSnapshotIncludeCollectionList(); case "snapshotlocktimeoutms": case "snapshotLockTimeoutMs": return target.getConfiguration().getSnapshotLockTimeoutMs(); case "snapshotmaxthreads": case "snapshotMaxThreads": return target.getConfiguration().getSnapshotMaxThreads(); case "snapshotmode": case "snapshotMode": return target.getConfiguration().getSnapshotMode(); case "snapshotselectstatementoverrides": case "snapshotSelectStatementOverrides": return target.getConfiguration().getSnapshotSelectStatementOverrides(); case "sourcestructversion": case "sourceStructVersion": return target.getConfiguration().getSourceStructVersion(); case "statusupdateintervalms": case "statusUpdateIntervalMs": return target.getConfiguration().getStatusUpdateIntervalMs(); case "tableblacklist": case "tableBlacklist": return target.getConfiguration().getTableBlacklist(); case "tableexcludelist": case "tableExcludeList": return target.getConfiguration().getTableExcludeList(); case "tableignorebuiltin": case "tableIgnoreBuiltin": return target.getConfiguration().isTableIgnoreBuiltin(); case "tableincludelist": case "tableIncludeList": return target.getConfiguration().getTableIncludeList(); case "tablewhitelist": case "tableWhitelist": return target.getConfiguration().getTableWhitelist(); case "timeprecisionmode": case "timePrecisionMode": return target.getConfiguration().getTimePrecisionMode(); case "toastedvalueplaceholder": case "toastedValuePlaceholder": return target.getConfiguration().getToastedValuePlaceholder(); case "tombstonesondelete": case "tombstonesOnDelete": return target.getConfiguration().isTombstonesOnDelete(); case "xminfetchintervalms": case "xminFetchIntervalMs": return target.getConfiguration().getXminFetchIntervalMs(); default: return null; } } @Override public Object getCollectionValueType(Object target, String name, boolean ignoreCase) { switch (ignoreCase ? name.toLowerCase() : name) { case "additionalproperties": case "additionalProperties": return java.lang.Object.class; default: return null; } } }
gnodet/camel
components/camel-debezium-postgres/src/generated/java/org/apache/camel/component/debezium/DebeziumPostgresEndpointConfigurer.java
Java
apache-2.0
37,665
package com.ybproject.DiaryMemoUtile.Utile; import java.util.Locale; import android.app.Activity; import android.content.Context; import android.telephony.TelephonyManager; import android.util.Log; public class CommonUtil { private static final String TAG = "CommonUtil"; /** * 이동 통신사 이름 얻어 오기 * @param activity * @return */ public static String getOperatorName(Activity activity){ TelephonyManager tm = (TelephonyManager) activity.getSystemService (activity.TELEPHONY_SERVICE); return tm.getNetworkOperatorName(); } /** * 국가 코드 얻어 오기 * < 참고자료 > ISO 국가 CODE URL * https://digitalid.crosscert.com/secureserver/server/help/ccodes.htm * @param activity * @return */ public static String getCountrylso(Activity activity){ TelephonyManager tm = (TelephonyManager) activity.getSystemService (activity.TELEPHONY_SERVICE); return tm.getSimCountryIso(); } /** * 로밍 여부 확인 * @param activity * @return boolean */ public static boolean getRoamingState(Activity activity){ TelephonyManager tm = (TelephonyManager) activity.getSystemService (activity.TELEPHONY_SERVICE); return tm.isNetworkRoaming(); } /** * 시스템 언어를 가져와서 준비된 언어가 아닐경우 영어로 지정 * @param con * @return */ public static String getLanguage(Context con) { Log.d(TAG, "getLanguage() Start"); String systemLanguage = con.getResources().getConfiguration().locale.getLanguage(); if(systemLanguage.equals(Locale.KOREAN.toString())) { Log.d(TAG, "System language is KOREAN."); } else if(systemLanguage.equals(Locale.ENGLISH.toString())) { Log.d(TAG, "System language is ENGLISH."); } else if(systemLanguage.equals(Locale.JAPANESE.toString())) { Log.d(TAG, "System language is JAPANESE."); } else if(systemLanguage.equals(Locale.CHINESE.toString())) { Log.d(TAG, "System language is CHINESS."); } else if(systemLanguage.equals("in")) { Log.d(TAG, "System language is INDONESIAN."); } else { Log.d(TAG, "System language is other. set default(en)"); systemLanguage = "en"; } return systemLanguage; } }
tina0430/leejihee-
leejihee--master/diarymemo/app/src/main/java/com/ybproject/DiaryMemoUtile/Utile/CommonUtil.java
Java
apache-2.0
2,234
#include "redis_store_handler_op.h" #include <caffe2/core/context_gpu.h> namespace caffe2 { REGISTER_CUDA_OPERATOR( RedisStoreHandlerCreate, RedisStoreHandlerCreateOp<CUDAContext>); } // namespace caffe2
xzturn/caffe2
caffe2/distributed/redis_store_handler_op_gpu.cc
C++
apache-2.0
216
<!DOCTYPE html> <html> <head> <title>{% translate language, 'terms-and-conditions' %}</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="/static/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <style> #terms-of-use { height: calc(100vh - 240px); overflow: auto; } </style> </head> <body> <nav class="navbar navbar-default"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">{% translate language, 'terms-and-conditions' %}</a> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="/logout">{% translate language, 'log_out' %}</a></li> </ul> </div> </div> </nav> <div class="container"> <h4>{% translate language, 'please_review_updated_tac' %}</h4> <div id="terms-of-use">{{ tac }}</div> <hr> <div> <form id="terms-form" method="post"> <input type="hidden" name="version" value="{{ version }}"> <div class="checkbox" id="checkbox-container"> <label> <input type="checkbox" name="accept" id="accept-checkbox" required> {% translate language, 'i_agree_to_toc' %} </label> <div class="help-block" style="display: none;"> {% translate language, 'please_agree_to_toc' %} </div> </div> <button class="btn btn-default" id="submit-button">{% translate language, 'continue' %}</button> </form> </div> </div> <script src="/static/js/jquery-1.10.0.min.js"></script> <script src="/static/js/terms.js"></script> </body> </html>
rogerthat-platform/rogerthat-backend
src/rogerthat/templates/terms_and_conditions.html
HTML
apache-2.0
2,260
/* * 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.guacamole.auth.ldap.user; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.ldap.client.api.LdapNetworkConnection; import org.apache.guacamole.auth.ldap.ConnectedLDAPConfiguration; import org.apache.guacamole.auth.ldap.conf.LDAPConfiguration; /** * LDAPConfiguration implementation that represents the configuration and * network connection of an LDAP that has been bound on behalf of a Guacamole * user. */ public class UserLDAPConfiguration extends ConnectedLDAPConfiguration { /** * The username of the associated Guacamole user. */ private final String username; /** * Creates a new UserLDAPConfiguration that associates the given * LDAPConfiguration of an LDAP server with the active network connection to * that server, as well as the username of the Guacamole user on behalf of * whom that connection was established. All functions inherited from the * LDAPConfiguration interface are delegated to the given LDAPConfiguration. * It is the responsibility of the caller to ensure the provided * LdapNetworkConnection is closed after it is no longer needed. * * @param config * The LDAPConfiguration to wrap. * * @param username * The username of the associated Guacamole user. * * @param bindDn * The LDAP DN that was used to bind with the LDAP server to produce * the given LdapNetworkConnection. * * @param connection * The connection to the LDAP server represented by the given * configuration. */ public UserLDAPConfiguration(LDAPConfiguration config, String username, Dn bindDn, LdapNetworkConnection connection) { super(config, bindDn, connection); this.username = username; } /** * Returns the username of the Guacamole user on behalf of whom the * associated LDAP network connection was established. * * @return * The username of the associated Guacamole user. */ public String getGuacamoleUsername() { return username; } }
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/UserLDAPConfiguration.java
Java
apache-2.0
2,961
// // Copyright (c) Microsoft. All rights reserved. // // 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. namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands { using System; using System.Management.Automation; using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models; [Cmdlet(VerbsCommon.Remove, "AzureRMApiManagementProductFromGroup")] [OutputType(typeof(bool))] public class RemoveAzureApiManagementProductFromGroup : AzureApiManagementCmdletBase { [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Instance of PsApiManagementContext. This parameter is required.")] [ValidateNotNullOrEmpty] public PsApiManagementContext Context { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing group. This parameter is required.")] [ValidateNotNullOrEmpty] public String GroupId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Identifier of existing product. This parameter is required.")] [ValidateNotNullOrEmpty] public String ProductId { get; set; } [Parameter( ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")] public SwitchParameter PassThru { get; set; } public override void ExecuteApiManagementCmdlet() { Client.ProductRemoveFromGroup(Context, GroupId, ProductId); if (PassThru) { WriteObject(true); } } } }
SarahRogers/azure-powershell
src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/RemoveAzureApiManagementProductFromGroup.cs
C#
apache-2.0
2,415
/* Copyright 2010-2014 MongoDB Inc. * * 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. */ using System; using System.Collections.Generic; using System.Linq; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Driver.GeoJsonObjectModel.Serializers; namespace MongoDB.Driver.GeoJsonObjectModel { /// <summary> /// Represents the coordinates of a GeoJson linear ring. /// </summary> /// <typeparam name="TCoordinates">The type of the coordinates.</typeparam> [BsonSerializer(typeof(GeoJsonLinearRingCoordinatesSerializer<>))] public class GeoJsonLinearRingCoordinates<TCoordinates> : GeoJsonLineStringCoordinates<TCoordinates> where TCoordinates : GeoJsonCoordinates { // constructors /// <summary> /// Initializes a new instance of the <see cref="GeoJsonLinearRingCoordinates{TCoordinates}"/> class. /// </summary> /// <param name="positions">The positions.</param> /// <exception cref="System.ArgumentException"> /// A linear ring requires at least 4 positions.;positions /// or /// The first and last positions in a linear ring must be equal.;positions /// </exception> public GeoJsonLinearRingCoordinates(IEnumerable<TCoordinates> positions) : base(positions) { if (Positions.Count < 4) { throw new ArgumentException("A linear ring requires at least 4 positions.", "positions"); } if (!Positions.First().Equals(Positions.Last())) { throw new ArgumentException("The first and last positions in a linear ring must be equal.", "positions"); } } } }
antonnik/code-classifier
naive_bayes/resources/c#/GeoJsonLinearRingCoordinates.cs
C#
apache-2.0
2,202
<?php /** * PEAR_Validate * * PHP versions 4 and 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category pear * @package PEAR * @author Greg Beaver <cellog@php.net> * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Validate.php,v 1.1 2010/05/07 09:10:13 soonchoy Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ /**#@+ * Constants for install stage */ define('PEAR_VALIDATE_INSTALLING', 1); define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others define('PEAR_VALIDATE_NORMAL', 3); define('PEAR_VALIDATE_DOWNLOADING', 4); // this is not bit-mapped like the others define('PEAR_VALIDATE_PACKAGING', 7); /**#@-*/ require_once 'PEAR/Common.php'; require_once 'PEAR/Validator/PECL.php'; /** * Validation class for package.xml - channel-level advanced validation * @category pear * @package PEAR * @author Greg Beaver <cellog@php.net> * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ class PEAR_Validate { var $packageregex = _PEAR_COMMON_PACKAGE_NAME_PREG; /** * @var PEAR_PackageFile_v1|PEAR_PackageFile_v2 */ var $_packagexml; /** * @var int one of the PEAR_VALIDATE_* constants */ var $_state = PEAR_VALIDATE_NORMAL; /** * Format: ('error' => array('field' => name, 'reason' => reason), 'warning' => same) * @var array * @access private */ var $_failures = array('error' => array(), 'warning' => array()); /** * Override this method to handle validation of normal package names * @param string * @return bool * @access protected */ function _validPackageName($name) { return (bool) preg_match('/^' . $this->packageregex . '\\z/', $name); } /** * @param string package name to validate * @param string name of channel-specific validation package * @final */ function validPackageName($name, $validatepackagename = false) { if ($validatepackagename) { if (strtolower($name) == strtolower($validatepackagename)) { return (bool) preg_match('/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*\\z/', $name); } } return $this->_validPackageName($name); } /** * This validates a bundle name, and bundle names must conform * to the PEAR naming convention, so the method is final and static. * @param string * @final * @static */ function validGroupName($name) { return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name); } /** * Determine whether $state represents a valid stability level * @param string * @return bool * @static * @final */ function validState($state) { return in_array($state, array('snapshot', 'devel', 'alpha', 'beta', 'stable')); } /** * Get a list of valid stability levels * @return array * @static * @final */ function getValidStates() { return array('snapshot', 'devel', 'alpha', 'beta', 'stable'); } /** * Determine whether a version is a properly formatted version number that can be used * by version_compare * @param string * @return bool * @static * @final */ function validVersion($ver) { return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver); } /** * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 */ function setPackageFile(&$pf) { $this->_packagexml = &$pf; } /** * @access private */ function _addFailure($field, $reason) { $this->_failures['errors'][] = array('field' => $field, 'reason' => $reason); } /** * @access private */ function _addWarning($field, $reason) { $this->_failures['warnings'][] = array('field' => $field, 'reason' => $reason); } function getFailures() { $failures = $this->_failures; $this->_failures = array('warnings' => array(), 'errors' => array()); return $failures; } /** * @param int one of the PEAR_VALIDATE_* constants */ function validate($state = null) { if (!isset($this->_packagexml)) { return false; } if ($state !== null) { $this->_state = $state; } $this->_failures = array('warnings' => array(), 'errors' => array()); $this->validatePackageName(); $this->validateVersion(); $this->validateMaintainers(); $this->validateDate(); $this->validateSummary(); $this->validateDescription(); $this->validateLicense(); $this->validateNotes(); if ($this->_packagexml->getPackagexmlVersion() == '1.0') { $this->validateState(); $this->validateFilelist(); } elseif ($this->_packagexml->getPackagexmlVersion() == '2.0' || $this->_packagexml->getPackagexmlVersion() == '2.1') { $this->validateTime(); $this->validateStability(); $this->validateDeps(); $this->validateMainFilelist(); $this->validateReleaseFilelist(); //$this->validateGlobalTasks(); $this->validateChangelog(); } return !((bool) count($this->_failures['errors'])); } /** * @access protected */ function validatePackageName() { if ($this->_state == PEAR_VALIDATE_PACKAGING || $this->_state == PEAR_VALIDATE_NORMAL) { if (($this->_packagexml->getPackagexmlVersion() == '2.0' || $this->_packagexml->getPackagexmlVersion() == '2.1') && $this->_packagexml->getExtends()) { $version = $this->_packagexml->getVersion() . ''; $name = $this->_packagexml->getPackage(); $test = array_shift($a = explode('.', $version)); if ($test == '0') { return true; } $vlen = strlen($test); $majver = substr($name, strlen($name) - $vlen); while ($majver && !is_numeric($majver{0})) { $majver = substr($majver, 1); } if ($majver != $test) { $this->_addWarning('package', "package $name extends package " . $this->_packagexml->getExtends() . ' and so the name should ' . 'have a postfix equal to the major version like "' . $this->_packagexml->getExtends() . $test . '"'); return true; } elseif (substr($name, 0, strlen($name) - $vlen) != $this->_packagexml->getExtends()) { $this->_addWarning('package', "package $name extends package " . $this->_packagexml->getExtends() . ' and so the name must ' . 'be an extension like "' . $this->_packagexml->getExtends() . $test . '"'); return true; } } } if (!$this->validPackageName($this->_packagexml->getPackage())) { $this->_addFailure('name', 'package name "' . $this->_packagexml->getPackage() . '" is invalid'); return false; } } /** * @access protected */ function validateVersion() { if ($this->_state != PEAR_VALIDATE_PACKAGING) { if (!$this->validVersion($this->_packagexml->getVersion())) { $this->_addFailure('version', 'Invalid version number "' . $this->_packagexml->getVersion() . '"'); } return false; } $version = $this->_packagexml->getVersion(); $versioncomponents = explode('.', $version); if (count($versioncomponents) != 3) { $this->_addWarning('version', 'A version number should have 3 decimals (x.y.z)'); return true; } $name = $this->_packagexml->getPackage(); // version must be based upon state switch ($this->_packagexml->getState()) { case 'snapshot' : return true; case 'devel' : if ($versioncomponents[0] . 'a' == '0a') { return true; } if ($versioncomponents[0] == 0) { $versioncomponents[0] = '0'; $this->_addWarning('version', 'version "' . $version . '" should be "' . implode('.' ,$versioncomponents) . '"'); } else { $this->_addWarning('version', 'packages with devel stability must be < version 1.0.0'); } return true; break; case 'alpha' : case 'beta' : // check for a package that extends a package, // like Foo and Foo2 if ($this->_state == PEAR_VALIDATE_PACKAGING) { if (substr($versioncomponents[2], 1, 2) == 'rc') { $this->_addFailure('version', 'Release Candidate versions ' . 'must have capital RC, not lower-case rc'); return false; } } if (!$this->_packagexml->getExtends()) { if ($versioncomponents[0] == '1') { if ($versioncomponents[2]{0} == '0') { if ($versioncomponents[2] == '0') { // version 1.*.0000 $this->_addWarning('version', 'version 1.' . $versioncomponents[1] . '.0 probably should not be alpha or beta'); return true; } elseif (strlen($versioncomponents[2]) > 1) { // version 1.*.0RC1 or 1.*.0beta24 etc. return true; } else { // version 1.*.0 $this->_addWarning('version', 'version 1.' . $versioncomponents[1] . '.0 probably should not be alpha or beta'); return true; } } else { $this->_addWarning('version', 'bugfix versions (1.3.x where x > 0) probably should ' . 'not be alpha or beta'); return true; } } elseif ($versioncomponents[0] != '0') { $this->_addWarning('version', 'major versions greater than 1 are not allowed for packages ' . 'without an <extends> tag or an identical postfix (foo2 v2.0.0)'); return true; } if ($versioncomponents[0] . 'a' == '0a') { return true; } if ($versioncomponents[0] == 0) { $versioncomponents[0] = '0'; $this->_addWarning('version', 'version "' . $version . '" should be "' . implode('.' ,$versioncomponents) . '"'); } } else { $vlen = strlen($versioncomponents[0] . ''); $majver = substr($name, strlen($name) - $vlen); while ($majver && !is_numeric($majver{0})) { $majver = substr($majver, 1); } if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) { $this->_addWarning('version', 'first version number "' . $versioncomponents[0] . '" must match the postfix of ' . 'package name "' . $name . '" (' . $majver . ')'); return true; } if ($versioncomponents[0] == $majver) { if ($versioncomponents[2]{0} == '0') { if ($versioncomponents[2] == '0') { // version 2.*.0000 $this->_addWarning('version', "version $majver." . $versioncomponents[1] . '.0 probably should not be alpha or beta'); return false; } elseif (strlen($versioncomponents[2]) > 1) { // version 2.*.0RC1 or 2.*.0beta24 etc. return true; } else { // version 2.*.0 $this->_addWarning('version', "version $majver." . $versioncomponents[1] . '.0 cannot be alpha or beta'); return true; } } else { $this->_addWarning('version', "bugfix versions ($majver.x.y where y > 0) should " . 'not be alpha or beta'); return true; } } elseif ($versioncomponents[0] != '0') { $this->_addWarning('version', "only versions 0.x.y and $majver.x.y are allowed for alpha/beta releases"); return true; } if ($versioncomponents[0] . 'a' == '0a') { return true; } if ($versioncomponents[0] == 0) { $versioncomponents[0] = '0'; $this->_addWarning('version', 'version "' . $version . '" should be "' . implode('.' ,$versioncomponents) . '"'); } } return true; break; case 'stable' : if ($versioncomponents[0] == '0') { $this->_addWarning('version', 'versions less than 1.0.0 cannot ' . 'be stable'); return true; } if (!is_numeric($versioncomponents[2])) { if (preg_match('/\d+(rc|a|alpha|b|beta)\d*/i', $versioncomponents[2])) { $this->_addWarning('version', 'version "' . $version . '" or any ' . 'RC/beta/alpha version cannot be stable'); return true; } } // check for a package that extends a package, // like Foo and Foo2 if ($this->_packagexml->getExtends()) { $vlen = strlen($versioncomponents[0] . ''); $majver = substr($name, strlen($name) - $vlen); while ($majver && !is_numeric($majver{0})) { $majver = substr($majver, 1); } if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) { $this->_addWarning('version', 'first version number "' . $versioncomponents[0] . '" must match the postfix of ' . 'package name "' . $name . '" (' . $majver . ')'); return true; } } elseif ($versioncomponents[0] > 1) { $this->_addWarning('version', 'major version x in x.y.z may not be greater than ' . '1 for any package that does not have an <extends> tag'); } return true; break; default : return false; break; } } /** * @access protected */ function validateMaintainers() { // maintainers can only be truly validated server-side for most channels // but allow this customization for those who wish it return true; } /** * @access protected */ function validateDate() { if ($this->_state == PEAR_VALIDATE_NORMAL || $this->_state == PEAR_VALIDATE_PACKAGING) { if (!preg_match('/(\d\d\d\d)\-(\d\d)\-(\d\d)/', $this->_packagexml->getDate(), $res) || count($res) < 4 || !checkdate($res[2], $res[3], $res[1]) ) { $this->_addFailure('date', 'invalid release date "' . $this->_packagexml->getDate() . '"'); return false; } if ($this->_state == PEAR_VALIDATE_PACKAGING && $this->_packagexml->getDate() != date('Y-m-d')) { $this->_addWarning('date', 'Release Date "' . $this->_packagexml->getDate() . '" is not today'); } } return true; } /** * @access protected */ function validateTime() { if (!$this->_packagexml->getTime()) { // default of no time value set return true; } // packager automatically sets time, so only validate if // pear validate is called if ($this->_state = PEAR_VALIDATE_NORMAL) { if (!preg_match('/\d\d:\d\d:\d\d/', $this->_packagexml->getTime())) { $this->_addFailure('time', 'invalid release time "' . $this->_packagexml->getTime() . '"'); return false; } if (strtotime($this->_packagexml->getTime()) == -1) { $this->_addFailure('time', 'invalid release time "' . $this->_packagexml->getTime() . '"'); return false; } } return true; } /** * @access protected */ function validateState() { // this is the closest to "final" php4 can get if (!PEAR_Validate::validState($this->_packagexml->getState())) { if (strtolower($this->_packagexml->getState() == 'rc')) { $this->_addFailure('state', 'RC is not a state, it is a version ' . 'postfix, use ' . $this->_packagexml->getVersion() . 'RC1, state beta'); } $this->_addFailure('state', 'invalid release state "' . $this->_packagexml->getState() . '", must be one of: ' . implode(', ', PEAR_Validate::getValidStates())); return false; } return true; } /** * @access protected */ function validateStability() { $ret = true; $packagestability = $this->_packagexml->getState(); $apistability = $this->_packagexml->getState('api'); if (!PEAR_Validate::validState($packagestability)) { $this->_addFailure('state', 'invalid release stability "' . $this->_packagexml->getState() . '", must be one of: ' . implode(', ', PEAR_Validate::getValidStates())); $ret = false; } $apistates = PEAR_Validate::getValidStates(); array_shift($apistates); // snapshot is not allowed if (!in_array($apistability, $apistates)) { $this->_addFailure('state', 'invalid API stability "' . $this->_packagexml->getState('api') . '", must be one of: ' . implode(', ', $apistates)); $ret = false; } return $ret; } /** * @access protected */ function validateSummary() { return true; } /** * @access protected */ function validateDescription() { return true; } /** * @access protected */ function validateLicense() { return true; } /** * @access protected */ function validateNotes() { return true; } /** * for package.xml 2.0 only - channels can't use package.xml 1.0 * @access protected */ function validateDependencies() { return true; } /** * for package.xml 1.0 only * @access private */ function _validateFilelist() { return true; // placeholder for now } /** * for package.xml 2.0 only * @access protected */ function validateMainFilelist() { return true; // placeholder for now } /** * for package.xml 2.0 only * @access protected */ function validateReleaseFilelist() { return true; // placeholder for now } /** * @access protected */ function validateChangelog() { return true; } /** * @access protected */ function validateFilelist() { return true; } /** * @access protected */ function validateDeps() { return true; } } ?>
HladikBox/Console
libs/PEAR/PEAR/Validate.php
PHP
apache-2.0
22,969
/* * Licensed to GraphHopper and Peter Karich under one or more contributor * license agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * GraphHopper 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 com.graphhopper.tools; import com.graphhopper.GHRequest; import com.graphhopper.GHResponse; import com.graphhopper.GraphHopper; import com.graphhopper.routing.util.*; import com.graphhopper.storage.index.LocationIndex; import com.graphhopper.storage.Graph; import com.graphhopper.storage.GraphStorage; import com.graphhopper.storage.NodeAccess; import com.graphhopper.storage.RAMDirectory; import com.graphhopper.util.CmdArgs; import com.graphhopper.util.Constants; import com.graphhopper.util.DistanceCalc; import com.graphhopper.util.DistanceCalcEarth; import com.graphhopper.util.Helper; import com.graphhopper.util.MiniPerfTest; import com.graphhopper.util.StopWatch; import com.graphhopper.util.shapes.BBox; import java.io.FileWriter; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import java.util.Map.Entry; import java.util.Random; import java.util.TreeMap; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author Peter Karich */ public class Measurement { public static void main( String[] strs ) { new Measurement().start(CmdArgs.read(strs)); } private static final Logger logger = LoggerFactory.getLogger(Measurement.class); private final Map<String, String> properties = new TreeMap<String, String>(); private long seed; private int maxNode; class MeasureHopper extends GraphHopper { @Override protected void prepare() { // do nothing as we need normal graph first. in second step do it explicitely } @Override protected void ensureNotLoaded() { // skip check. we know what we are doing } public void doPostProcessing() { // re-create index to avoid bug as pickNode in locationIndex.prepare could be wrong while indexing if level is not taken into account and assumed to be 0 for pre-initialized graph StopWatch sw = new StopWatch().start(); int edges = getGraph().getAllEdges().getCount(); setAlgorithmFactory(createPrepare()); super.prepare(); setLocationIndex(createLocationIndex(new RAMDirectory())); put("prepare.time", sw.stop().getTime()); put("prepare.shortcuts", getGraph().getAllEdges().getCount() - edges); } } // creates properties file in the format key=value // Every value is one y-value in a separate diagram with an identical x-value for every Measurement.start call void start( CmdArgs args ) { long importTook = args.getLong("graph.importTime", -1); put("graph.importTime", importTook); String graphLocation = args.get("graph.location", ""); if (Helper.isEmpty(graphLocation)) throw new IllegalStateException("no graph.location specified"); String propLocation = args.get("measurement.location", ""); if (Helper.isEmpty(propLocation)) propLocation = "measurement" + new SimpleDateFormat("yyyy-MM-dd_HH_mm_ss").format(new Date()) + ".properties"; seed = args.getLong("measurement.seed", 123); String gitCommit = args.get("measurement.gitinfo", ""); int count = args.getInt("measurement.count", 5000); MeasureHopper hopper = new MeasureHopper(); hopper.forDesktop(); if (!hopper.load(graphLocation)) throw new IllegalStateException("Cannot load existing levelgraph at " + graphLocation); GraphStorage g = hopper.getGraph(); if ("true".equals(g.getProperties().get("prepare.done"))) throw new IllegalStateException("Graph has to be unprepared but wasn't!"); String vehicleStr = args.get("graph.flagEncoders", ""); StopWatch sw = new StopWatch().start(); try { maxNode = g.getNodes(); printGraphDetails(g, vehicleStr); printLocationIndexQuery(g, hopper.getLocationIndex(), count); // Route via dijkstrabi. Normal routing takes a lot of time => smaller query number than CH // => values are not really comparable to routingCH as e.g. the mean distance etc is different hopper.setCHEnable(false); printTimeOfRouteQuery(hopper, count / 20, "routing", vehicleStr, true); System.gc(); // route via CH. do preparation before hopper.setCHEnable(true); hopper.doPostProcessing(); printTimeOfRouteQuery(hopper, count, "routingCH", vehicleStr, true); printTimeOfRouteQuery(hopper, count, "routingCH_no_instr", vehicleStr, false); logger.info("store into " + propLocation); } catch (Exception ex) { logger.error("Problem while measuring " + graphLocation, ex); put("error", ex.toString()); } finally { put("measurement.gitinfo", gitCommit); put("measurement.count", count); put("measurement.seed", seed); put("measurement.time", sw.stop().getTime()); System.gc(); put("measurement.totalMB", Helper.getTotalMB()); put("measurement.usedMB", Helper.getUsedMB()); try { store(new FileWriter(propLocation), "measurement finish, " + new Date().toString() + ", " + Constants.BUILD_DATE); } catch (IOException ex) { logger.error("Problem while storing properties " + graphLocation + ", " + propLocation, ex); } } } private void printGraphDetails( GraphStorage g, String vehicleStr ) { // graph size (edge, node and storage size) put("graph.nodes", g.getNodes()); put("graph.edges", g.getAllEdges().getCount()); put("graph.sizeInMB", g.getCapacity() / Helper.MB); put("graph.encoder", vehicleStr); } private void printLocationIndexQuery( Graph g, final LocationIndex idx, int count ) { count *= 2; final BBox bbox = g.getBounds(); final double latDelta = bbox.maxLat - bbox.minLat; final double lonDelta = bbox.maxLon - bbox.minLon; final Random rand = new Random(seed); MiniPerfTest miniPerf = new MiniPerfTest() { @Override public int doCalc( boolean warmup, int run ) { double lat = rand.nextDouble() * latDelta + bbox.minLat; double lon = rand.nextDouble() * lonDelta + bbox.minLon; int val = idx.findClosest(lat, lon, EdgeFilter.ALL_EDGES).getClosestNode(); // if (!warmup && val >= 0) // list.add(val); return val; } }.setIterations(count).start(); print("location2id", miniPerf); } private void printTimeOfRouteQuery( final GraphHopper hopper, int count, String prefix, final String vehicle, final boolean withInstructions ) { final Graph g = hopper.getGraph(); final AtomicLong maxDistance = new AtomicLong(0); final AtomicLong minDistance = new AtomicLong(Long.MAX_VALUE); final AtomicLong distSum = new AtomicLong(0); final AtomicLong airDistSum = new AtomicLong(0); final AtomicInteger failedCount = new AtomicInteger(0); final DistanceCalc distCalc = new DistanceCalcEarth(); // final AtomicLong extractTimeSum = new AtomicLong(0); // final AtomicLong calcPointsTimeSum = new AtomicLong(0); // final AtomicLong calcDistTimeSum = new AtomicLong(0); // final AtomicLong tmpDist = new AtomicLong(0); final Random rand = new Random(seed); final NodeAccess na = g.getNodeAccess(); MiniPerfTest miniPerf = new MiniPerfTest() { @Override public int doCalc( boolean warmup, int run ) { int from = rand.nextInt(maxNode); int to = rand.nextInt(maxNode); double fromLat = na.getLatitude(from); double fromLon = na.getLongitude(from); double toLat = na.getLatitude(to); double toLon = na.getLongitude(to); GHRequest req = new GHRequest(fromLat, fromLon, toLat, toLon). setWeighting("fastest"). setVehicle(vehicle); req.getHints().put("instructions", withInstructions); GHResponse res; try { res = hopper.route(req); } catch (Exception ex) { // 'not found' can happen if import creates more than one subnetwork throw new RuntimeException("Error while calculating route! " + "nodes:" + from + " -> " + to + ", request:" + req, ex); } if (res.hasErrors()) { if (!warmup) failedCount.incrementAndGet(); if (!res.getErrors().get(0).getMessage().toLowerCase().contains("not found")) logger.error("errors should NOT happen in Measurement! " + req + " => " + res.getErrors()); return 0; } if (!warmup) { long dist = (long) res.getDistance(); distSum.addAndGet(dist); airDistSum.addAndGet((long) distCalc.calcDist(fromLat, fromLon, toLat, toLon)); if (dist > maxDistance.get()) maxDistance.set(dist); if (dist < minDistance.get()) minDistance.set(dist); // extractTimeSum.addAndGet(p.getExtractTime()); // long start = System.nanoTime(); // size = p.calcPoints().getSize(); // calcPointsTimeSum.addAndGet(System.nanoTime() - start); } return res.getPoints().getSize(); } }.setIterations(count).start(); count -= failedCount.get(); put(prefix + ".failedCount", failedCount.get()); put(prefix + ".distanceMin", minDistance.get()); put(prefix + ".distanceMean", (float) distSum.get() / count); put(prefix + ".airDistanceMean", (float) airDistSum.get() / count); put(prefix + ".distanceMax", maxDistance.get()); // put(prefix + ".extractTime", (float) extractTimeSum.get() / count / 1000000f); // put(prefix + ".calcPointsTime", (float) calcPointsTimeSum.get() / count / 1000000f); // put(prefix + ".calcDistTime", (float) calcDistTimeSum.get() / count / 1000000f); print(prefix, miniPerf); } void print( String prefix, MiniPerfTest perf ) { logger.info(perf.getReport()); put(prefix + ".sum", perf.getSum()); // put(prefix+".rms", perf.getRMS()); put(prefix + ".min", perf.getMin()); put(prefix + ".mean", perf.getMean()); put(prefix + ".max", perf.getMax()); } void put( String key, Object val ) { // convert object to string to make serialization possible properties.put(key, "" + val); } private void store( FileWriter fileWriter, String comment ) throws IOException { fileWriter.append("#" + comment + "\n"); for (Entry<String, String> e : properties.entrySet()) { fileWriter.append(e.getKey()); fileWriter.append("="); fileWriter.append(e.getValue()); fileWriter.append("\n"); } fileWriter.flush(); } }
heisenpai/GraphHopper
tools/src/main/java/com/graphhopper/tools/Measurement.java
Java
apache-2.0
12,750
// This file has been autogenerated. var profile = require('../../../lib/util/profile'); exports.getMockedProfile = function () { var newProfile = new profile.Profile(); newProfile.addSubscription(new profile.Subscription({ id: '00977cdb-163f-435f-9c32-39ec8ae61f4d', name: 'node', user: { name: 'user@domain.example', type: 'user' }, tenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47', registeredProviders: [], isDefault: true }, newProfile.environments['AzureCloud'])); return newProfile; }; exports.setEnvironment = function() { process.env['AZURE_ARM_TEST_LOCATION'] = 'South Central US'; }; exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') .get('/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/resourcegroups/xDeploymentTestGroup3480/deployments/random_deployment_name?api-version=2014-04-01-preview') .reply(404, "{\"error\":{\"code\":\"DeploymentNotFound\",\"message\":\"Deployment 'random_deployment_name' could not be found.\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', 'x-ms-failure-cause': 'gateway', 'x-ms-ratelimit-remaining-subscription-reads': '14994', 'x-ms-request-id': '4acb0511-0015-4a21-92da-532958a611f0', 'x-ms-correlation-request-id': '4acb0511-0015-4a21-92da-532958a611f0', 'x-ms-routing-request-id': 'WESTUS:20151007T202358Z:4acb0511-0015-4a21-92da-532958a611f0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', date: 'Wed, 07 Oct 2015 20:23:57 GMT', connection: 'close', 'content-length': '107' }); return result; }, function (nock) { var result = nock('https://management.azure.com:443') .get('/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/resourcegroups/xDeploymentTestGroup3480/deployments/random_deployment_name?api-version=2014-04-01-preview') .reply(404, "{\"error\":{\"code\":\"DeploymentNotFound\",\"message\":\"Deployment 'random_deployment_name' could not be found.\"}}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-type': 'application/json; charset=utf-8', expires: '-1', 'x-ms-failure-cause': 'gateway', 'x-ms-ratelimit-remaining-subscription-reads': '14994', 'x-ms-request-id': '4acb0511-0015-4a21-92da-532958a611f0', 'x-ms-correlation-request-id': '4acb0511-0015-4a21-92da-532958a611f0', 'x-ms-routing-request-id': 'WESTUS:20151007T202358Z:4acb0511-0015-4a21-92da-532958a611f0', 'strict-transport-security': 'max-age=31536000; includeSubDomains', date: 'Wed, 07 Oct 2015 20:23:57 GMT', connection: 'close', 'content-length': '107' }); return result; }]];
colrack/azure-xplat-cli
test/recordings/arm-cli-group-tests/arm_group_log_show_should_fail_when_an_invalid_deployment_name_is_provided.nock.js
JavaScript
apache-2.0
2,675
package de.japkit.metaannotations; /**Annotation value.*/ public @interface AV { /** * By default, this rule is active. * To switch it on or of case by case, a boolean expression can be used here. * * @return */ String cond() default ""; /** * The expression language for the cond expression. * @return */ String condLang() default ""; /** * As an alternative to the cond expression, a boolean function can be called. * * @return */ Class<?>[] condFun() default {}; /** * An expression to determine the source object for generating this annotation value(s). * The source element is available as "src" in expressions. If the src expression is not set, the src * element of the parent element is used (usually the enclosing element). * <p> * If this expression results in an Iterable, each object provided by the * Iterator is use as source object. That is, the annotation value is generated * multiple times, once for each object given by the iterator. * * @return */ String src() default ""; /** * As an alternative to the src expression, a function can be called to determine the source object. * * @return */ Class<?>[] srcFun() default {}; /** * * @return the language of the src expression. Defaults to Java EL. */ String srcLang() default ""; /** * * @return the name of the target annotation value */ String name(); /** * * @return the annotation value as a string */ String value() default ""; /** * * @return the annotation value as expression */ String expr() default ""; /** * * @return the expression language. Defaults to Java EL. */ String lang() default ""; /** * To create annotations as annotation values, an annotation mapping can be * referenced here by its Id. If expr is also set, the expression is * expected to yield an element or a collection of elements for which to * apply the annotation mapping. * * @return the id of the annotation mapping. */ String annotationMappingId() default ""; AVMode mode() default AVMode.ERROR_IF_EXISTS; }
japkit/japkit
japkit-annotations/src/main/java/de/japkit/metaannotations/AV.java
Java
apache-2.0
2,114
package com.snakerflow.framework.security.dao; import com.snakerflow.framework.orm.hibernate.HibernateDao; import com.snakerflow.framework.security.entity.Org; import org.springframework.stereotype.Component; /** * 部门持久化类 * @author yuqs * @since 0.1 */ @Component public class OrgDao extends HibernateDao<Org, Long> { }
snakerflow/snaker-web
src/main/java/com/snakerflow/framework/security/dao/OrgDao.java
Java
apache-2.0
339
/* * 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. */ using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Apache.Ignite.Benchmarks")] [assembly: AssemblyDescription("Apache Ignite.NET Benchmarks")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Apache Software Foundation")] [assembly: AssemblyProduct("Apache Ignite.NET")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("8fae8395-7e91-411a-a78f-44d6d3fed0fc")] [assembly: AssemblyVersion("1.7.0.11707")] [assembly: AssemblyFileVersion("1.7.0.11707")] [assembly: AssemblyInformationalVersion("1.7.0")]
f7753/ignite
modules/platforms/dotnet/Apache.Ignite.Benchmarks/Properties/AssemblyInfo.cs
C#
apache-2.0
1,488
/*! * Start Bootstrap - Portfolio Item HTML Template (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ body { padding-top: 70px; /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */ background-color: #222222; } .page-header { color: #1F824F; } .portfolio-item { margin-bottom: 25px; } h3 { color:#777; } p { color:#777; } /* footer { margin: 50px 0; }*/
gizboslice/gizboslice.github.io
css/portfolio-item.css
CSS
apache-2.0
541
/** * Copyright (C) 2015 Anthony K. Trinh * * 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 com.github.tony19.loggly; import org.junit.Before; import org.junit.Rule; import org.junit.rules.ExpectedException; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import retrofit.mime.TypedString; import static org.junit.Assert.assertThat; import static org.hamcrest.CoreMatchers.is; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; /** * Tests {@link com.github.tony19.loggly.LogglyClient} * @author tony19@gmail.com */ @RunWith(MockitoJUnitRunner.class) public class LogglyClientTest { @Mock private ILogglyRestService restApi; private ILogglyClient loggly; private static final String TOKEN = "1e29e92a-b099-49c5-a260-4c56a71f7c89"; private static final String NO_TAGS = null; @Rule public ExpectedException exception = ExpectedException.none(); @Before public void setup() { restApi = Mockito.mock(ILogglyRestService.class); loggly = new LogglyClient(TOKEN, restApi); } @Test public void constructorRejectsNull() { exception.expect(IllegalArgumentException.class); new LogglyClient(null); } @Test public void logRejectsNull() { assertThat(loggly.log(null), is(false)); Mockito.verifyZeroInteractions(restApi); } @Test public void logBulkRejectsNull() { assertThat(loggly.logBulk((String[])null), is(false)); Mockito.verifyZeroInteractions(restApi); } @Test public void logBulkVarargsRejectsNull() { assertThat(loggly.logBulk(null, ""), is(false)); Mockito.verifyZeroInteractions(restApi); } @Test public void logCallsLogRestApi() { Mockito.doReturn(LogglyResponse.OK).when(restApi).log(anyString(), anyString(), any(TypedString.class)); final String event = "hello world\nthis is a\nmulti-line event"; assertThat(loggly.log(event), is(true)); Mockito.verify(restApi).log(TOKEN, NO_TAGS, new TypedString(event)); } @Test public void logBulkCallsBulkRestApi() { Mockito.doReturn(LogglyResponse.OK).when(restApi).logBulk(anyString(), anyString(), any(TypedString.class)); final boolean ok = loggly.logBulk("E 1", "E 2", "E 3"); assertThat(ok, is(true)); Mockito.verify(restApi).logBulk(TOKEN, NO_TAGS, new TypedString("E 1\nE 2\nE 3\n")); } @Test public void logBulkPreservesNewLineAsCarriageReturn() { Mockito.doReturn(LogglyResponse.OK).when(restApi).logBulk(anyString(), anyString(), any(TypedString.class)); final boolean ok = loggly.logBulk("multi-line\nevent here", "event 2"); assertThat(ok, is(true)); Mockito.verify(restApi).logBulk(TOKEN, NO_TAGS, new TypedString("multi-line\revent here\nevent 2\n")); } @Test public void singleTagIsSentToLoggly() { loggly.setTags("foo"); loggly.logBulk("event"); Mockito.verify(restApi).logBulk(TOKEN, "foo", new TypedString("event\n")); } @Test public void singleCsvTagIsSentToLoggly() { loggly.setTags("foo,bar"); loggly.logBulk("event"); Mockito.verify(restApi).logBulk(TOKEN, "foo,bar", new TypedString("event\n")); } @Test public void multipleTagsAreSentToLoggly() { loggly.setTags("foo", "bar"); loggly.logBulk("event"); Mockito.verify(restApi).logBulk(TOKEN, "foo,bar", new TypedString("event\n")); } @Test public void mixOfSingleTagAndMultipleTagsAreSentToLoggly() { loggly.setTags("foo", "bar", "baz,abc", "w,x ,y ,z, "); loggly.logBulk("event"); Mockito.verify(restApi).logBulk(TOKEN, "foo,bar,baz,abc,w,x,y,z", new TypedString("event\n")); } @Test public void emptyTagsResultInNoTags() { loggly.setTags("", " ", " ,", ", , ,, "); loggly.logBulk("event"); Mockito.verify(restApi).logBulk(TOKEN, NO_TAGS, new TypedString("event\n")); } }
psquickitjayant/loggly-client
src/test/java/com/github/tony19/loggly/LogglyClientTest.java
Java
apache-2.0
4,666
@echo off setlocal rem Use dynamic shaders to build .inc files only rem set dynamic_shaders=0 rem == Setup path to nmake.exe, from vc 2005 common tools directory == call "%VS100COMNTOOLS%vsvars32.bat" rem ================================ rem ==== MOD PATH CONFIGURATIONS === rem == Set the absolute path to your mod's game directory here == rem == Note that this path needs does not support long file/directory names == rem == So instead of a path such as "C:\Program Files\Steam\steamapps\mymod" == rem == you need to find the 8.3 abbreviation for the directory name using 'dir /x' == rem == and set the directory to something like C:\PROGRA~2\Steam\steamapps\sourcemods\mymod == set GAMEDIR=E:\STEAMA~1\SOURCE~1\shelter rem == Set the relative path to SourceSDK\bin\orangebox\bin == rem == As above, this path does not support long directory names or spaces == rem == e.g. ..\..\..\..\..\PROGRA~2\Steam\steamapps\<USER NAME>\sourcesdk\bin\orangebox\bin == set SDKBINDIR=..\..\..\..\..\..\STEAMA~1\common\ALIENS~1\bin rem == Set the Path to your mods root source code == rem this should already be correct, accepts relative paths only! set SOURCEDIR=..\.. rem ==== MOD PATH CONFIGURATIONS END === rem ==================================== set TTEXE=..\..\devtools\bin\timeprecise.exe if not exist %TTEXE% goto no_ttexe goto no_ttexe_end :no_ttexe set TTEXE=time /t :no_ttexe_end rem echo. rem echo ~~~~~~ buildsdkshaders %* ~~~~~~ %TTEXE% -cur-Q set tt_all_start=%ERRORLEVEL% set tt_all_chkpt=%tt_start% set BUILD_SHADER=call buildshaders.bat set ARG_EXTRA= %BUILD_SHADER% deferred_shaders -game %GAMEDIR% -source %SOURCEDIR% -dx9_30 -force30 rem echo. if not "%dynamic_shaders%" == "1" ( rem echo Finished full buildallshaders %* ) else ( rem echo Finished dynamic buildallshaders %* ) rem %TTEXE% -diff %tt_all_start% -cur rem echo.
jonathonracz/swarm-deferred
materialsystem/swarmshaders/bdef.bat
Batchfile
apache-2.0
1,859
public class IntConstantXor { public final static int test(int arg) { return arg ^ 0xF0F0; } }
monoman/cnatural-language
tests/resources/ExpressionsTest/sources/IntConstantXor.stab.cs
C#
apache-2.0
99
export interface AIMonthlySummary { successCount: number; failedCount: number; } export interface AIInvocationTrace { timestamp: string; timestampFriendly: string; id: string; name: string; success: boolean; resultCode: string; duration: number; operationId: string; invocationId: string; } export interface AIInvocationTraceHistory { rowId: number; timestamp: string; timestampFriendly: string; message: string; logLevel: string; } export interface AIQueryResult { tables: AIQueryResultTable[]; } export interface AIQueryResultTable { name: string; columns: AIQueryResultTableColumn[]; rows: any[][]; } export interface AIQueryResultTableColumn { columnName: string; dataType: string; columnType: string; } export interface ApplicationInsight { AppId: string; Application_Type: string; ApplicationId: string; CreationDate: Date; InstrumentationKey: string; Name: string; }
projectkudu/AzureFunctions
client/src/app/shared/models/application-insights.ts
TypeScript
apache-2.0
987
// Copyright 2018 Google LLC // // 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 // // https://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. #include "tools/render/trace_program.h" #include "absl/flags/flag.h" #include "absl/time/clock.h" #include "tools/render/layout_constants.h" ABSL_FLAG(bool, show_fps, false, "Show the current framerate of the program"); ABSL_FLAG(bool, vsync, true, "Enables vsync"); ABSL_FLAG(double, mouseover_threshold, 3.0, "The minimum size of a single packet (in fractional pixels) that " "causes the packet information box being showed"); namespace quic_trace { namespace render { TraceProgram::TraceProgram() : window_(SDL_CreateWindow( "QUIC trace viewer", 0, 0, state_.window.x, state_.window.y, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI)), context_(*window_) { UpdateWindowSize(); state_buffer_ = absl::make_unique<ProgramState>(&state_); renderer_ = absl::make_unique<TraceRenderer>(state_buffer_.get()); text_renderer_ = absl::make_unique<TextRenderer>(state_buffer_.get()); axis_renderer_ = absl::make_unique<AxisRenderer>(text_renderer_.get(), state_buffer_.get()); rectangle_renderer_ = absl::make_unique<RectangleRenderer>(state_buffer_.get()); SDL_GL_SetSwapInterval(absl::GetFlag(FLAGS_vsync) ? 1 : 0); SDL_SetWindowMinimumSize(*window_, 640, 480); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } void TraceProgram::LoadTrace(std::unique_ptr<Trace> trace) { std::stable_sort( trace->mutable_events()->begin(), trace->mutable_events()->end(), [](const Event& a, const Event& b) { return a.time_us() < b.time_us(); }); trace_ = absl::make_unique<ProcessedTrace>(std::move(trace), renderer_.get()); state_.viewport.x = renderer_->max_x(); state_.viewport.y = renderer_->max_y(); } void TraceProgram::Loop() { while (!quit_) { absl::Time frame_start = absl::Now(); PollEvents(); PollKeyboard(); PollMouse(); EnsureBounds(); state_buffer_->Refresh(); // Render. glClearColor(1.f, 1.f, 1.f, 1.f); glClear(GL_COLOR_BUFFER_BIT); // Note that the order of calls below determines what is drawn on top of // what. renderer_->Render(); axis_renderer_->Render(); MaybeShowFramerate(); DrawRightSideTables(); // The batch object renderers should be called last. rectangle_renderer_->Render(); text_renderer_->DrawAll(); SDL_GL_SwapWindow(*window_); absl::Time frame_end = absl::Now(); frame_duration_ = 0.25 * (frame_end - frame_start) + 0.75 * frame_duration_; } } float TraceProgram::ScaleAdditiveFactor(float x) { return x * absl::ToDoubleSeconds(frame_duration_) / absl::ToDoubleSeconds(kReferenceFrameDuration); } float TraceProgram::ScaleMultiplicativeFactor(float k) { return std::pow(k, absl::ToDoubleSeconds(frame_duration_) / absl::ToDoubleSeconds(kReferenceFrameDuration)); } void TraceProgram::Zoom(float zoom) { float zoom_factor = std::abs(zoom); float sign = std::copysign(1.f, zoom); // Ensure that the central point doesn't move. state_.offset.x += sign * (1 - zoom_factor) * state_.viewport.x / 2; state_.offset.y += sign * (1 - zoom_factor) * state_.viewport.y / 2; state_.viewport.x *= std::pow(zoom_factor, sign); state_.viewport.y *= std::pow(zoom_factor, sign); } void TraceProgram::UpdateWindowSize() { int width, height; SDL_GL_GetDrawableSize(*window_, &width, &height); state_.window = vec2(width, height); glViewport(0, 0, width, height); int input_width, input_height; SDL_GetWindowSize(*window_, &input_width, &input_height); input_scale_ = vec2((float)width / input_width, (float)height / input_height); const float kReferenceDpi = 100.f; float dpi; int result = SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(*window_), &dpi, nullptr, nullptr); if (result < 0) { LOG(WARNING) << "Failed to retrieve window DPI"; } state_.dpi_scale = input_scale_.x * dpi / kReferenceDpi; } void TraceProgram::PollEvents() { SDL_Event event; while (SDL_PollEvent(&event)) { switch (event.type) { case SDL_QUIT: quit_ = true; break; case SDL_WINDOWEVENT: if (event.window.event == SDL_WINDOWEVENT_RESIZED) { UpdateWindowSize(); } break; case SDL_KEYDOWN: if (event.key.keysym.scancode == SDL_SCANCODE_H) { show_online_help_ = !show_online_help_; } break; case SDL_MOUSEWHEEL: { int wheel_offset = event.wheel.y; if (wheel_offset == 0) { break; } if (event.wheel.direction == SDL_MOUSEWHEEL_FLIPPED) { wheel_offset *= -1; } // Note that this does not need to be scaled with framerate since // mousewheel events are discrete. Zoom(std::copysign(0.95f, wheel_offset)); break; } } } } void TraceProgram::PollKeyboard() { const uint8_t* state = SDL_GetKeyboardState(nullptr); if (state[SDL_SCANCODE_Q]) { quit_ = true; } // Zoom handling. const float zoom_factor = ScaleMultiplicativeFactor(0.98); if (state[SDL_SCANCODE_Z]) { Zoom(+zoom_factor); } if (state[SDL_SCANCODE_X]) { Zoom(-zoom_factor); } if (state[SDL_SCANCODE_UP]) { state_.offset.y += ScaleAdditiveFactor(state_.viewport.y * 0.03); } if (state[SDL_SCANCODE_DOWN]) { state_.offset.y -= ScaleAdditiveFactor(state_.viewport.y * 0.03); } if (state[SDL_SCANCODE_LEFT]) { state_.offset.x -= ScaleAdditiveFactor(state_.viewport.x * 0.03); } if (state[SDL_SCANCODE_RIGHT]) { state_.offset.x += ScaleAdditiveFactor(state_.viewport.x * 0.03); } if (state[SDL_SCANCODE_R]) { absl::optional<Box> new_viewport = trace_->BoundContainedPackets(Box{state_.offset, state_.viewport}); if (new_viewport) { state_.offset = new_viewport->origin; state_.viewport = new_viewport->size; } } } void TraceProgram::PollMouse() { int x, y; uint32_t buttons = SDL_GetMouseState(&x, &y); const uint8_t* state = SDL_GetKeyboardState(nullptr); bool shift = state[SDL_SCANCODE_LSHIFT] || state[SDL_SCANCODE_RSHIFT]; x *= input_scale_.x; y *= input_scale_.y; HandlePanning((buttons & SDL_BUTTON(SDL_BUTTON_LEFT)) && !shift, x, state_.window.y - y); HandleSummary((buttons & SDL_BUTTON(SDL_BUTTON_LEFT)) && shift, x); HandleZooming(buttons & SDL_BUTTON(SDL_BUTTON_RIGHT), x, state_.window.y - y); HandleMouseover(x, state_.window.y - y); } void TraceProgram::HandlePanning(bool pressed, int x, int y) { if (!pressed) { panning_ = false; return; } if (!panning_) { panning_ = true; panning_last_pos_ = vec2(x, y); return; } state_.offset += WindowToTraceRelative(panning_last_pos_ - vec2(x, y)); panning_last_pos_ = vec2(x, y); } void TraceProgram::HandleZooming(bool pressed, int x, int y) { if (!pressed && !zooming_) { return; } if (pressed && !zooming_) { zooming_ = true; zoom_start_x_ = x; zoom_start_y_ = y; return; } Box window_box = BoundingBox(vec2(x, y), vec2(zoom_start_x_, zoom_start_y_)); // Ensure that the selection does not go out of the bounds of the trace view. window_box = IntersectBoxes(window_box, TraceBounds()); if (pressed && zooming_) { // User is still selecting the area to zoom into. Draw a transparent grey // rectangle to indicate the currently picked area. rectangle_renderer_->AddRectangle(window_box, 0x00000033); return; } // Actually zoom in. zooming_ = false; // Discard all attempts to zoom in into something smaller than 16x16 pixels, // as those are more liekly to be accidental. if (window_box.size.x < 16 || window_box.size.y < 16) { return; } const Box trace_box = WindowToTraceCoordinates(window_box); state_.viewport = trace_box.size; state_.offset = trace_box.origin; } void TraceProgram::HandleSummary(bool pressed, int x) { if (!pressed) { summary_ = false; return; } if (!summary_) { summary_ = true; summary_start_x_ = x; return; } Box window_box = BoundingBox(vec2(x, 0), vec2(summary_start_x_, 99999.f)); // Ensure that the selection does not go out of the bounds of the trace view. window_box = IntersectBoxes(window_box, TraceBounds()); if (window_box.size.x < 1) { return; } rectangle_renderer_->AddRectangle(window_box, 0x00000033); const Box selected = WindowToTraceCoordinates(window_box); summary_table_.emplace(state_buffer_.get(), text_renderer_.get(), rectangle_renderer_.get()); if (!trace_->SummaryTable(&*summary_table_, selected.origin.x, selected.origin.x + selected.size.x)) { summary_table_ = absl::nullopt; } } void TraceProgram::HandleMouseover(int x, int y) { vec2 window_pos(x, y); if (!IsInside(window_pos, TraceBounds())) { return; } vec2 trace_pos = WindowToTraceCoordinates(window_pos); float packet_size_in_pixels = kSentPacketDurationMs / state_.viewport.x * state_.window.x; if (packet_size_in_pixels < absl::GetFlag(FLAGS_mouseover_threshold)) { renderer_->set_highlighted_packet(-1); return; } constexpr int kPixelMargin = 64; const vec2 margin = WindowToTraceRelative(vec2(kPixelMargin, kPixelMargin)); ProcessedTrace::PacketSearchResult hovered_packet = trace_->FindPacketContainingPoint(trace_pos, margin); renderer_->set_highlighted_packet(hovered_packet.index); if (hovered_packet.event == nullptr) { return; } constexpr vec2 kMouseoverOffset = vec2(32, 32); Table table(state_buffer_.get(), text_renderer_.get(), rectangle_renderer_.get()); trace_->FillTableForPacket(&table, hovered_packet.as_rendered, hovered_packet.event); vec2 table_size = table.Layout(); table.Draw(vec2(x, y) + kMouseoverOffset + 0 * table_size); } Table TraceProgram::GenerateOnlineHelp() { Table table(state_buffer_.get(), text_renderer_.get(), rectangle_renderer_.get()); table.AddHeader("Help"); table.AddRow("h", "Toggle help"); table.AddRow("z", "Zoom in"); table.AddRow("x", "Zoom out"); table.AddRow("r", "Rescale"); table.AddRow("Arrows", "Move"); table.AddRow("LMouse", "Move"); table.AddRow("RMouse", "Zoom"); table.AddRow("Shift+LM", "Summary"); return table; } void TraceProgram::EnsureBounds() { constexpr float kTimeMargin = 3000.f; constexpr float kOffsetMargin = 10 * 1350.f; state_.viewport.x = std::min(state_.viewport.x, renderer_->max_x() + 2 * kTimeMargin); state_.viewport.y = std::min(state_.viewport.y, renderer_->max_y() + 2 * kOffsetMargin); const float min_x = -kTimeMargin; const float min_y = -kOffsetMargin; const float max_x = renderer_->max_x() + kTimeMargin; const float max_y = renderer_->max_y() + kOffsetMargin; state_.offset.x = std::max(min_x, state_.offset.x); state_.offset.x = std::min(max_x - state_.viewport.x, state_.offset.x); state_.offset.y = std::max(min_y, state_.offset.y); state_.offset.y = std::min(max_y - state_.viewport.y, state_.offset.y); } vec2 TraceProgram::WindowToTraceRelative(vec2 vector) { const vec2 pixel_viewport = state_.window - 2 * TraceMargin(state_.dpi_scale); return vector * state_.viewport / pixel_viewport; } vec2 TraceProgram::WindowToTraceCoordinates(vec2 point) { return state_.offset + WindowToTraceRelative(point - TraceMargin(state_.dpi_scale)); } Box TraceProgram::WindowToTraceCoordinates(Box box) { return BoundingBox(WindowToTraceCoordinates(box.origin), WindowToTraceCoordinates(box.origin + box.size)); } Box TraceProgram::TraceBounds() { return BoundingBox(TraceMargin(state_.dpi_scale), state_.window - TraceMargin(state_.dpi_scale)); } void TraceProgram::MaybeShowFramerate() { if (!absl::GetFlag(FLAGS_show_fps)) { return; } char buffer[16]; snprintf(buffer, sizeof(buffer), "%.2ffps", 1. / absl::ToDoubleSeconds(frame_duration_)); std::shared_ptr<const Text> framerate = text_renderer_->RenderText(buffer); text_renderer_->AddText(framerate, 0, state_.window.y - framerate->height()); } void TraceProgram::DrawRightSideTables() { float distance = 20.f * state_.dpi_scale; vec2 offset = state_.window - vec2(distance, distance); if (summary_table_.has_value()) { vec2 table_size = summary_table_->Layout(); summary_table_->Draw(offset - table_size); offset.y -= table_size.y + distance; } if (show_online_help_) { Table online_help = GenerateOnlineHelp(); vec2 table_size = online_help.Layout(); online_help.Draw(offset - table_size); offset.y -= table_size.y + distance; } summary_table_ = absl::nullopt; } } // namespace render } // namespace quic_trace
google/quic-trace
tools/render/trace_program.cc
C++
apache-2.0
13,529
--- layout: documentation --- The native dependencies are only needed on actual Storm clusters. When running Storm in local mode, Storm uses a pure Java messaging system so that you don't need to install native dependencies on your development machine. Installing ZeroMQ and JZMQ is usually straightforward. Sometimes, however, people run into issues with autoconf and get strange errors. If you run into any issues, please email the [Storm mailing list](http://groups.google.com/group/storm-user) or come get help in the #storm-user room on freenode. Storm has been tested with ZeroMQ 2.1.7, and this is the recommended ZeroMQ release that you install. You can download a ZeroMQ release [here](http://download.zeromq.org/). Installing ZeroMQ should look something like this: ``` wget http://download.zeromq.org/zeromq-2.1.7.tar.gz tar -xzf zeromq-2.1.7.tar.gz cd zeromq-2.1.7 ./configure make sudo make install ``` JZMQ is the Java bindings for ZeroMQ. JZMQ doesn't have any releases (we're working with them on that), so there is risk of a regression if you always install from the master branch. To prevent a regression from happening, you should instead install from [this fork](http://github.com/nathanmarz/jzmq) which is tested to work with Storm. Installing JZMQ should look something like this: ``` #install jzmq git clone https://github.com/nathanmarz/jzmq.git cd jzmq ./autogen.sh ./configure make sudo make install ``` To get the JZMQ build to work, you may need to do one or all of the following: 1. Set JAVA_HOME environment variable appropriately 2. Install Java dev package (more info [here](http://codeslinger.posterous.com/getting-zeromq-and-jzmq-running-on-mac-os-x) for Mac OSX users) 3. Upgrade autoconf on your machine 4. Follow the instructions in [this blog post](http://blog.pmorelli.com/getting-zeromq-and-jzmq-running-on-mac-os-x) If you run into any errors when running `./configure`, [this thread](http://stackoverflow.com/questions/3522248/how-do-i-compile-jzmq-for-zeromq-on-osx) may provide a solution.
techdocscn/storm
source/documentation/Installing-native-dependencies.md
Markdown
apache-2.0
2,042
package com.amazonaws.eclipse.opsworks; import java.util.LinkedList; import java.util.List; import com.amazonaws.services.opsworks.AWSOpsWorks; import com.amazonaws.services.opsworks.model.App; import com.amazonaws.services.opsworks.model.DescribeAppsRequest; import com.amazonaws.services.opsworks.model.DescribeInstancesRequest; import com.amazonaws.services.opsworks.model.DescribeLayersRequest; import com.amazonaws.services.opsworks.model.DescribeStacksRequest; import com.amazonaws.services.opsworks.model.Instance; import com.amazonaws.services.opsworks.model.Layer; import com.amazonaws.services.opsworks.model.Stack; public class ServiceAPIUtils { public static List<Stack> getAllStacks(AWSOpsWorks client) { return client.describeStacks(new DescribeStacksRequest()) .getStacks(); } public static List<Layer> getAllLayersInStack(AWSOpsWorks client, String stackId) { return client.describeLayers( new DescribeLayersRequest().withStackId(stackId)) .getLayers(); } public static List<Instance> getAllInstancesInStack(AWSOpsWorks client, String stackId) { return client.describeInstances( new DescribeInstancesRequest().withStackId(stackId)) .getInstances(); } public static List<Instance> getAllInstancesInLayer(AWSOpsWorks client, String layerId) { return client.describeInstances( new DescribeInstancesRequest().withLayerId(layerId)) .getInstances(); } public static List<App> getAllAppsInStack(AWSOpsWorks client, String stackId) { return client.describeApps( new DescribeAppsRequest().withStackId(stackId)) .getApps(); } public static List<App> getAllJavaAppsInStack(AWSOpsWorks client, String stackId) { List<App> allJavaApps = new LinkedList<>(); for (App app : getAllAppsInStack(client, stackId)) { if ("java".equalsIgnoreCase(app.getType())) { allJavaApps.add(app); } } return allJavaApps; } }
zhangzhx/aws-toolkit-eclipse
bundles/com.amazonaws.eclipse.opsworks/src/com/amazonaws/eclipse/opsworks/ServiceAPIUtils.java
Java
apache-2.0
2,139
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package com.badlogic.gdx.physics.bullet.collision; import com.badlogic.gdx.physics.bullet.BulletBase; import com.badlogic.gdx.physics.bullet.linearmath.*; import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.math.Quaternion; import com.badlogic.gdx.math.Matrix3; import com.badlogic.gdx.math.Matrix4; public class btConvexPointCloudShape extends btPolyhedralConvexAabbCachingShape { private long swigCPtr; protected btConvexPointCloudShape(final String className, long cPtr, boolean cMemoryOwn) { super(className, CollisionJNI.btConvexPointCloudShape_SWIGUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } /** Construct a new btConvexPointCloudShape, normally you should not need this constructor it's intended for low-level usage. */ public btConvexPointCloudShape(long cPtr, boolean cMemoryOwn) { this("btConvexPointCloudShape", cPtr, cMemoryOwn); construct(); } @Override protected void reset(long cPtr, boolean cMemoryOwn) { if (!destroyed) destroy(); super.reset(CollisionJNI.btConvexPointCloudShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn); } public static long getCPtr(btConvexPointCloudShape obj) { return (obj == null) ? 0 : obj.swigCPtr; } @Override protected void finalize() throws Throwable { if (!destroyed) destroy(); super.finalize(); } @Override protected synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; CollisionJNI.delete_btConvexPointCloudShape(swigCPtr); } swigCPtr = 0; } super.delete(); } public btConvexPointCloudShape() { this(CollisionJNI.new_btConvexPointCloudShape__SWIG_0(), true); } public btConvexPointCloudShape(btVector3 points, int numPoints, Vector3 localScaling, boolean computeAabb) { this(CollisionJNI.new_btConvexPointCloudShape__SWIG_1(btVector3.getCPtr(points), points, numPoints, localScaling, computeAabb), true); } public btConvexPointCloudShape(btVector3 points, int numPoints, Vector3 localScaling) { this(CollisionJNI.new_btConvexPointCloudShape__SWIG_2(btVector3.getCPtr(points), points, numPoints, localScaling), true); } public void setPoints(btVector3 points, int numPoints, boolean computeAabb, Vector3 localScaling) { CollisionJNI.btConvexPointCloudShape_setPoints__SWIG_0(swigCPtr, this, btVector3.getCPtr(points), points, numPoints, computeAabb, localScaling); } public void setPoints(btVector3 points, int numPoints, boolean computeAabb) { CollisionJNI.btConvexPointCloudShape_setPoints__SWIG_1(swigCPtr, this, btVector3.getCPtr(points), points, numPoints, computeAabb); } public void setPoints(btVector3 points, int numPoints) { CollisionJNI.btConvexPointCloudShape_setPoints__SWIG_2(swigCPtr, this, btVector3.getCPtr(points), points, numPoints); } public btVector3 getUnscaledPoints() { long cPtr = CollisionJNI.btConvexPointCloudShape_getUnscaledPoints__SWIG_0(swigCPtr, this); return (cPtr == 0) ? null : new btVector3(cPtr, false); } public int getNumPoints() { return CollisionJNI.btConvexPointCloudShape_getNumPoints(swigCPtr, this); } public Vector3 getScaledPoint(int index) { return CollisionJNI.btConvexPointCloudShape_getScaledPoint(swigCPtr, this, index); } }
ryoenji/libgdx
extensions/gdx-bullet/jni/swig-src/collision/com/badlogic/gdx/physics/bullet/collision/btConvexPointCloudShape.java
Java
apache-2.0
3,604
/* * Copyright (c) 2009 - 2020 CaspersBox Web Services * * 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 com.cws.esolutions.security.config.xml; /* * Project: eSolutionsSecurity * Package: com.cws.esolutions.security.config.xml * File: RepositoryConfig.java * * History * * Author Date Comments * ---------------------------------------------------------------------------- * cws-khuntly 11/23/2008 22:39:20 Created. */ import org.slf4j.Logger; import java.io.Serializable; import java.lang.reflect.Field; import org.slf4j.LoggerFactory; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import com.cws.esolutions.security.SecurityServiceConstants; /** * @author cws-khuntly * @version 1.0 * @see java.io.Serializable */ @XmlType(name = "securityReturningAttributes") @XmlAccessorType(XmlAccessType.NONE) public final class SecurityReturningAttributes implements Serializable { private String secret = null; private String olrLocked = null; private String lastLogin = null; private String lockCount = null; private String expiryDate = null; private String olrSetupReq = null; private String isSuspended = null; private String secAnswerTwo = null; private String secAnswerOne = null; private String userPassword = null; private String secQuestionTwo = null; private String secQuestionOne = null; private static final long serialVersionUID = -6606124907043164731L; private static final String CNAME = SecurityReturningAttributes.class.getName(); private static final Logger DEBUGGER = LoggerFactory.getLogger(SecurityServiceConstants.DEBUGGER); private static final boolean DEBUG = DEBUGGER.isDebugEnabled(); private static final Logger ERROR_RECORDER = LoggerFactory.getLogger(SecurityServiceConstants.ERROR_LOGGER); public final void setUserPassword(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setUserPassword(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.userPassword = value; } public final void setSecret(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setSecret(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.secret = value; } public final void setSecQuestionOne(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setSecQuestionOne(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.secQuestionOne = value; } public final void setSecQuestionTwo(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setSecQuestionTwo(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.secQuestionTwo = value; } public final void setSecAnswerOne(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setSecAnswerOne(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.secAnswerOne = value; } public final void setSecAnswerTwo(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setSecAnswerTwo(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.secAnswerTwo = value; } public final void setLockCount(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setLockCount(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.lockCount = value; } public final void setLastLogin(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setLastLogin(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.lastLogin = value; } public final void setExpiryDate(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setExpiryDate(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.expiryDate = value; } public final void setIsSuspended(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setIsSuspended(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.isSuspended = value; } public final void setOlrSetupReq(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setOlrSetupReq(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.olrSetupReq = value; } public final void setOlrLocked(final String value) { final String methodName = SecurityReturningAttributes.CNAME + "#setOlrLocked(final String value)"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", value); } this.olrLocked = value; } @XmlElement(name = "userPassword") public final String getUserPassword() { final String methodName = SecurityReturningAttributes.CNAME + "#getUserPassword()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.userPassword); } return this.userPassword; } @XmlElement(name = "secret") public final String getSecret() { final String methodName = SecurityReturningAttributes.CNAME + "#getSecret()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.secret); } return this.secret; } @XmlElement(name = "secQuestionOne") public final String getSecQuestionOne() { final String methodName = SecurityReturningAttributes.CNAME + "#getSecQuestionOne()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.secQuestionOne); } return this.secQuestionOne; } @XmlElement(name = "secQuestionTwo") public final String getSecQuestionTwo() { final String methodName = SecurityReturningAttributes.CNAME + "#getSecQuestionTwo()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.secQuestionTwo); } return this.secQuestionTwo; } @XmlElement(name = "secAnswerOne") public final String getSecAnswerOne() { final String methodName = SecurityReturningAttributes.CNAME + "#getSecAnswerOne()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.secAnswerOne); } return this.secAnswerOne; } @XmlElement(name = "secAnswerTwo") public final String getSecAnswerTwo() { final String methodName = SecurityReturningAttributes.CNAME + "#getSecAnswerTwo()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.secAnswerTwo); } return this.secAnswerTwo; } @XmlElement(name = "lockCount") public final String getLockCount() { final String methodName = SecurityReturningAttributes.CNAME + "#getLockCount()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.lockCount); } return this.lockCount; } @XmlElement(name = "lastLogin") public final String getLastLogin() { final String methodName = SecurityReturningAttributes.CNAME + "#getLastLogin()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.lastLogin); } return this.lastLogin; } @XmlElement(name = "expiryDate") public final String getExpiryDate() { final String methodName = SecurityReturningAttributes.CNAME + "#getExpiryDate()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.expiryDate); } return this.expiryDate; } @XmlElement(name = "isSuspended") public final String getIsSuspended() { final String methodName = SecurityReturningAttributes.CNAME + "#getIsSuspended()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.isSuspended); } return this.isSuspended; } @XmlElement(name = "olrSetupReq") public final String getOlrSetupReq() { final String methodName = SecurityReturningAttributes.CNAME + "#getOlrSetupReq()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.olrSetupReq); } return this.olrSetupReq; } @XmlElement(name = "olrLocked") public final String getOlrLocked() { final String methodName = SecurityReturningAttributes.CNAME + "#getOlrLocked()"; if (DEBUG) { DEBUGGER.debug(methodName); DEBUGGER.debug("Value: {}", this.olrLocked); } return this.olrLocked; } @Override public final String toString() { final String methodName = SecurityReturningAttributes.CNAME + "#toString()"; if (DEBUG) { DEBUGGER.debug(methodName); } StringBuilder sBuilder = new StringBuilder() .append("[" + this.getClass().getName() + "]" + SecurityServiceConstants.LINE_BREAK + "{" + SecurityServiceConstants.LINE_BREAK); for (Field field : this.getClass().getDeclaredFields()) { if (DEBUG) { DEBUGGER.debug("field: {}", field); } if (!(field.getName().equals("methodName")) && (!(field.getName().equals("CNAME"))) && (!(field.getName().equals("DEBUGGER"))) && (!(field.getName().equals("DEBUG"))) && (!(field.getName().equals("ERROR_RECORDER"))) && (!(field.getName().equals("serialVersionUID")))) { try { if (field.get(this) != null) { sBuilder.append("\t" + field.getName() + " --> " + field.get(this) + SecurityServiceConstants.LINE_BREAK); } } catch (IllegalAccessException iax) { ERROR_RECORDER.error(iax.getMessage(), iax); } } } sBuilder.append('}'); if (DEBUG) { DEBUGGER.debug("sBuilder: {}", sBuilder); } return sBuilder.toString(); } }
cwsus/esolutions
eSolutionsSecurity/src/main/java/com/cws/esolutions/security/config/xml/SecurityReturningAttributes.java
Java
apache-2.0
12,684
/* * Copyright 2014-present Facebook, Inc. * * 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 com.facebook.buck.features.ocaml; import com.facebook.buck.core.sourcepath.resolver.SourcePathResolver; import com.facebook.buck.core.toolchain.tool.Tool; import com.facebook.buck.shell.ShellStep; import com.facebook.buck.step.ExecutionContext; import com.google.common.collect.ImmutableList; import java.nio.file.Path; /** A yacc step which processes .mly files and outputs .ml and mli files */ public class OcamlYaccStep extends ShellStep { private final SourcePathResolver resolver; public static class Args { public final Tool yaccCompiler; public final Path output; public final Path input; public Args(Tool yaccCompiler, Path output, Path input) { this.yaccCompiler = yaccCompiler; this.output = output; this.input = input; } } private final Args args; public OcamlYaccStep(Path workingDirectory, SourcePathResolver resolver, Args args) { super(workingDirectory); this.resolver = resolver; this.args = args; } @Override public String getShortName() { return "OCaml yacc"; } @Override protected ImmutableList<String> getShellCommandInternal(ExecutionContext context) { return ImmutableList.<String>builder() .addAll(args.yaccCompiler.getCommandPrefix(resolver)) .add("-b", OcamlUtil.stripExtension(args.output.toString())) .add(args.input.toString()) .build(); } }
shs96c/buck
src/com/facebook/buck/features/ocaml/OcamlYaccStep.java
Java
apache-2.0
2,008
# Status: ported, except for tests and --abbreviate-paths. # Base revision: 64070 # # Copyright 2001, 2002, 2003 Dave Abrahams # Copyright 2006 Rene Rivera # Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import re from b2.util.utility import * from b2.build import feature from b2.util import sequence, qualify_jam_action import b2.util.set from b2.manager import get_manager __re_two_ampersands = re.compile ('&&') __re_comma = re.compile (',') __re_split_condition = re.compile ('(.*):(<.*)') __re_split_conditional = re.compile (r'(.+):<(.+)') __re_colon = re.compile (':') __re_has_condition = re.compile (r':<') __re_separate_condition_and_property = re.compile (r'(.*):(<.*)') __not_applicable_feature='not-applicable-in-this-context' feature.feature(__not_applicable_feature, [], ['free']) class Property(object): __slots__ = ('_feature', '_value', '_condition') def __init__(self, f, value, condition = []): if type(f) == type(""): f = feature.get(f) # At present, single property has a single value. assert type(value) != type([]) assert(f.free() or value.find(':') == -1) self._feature = f self._value = value self._condition = condition def feature(self): return self._feature def value(self): return self._value def condition(self): return self._condition def to_raw(self): result = "<" + self._feature.name() + ">" + str(self._value) if self._condition: result = ",".join(str(p) for p in self._condition) + ':' + result return result def __str__(self): return self.to_raw() def __hash__(self): # FIXME: consider if this class should be value-is-identity one return hash((self._feature, self._value, tuple(self._condition))) def __cmp__(self, other): return cmp((self._feature, self._value, self._condition), (other._feature, other._value, other._condition)) def create_from_string(s, allow_condition=False,allow_missing_value=False): condition = [] import types if not isinstance(s, types.StringType): print type(s) if __re_has_condition.search(s): if not allow_condition: raise BaseException("Conditional property is not allowed in this context") m = __re_separate_condition_and_property.match(s) condition = m.group(1) s = m.group(2) # FIXME: break dependency cycle from b2.manager import get_manager feature_name = get_grist(s) if not feature_name: if feature.is_implicit_value(s): f = feature.implied_feature(s) value = s else: raise get_manager().errors()("Invalid property '%s' -- unknown feature" % s) else: if feature.valid(feature_name): f = feature.get(feature_name) value = get_value(s) else: # In case feature name is not known, it is wrong to do a hard error. # Feature sets change depending on the toolset. So e.g. # <toolset-X:version> is an unknown feature when using toolset Y. # # Ideally we would like to ignore this value, but most of # Boost.Build code expects that we return a valid Property. For this # reason we use a sentinel <not-applicable-in-this-context> feature. # # The underlying cause for this problem is that python port Property # is more strict than its Jam counterpart and must always reference # a valid feature. f = feature.get(__not_applicable_feature) value = s if not value and not allow_missing_value: get_manager().errors()("Invalid property '%s' -- no value specified" % s) if condition: condition = [create_from_string(x) for x in condition.split(',')] return Property(f, value, condition) def create_from_strings(string_list, allow_condition=False): return [create_from_string(s, allow_condition) for s in string_list] def reset (): """ Clear the module state. This is mainly for testing purposes. """ global __results # A cache of results from as_path __results = {} reset () def path_order (x, y): """ Helper for as_path, below. Orders properties with the implicit ones first, and within the two sections in alphabetical order of feature name. """ if x == y: return 0 xg = get_grist (x) yg = get_grist (y) if yg and not xg: return -1 elif xg and not yg: return 1 else: if not xg: x = feature.expand_subfeatures([x]) y = feature.expand_subfeatures([y]) if x < y: return -1 elif x > y: return 1 else: return 0 def identify(string): return string # Uses Property def refine (properties, requirements): """ Refines 'properties' by overriding any non-free properties for which a different value is specified in 'requirements'. Conditional requirements are just added without modification. Returns the resulting list of properties. """ # The result has no duplicates, so we store it in a set result = set() # Records all requirements. required = {} # All the elements of requirements should be present in the result # Record them so that we can handle 'properties'. for r in requirements: # Don't consider conditional requirements. if not r.condition(): required[r.feature()] = r for p in properties: # Skip conditional properties if p.condition(): result.add(p) # No processing for free properties elif p.feature().free(): result.add(p) else: if required.has_key(p.feature()): result.add(required[p.feature()]) else: result.add(p) return sequence.unique(list(result) + requirements) def translate_paths (properties, path): """ Interpret all path properties in 'properties' as relative to 'path' The property values are assumed to be in system-specific form, and will be translated into normalized form. """ result = [] for p in properties: if p.feature().path(): values = __re_two_ampersands.split(p.value()) new_value = "&&".join(os.path.join(path, v) for v in values) if new_value != p.value(): result.append(Property(p.feature(), new_value, p.condition())) else: result.append(p) else: result.append (p) return result def translate_indirect(properties, context_module): """Assumes that all feature values that start with '@' are names of rules, used in 'context-module'. Such rules can be either local to the module or global. Qualified local rules with the name of the module.""" result = [] for p in properties: if p.value()[0] == '@': q = qualify_jam_action(p.value()[1:], context_module) get_manager().engine().register_bjam_action(q) result.append(Property(p.feature(), '@' + q, p.condition())) else: result.append(p) return result def validate (properties): """ Exit with error if any of the properties is not valid. properties may be a single property or a sequence of properties. """ if isinstance (properties, str): __validate1 (properties) else: for p in properties: __validate1 (p) def expand_subfeatures_in_conditions (properties): result = [] for p in properties: if not p.condition(): result.append(p) else: expanded = [] for c in p.condition(): if c.feature().name().startswith("toolset") or c.feature().name() == "os": # It common that condition includes a toolset which # was never defined, or mentiones subfeatures which # were never defined. In that case, validation will # only produce an spirious error, so don't validate. expanded.extend(feature.expand_subfeatures ([c], True)) else: expanded.extend(feature.expand_subfeatures([c])) result.append(Property(p.feature(), p.value(), expanded)) return result # FIXME: this should go def split_conditional (property): """ If 'property' is conditional property, returns condition and the property, e.g <variant>debug,<toolset>gcc:<inlining>full will become <variant>debug,<toolset>gcc <inlining>full. Otherwise, returns empty string. """ m = __re_split_conditional.match (property) if m: return (m.group (1), '<' + m.group (2)) return None def select (features, properties): """ Selects properties which correspond to any of the given features. """ result = [] # add any missing angle brackets features = add_grist (features) return [p for p in properties if get_grist(p) in features] def validate_property_sets (sets): for s in sets: validate(s.all()) def evaluate_conditionals_in_context (properties, context): """ Removes all conditional properties which conditions are not met For those with met conditions, removes the condition. Properies in conditions are looked up in 'context' """ base = [] conditional = [] for p in properties: if p.condition(): conditional.append (p) else: base.append (p) result = base[:] for p in conditional: # Evaluate condition # FIXME: probably inefficient if all(x in context for x in p.condition()): result.append(Property(p.feature(), p.value())) return result def change (properties, feature, value = None): """ Returns a modified version of properties with all values of the given feature replaced by the given value. If 'value' is None the feature will be removed. """ result = [] feature = add_grist (feature) for p in properties: if get_grist (p) == feature: if value: result.append (replace_grist (value, feature)) else: result.append (p) return result ################################################################ # Private functions def __validate1 (property): """ Exit with error if property is not valid. """ msg = None if not property.feature().free(): feature.validate_value_string (property.feature(), property.value()) ################################################################### # Still to port. # Original lines are prefixed with "# " # # # import utility : ungrist ; # import sequence : unique ; # import errors : error ; # import feature ; # import regex ; # import sequence ; # import set ; # import path ; # import assert ; # # # rule validate-property-sets ( property-sets * ) # { # for local s in $(property-sets) # { # validate [ feature.split $(s) ] ; # } # } # def remove(attributes, properties): """Returns a property sets which include all the elements in 'properties' that do not have attributes listed in 'attributes'.""" result = [] for e in properties: attributes_new = feature.attributes(get_grist(e)) has_common_features = 0 for a in attributes_new: if a in attributes: has_common_features = 1 break if not has_common_features: result += e return result def take(attributes, properties): """Returns a property set which include all properties in 'properties' that have any of 'attributes'.""" result = [] for e in properties: if b2.util.set.intersection(attributes, feature.attributes(get_grist(e))): result.append(e) return result def translate_dependencies(properties, project_id, location): result = [] for p in properties: if not p.feature().dependency(): result.append(p) else: v = p.value() m = re.match("(.*)//(.*)", v) if m: rooted = m.group(1) if rooted[0] == '/': # Either project id or absolute Linux path, do nothing. pass else: rooted = os.path.join(os.getcwd(), location, rooted) result.append(Property(p.feature(), rooted + "//" + m.group(2), p.condition())) elif os.path.isabs(v): result.append(p) else: result.append(Property(p.feature(), project_id + "//" + v, p.condition())) return result class PropertyMap: """ Class which maintains a property set -> string mapping. """ def __init__ (self): self.__properties = [] self.__values = [] def insert (self, properties, value): """ Associate value with properties. """ self.__properties.append(properties) self.__values.append(value) def find (self, properties): """ Return the value associated with properties or any subset of it. If more than one subset has value assigned to it, return the value for the longest subset, if it's unique. """ return self.find_replace (properties) def find_replace(self, properties, value=None): matches = [] match_ranks = [] for i in range(0, len(self.__properties)): p = self.__properties[i] if b2.util.set.contains (p, properties): matches.append (i) match_ranks.append(len(p)) best = sequence.select_highest_ranked (matches, match_ranks) if not best: return None if len (best) > 1: raise NoBestMatchingAlternative () best = best [0] original = self.__values[best] if value: self.__values[best] = value return original # local rule __test__ ( ) # { # import errors : try catch ; # import feature ; # import feature : feature subfeature compose ; # # # local rules must be explicitly re-imported # import property : path-order ; # # feature.prepare-test property-test-temp ; # # feature toolset : gcc : implicit symmetric ; # subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4 # 3.0 3.0.1 3.0.2 : optional ; # feature define : : free ; # feature runtime-link : dynamic static : symmetric link-incompatible ; # feature optimization : on off ; # feature variant : debug release : implicit composite symmetric ; # feature rtti : on off : link-incompatible ; # # compose <variant>debug : <define>_DEBUG <optimization>off ; # compose <variant>release : <define>NDEBUG <optimization>on ; # # import assert ; # import "class" : new ; # # validate <toolset>gcc <toolset>gcc-3.0.1 : $(test-space) ; # # assert.result <toolset>gcc <rtti>off <define>FOO # : refine <toolset>gcc <rtti>off # : <define>FOO # : $(test-space) # ; # # assert.result <toolset>gcc <optimization>on # : refine <toolset>gcc <optimization>off # : <optimization>on # : $(test-space) # ; # # assert.result <toolset>gcc <rtti>off # : refine <toolset>gcc : <rtti>off : $(test-space) # ; # # assert.result <toolset>gcc <rtti>off <rtti>off:<define>FOO # : refine <toolset>gcc : <rtti>off <rtti>off:<define>FOO # : $(test-space) # ; # # assert.result <toolset>gcc:<define>foo <toolset>gcc:<define>bar # : refine <toolset>gcc:<define>foo : <toolset>gcc:<define>bar # : $(test-space) # ; # # assert.result <define>MY_RELEASE # : evaluate-conditionals-in-context # <variant>release,<rtti>off:<define>MY_RELEASE # : <toolset>gcc <variant>release <rtti>off # # ; # # try ; # validate <feature>value : $(test-space) ; # catch "Invalid property '<feature>value': unknown feature 'feature'." ; # # try ; # validate <rtti>default : $(test-space) ; # catch \"default\" is not a known value of feature <rtti> ; # # validate <define>WHATEVER : $(test-space) ; # # try ; # validate <rtti> : $(test-space) ; # catch "Invalid property '<rtti>': No value specified for feature 'rtti'." ; # # try ; # validate value : $(test-space) ; # catch "value" is not a value of an implicit feature ; # # # assert.result <rtti>on # : remove free implicit : <toolset>gcc <define>foo <rtti>on : $(test-space) ; # # assert.result <include>a # : select include : <include>a <toolset>gcc ; # # assert.result <include>a # : select include bar : <include>a <toolset>gcc ; # # assert.result <include>a <toolset>gcc # : select include <bar> <toolset> : <include>a <toolset>gcc ; # # assert.result <toolset>kylix <include>a # : change <toolset>gcc <include>a : <toolset> kylix ; # # # Test ordinary properties # assert.result # : split-conditional <toolset>gcc # ; # # # Test properties with ":" # assert.result # : split-conditional <define>FOO=A::B # ; # # # Test conditional feature # assert.result <toolset>gcc,<toolset-gcc:version>3.0 <define>FOO # : split-conditional <toolset>gcc,<toolset-gcc:version>3.0:<define>FOO # ; # # feature.finish-test property-test-temp ; # } #
flingone/frameworks_base_cmds_remoted
libs/boost/tools/build/src/build/property.py
Python
apache-2.0
19,263
Sample SAI Pipeline (v0.1) ========================== This target implements a logical pipeline which can be used to generate v0.9.1 of SAI API. Details ======= 1. Basic SAI header file autogeneration from the sai_p4.p4 2. Makefile to a. Build the SAI wrappers b. Auto-generate the handlers to run the softswitch with SAI interfaces 3. Sample test functions (in C, in process callable) and using of-test framework 4. Sample L2 and L3 tests Run === 1. Build behavioral-model In targets/sai_p4, type make (or make bm). This should result in behavioral-model executable. 2. Run behavioral-model In tragets/sai_p4, type sudo ./behavioral-model 3. Run tests In another shell run the tests using SAI thrift IPC to test sudo ./run_tests.py --test-dir of-tests/tests/sai_thrift sai.L3Test or sudo ./run_tests.py --test-dir of-tests/tests/sai_thrift sai.L2Test 4. To terminate behavioral-model Type Control+'C' in the shell running the behavioral-model Notes ===== Currently the pipeline is defined WITHOUT VLAN and ECMP groups. Create and Remove SAI functions are auto-generated from P4 program Coming soon =========== 1. Set and Get attributes 2. VLAN and ECMP group functions (function prototypes are in sai_templ.h.txt) 3. ACL and QoS table implementations
Peilong/p4factory
targets/sai_p4/README.md
Markdown
apache-2.0
1,295
/* * Copyright 2012 Open Source Robotics Foundation * * 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. * */ /* * Desc: a test for getting force and torques at joints * Author: John Hsu */ #ifndef GAZEBO_JOINT_TRAJECTORY_PLUGIN_HH #define GAZEBO_JOINT_TRAJECTORY_PLUGIN_HH #include <boost/thread.hpp> #include <boost/thread/mutex.hpp> #include "gazebo/physics/physics.hh" #include "gazebo/transport/TransportTypes.hh" #include "gazebo/common/Time.hh" #include "gazebo/common/Plugin.hh" #include "gazebo/common/Events.hh" namespace gazebo { class ForceTorquePlugin : public ModelPlugin { /// \brief Constructor public: ForceTorquePlugin(); /// \brief Destructor public: virtual ~ForceTorquePlugin(); /// \brief Load the controller public: void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf); /// \brief Update the controller /// \param[in] _info Update information provided by the server. private: void UpdateStates(const common::UpdateInfo &_info); private: physics::WorldPtr world; private: physics::ModelPtr model; private: physics::Joint_V joints; private: boost::mutex update_mutex; // Pointer to the update event connection private: event::ConnectionPtr updateConnection; }; } #endif
spyhak/mac_gazebo
plugins/ForceTorquePlugin.hh
C++
apache-2.0
1,782
package nkp.pspValidator.shared.engine.evaluationFunctions; import nkp.pspValidator.shared.engine.Engine; import nkp.pspValidator.shared.engine.ValueEvaluation; import nkp.pspValidator.shared.engine.ValueType; import org.junit.BeforeClass; import org.junit.Test; import java.io.File; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.*; /** * Created by Martin Řehánek on 21.10.16. */ public class EfGetFirstFileFromFileListTest { private static final String FUNCTION_NAME = "getFirstFileFromFileList"; private static final String PARAM_FILE_LIST = "files"; private static final File DIR = new File("src/test/resources/monograph_1.2/b50eb6b0-f0a4-11e3-b72e-005056827e52"); private static List<File> LIST = new ArrayList<File>() { { add(new File("/first")); add(new File("/second")); add(new File("/third")); } }; private static String LIST_VAR = "LIST"; private static Engine engine; @BeforeClass public static void setup() { engine = new Engine(null); defineListVar(); } private static void defineListVar() { engine.registerValueDefinition(LIST_VAR, engine.buildValueDefinition(ValueType.FILE_LIST, engine.buildEvaluationFunction("findFilesInDirByPattern") .withValueParam("dir", ValueType.FILE, new ValueEvaluation(DIR)) .withPatternParam("pattern", engine.buildPatternDefinition(engine.buildRawPatternExpression(false, ".+")).evaluate()) )); } @Test public void listFromConstantOk() { EvaluationFunction evFunction = engine.buildEvaluationFunction(FUNCTION_NAME) .withValueParam(PARAM_FILE_LIST, ValueType.FILE_LIST, new ValueEvaluation(LIST)); ValueEvaluation evaluation = evFunction.evaluate(); assertEquals(LIST.get(0), evaluation.getData()); } @Test public void listFromReferenceOk() { EvaluationFunction evFunction = engine.buildEvaluationFunction(FUNCTION_NAME) .withValueParamByReference(PARAM_FILE_LIST, ValueType.FILE_LIST, LIST_VAR); ValueEvaluation result = evFunction.evaluate(); assertEquals(DIR.listFiles()[0].getName(), ((File) result.getData()).getName()); } @Test public void paramDirMissing() { EvaluationFunction evFunction = engine.buildEvaluationFunction(FUNCTION_NAME); ValueEvaluation evaluation = evFunction.evaluate(); assertNull(evaluation.getData()); assertNotNull(evaluation.getErrorMessage()); } @Test public void paramDirDuplicate() { EvaluationFunction evFunction = engine.buildEvaluationFunction(FUNCTION_NAME) .withValueParam(PARAM_FILE_LIST, ValueType.FILE_LIST, new ValueEvaluation(LIST)) .withValueParamByReference(PARAM_FILE_LIST, ValueType.FILE_LIST, LIST_VAR); //TODO: to by melo byt v ramci kontroly kotraktu, tj. zadna vyjimka try { evFunction.evaluate(); //fail(); } catch (RuntimeException e) { //parametr ... musí být jen jeden } } @Test public void paramListFromConstantInvalidParamType() { EvaluationFunction evFunction = engine.buildEvaluationFunction(FUNCTION_NAME) .withValueParam(PARAM_FILE_LIST, ValueType.FILE, new ValueEvaluation(LIST)); ValueEvaluation evaluation = evFunction.evaluate(); assertNull(evaluation.getData()); assertNotNull(evaluation.getErrorMessage()); } @Test public void paramListFromReferenceInvalidParamType() { EvaluationFunction evFunction = engine.buildEvaluationFunction(FUNCTION_NAME) .withValueParamByReference(PARAM_FILE_LIST, ValueType.FILE, LIST_VAR); ValueEvaluation evaluation = evFunction.evaluate(); assertNull(evaluation.getData()); assertNotNull(evaluation.getErrorMessage()); } }
NLCR/komplexni-validator
sharedModule/src/test/java/nkp/pspValidator/shared/engine/evaluationFunctions/EfGetFirstFileFromFileListTest.java
Java
apache-2.0
4,066
package org.radargun.service; import java.util.Collections; import java.util.List; import org.infinispan.query.dsl.FilterConditionContext; import org.infinispan.query.dsl.FilterConditionEndContext; import org.infinispan.query.dsl.QueryFactory; import org.radargun.traits.Query; import org.radargun.traits.Queryable; /** * Provides implementation of querying suited to Infinispan DSL Queries * * @author Radim Vansa &lt;rvansa@redhat.com&gt; */ public abstract class AbstractInfinispanQueryable implements Queryable { protected static class QueryBuilderImpl implements Query.Builder { protected final QueryFactory factory; protected final org.infinispan.query.dsl.QueryBuilder builder; protected FilterConditionContext context; public QueryBuilderImpl(QueryFactory factory, Class<?> clazz) { this.factory = factory; this.builder = factory.from(clazz); } protected QueryBuilderImpl(QueryFactory factory) { this.factory = factory; this.builder = null; } protected FilterConditionEndContext getEndContext(Query.SelectExpression selectExpression) { FilterConditionEndContext endContext; if (context != null) { endContext = context.and().having(selectExpression.attribute); } else if (builder != null) { endContext = builder.having(selectExpression.attribute); } else { endContext = factory.having(selectExpression.attribute); } return endContext; } @Override public Query.Builder subquery() { return new QueryBuilderImpl(factory); } @Override public Query.Builder eq(Query.SelectExpression selectExpression, Object value) { context = getEndContext(selectExpression).eq(value); return this; } @Override public Query.Builder lt(Query.SelectExpression selectExpression, Object value) { context = getEndContext(selectExpression).lt(value); return this; } @Override public Query.Builder le(Query.SelectExpression selectExpression, Object value) { context = getEndContext(selectExpression).lte(value); return this; } @Override public Query.Builder gt(Query.SelectExpression selectExpression, Object value) { context = getEndContext(selectExpression).gt(value); return this; } @Override public Query.Builder ge(Query.SelectExpression selectExpression, Object value) { context = getEndContext(selectExpression).gte(value); return this; } @Override public Query.Builder between(Query.SelectExpression selectExpression, Object lowerBound, boolean lowerInclusive, Object upperBound, boolean upperInclusive) { context = getEndContext(selectExpression).between(lowerBound, upperBound).includeLower(lowerInclusive).includeUpper(upperInclusive); return this; } @Override public Query.Builder isNull(Query.SelectExpression selectExpression) { context = getEndContext(selectExpression).isNull(); return this; } @Override public Query.Builder like(Query.SelectExpression selectExpression, String pattern) { context = getEndContext(selectExpression).like(pattern); return this; } @Override public Query.Builder contains(Query.SelectExpression selectExpression, Object value) { context = getEndContext(selectExpression).contains(value); return this; } @Override public Query.Builder not(Query.Builder subquery) { FilterConditionContext subqueryContext = ((QueryBuilderImpl) subquery).context; if (subqueryContext == null) { return this; } if (context != null) { context = context.and().not(subqueryContext); } else if (builder != null) { context = builder.not(subqueryContext); } else { context = factory.not(subqueryContext); } return this; } @Override public Query.Builder any(Query.Builder... subqueries) { if (subqueries.length == 0) { return this; } FilterConditionContext innerContext = null; for (Query.Builder subquery : subqueries) { if (innerContext == null) { innerContext = ((QueryBuilderImpl) subquery).context; } else { innerContext = innerContext.or(((QueryBuilderImpl) subquery).context); } } if (context != null) { context = context.and(innerContext); } else if (builder != null) { context = builder.not().not(innerContext); } else { context = factory.not().not(innerContext); } return this; } @Override public Query.Builder orderBy(Query.SelectExpression selectExpression) { if (builder == null) throw new IllegalArgumentException("You have to call orderBy() on root query builder!"); if (selectExpression.function != Query.AggregationFunction.NONE) throw new IllegalArgumentException("This version of infinispan doesn't support aggregations!"); builder.orderBy(selectExpression.attribute, selectExpression.asc ? org.infinispan.query.dsl.SortOrder.ASC : org.infinispan.query.dsl.SortOrder.DESC); return this; } @Override public Query.Builder projection(Query.SelectExpression... selectExpressions) { if (builder == null) throw new IllegalArgumentException("You have to call projection() on root query builder!"); String[] stringAttributes = new String[selectExpressions.length]; for (int i = 0; i < selectExpressions.length; i++) { if (selectExpressions[i].function != Query.AggregationFunction.NONE) { throw new IllegalArgumentException("This version of infinispan doesn't support aggregations!"); } stringAttributes[i] = selectExpressions[i].attribute; } builder.setProjection(stringAttributes); return this; } @Override public Query.Builder groupBy(String... attributes) { throw new RuntimeException("Grouping is not implemented in this version of infinispan."); } @Override public Query.Builder offset(long offset) { if (builder == null) throw new IllegalArgumentException("You have to call offset() on root query builder!"); builder.startOffset(offset); return this; } @Override public Query.Builder limit(long limit) { if (builder == null) throw new IllegalArgumentException("You have to call limit() on root query builder!"); builder.maxResults(limit > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) limit); return this; } @Override public Query build() { if (builder == null) throw new IllegalArgumentException("You have to call build() on root query builder!"); return new QueryImpl(builder.build()); } } protected static class QueryImpl implements Query { private final org.infinispan.query.dsl.Query query; public QueryImpl(org.infinispan.query.dsl.Query query) { this.query = query; } public org.infinispan.query.dsl.Query getDelegatingQuery() { return query; } @Override public Result execute(Context resource) { return new QueryResultImpl(query.list()); } } protected static class QueryResultImpl implements Query.Result { private final List<Object> list; public QueryResultImpl(List<Object> list) { this.list = list; } @Override public int size() { return list.size(); } @Override public List values() { return Collections.unmodifiableList(list); } } }
rmacor/radargun
plugins/infinispan60/src/main/java/org/radargun/service/AbstractInfinispanQueryable.java
Java
apache-2.0
8,017
/** * Copyright (C) 2010-2012 LShift Ltd. * * 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 net.lshift.diffa.kernel.config import net.lshift.diffa.schema.servicelimits._ import net.lshift.diffa.schema.jooq.{DatabaseFacade => JooqDatabaseFacade} import net.lshift.diffa.schema.tables.PairLimits.PAIR_LIMITS import net.lshift.diffa.schema.tables.SpaceLimits.SPACE_LIMITS import net.lshift.diffa.schema.tables.SystemLimits.SYSTEM_LIMITS import net.lshift.diffa.schema.tables.LimitDefinitions.LIMIT_DEFINITIONS import org.jooq.impl.{TableImpl, Factory} import org.jooq.{Condition, TableField} import scala.collection.JavaConversions._ import net.lshift.diffa.schema.tables.records.{SpaceLimitsRecord, SystemLimitsRecord} import java.lang.{Long => LONG} class JooqServiceLimitsStore(jooq:JooqDatabaseFacade) extends ServiceLimitsStore { private def validate(limitValue: Int) { if (limitValue < 0 && limitValue != Unlimited.hardLimit) throw new Exception("Invalid limit value") } def defineLimit(limit: ServiceLimit) = jooq.execute(t => { t.insertInto(LIMIT_DEFINITIONS). set(LIMIT_DEFINITIONS.NAME, limit.key). set(LIMIT_DEFINITIONS.DESCRIPTION, limit.description). onDuplicateKeyUpdate(). set(LIMIT_DEFINITIONS.DESCRIPTION, limit.description). execute() }) def deleteDomainLimits(space:Long) = jooq.execute(t => { deletePairLimitsByDomainInternal(t, space) t.delete(SPACE_LIMITS). where(SPACE_LIMITS.SPACE.equal(space)). execute() }) def deletePairLimitsByDomain(space:Long) = { jooq.execute(deletePairLimitsByDomainInternal(_, space)) } def setSystemHardLimit(limit: ServiceLimit, limitValue: Int) = jooq.execute(t => { validate(limitValue) setSystemLimit(t, limit, limitValue, SYSTEM_LIMITS.HARD_LIMIT) cascadeToSpaceLimits(t, limit, limitValue, SPACE_LIMITS.HARD_LIMIT) }) def setDomainHardLimit(space:Long, limit: ServiceLimit, limitValue: Int) = { jooq.execute(t => { validate(limitValue) setDomainLimit(t, space, limit, limitValue, SPACE_LIMITS.HARD_LIMIT) }) } def setSystemDefaultLimit(limit: ServiceLimit, limitValue: Int) = jooq.execute(t => { setSystemLimit(t, limit, limitValue, SYSTEM_LIMITS.DEFAULT_LIMIT) }) def setDomainDefaultLimit(space:Long, limit: ServiceLimit, limitValue: Int) = { jooq.execute(t => { setDomainLimit(t, space, limit, limitValue, SPACE_LIMITS.DEFAULT_LIMIT) }) } def setPairLimit(space:Long, pairKey: String, limit: ServiceLimit, limitValue: Int) = { jooq.execute(setPairLimit(_, space, pairKey, limit, limitValue)) } def getSystemHardLimitForName(limit: ServiceLimit) = getLimit(SYSTEM_LIMITS.HARD_LIMIT, SYSTEM_LIMITS, SYSTEM_LIMITS.NAME.equal(limit.key)) def getSystemDefaultLimitForName(limit: ServiceLimit) = getLimit(SYSTEM_LIMITS.DEFAULT_LIMIT, SYSTEM_LIMITS, SYSTEM_LIMITS.NAME.equal(limit.key)) def getDomainHardLimitForDomainAndName(space:Long, limit: ServiceLimit) = { getLimit(SPACE_LIMITS.HARD_LIMIT, SPACE_LIMITS, SPACE_LIMITS.NAME.equal(limit.key), SPACE_LIMITS.SPACE.equal(space)) } def getDomainDefaultLimitForDomainAndName(space:Long, limit: ServiceLimit) = { getLimit(SPACE_LIMITS.DEFAULT_LIMIT, SPACE_LIMITS, SPACE_LIMITS.NAME.equal(limit.key), SPACE_LIMITS.SPACE.equal(space)) } def getPairLimitForPairAndName(space:Long, pairKey: String, limit: ServiceLimit) = { getLimit(PAIR_LIMITS.LIMIT_VALUE, PAIR_LIMITS, PAIR_LIMITS.NAME.equal(limit.key), PAIR_LIMITS.SPACE.equal(space), PAIR_LIMITS.PAIR.equal(pairKey)) } private def getLimit(limitValue:TableField[_,_], table:TableImpl[_], predicate:Condition*) : Option[Int] = jooq.execute(t => { val record = t.select(limitValue).from(table).where(predicate).fetchOne() if (record != null) { Some(record.getValueAsInteger(limitValue)) } else { None } }) private def setPairLimit(t: Factory, space: Long, pairKey: String, limit: ServiceLimit, limitValue: Int) = { t.insertInto(PAIR_LIMITS). set(PAIR_LIMITS.NAME, limit.key). set(PAIR_LIMITS.LIMIT_VALUE, int2Integer(limitValue)). set(PAIR_LIMITS.SPACE, space:LONG). set(PAIR_LIMITS.PAIR, pairKey). onDuplicateKeyUpdate(). set(PAIR_LIMITS.LIMIT_VALUE, int2Integer(limitValue)). execute() } /** * If there isn't a row for the the particular limit, then irrespective of whether setting the hard or default limit, * set both columns to the same value. If the row already exists, then just update the requested column (i.e. either * the hard or the default limit). After having performed the UPSERT, make sure that the default limit is never greater * than the hard limit. */ private def setSystemLimit(t:Factory, limit: ServiceLimit, limitValue: java.lang.Integer, fieldToLimit:TableField[SystemLimitsRecord,java.lang.Integer]) = { t.insertInto(SYSTEM_LIMITS). set(SYSTEM_LIMITS.NAME, limit.key). set(SYSTEM_LIMITS.HARD_LIMIT, limitValue). set(SYSTEM_LIMITS.DEFAULT_LIMIT, limitValue). onDuplicateKeyUpdate(). set(fieldToLimit, limitValue). execute() verifySystemDefaultLimit(t) } private def setDomainLimit(t:Factory, space:Long, limit: ServiceLimit, limitValue: java.lang.Integer, fieldToLimit:TableField[SpaceLimitsRecord,java.lang.Integer]) = { t.insertInto(SPACE_LIMITS). set(SPACE_LIMITS.SPACE, space:LONG). set(SPACE_LIMITS.NAME, limit.key). set(SPACE_LIMITS.HARD_LIMIT, limitValue). set(SPACE_LIMITS.DEFAULT_LIMIT, limitValue). onDuplicateKeyUpdate(). set(fieldToLimit, limitValue). execute() verifyDomainDefaultLimit(t) cascadeToPairLimits(t, space, limit, limitValue) } /** * This will only get called within the scope of setting a system hard limit, so be careful when trying to make it more optimal :-) */ private def cascadeToSpaceLimits(t:Factory, limit: ServiceLimit, limitValue: java.lang.Integer, fieldToLimit:TableField[SpaceLimitsRecord,java.lang.Integer]) = { t.update(SPACE_LIMITS). set(fieldToLimit, limitValue). where(SPACE_LIMITS.NAME.equal(limit.key)). and(SPACE_LIMITS.HARD_LIMIT.greaterThan(limitValue)). execute() verifyDomainDefaultLimit(t) verifyPairLimit(t, limit, limitValue) } private def cascadeToPairLimits(t:Factory, space:Long, limit: ServiceLimit, limitValue: java.lang.Integer) = { t.update(PAIR_LIMITS). set(PAIR_LIMITS.LIMIT_VALUE, limitValue). where(PAIR_LIMITS.NAME.equal(limit.key)). and(PAIR_LIMITS.SPACE.equal(space)). and(PAIR_LIMITS.LIMIT_VALUE.greaterThan(limitValue)). execute() } private def verifySystemDefaultLimit(t:Factory) = { t.update(SYSTEM_LIMITS). set(SYSTEM_LIMITS.DEFAULT_LIMIT, SYSTEM_LIMITS.HARD_LIMIT). where(SYSTEM_LIMITS.DEFAULT_LIMIT.greaterThan(SYSTEM_LIMITS.HARD_LIMIT)). execute() } private def verifyDomainDefaultLimit(t:Factory) = { t.update(SPACE_LIMITS). set(SPACE_LIMITS.DEFAULT_LIMIT, SPACE_LIMITS.HARD_LIMIT). where(SPACE_LIMITS.DEFAULT_LIMIT.greaterThan(SPACE_LIMITS.HARD_LIMIT)). execute() } private def verifyPairLimit(t:Factory, limit: ServiceLimit, limitValue: java.lang.Integer) = { t.update(PAIR_LIMITS). set(PAIR_LIMITS.LIMIT_VALUE, limitValue). where(PAIR_LIMITS.LIMIT_VALUE.greaterThan(limitValue)). and(PAIR_LIMITS.NAME.equal(limit.key)). execute() } private def deletePairLimitsByDomainInternal(t:Factory, space: Long) = { t.delete(PAIR_LIMITS). where(PAIR_LIMITS.SPACE.equal(space)). execute() } }
0x6e6562/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/config/JooqServiceLimitsStore.scala
Scala
apache-2.0
8,247
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- Copyright 2004 The Apache Software Foundation 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. --> <html> <head> <title>Tapestry: Web Application Framework</title> </head> <body> <p>A set of classes that assist with dynamically generating JDBC SQL queries. Importantly, they help hide the difference between a {@link java.sql.Statement} and {@link java.sql.PreparedStatement} ... in fact, using a {@link org.apache.tapestry.contrib.jdbc.StatementAssembly} you don't know in advance which you'll get, which is very handy when generating truly dynamic SQL. @author Howard Lewis Ship <a href="mailto:hlship@apache.org">hlship@apache.org</a> </body> </html>
apache/tapestry4
contrib/src/java/org/apache/tapestry/contrib/jdbc/package.html
HTML
apache-2.0
1,240