text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.rti.dds.camel</groupId>
    <artifactId>examples-ice-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>mdpnp :: ice</name>
    <description>Ice example for the Camel RTI Component</description>

    <modules>
        <module>ice-type</module>
        <module>ice-routing</module>
    </modules>

</project>


text:
<?xml version="1.0" encoding="utf-8"?>
<!--

-->

<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:interpolator="@anim/decelerate_interpolator">
    <scale android:fromXScale="2.0" android:toXScale="1.0"
           android:fromYScale="2.0" android:toYScale="1.0"
           android:pivotX="50%" android:pivotY="50%"
           android:duration="@android:integer/config_shortAnimTime" />
    <translate android:fromYDelta="100%" android:toYDelta="0"
            android:duration="@android:integer/config_shortAnimTime"/>
</set>

redpajama_set_name: RedPajamaGithub


text:
package com.adobe.epubcheck.ocf;

import java.io.InputStream;

public interface EncryptionFilter {

	public boolean canDecrypt();

	public InputStream decrypt(InputStream in);
}


text:
require('dotenv-safe').config();

const merge = require('webpack-merge');

const baseConfig = require('./webpack/webpack.config.base');
const developmentConfig = require('./webpack/webpack.config.development');
const productionConfig = require('./webpack/webpack.config.production');

const isProduction = process.env.NODE_ENV === 'production';
const config = merge(baseConfig, isProduction ? productionConfig : developmentConfig);
module.exports = config;


text:
package org.jruby.ext.jmx.agent;

public class JavaHome {
    public static void main(String[] args) {
        System.out.println(System.getProperty("java.home"));
    }
}


text:
require_relative "./extend/formula_cop"

module RuboCop
  module Cop
    module FormulaAudit
      # This cop checks for correct order of components in a Formula
      #
      # - component_precedence_list has component hierarchy in a nested list
      #   where each sub array contains components' details which are at same precedence level
      class ComponentsOrder < FormulaCop
        def audit_formula(_node, _class_node, _parent_class_node, body_node)
          component_precedence_list = [
            [{ name: :include,  type: :method_call }],
            [{ name: :desc,     type: :method_call }],
            [{ name: :homepage, type: :method_call }],
            [{ name: :url,      type: :method_call }],
            [{ name: :mirror,   type: :method_call }],
            [{ name: :version,  type: :method_call }],
            [{ name: :sha256,   type: :method_call }],
            [{ name: :revision, type: :method_call }],
            [{ name: :version_scheme, type: :method_call }],
            [{ name: :head,     type: :method_call }],
            [{ name: :stable,   type: :block_call }],
            [{ name: :bottle,   type: :block_call }],
            [{ name: :devel,    type: :block_call }],
            [{ name: :head,     type: :block_call }],
            [{ name: :bottle,   type: :method_call }],
            [{ name: :keg_only, type: :method_call }],
            [{ name: :option,   type: :method_call }],
            [{ name: :depends_on, type: :method_call }],
            [{ name: :conflicts_with, type: :method_call }],
            [{ name: :go_resource, type: :block_call }, { name: :resource, type: :block_call }],
            [{ name: :install, type: :method_definition }],
            [{ name: :post_install, type: :method_definition }],
            [{ name: :caveats, type: :method_definition }],
            [{ name: :plist_options, type: :method_call }, { name: :plist, type: :method_definition }],
            [{ name: :test, type: :block_call }],
          ]

          @present_components = component_precedence_list.map do |components|
            relevant_components = []
            components.each do |component|
              case component[:type]
              when :method_call
                relevant_components += find_method_calls_by_name(body_node, component[:name]).to_a
              when :block_call
                relevant_components += find_blocks(body_node, component[:name]).to_a
              when :method_definition
                relevant_components << find_method_def(body_node, component[:name])
              end
            end
            relevant_components.delete_if(&:nil?)
          end

          # Check if each present_components is above rest of the present_components
          @present_components.take(@present_components.size - 1).each_with_index do |preceding_component, p_idx|
            next if preceding_component.empty?
            @present_components.drop(p_idx + 1).each do |succeeding_component|
              next if succeeding_component.empty?
              @offensive_nodes = check_precedence(preceding_component, succeeding_component)
              component_problem @offensive_nodes[0], @offensive_nodes[1] if @offensive_nodes
            end
          end
        end

        # `aspell`: options and resources should be grouped by language
        WHITELIST = %w[
          aspell
        ].freeze

        # Method to format message for reporting component precedence violations
        def component_problem(c1, c2)
          return if WHITELIST.include?(@formula_name)
          problem "`#{format_component(c1)}` (line #{line_number(c1)}) should be put before `#{format_component(c2)}` (line #{line_number(c2)})"
        end

        # autocorrect method gets called just after component_problem method call
        def autocorrect(_node)
          succeeding_node = @offensive_nodes[0]
          preceding_node = @offensive_nodes[1]
          lambda do |corrector|
            reorder_components(corrector, succeeding_node, preceding_node)
          end
        end

        # Reorder two nodes in the source, using the corrector instance in autocorrect method
        # Components of same type are grouped together when rewriting the source
        # Linebreaks are introduced if components are of two different methods/blocks/multilines
        def reorder_components(corrector, node1, node2)
          # order_idx : node1's index in component_precedence_list
          # curr_p_idx: node1's index in preceding_comp_arr
          # preceding_comp_arr: array containing components of same type
          order_idx, curr_p_idx, preceding_comp_arr = get_state(node1)

          # curr_p_idx.positive? means node1 needs to be grouped with its own kind
          if curr_p_idx.positive?
            node2 = preceding_comp_arr[curr_p_idx - 1]
            indentation = " " * (start_column(node2) - line_start_column(node2))
            line_breaks = node2.multiline? ? "\n\n" : "\n"
            corrector.insert_after(node2.source_range, line_breaks + indentation + node1.source)
          else
            indentation = " " * (start_column(node2) - line_start_column(node2))
            # No line breaks upto version_scheme, order_idx == 8
            line_breaks = (order_idx > 8) ? "\n\n" : "\n"
            corrector.insert_before(node2.source_range, node1.source + line_breaks + indentation)
          end
          corrector.remove(range_with_surrounding_space(range: node1.source_range, side: :left))
        end

        # Returns precedence index and component's index to properly reorder and group during autocorrect
        def get_state(node1)
          @present_components.each_with_index do |comp, idx|
            return [idx, comp.index(node1), comp] if comp.member?(node1)
          end
        end
      end
    end
  end
end


text:
/**
 * @file
 * Styling for contextual module icons.
 */

/**
 * Toolbar tab icon.
 */
.toolbar-bar .toolbar-icon-edit:before {
  background-image: url("../../../misc/icons/bebebe/pencil.svg");
}
.no-svg .toolbar-bar .toolbar-icon-edit:before {
  background-image: url("../../../misc/icons/bebebe/pencil.png");
}
.toolbar-bar .toolbar-icon-edit:active:before,
.toolbar-bar .toolbar-icon-edit.active:before {
  background-image: url("../../../misc/icons/ffffff/pencil.svg");
}
.no-svg .toolbar-bar .toolbar-icon-edit:active:before,
.no-svg .toolbar-bar .toolbar-icon-edit.active:before {
  background-image: url("../../../misc/icons/ffffff/pencil.png");
}

/**
 * Contextual trigger.
 */
.contextual .trigger {
  background-image: url("../../../misc/icons/787878/pencil.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  /* Override the .focusable height: auto */
  height: 28px !important;
  /* Override the .focusable height: auto */
  width: 28px !important;
  text-indent: -9999px;

}
.no-svg .contextual .trigger {
  background-image: url("../../../misc/icons/787878/pencil.png");
}


text:
<?php
namespace Testo\Examples;

class Hello
{
    public function world()
    {
        echo 'hello world!';
    }
}


text:
// Originally from UpdatedComponentTests/StandardTesting/REST/Rest_Get_RequestTypes_Parameters_ListOfStrings_1BlankEntry.xls;
package com.betfair.cougar.tests.updatedcomponenttests.standardtesting.rest;

import com.betfair.testing.utils.cougar.CougarBaseline2_8TestingInvoker;
import com.betfair.testing.utils.cougar.enums.CougarMessageContentTypeEnum;

import org.testng.annotations.Test;

/**
 * Ensure that when the 4 supported Rest XML/JSON Gets are performed, Cougar can handle an empty List of Strings being passed in the Header and Query parameters
 */
public class RestGetRequestTypesParametersListOfStrings1BlankEntryTest {

    @Test
    public void doTest() {
        String expectedXmlResponse = "<StringListOperationResponse><NonMandatoryParamsOperationResponseObject><headerParameter/><queryParameter/></NonMandatoryParamsOperationResponseObject></StringListOperationResponse>";
        String expectedJsonResponse = "{queryParameter:\"\",headerParameter:\"\"}";
        CougarBaseline2_8TestingInvoker.create()
                .setOperation("stringListOperation")
                .addHeaderParam("HeaderParam","")
                .addQueryParam("queryParam","")
                .setExpectedResponse(CougarMessageContentTypeEnum.XML, expectedXmlResponse)
                .setExpectedResponse(CougarMessageContentTypeEnum.JSON, expectedJsonResponse)
                .setExpectedHttpResponse(200, "OK")
                .makeMatrixRescriptCalls(CougarMessageContentTypeEnum.JSON, CougarMessageContentTypeEnum.XML)
                .verify();

    }

}


text:
class WXDLLEXPORT wxButton;

// ---------------------------------------------------------------------------
// constants
// ---------------------------------------------------------------------------

#if WXWIN_COMPATIBILITY_2_4
// they're unused by wxWidgets...
enum
{
    wxKEY_SHIFT = 1,
    wxKEY_CTRL  = 2
};
#endif

// ---------------------------------------------------------------------------
// wxWindow declaration for OS/2 PM
// ---------------------------------------------------------------------------

class WXDLLEXPORT wxWindowOS2 : public wxWindowBase
{
public:
    wxWindowOS2()
    {
        Init();
    }

    wxWindowOS2( wxWindow*       pParent
                ,wxWindowID      vId
                ,const wxPoint&  rPos = wxDefaultPosition
                ,const wxSize&   rSize = wxDefaultSize
                ,long            lStyle = 0
                ,const wxString& rName = wxPanelNameStr
               )
    {
        Init();
        Create( pParent
               ,vId
               ,rPos
               ,rSize
               ,lStyle
               ,rName
              );
    }

    virtual ~wxWindowOS2();

    bool Create( wxWindow*       pParent
                ,wxWindowID      vId
                ,const wxPoint&  rPos = wxDefaultPosition
                ,const wxSize&   rSize = wxDefaultSize
                ,long            lStyle = 0
                ,const wxString& rName = wxPanelNameStr
               );

    // implement base class pure virtuals
    virtual void     SetTitle(const wxString& rTitle);
    virtual wxString GetTitle(void) const;
    virtual void     Raise(void);
    virtual void     Lower(void);
    virtual bool     Show(bool bShow = true);
    virtual bool     Enable(bool bEnable = true);
    virtual void     SetFocus(void);
    virtual void     SetFocusFromKbd(void);
    virtual bool     Reparent(wxWindow* pNewParent);
    virtual void     WarpPointer( int x
                                 ,int y
                                );
    virtual void     Refresh( bool          bEraseBackground = true
                             ,const wxRect* pRect = (const wxRect *)NULL
                            );
    virtual void     Freeze(void);
    virtual void     Update(void);
    virtual void     Thaw(void);
    virtual void     SetWindowStyleFlag(long lStyle);
    virtual bool     SetCursor(const wxCursor& rCursor);
    virtual bool     SetFont(const wxFont& rFont);
    virtual int      GetCharHeight(void) const;
    virtual int      GetCharWidth(void) const;
    virtual void     GetTextExtent( const wxString& rString
                                   ,int*            pX
                                   ,int*            pY
                                   ,int*            pDescent = (int *)NULL
                                   ,int*            pExternalLeading = (int *)NULL
                                   ,const wxFont*   pTheFont = (const wxFont *)NULL
                                  ) const;
#if wxUSE_MENUS_NATIVE
    virtual bool     DoPopupMenu( wxMenu* pMenu
                                 ,int     nX
                                 ,int     nY
                                );
#endif // wxUSE_MENUS_NATIVE

    virtual void     SetScrollbar( int  nOrient
                                  ,int  nPos
                                  ,int  nThumbVisible
                                  ,int  nRange
                                  ,bool bRefresh = true
                                 );
    virtual void     SetScrollPos( int  nOrient
                                  ,int  nPos
                                  ,bool bRefresh = true
                                 );
    virtual int      GetScrollPos(int nOrient) const;
    virtual int      GetScrollThumb(int nOrient) const;
    virtual int      GetScrollRange(int nOrient) const;
    virtual void     ScrollWindow( int           nDx
                                  ,int           nDy
                                  ,const wxRect* pRect = (wxRect *)NULL
                                 );

    inline HWND                   GetScrollBarHorz(void) const {return m_hWndScrollBarHorz;}
    inline HWND                   GetScrollBarVert(void) const {return m_hWndScrollBarVert;};
#if wxUSE_DRAG_AND_DROP
    virtual void SetDropTarget(wxDropTarget* pDropTarget);
#endif // wxUSE_DRAG_AND_DROP

    // Accept files for dragging
    virtual void DragAcceptFiles(bool bAccept);

#ifndef __WXUNIVERSAL__
    // Native resource loading (implemented in src/os2/nativdlg.cpp)
    // FIXME: should they really be all virtual?
    virtual bool LoadNativeDialog( wxWindow*   pParent
                                  ,wxWindowID& vId
                                 );
    virtual bool LoadNativeDialog( wxWindow*       pParent
                                  ,const wxString& rName
                                 );
    wxWindow*    GetWindowChild1(wxWindowID vId);
    wxWindow*    GetWindowChild(wxWindowID vId);
#endif //__WXUNIVERSAL__

    // implementation from now on
    // --------------------------

    // simple accessors
    // ----------------

    WXHWND           GetHWND(void) const { return m_hWnd; }
    void             SetHWND(WXHWND hWnd) { m_hWnd = hWnd; }
    virtual WXWidget GetHandle(void) const { return GetHWND(); }
    bool             GetUseCtl3D(void) const { return m_bUseCtl3D; }
    bool             GetTransparentBackground(void) const { return m_bBackgroundTransparent; }
    void             SetTransparent(bool bT = true) { m_bBackgroundTransparent = bT; }

    // event handlers
    // --------------
    void OnSetFocus(wxFocusEvent& rEvent);
    void OnEraseBackground(wxEraseEvent& rEvent);
    void OnIdle(wxIdleEvent& rEvent);

public:

    // Windows subclassing
    void SubclassWin(WXHWND hWnd);
    void UnsubclassWin(void);

    WXFARPROC OS2GetOldWndProc(void) const { return m_fnOldWndProc; }
    void OS2SetOldWndProc(WXFARPROC fnProc) { m_fnOldWndProc = fnProc; }
    //
    // Return true if the window is of a standard (i.e. not wxWidgets') class
    //
    bool IsOfStandardClass(void) const { return m_fnOldWndProc != NULL; }

    wxWindow* FindItem(long lId) const;
    wxWindow* FindItemByHWND( WXHWND hWnd
                             ,bool   bControlOnly = false
                            ) const;

    // Make a Windows extended style from the given wxWidgets window style ?? applicable to OS/2??
    static WXDWORD MakeExtendedStyle( long lStyle
                                     ,bool bEliminateBorders = true
                                    );

    // PM only: true if this control is part of the main control
    virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; };

    // translate wxWidgets style flags for this control into the PM style
    // and optional extended style for the corresponding native control
    //
    // this is the function that should be overridden in the derived classes,
    // but you will mostly use OS2GetCreateWindowFlags() below
    virtual WXDWORD OS2GetStyle( long     lFlags
                                ,WXDWORD* pdwExstyle = NULL
                               ) const;

    // get the MSW window flags corresponding to wxWidgets ones
    //
    // the functions returns the flags (WS_XXX) directly and puts the ext
    // (WS_EX_XXX) flags into the provided pointer if not NULL
    WXDWORD OS2GetCreateWindowFlags(WXDWORD* pdwExflags = NULL) const
        { return OS2GetStyle(GetWindowStyle(), pdwExflags); }

    // get the HWND to be used as parent of this window with CreateWindow()
    virtual WXHWND OS2GetParent(void) const;

    // returns true if the window has been created
    bool         OS2Create( PSZ            zClass
                           ,const wxChar*  zTitle
                           ,WXDWORD        dwStyle
                           ,const wxPoint& rPos
                           ,const wxSize&  rSize
                           ,void*          pCtlData
                           ,WXDWORD        dwExStyle
                           ,bool           bIsChild
                          );
    virtual bool OS2Command( WXUINT uParam
                            ,WXWORD nId
                           );

#ifndef __WXUNIVERSAL__
    // Create an appropriate wxWindow from a HWND
    virtual wxWindow* CreateWindowFromHWND( wxWindow* pParent
                                           ,WXHWND    hWnd
                                          );

    // Make sure the window style reflects the HWND style (roughly)
    virtual void AdoptAttributesFromHWND(void);
#endif

    // Setup background and foreground colours correctly
    virtual void SetupColours(void);

    // ------------------------------------------------------------------------
    // helpers for message handlers: these perform the same function as the
    // message crackers from <windowsx.h> - they unpack WPARAM and LPARAM into
    // the correct parameters
    // ------------------------------------------------------------------------

    void UnpackCommand( WXWPARAM wParam
                       ,WXLPARAM lParam,
                        WXWORD*  pId
                       ,WXHWND*  pHwnd
                       ,WXWORD*  pCmd
                      );
    void UnpackActivate( WXWPARAM wParam
                        ,WXLPARAM lParam
                        ,WXWORD*  pState
                        ,WXHWND*  pHwnd
                       );
    void UnpackScroll( WXWPARAM wParam
                      ,WXLPARAM lParam
                      ,WXWORD*  pCode
                      ,WXWORD*  pPos
                      ,WXHWND*  pHwnd
                     );
    void UnpackMenuSelect( WXWPARAM wParam
                          ,WXLPARAM lParam
                          ,WXWORD*  pTtem
                          ,WXWORD*  pFlags
                          ,WXHMENU* pHmenu
                         );

    // ------------------------------------------------------------------------
    // internal handlers for OS2 messages: all handlers return a boolen value:
    // true means that the handler processed the event and false that it didn't
    // ------------------------------------------------------------------------

    // there are several cases where we have virtual functions for PM
    // message processing: this is because these messages often require to be
    // processed in a different manner in the derived classes. For all other
    // messages, however, we do *not* have corresponding OS2OnXXX() function
    // and if the derived class wants to process them, it should override
    // OS2WindowProc() directly.

    // scroll event (both horizontal and vertical)
    virtual bool OS2OnScroll( int    nOrientation
                             ,WXWORD nSBCode
                             ,WXWORD pos
                             ,WXHWND control
                            );

    // owner-drawn controls need to process these messages
    virtual bool OS2OnDrawItem( int               nId
                               ,WXDRAWITEMSTRUCT* pItem
                              );
    virtual long OS2OnMeasureItem( int                  nId
                                  ,WXMEASUREITEMSTRUCT* pItem
                                 );

    virtual void OnPaint(wxPaintEvent& rEvent);

    // the rest are not virtual
    bool HandleCreate( WXLPCREATESTRUCT vCs
                      ,bool*            pMayCreate
                     );
    bool HandleInitDialog(WXHWND hWndFocus);
    bool HandleDestroy(void);
    bool HandlePaint(void);
    bool HandleEraseBkgnd(WXHDC vDC);
    bool HandleMinimize(void);
    bool HandleMaximize(void);
    bool HandleSize( int    nX
                    ,int    nY
                    ,WXUINT uFlag
                   );
    bool HandleGetMinMaxInfo(PSWP pMmInfo);
    bool HandleShow( bool bShow
                    ,int  nStatus
                   );
    bool HandleActivate( int    nFlag
                        ,WXHWND hActivate
                       );
    bool HandleCommand( WXWORD nId
                       ,WXWORD nCmd
                       ,WXHWND hControl
                      );
    bool HandleSysCommand( WXWPARAM wParam
                          ,WXLPARAM lParam
                         );
    bool HandlePaletteChanged(void);
    bool HandleQueryNewPalette(void);
    bool HandleSysColorChange(void);
    bool HandleDisplayChange(void);
    bool HandleCaptureChanged(WXHWND hBainedCapture);

    bool HandleCtlColor(WXHBRUSH* hBrush);
    bool HandleSetFocus(WXHWND hWnd);
    bool HandleKillFocus(WXHWND hWnd);
    bool HandleEndDrag(WXWPARAM wParam);
    bool HandleMouseEvent( WXUINT uMsg
                          ,int    nX
                          ,int    nY
                          ,WXUINT uFlags
                         );
    bool HandleMouseMove( int    nX
                         ,int    nY
                         ,WXUINT uFlags
                        );
    bool HandleChar( WXWPARAM wParam
                    ,WXLPARAM lParam
                    ,bool     bIsASCII = false
                   );
    bool HandleKeyDown( WXWPARAM wParam
                       ,WXLPARAM lParam
                      );
    bool HandleKeyUp( WXWPARAM wParam
                     ,WXLPARAM lParam
                    );
    bool HandleQueryDragIcon(WXHICON* phIcon);
    bool HandleSetCursor( USHORT vId
                         ,WXHWND hWnd
                        );

    bool IsMouseInWindow(void) const;
    bool OS2GetCreateWindowCoords( const wxPoint& rPos
                                  ,const wxSize&  rSize
                                  ,int&           rnX
                                  ,int&           rnY
                                  ,int&           rnWidth
                                  ,int&           rnHeight
                                 ) const;

    // Window procedure
    virtual MRESULT OS2WindowProc( WXUINT   uMsg
                                  ,WXWPARAM wParam
                                  ,WXLPARAM lParam
                                 );

    // Calls an appropriate default window procedure
    virtual MRESULT OS2DefWindowProc( WXUINT   uMsg
                                     ,WXWPARAM wParam
                                     ,WXLPARAM lParam
                                    );
    virtual bool    OS2ProcessMessage(WXMSG* pMsg);
    virtual bool    OS2ShouldPreProcessMessage(WXMSG* pMsg);
    virtual bool    OS2TranslateMessage(WXMSG* pMsg);
    virtual void    OS2DestroyWindow(void);

    // this function should return the brush to paint the window background
    // with or 0 for the default brush
    virtual WXHBRUSH OnCtlColor( WXHDC    hDC
                                ,WXHWND   hWnd
                                ,WXUINT   uCtlColor
                                ,WXUINT   uMessage
                                ,WXWPARAM wParam
                                ,WXLPARAM lParam
                               );

    // Responds to colour changes: passes event on to children.
    void OnSysColourChanged(wxSysColourChangedEvent& rEvent);

    // initialize various fields of wxMouseEvent (common part of OS2OnMouseXXX)
    void InitMouseEvent( wxMouseEvent& rEvent
                        ,int           nX
                        ,int           nY
                        ,WXUINT        uFlags
                       );

    void MoveChildren(int nDiff);
    PSWP GetSwp(void) {return &m_vWinSwp;}

protected:
    // PM can't create some MSW styles natively but can perform these after
    // creation by sending messages
    typedef enum extra_flags { kFrameToolWindow = 0x0001
                              ,kVertCaption     = 0x0002
                              ,kHorzCaption     = 0x0004
                             } EExtraFlags;
    // Some internal sizeing id's to make it easy for event handlers
    typedef enum size_types { kSizeNormal
                             ,kSizeMax
                             ,kSizeMin
                            } ESizeTypes;
    // the window handle
    WXHWND                          m_hWnd;

    // the old window proc (we subclass all windows)
    WXFARPROC                       m_fnOldWndProc;

    // additional (OS2 specific) flags
    bool                            m_bUseCtl3D:1; // Using CTL3D for this control
    bool                            m_bBackgroundTransparent:1;
    bool                            m_bMouseInWindow:1;
    bool                            m_bLastKeydownProcessed:1;
    bool                            m_bWinCaptured:1;
    WXDWORD                         m_dwExStyle;

    // the size of one page for scrolling
    int                             m_nXThumbSize;
    int                             m_nYThumbSize;

#if wxUSE_MOUSEEVENT_HACK
    // the coordinates of the last mouse event and the type of it
    long                            m_lLastMouseX,
    long                            m_lLastMouseY;
    int                             m_nLastMouseEvent;
#endif // wxUSE_MOUSEEVENT_HACK

    WXHMENU                         m_hMenu; // Menu, if any
    unsigned long                   m_ulMenubarId; // it's Id, if any

    // the return value of WM_GETDLGCODE handler
    long                            m_lDlgCode;

    // implement the base class pure virtuals
    virtual void DoClientToScreen( int* pX
                                  ,int* pY
                                 ) const;
    virtual void DoScreenToClient( int* pX
                                  ,int* pY
                                 ) const;
    virtual void DoGetPosition( int* pX
                               ,int* pY
                              ) const;
    virtual void DoGetSize( int* pWidth
                           ,int* pHeight
                          ) const;
    virtual void DoGetClientSize( int* pWidth
                                 ,int* pHeight
                                ) const;
    virtual void DoSetSize( int nX
                           ,int nY
                           ,int nWidth
                           ,int nHeight
                           ,int nSizeFlags = wxSIZE_AUTO
                          );
    virtual void DoSetClientSize( int nWidth
                                 ,int nHeight
                                );

    virtual void     DoCaptureMouse(void);
    virtual void     DoReleaseMouse(void);

    // move the window to the specified location and resize it: this is called
    // from both DoSetSize() and DoSetClientSize() and would usually just call
    // ::WinSetWindowPos() except for composite controls which will want to arrange
    // themselves inside the given rectangle
    virtual void DoMoveWindow( int nX
                              ,int nY
                              ,int nWidth
                              ,int nHeight
                             );

#if wxUSE_TOOLTIPS
    virtual void DoSetToolTip(wxToolTip* pTip);
#endif // wxUSE_TOOLTIPS

    int  GetOS2ParentHeight(wxWindowOS2* pParent);

private:
    // common part of all ctors
    void Init(void);

    // the (non-virtual) handlers for the events
    bool HandleMove( int nX
                    ,int nY
                   );
    bool HandleJoystickEvent( WXUINT uMsg
                             ,int    pX
                             ,int    pY
                             ,WXUINT uFlags
                            );

    bool HandleNotify( int       nIdCtrl
                      ,WXLPARAM  lParam
                      ,WXLPARAM* pResult
                     );
    // the helper functions used by HandleChar/KeyXXX methods
    wxKeyEvent CreateKeyEvent( wxEventType evType
                              ,int         nId
                              ,WXLPARAM    lParam = 0
                              ,WXWPARAM    wParam = 0
                             ) const;

    wxWindowList*                   m_pChildrenDisabled;
    HWND                            m_hWndScrollBarHorz;
    HWND                            m_hWndScrollBarVert;
    SWP                             m_vWinSwp;

    DECLARE_DYNAMIC_CLASS(wxWindowOS2);
    DECLARE_NO_COPY_CLASS(wxWindowOS2)
    DECLARE_EVENT_TABLE()

    //
    // Virtual function hiding supression
    //
    inline virtual bool Reparent(wxWindowBase* pNewParent)
    { return(wxWindowBase::Reparent(pNewParent));}
}; // end of wxWindow

class wxWindowCreationHook
{
public:
    wxWindowCreationHook(wxWindow* pWinBeingCreated);
    ~wxWindowCreationHook();
}; // end of CLASS wxWindowCreationHook

// ---------------------------------------------------------------------------
// global functions
// ---------------------------------------------------------------------------

// kbd code translation
WXDLLEXPORT int wxCharCodeOS2ToWX(int nKeySym);
WXDLLEXPORT int wxCharCodeWXToOS2( int   nId
                                  ,bool* pbIsVirtual
                                 );

// ----------------------------------------------------------------------------
// global objects
// ----------------------------------------------------------------------------

// notice that this hash must be defined after wxWindow declaration as it
// needs to "see" its dtor and not just forward declaration
#include "wx/hash.h"

// pseudo-template HWND <-> wxWindow hash table
WX_DECLARE_HASH(wxWindowOS2, wxWindowList, wxWinHashTable);

extern wxWinHashTable *wxWinHandleHash;

#endif
    // _WX_WINDOW_H_


text:
#include <test/rix/core/helpers/GeometryHelper.h>

using namespace std;
using namespace dp::math;

namespace dp
{
  namespace rix
  {
    using namespace core;

    namespace util
    {

      GeometrySharedHandle generateGeometry( dp::rix::util::GeometryDataSharedPtr& meshIn, dp::rix::core::Renderer* m_rix )
      {
        unsigned int attrMask = 0;

        for( map<dp::rix::util::AttributeID, dp::rix::util::AttributeData>::iterator it = meshIn->m_attributes.begin(); it != meshIn->m_attributes.end(); ++it )
        {
          attrMask |= it->first;
        }

        map<dp::rix::util::AttributeID, BufferSharedHandle> vbuffers;
        vector<VertexFormatInfo> vfis;

        BufferSharedHandle ibuffer;
        if( !meshIn->m_indices.empty() )
        {
          ibuffer = m_rix->bufferCreate();
          size_t bufferSize = meshIn->m_indices.size() * sizeof(unsigned int);
          m_rix->bufferSetSize( ibuffer, bufferSize );
          m_rix->bufferUpdateData( ibuffer, 0, &meshIn->m_indices[0], bufferSize );
        }

        VertexDataSharedHandle vertexData = m_rix->vertexDataCreate();
        for(unsigned int i = 0; i < NUM_ATTRIBS; i++)
        {
          dp::rix::util::AttributeID curAttr = (dp::rix::util::AttributeID)(1 << i);
          if( attrMask & curAttr )
          {
            vbuffers[curAttr] = m_rix->bufferCreate();
            m_rix->bufferSetSize( vbuffers[curAttr], meshIn->m_attributes[curAttr].m_data.size() * sizeof(float) );
            m_rix->bufferUpdateData( vbuffers[curAttr], 0, &meshIn->m_attributes[curAttr].m_data[0], meshIn->m_attributes[curAttr].m_data.size() * sizeof(float) );

            dp::Uint8 streamId = dp::checked_cast<dp::Uint8>( vfis.size() );

            vfis.push_back( VertexFormatInfo( i, dp::DT_FLOAT_32, meshIn->m_attributes[curAttr].m_dimensionality, false,
                                              streamId, 0, meshIn->m_attributes[curAttr].m_dimensionality * sizeof(float)) );

            m_rix->vertexDataSet( vertexData, streamId, vbuffers[curAttr], 0, meshIn->m_attributes[curAttr].m_data.size() / meshIn->m_attributes[curAttr].m_dimensionality );
          }
        }

        VertexFormatDescription vertexFormatDescription( &vfis[0], vfis.size() );
        VertexFormatSharedHandle vertexFormat = m_rix->vertexFormatCreate( vertexFormatDescription );

        VertexAttributesSharedHandle vertexAttributes = m_rix->vertexAttributesCreate();
        m_rix->vertexAttributesSet( vertexAttributes, vertexData, vertexFormat );

        IndicesSharedHandle indices = 0;
        if( !meshIn->m_indices.empty() )
        {
          indices = m_rix->indicesCreate();
          m_rix->indicesSetData( indices, dp::DT_UNSIGNED_INT_32, ibuffer, 0, meshIn->m_indices.size() );
        }

        GeometryDescriptionSharedHandle geometryDescription = m_rix->geometryDescriptionCreate();
        m_rix->geometryDescriptionSet( geometryDescription, meshIn->m_gpt );

        GeometrySharedHandle geometry = m_rix->geometryCreate();
        m_rix->geometrySetData( geometry, geometryDescription, vertexAttributes, indices );

        return geometry;

      }

    } // namespace util
  } // namespace rix
} // namespace dp


text:
package com.github.oohira.intercom.model;

import java.util.List;

/**
 * Class representing an error response.
 *
 * @author oohira
 */
public class ErrorResponse {
    /**
     * Class representing an error.
     */
    public static class Error {
        private String type; // initialized only when a single error
        private String code; // initialized only when an error list
        private String message;

        /**
         * Gets a type of this error.
         *
         * NOTE:
         * If this is an Events API error, this method will return null.
         * In that case, use {@link #getCode()} instead. This confusing
         * behavior is due to strange specification of Intercom Events API.
         *
         * @return an error type
         */
        public String getType() {
            return this.type;
        }

        /**
         * Gets a kind of this error.
         *
         * NOTE:
         * If this is not an Events API error, this method will return null.
         * In that case, use {@link #getType()} instead. This confusing
         * behavior is due to strange specification of Intercom Events API.
         *
         * @return an error type
         */
        public String getCode() {
            return this.code;
        }

        public String getMessage() {
            return this.message;
        }
    }

    private static final String TYPE_ERROR_LIST = "error.list";
    private String type;
    private Error error;
    private List<Error> errors;
    private transient int statusCode;

    public ErrorResponse() {
    }

    public boolean isErrorList() {
        return TYPE_ERROR_LIST.equals(this.type);
    }

    public Error getError() {
        if (isErrorList()) {
            throw new UnsupportedOperationException("This is an Error List object. Use getErrors() instead.");
        }
        return this.error;
    }

    public List<Error> getErrors() {
        if (!isErrorList()) {
            throw new UnsupportedOperationException("This is a single Error object. Use getError() instead.");
        }
        return this.errors;
    }

    /**
     * Gets a type of this error.
     *
     * @return If this is a single error, returns type of the error.
     *         If this is an error list, returns type of the first error.
     */
    public String getType() {
        if (isErrorList()) {
            if (this.errors != null && !this.errors.isEmpty()) {
                return this.errors.get(0).getCode();
            }
        } else {
            if (this.error != null) {
                return this.error.getType();
            }
        }
        return null;
    }

    /**
     * Gets a human readable description of this error.
     *
     * @return If this is a single error, returns description of the error.
     *         If this is an error list, returns description of the first error.
     */
    public String getMessage() {
        if (isErrorList()) {
            if (this.errors != null && !this.errors.isEmpty()) {
                return this.errors.get(0).getMessage();
            }
        } else {
            if (this.error != null) {
                return this.error.getMessage();
            }
        }
        return null;
    }

    public int getStatusCode() {
        return this.statusCode;
    }

    public void setStatusCode(final int statusCode) {
        this.statusCode = statusCode;
    }
}


text:
<?php

namespace Snide\Magnum\Model;

/**
 * Class UserTest
 *
 * @author Pascal DENIS <pascal.denis.75@gmail.com>
 */
class UserTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var User
     */
    protected $object;

    /**
     * Set up the test
     */
    protected function setUp()
    {
        $this->object = new User();
    }

    /**
     * Test ID
     */
    public function testId()
    {
        $this->assertNull($this->object->getId());
        $id = '12';
        $this->object->setId($id);
        $this->assertEquals($id, $this->object->getId());
    }

    /**
     * Test createdAt
     */
    public function testCreatedAt()
    {
        $this->assertNull($this->object->getCreatedAt());
        $date = '2014-02-15T04:36:59-06:00';
        $createdAt = new \DateTime($date);

        $this->object->setCreatedAt($date);
        $this->assertEquals($createdAt, $this->object->getCreatedAt());
        $this->object->setCreatedAt($createdAt);
        $this->assertEquals($createdAt, $this->object->getCreatedAt());
    }

    /**
     * Test email
     */
    public function testEmail()
    {
        $this->assertNull($this->object->getEmail());
        $email = 'pascal.denis.75@gmail.com';
        $this->object->setEmail($email);
        $this->assertEquals($email, $this->object->getEmail());
    }

    /**
     * Test login
     */
    public function testLogin()
    {
        $this->assertNull($this->object->getLogin());
        $login = 'snide';
        $this->object->setLogin($login);
        $this->assertEquals($login, $this->object->getLogin());
    }

    /**
     * Test projects count
     */
    public function testProjects()
    {
        $this->assertNull($this->object->getProjects());
        $count = '10';
        $this->object->setProjects($count);
        $this->assertEquals($count, $this->object->getProjects());
    }

    /**
     * Test time used
     */
    public function testTimeUsed()
    {
        $this->assertNull($this->object->getTimeUsed());
        $timeUsed = 10.1;
        $this->object->setTimeUsed($timeUsed);
        $this->assertEquals($timeUsed, $this->object->getTimeUsed());
    }

    /**
     * Test time quota
     */
    public function testTimeQuota()
    {
        $this->assertNull($this->object->getTimeQuota());
        $timeQuota = 20;
        $this->object->setTimeQuota($timeQuota);
        $this->assertEquals($timeQuota, $this->object->getTimeQuota());
    }

    /**
     * Test API token
     */
    public function testApiToken()
    {
        $this->assertNull($this->object->getApiToken());
        $token = 'fa1231daezfae14dc';
        $this->object->setApiToken($token);
        $this->assertEquals($token, $this->object->getApiToken());
    }
}


text:
package cromwell.backend.validation

import com.typesafe.config.Config
import wom.RuntimeAttributesKeys
import wom.values._

/**
  * Validates the "failOnStderr" runtime attribute as a Boolean or a String 'true' or 'false', returning the value as a
  * `Boolean`.
  *
  * `instance` returns an validation that errors when no attribute is specified.
  *
  * `configDefaultWdlValue` returns the value of the attribute as specified by the
  * reference.conf file, coerced into a WomValue.
  *
  * `default` a validation with the default value specified by the reference.conf file.
  */

object FailOnStderrValidation {
  lazy val instance: RuntimeAttributesValidation[Boolean] = new FailOnStderrValidation
  def default(runtimeConfig: Option[Config]): RuntimeAttributesValidation[Boolean] = instance.withDefault(
    configDefaultWdlValue(runtimeConfig) getOrElse WomBoolean(false))
  def configDefaultWdlValue(runtimeConfig: Option[Config]): Option[WomValue] = instance.configDefaultWomValue(runtimeConfig)
}

class FailOnStderrValidation extends BooleanRuntimeAttributesValidation(RuntimeAttributesKeys.FailOnStderrKey) {
  override def usedInCallCaching: Boolean = true

  override protected def missingValueMessage: String =
    s"Expecting $key runtime attribute to be a Boolean or a String with values of 'true' or 'false'"
}


text:
#pragma once
#include <aws/workdocs/WorkDocs_EXPORTS.h>
#include <aws/workdocs/model/RoleType.h>
#include <aws/workdocs/model/RolePermissionType.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace WorkDocs
{
namespace Model
{

  /**
   *
Describes the permissions.

See Also:
   AWS
   * API Reference

   */
  class AWS_WORKDOCS_API PermissionInfo
  {
  public:
    PermissionInfo();
    PermissionInfo(Aws::Utils::Json::JsonView jsonValue);
    PermissionInfo& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The role of the user.

     */
    inline const RoleType& GetRole() const{ return m_role; }

    /**
     *
The role of the user.

     */
    inline void SetRole(const RoleType& value) { m_roleHasBeenSet = true; m_role = value; }

    /**
     *
The role of the user.

     */
    inline void SetRole(RoleType&& value) { m_roleHasBeenSet = true; m_role = std::move(value); }

    /**
     *
The role of the user.

     */
    inline PermissionInfo& WithRole(const RoleType& value) { SetRole(value); return *this;}

    /**
     *
The role of the user.

     */
    inline PermissionInfo& WithRole(RoleType&& value) { SetRole(std::move(value)); return *this;}

    /**
     *
The type of permissions.

     */
    inline const RolePermissionType& GetType() const{ return m_type; }

    /**
     *
The type of permissions.

     */
    inline void SetType(const RolePermissionType& value) { m_typeHasBeenSet = true; m_type = value; }

    /**
     *
The type of permissions.

     */
    inline void SetType(RolePermissionType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }

    /**
     *
The type of permissions.

     */
    inline PermissionInfo& WithType(const RolePermissionType& value) { SetType(value); return *this;}

    /**
     *
The type of permissions.

     */
    inline PermissionInfo& WithType(RolePermissionType&& value) { SetType(std::move(value)); return *this;}

  private:

    RoleType m_role;
    bool m_roleHasBeenSet;

    RolePermissionType m_type;
    bool m_typeHasBeenSet;
  };

} // namespace Model
} // namespace WorkDocs
} // namespace Aws


text:
var searchData=
[
  ['geometricobject_2ecpp',['GeometricObject.cpp',['../_geometric_object_8cpp.html',1,'']]],
  ['geometricobject_2eh',['GeometricObject.h',['../_geometric_object_8h.html',1,'']]]
];


text:
from __future__ import division, absolute_import

from unittest2 import TestCase

from yunomi.compat import xrange
from yunomi.stats.uniform_sample import UniformSample

class UniformSampleTests(TestCase):

    def test_a_sample_of_100_out_of_1000_elements(self):
        sample = UniformSample(100)
        for i in xrange(1000):
            sample.update(i)
        snapshot = sample.get_snapshot()

        self.assertEqual(sample.size(), 100)
        self.assertEqual(snapshot.size(), 100)

        for i in snapshot.get_values():
            self.assertTrue(i < 1000 and i >= 0)


text:
package edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical;

import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

import org.apache.commons.lang3.mutable.Mutable;

import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalPlan;
import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;

public abstract class AbstractOperatorWithNestedPlans extends AbstractLogicalOperator {
    protected final List<ILogicalPlan> nestedPlans;

    public AbstractOperatorWithNestedPlans() {
        nestedPlans = new ArrayList<ILogicalPlan>();
    }

    public AbstractOperatorWithNestedPlans(List<ILogicalPlan> nestedPlans) {
        this.nestedPlans = nestedPlans;
    }

    public List<ILogicalPlan> getNestedPlans() {
        return nestedPlans;
    }

    @Override
    public boolean hasNestedPlans() {
        return true;
    }

    public LinkedList<Mutable<ILogicalOperator>> allRootsInReverseOrder() {
        LinkedList<Mutable<ILogicalOperator>> allRoots = new LinkedList<Mutable<ILogicalOperator>>();
        for (ILogicalPlan p : nestedPlans) {
            for (Mutable<ILogicalOperator> r : p.getRoots()) {
                allRoots.addFirst(r);
            }
        }
        return allRoots;
    }

    //
    // @Override
    // public void computeConstraintsAndEquivClasses() {
    // for (ILogicalPlan p : nestedPlans) {
    // for (LogicalOperatorReference r : p.getRoots()) {
    // AbstractLogicalOperator op = (AbstractLogicalOperator) r.getOperator();
    // equivalenceClasses.putAll(op.getEquivalenceClasses());
    // functionalDependencies.addAll(op.getFDs());
    // }
    // }
    // }

    @Override
    public void recomputeSchema() {
        schema = new ArrayList<LogicalVariable>();
        schema.addAll(inputs.get(0).getValue().getSchema());
        for (ILogicalPlan p : nestedPlans) {
            for (Mutable<ILogicalOperator> r : p.getRoots()) {
                schema.addAll(r.getValue().getSchema());
            }
        }
    }

    @Override
    public boolean isMap() {
        return false;
    }

    public abstract void getUsedVariablesExceptNestedPlans(Collection<LogicalVariable> vars);

    public abstract void getProducedVariablesExceptNestedPlans(Collection<LogicalVariable> vars);

}


text:
module KeywordExtractor
  class Stemming < ComposableOperations::Operation

    processes :tokens

    def execute
      Array(tokens).flatten.each do |token|
        next if token.nil?
        token[:stem] = PorterStemmer.stem(token.to_s.downcase)
      end

      tokens
    end

  end
end


text:
package org.apache.nifi.processors.aws.s3;

import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.attributes.CoreAttributes;
import org.apache.nifi.processor.exception.FlowFileAccessException;
import org.apache.nifi.util.MockFlowFile;
import org.apache.nifi.util.TestRunner;
import org.apache.nifi.util.TestRunners;

import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.model.AmazonS3Exception;
import com.amazonaws.services.s3.model.GetObjectRequest;
import com.amazonaws.services.s3.model.ObjectMetadata;
import com.amazonaws.services.s3.model.S3Object;
import com.amazonaws.util.StringInputStream;

import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class TestFetchS3Object {

    private TestRunner runner = null;
    private FetchS3Object mockFetchS3Object = null;
    private AmazonS3Client actualS3Client = null;
    private AmazonS3Client mockS3Client = null;

    @Before
    public void setUp() {
        mockS3Client = Mockito.mock(AmazonS3Client.class);
        mockFetchS3Object = new FetchS3Object() {
            protected AmazonS3Client getClient() {
                actualS3Client = client;
                return mockS3Client;
            }
        };
        runner = TestRunners.newTestRunner(mockFetchS3Object);
    }

    @Test
    public void testGetObject() throws IOException {
        runner.setProperty(FetchS3Object.REGION, "us-east-1");
        runner.setProperty(FetchS3Object.BUCKET, "request-bucket");
        final Map<String, String> attrs = new HashMap<>();
        attrs.put("filename", "request-key");
        runner.enqueue(new byte[0], attrs);

        S3Object s3ObjectResponse = new S3Object();
        s3ObjectResponse.setBucketName("response-bucket-name");
        s3ObjectResponse.setKey("response-key");
        s3ObjectResponse.setObjectContent(new StringInputStream("Some Content"));
        ObjectMetadata metadata = Mockito.spy(ObjectMetadata.class);
        metadata.setContentDisposition("key/path/to/file.txt");
        metadata.setContentType("text/plain");
        metadata.setContentMD5("testMD5hash");
        Date expiration = new Date();
        metadata.setExpirationTime(expiration);
        metadata.setExpirationTimeRuleId("testExpirationRuleId");
        Map<String, String> userMetadata = new HashMap<>();
        userMetadata.put("userKey1", "userValue1");
        userMetadata.put("userKey2", "userValue2");
        metadata.setUserMetadata(userMetadata);
        metadata.setSSEAlgorithm("testAlgorithm");
        Mockito.when(metadata.getETag()).thenReturn("test-etag");
        s3ObjectResponse.setObjectMetadata(metadata);
        Mockito.when(mockS3Client.getObject(Mockito.any())).thenReturn(s3ObjectResponse);

        runner.run(1);

        ArgumentCaptor<GetObjectRequest> captureRequest = ArgumentCaptor.forClass(GetObjectRequest.class);
        Mockito.verify(mockS3Client, Mockito.times(1)).getObject(captureRequest.capture());
        GetObjectRequest request = captureRequest.getValue();
        assertEquals("request-bucket", request.getBucketName());
        assertEquals("request-key", request.getKey());
        assertFalse(request.isRequesterPays());
        assertNull(request.getVersionId());

        runner.assertAllFlowFilesTransferred(FetchS3Object.REL_SUCCESS, 1);
        final List<MockFlowFile> ffs = runner.getFlowFilesForRelationship(FetchS3Object.REL_SUCCESS);
        MockFlowFile ff = ffs.get(0);
        ff.assertAttributeEquals("s3.bucket", "response-bucket-name");
        ff.assertAttributeEquals(CoreAttributes.FILENAME.key(), "file.txt");
        ff.assertAttributeEquals(CoreAttributes.PATH.key(), "key/path/to");
        ff.assertAttributeEquals(CoreAttributes.ABSOLUTE_PATH.key(), "key/path/to/file.txt");
        ff.assertAttributeEquals(CoreAttributes.MIME_TYPE.key(), "text/plain");
        ff.assertAttributeEquals("hash.value", "testMD5hash");
        ff.assertAttributeEquals("hash.algorithm", "MD5");
        ff.assertAttributeEquals("s3.etag", "test-etag");
        ff.assertAttributeEquals("s3.expirationTime", String.valueOf(expiration.getTime()));
        ff.assertAttributeEquals("s3.expirationTimeRuleId", "testExpirationRuleId");
        ff.assertAttributeEquals("userKey1", "userValue1");
        ff.assertAttributeEquals("userKey2", "userValue2");
        ff.assertAttributeEquals("s3.sseAlgorithm", "testAlgorithm");
        ff.assertContentEquals("Some Content");
    }

    @Test
    public void testGetObjectWithRequesterPays() throws IOException {
        runner.setProperty(FetchS3Object.REGION, "us-east-1");
        runner.setProperty(FetchS3Object.BUCKET, "request-bucket");
        runner.setProperty(FetchS3Object.REQUESTER_PAYS, "true");
        final Map<String, String> attrs = new HashMap<>();
        attrs.put("filename", "request-key");
        runner.enqueue(new byte[0], attrs);

        S3Object s3ObjectResponse = new S3Object();
        s3ObjectResponse.setBucketName("response-bucket-name");
        s3ObjectResponse.setKey("response-key");
        s3ObjectResponse.setObjectContent(new StringInputStream("Some Content"));
        ObjectMetadata metadata = Mockito.spy(ObjectMetadata.class);
        metadata.setContentDisposition("key/path/to/file.txt");
        metadata.setContentType("text/plain");
        metadata.setContentMD5("testMD5hash");
        Date expiration = new Date();
        metadata.setExpirationTime(expiration);
        metadata.setExpirationTimeRuleId("testExpirationRuleId");
        Map<String, String> userMetadata = new HashMap<>();
        userMetadata.put("userKey1", "userValue1");
        userMetadata.put("userKey2", "userValue2");
        metadata.setUserMetadata(userMetadata);
        metadata.setSSEAlgorithm("testAlgorithm");
        Mockito.when(metadata.getETag()).thenReturn("test-etag");
        s3ObjectResponse.setObjectMetadata(metadata);
        Mockito.when(mockS3Client.getObject(Mockito.any())).thenReturn(s3ObjectResponse);

        runner.run(1);

        ArgumentCaptor<GetObjectRequest> captureRequest = ArgumentCaptor.forClass(GetObjectRequest.class);
        Mockito.verify(mockS3Client, Mockito.times(1)).getObject(captureRequest.capture());
        GetObjectRequest request = captureRequest.getValue();
        assertEquals("request-bucket", request.getBucketName());
        assertEquals("request-key", request.getKey());
        assertTrue(request.isRequesterPays());
        assertNull(request.getVersionId());

        runner.assertAllFlowFilesTransferred(FetchS3Object.REL_SUCCESS, 1);
        final List<MockFlowFile> ffs = runner.getFlowFilesForRelationship(FetchS3Object.REL_SUCCESS);
        MockFlowFile ff = ffs.get(0);
        ff.assertAttributeEquals("s3.bucket", "response-bucket-name");
        ff.assertAttributeEquals(CoreAttributes.FILENAME.key(), "file.txt");
        ff.assertAttributeEquals(CoreAttributes.PATH.key(), "key/path/to");
        ff.assertAttributeEquals(CoreAttributes.ABSOLUTE_PATH.key(), "key/path/to/file.txt");
        ff.assertAttributeEquals(CoreAttributes.MIME_TYPE.key(), "text/plain");
        ff.assertAttributeEquals("hash.value", "testMD5hash");
        ff.assertAttributeEquals("hash.algorithm", "MD5");
        ff.assertAttributeEquals("s3.etag", "test-etag");
        ff.assertAttributeEquals("s3.expirationTime", String.valueOf(expiration.getTime()));
        ff.assertAttributeEquals("s3.expirationTimeRuleId", "testExpirationRuleId");
        ff.assertAttributeEquals("userKey1", "userValue1");
        ff.assertAttributeEquals("userKey2", "userValue2");
        ff.assertAttributeEquals("s3.sseAlgorithm", "testAlgorithm");
        ff.assertContentEquals("Some Content");
    }

    @Test
    public void testGetObjectVersion() throws IOException {
        runner.setProperty(FetchS3Object.REGION, "us-east-1");
        runner.setProperty(FetchS3Object.BUCKET, "request-bucket");
        runner.setProperty(FetchS3Object.VERSION_ID, "${s3.version}");
        final Map<String, String> attrs = new HashMap<>();
        attrs.put("filename", "request-key");
        attrs.put("s3.version", "request-version");
        runner.enqueue(new byte[0], attrs);

        S3Object s3ObjectResponse = new S3Object();
        s3ObjectResponse.setBucketName("response-bucket-name");
        s3ObjectResponse.setObjectContent(new StringInputStream("Some Content"));
        ObjectMetadata metadata = Mockito.spy(ObjectMetadata.class);
        metadata.setContentDisposition("key/path/to/file.txt");
        Mockito.when(metadata.getVersionId()).thenReturn("response-version");
        s3ObjectResponse.setObjectMetadata(metadata);
        Mockito.when(mockS3Client.getObject(Mockito.any())).thenReturn(s3ObjectResponse);

        runner.run(1);

        ArgumentCaptor<GetObjectRequest> captureRequest = ArgumentCaptor.forClass(GetObjectRequest.class);
        Mockito.verify(mockS3Client, Mockito.times(1)).getObject(captureRequest.capture());
        GetObjectRequest request = captureRequest.getValue();
        assertEquals("request-bucket", request.getBucketName());
        assertEquals("request-key", request.getKey());
        assertEquals("request-version", request.getVersionId());

        runner.assertAllFlowFilesTransferred(FetchS3Object.REL_SUCCESS, 1);
        final List<MockFlowFile> ffs = runner.getFlowFilesForRelationship(FetchS3Object.REL_SUCCESS);
        MockFlowFile ff = ffs.get(0);
        ff.assertAttributeEquals("s3.bucket", "response-bucket-name");
        ff.assertAttributeEquals(CoreAttributes.FILENAME.key(), "file.txt");
        ff.assertAttributeEquals(CoreAttributes.PATH.key(), "key/path/to");
        ff.assertAttributeEquals(CoreAttributes.ABSOLUTE_PATH.key(), "key/path/to/file.txt");
        ff.assertAttributeEquals("s3.version", "response-version");
        ff.assertContentEquals("Some Content");
    }

    @Test
    public void testGetObjectExceptionGoesToFailure() throws IOException {
        runner.setProperty(FetchS3Object.REGION, "us-east-1");
        runner.setProperty(FetchS3Object.BUCKET, "request-bucket");
        final Map<String, String> attrs = new HashMap<>();
        attrs.put("filename", "request-key");
        runner.enqueue(new byte[0], attrs);
        Mockito.doThrow(new AmazonS3Exception("NoSuchBucket")).when(mockS3Client).getObject(Mockito.any());

        runner.run(1);

        runner.assertAllFlowFilesTransferred(FetchS3Object.REL_FAILURE, 1);
    }

    @Test
    public void testGetObjectReturnsNull() throws IOException {
        runner.setProperty(FetchS3Object.REGION, "us-east-1");
        runner.setProperty(FetchS3Object.BUCKET, "request-bucket");
        final Map<String, String> attrs = new HashMap<>();
        attrs.put("filename", "request-key");
        runner.enqueue(new byte[0], attrs);
        Mockito.when(mockS3Client.getObject(Mockito.any())).thenReturn(null);

        runner.run(1);

        runner.assertAllFlowFilesTransferred(FetchS3Object.REL_FAILURE, 1);
    }

    @Test
    public void testFlowFileAccessExceptionGoesToFailure() throws IOException {
        runner.setProperty(FetchS3Object.REGION, "us-east-1");
        runner.setProperty(FetchS3Object.BUCKET, "request-bucket");
        final Map<String, String> attrs = new HashMap<>();
        attrs.put("filename", "request-key");
        runner.enqueue(new byte[0], attrs);

        AmazonS3Exception amazonException = new AmazonS3Exception("testing");
        Mockito.doThrow(new FlowFileAccessException("testing nested", amazonException)).when(mockS3Client).getObject(Mockito.any());

        runner.run(1);

        runner.assertAllFlowFilesTransferred(FetchS3Object.REL_FAILURE, 1);
    }
    @Test
    public void testGetPropertyDescriptors() throws Exception {
        FetchS3Object processor = new FetchS3Object();
        List<PropertyDescriptor> pd = processor.getSupportedPropertyDescriptors();
        assertEquals("size should be eq", 19, pd.size());
        assertTrue(pd.contains(FetchS3Object.ACCESS_KEY));
        assertTrue(pd.contains(FetchS3Object.AWS_CREDENTIALS_PROVIDER_SERVICE));
        assertTrue(pd.contains(FetchS3Object.BUCKET));
        assertTrue(pd.contains(FetchS3Object.CREDENTIALS_FILE));
        assertTrue(pd.contains(FetchS3Object.ENDPOINT_OVERRIDE));
        assertTrue(pd.contains(FetchS3Object.KEY));
        assertTrue(pd.contains(FetchS3Object.REGION));
        assertTrue(pd.contains(FetchS3Object.SECRET_KEY));
        assertTrue(pd.contains(FetchS3Object.SIGNER_OVERRIDE));
        assertTrue(pd.contains(FetchS3Object.SSL_CONTEXT_SERVICE));
        assertTrue(pd.contains(FetchS3Object.TIMEOUT));
        assertTrue(pd.contains(FetchS3Object.VERSION_ID));
        assertTrue(pd.contains(FetchS3Object.ENCRYPTION_SERVICE));
        assertTrue(pd.contains(FetchS3Object.PROXY_CONFIGURATION_SERVICE));
        assertTrue(pd.contains(FetchS3Object.PROXY_HOST));
        assertTrue(pd.contains(FetchS3Object.PROXY_HOST_PORT));
        assertTrue(pd.contains(FetchS3Object.PROXY_USERNAME));
        assertTrue(pd.contains(FetchS3Object.PROXY_PASSWORD));
        assertTrue(pd.contains(FetchS3Object.REQUESTER_PAYS));

    }
}


text:
package org.opencb.bionetdb.lib.executors;

import org.opencb.bionetdb.core.exceptions.BioNetDBException;
import org.opencb.bionetdb.core.models.network.NetworkPath;
import org.opencb.bionetdb.core.response.BioNetDBResult;
import org.opencb.bionetdb.lib.api.NetworkDBAdaptor;
import org.opencb.bionetdb.lib.api.iterators.NetworkPathIterator;
import org.opencb.commons.datastore.core.Query;
import org.opencb.commons.datastore.core.QueryOptions;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class PathQueryExecutor {

    private static final int QUERY_MAX_RESULTS = 50000;

    private NetworkDBAdaptor networkDBAdaptor;

    public PathQueryExecutor(NetworkDBAdaptor networkDBAdaptor) {
        this.networkDBAdaptor = networkDBAdaptor;
    }

    public BioNetDBResult<NetworkPath> query(Query query, QueryOptions queryOptions) throws BioNetDBException {
        NetworkPathIterator pathIterator = iterator(query, queryOptions);
        return getNetworkPathQueryResult(pathIterator);
    }

    public BioNetDBResult<NetworkPath> query(String cypher) throws BioNetDBException {
        NetworkPathIterator nodeIterator = iterator(cypher);
        return getNetworkPathQueryResult(nodeIterator);
    }

    public NetworkPathIterator iterator(Query query, QueryOptions queryOptions) throws BioNetDBException {
        return networkDBAdaptor.networkPathIterator(query, queryOptions);
    }

    public NetworkPathIterator iterator(String cypher) throws BioNetDBException {
        return networkDBAdaptor.networkPathIterator(cypher);
    }

    //-------------------------------------------------------------------------
    // P R I V A T E     M E T H O D S
    //-------------------------------------------------------------------------

    private BioNetDBResult<NetworkPath> getNetworkPathQueryResult(NetworkPathIterator pathIterator) {
        List<NetworkPath> networkPaths = new ArrayList<>();

        long startTime = System.currentTimeMillis();
        while (pathIterator.hasNext()) {
            if (networkPaths.size() >= this.QUERY_MAX_RESULTS) {
                break;
            }
            networkPaths.add(pathIterator.next());
        }
        long stopTime = System.currentTimeMillis();

        int time = (int) (stopTime - startTime) / 1000;
        return new BioNetDBResult(time, Collections.emptyList(), networkPaths.size(), networkPaths, networkPaths.size());
    }
}


text:
using UnityEngine;
using UnityEditor;
using System.Collections;

namespace TMPro.EditorUtilities
{

    [CustomEditor(typeof(TMP_Settings))]
    public class TMP_SettingsEditor : Editor
    {
        //private struct UI_PanelState
        //{

        //}

        //private string[] uiStateLabel = new string[] { "(Click to expand)", "(Click to collapse)" };
        //private GUIStyle _Label;

        private SerializedProperty prop_FontAsset;
        private SerializedProperty prop_SpriteAsset;
        private SerializedProperty prop_StyleSheet;

        public void OnEnable()
        {
            prop_FontAsset = serializedObject.FindProperty("fontAsset");
            prop_SpriteAsset = serializedObject.FindProperty("spriteAsset");
            prop_StyleSheet = serializedObject.FindProperty("styleSheet");

            // Get the UI Skin and Styles for the various Editors
            TMP_UIStyleManager.GetUIStyles();
        }

        public override void OnInspectorGUI()
        {
            //Event evt = Event.current;

            serializedObject.Update();

            GUILayout.Label("TEXTMESH PRO - SETTINGS", TMP_UIStyleManager.Section_Label);

            // TextMeshPro Font Info Panel
            EditorGUI.indentLevel = 0;

            //GUI.enabled = false; // Lock UI

            EditorGUIUtility.labelWidth = 135;
            //EditorGUIUtility.fieldWidth = 80;

            // FONT ASSET
            EditorGUILayout.BeginVertical(TMP_UIStyleManager.SquareAreaBox85G);
            GUILayout.Label("Default Font Asset", TMP_UIStyleManager.Label);
            GUILayout.Label("Select the Font Asset that will be assigned by default to newly created text objects when no Font Asset is specified.", TMP_UIStyleManager.Label);
            GUILayout.Space(5f);
            EditorGUILayout.PropertyField(prop_FontAsset);
            EditorGUILayout.EndVertical();

            // SPRITE ASSET
            EditorGUILayout.BeginVertical(TMP_UIStyleManager.SquareAreaBox85G);
            GUILayout.Label("Default Sprite Asset", TMP_UIStyleManager.Label);
            GUILayout.Label("Select the Sprite Asset that will be assigned by default when using the <sprite> tag when no Sprite Asset is specified.", TMP_UIStyleManager.Label);
            GUILayout.Space(5f);
            EditorGUILayout.PropertyField(prop_SpriteAsset);
            EditorGUILayout.EndVertical();

            // STYLE SHEET
            EditorGUILayout.BeginVertical(TMP_UIStyleManager.SquareAreaBox85G);
            GUILayout.Label("Default Style Sheet", TMP_UIStyleManager.Label);
            GUILayout.Label("Select the Style Sheet that will be used for all text objects in this project.", TMP_UIStyleManager.Label);
            GUILayout.Space(5f);
            EditorGUILayout.PropertyField(prop_StyleSheet);
            EditorGUILayout.EndVertical();

            if (serializedObject.ApplyModifiedProperties())
            {
                EditorUtility.SetDirty(target);
            }

        }
    }
}


text:
package sh.isaac.provider.commit;

public interface CancelUncommittedStamps {
    void setCancelUncommittedStamps(boolean cancelUncommittedStamps);
}


text:
/**
 *
 */
package com.horowitz.mickey;

import java.awt.Dimension;

/**
 * @author zhristov
 *
 */
public class Launcher {

  /**
   * @param args
   */
  public static void main(String[] args) {

    MainFrame frame = new MainFrame();

    frame.pack();
    frame.setSize(new Dimension(frame.getSize().width + 8, frame.getSize().height + 8));

    frame.setLocationRelativeTo(null);

    frame.setVisible(true);

  }

}


text:
'use strict';

angular.module('myApp').factory('bookDataService', function($http) {

  var baseUrl = 'http://ajs-workshop.herokuapp.com';

  function getAllBooks() {
    return $http.get(baseUrl + '/api/books');
  }

  function getBookByIsbn(isbn) {
    return $http.get(baseUrl + '/api/books/' + isbn);
  }

  function saveBook(book) {
    return $http.post(baseUrl + '/api/books', book);
  }

  function deleteBook(isbn) {
    return $http.delete(baseUrl + '/api/books/' + isbn);
  }

  return {
    getAllBooks: function() {
      return getAllBooks();
    },
    getBookByIsbn: function(isbn) {
      return getBookByIsbn(isbn);
    },
    saveBook: function(book) {
      return saveBook(book);
    },
    deleteBook: function(isbn) {
      return deleteBook(isbn);
    }
  };

});


text:
package com.alpine.model

import com.alpine.features.FeatureDesc
import com.alpine.metadata.DetailedTransformationSchema
import com.alpine.result._
import com.alpine.transformer._
import com.alpine.util.FeatureUtil

/**
 * These objects are serialized to JSON via GSON, augmented with type adapters for known interfaces,
 * scala Seq collections and Options.
 */

trait MLModel extends Serializable {
  /**
   * This should return a representative class from every jar that is needed to load
   * the object during deserialization.
   *
   * Default implementation returns the class of MLModel,
   * and the class of the model implementation.
   */
  def classesForLoading: Set[Class[_]] = Set[Class[_]](classOf[MLModel], this.getClass)
}

/**
 * RowModels are models that will produce a single result per row of data.
 */
trait RowModel extends MLModel {
  def transformer: Transformer
  def inputFeatures: Seq[FeatureDesc[_]]
  def outputFeatures: Seq[FeatureDesc[_]]
  /**
   * Used to identify this model when in a collection of models.
   * Should be simple characters, so it can be used in a feature name.
   * @return identifier for the model.
   */
  def identifier: String = ""
  def transformationSchema: DetailedTransformationSchema = {
    DetailedTransformationSchema(inputFeatures, outputFeatures, identifier)
  }
}

/**
 * A model that predicts values in a predefined set of classes.
 */
trait CategoricalRowModel extends RowModel {
  /**
   * The total set of classes that the predicted value can take on.
   * @return The set of possible values for the predicted value.
   */
  def classLabels: Seq[String]
  def transformer: CategoricalTransformer[_ <: CategoricalResult]
}

trait ClassificationRowModel extends CategoricalRowModel {
  def transformer: CategoricalTransformer[_ <: ClassificationResult]
  def outputFeatures = FeatureUtil.classificationOutputFeatures
  /**
   * Used when we are doing model quality evaluation e.g. Confusion Matrix,
   * so we know what feature in the test dataset to compare the result to.
   * @return Feature description used to identify the dependent feature in an evaluation dataset.
   */
  def dependentFeature: FeatureDesc[_]
}

trait ClusteringRowModel extends CategoricalRowModel {
  def transformer: CategoricalTransformer[_ <: ClusteringResult]
  def outputFeatures = FeatureUtil.clusteringOutputFeatures
}

trait RegressionRowModel extends RowModel {
  def transformer: RegressionTransformer
  def outputFeatures = FeatureUtil.regressionOutputFeatures
  /**
   * Used when we are doing model quality evaluation e.g. Confusion Matrix,
   * so we know what feature in the test dataset to compare the result to.
   * @return Feature description used to identify the dependent feature in an evaluation dataset.
   */
  def dependentFeature: FeatureDesc[_]
}


text:
// Copyright (C) 2005, 2006 International Business Machines and others.
// All Rights Reserved.
// This code is published under the Common Public License.
//
// $Id: IpLapack.hpp 759 2006-07-07 03:07:08Z andreasw $
//
// Authors:  Andreas Waechter              IBM    2005-12-25

#ifndef __IPLAPACK_HPP__
#define __IPLAPACK_HPP__

#include "IpUtils.hpp"
#include "IpException.hpp"

namespace SimTKIpopt
{
  DECLARE_STD_EXCEPTION(LAPACK_NOT_INCLUDED);

  /** Wrapper for LAPACK subroutine DPOTRS.  Solving a linear system
   *  given a Cholesky factorization.  We assume that the Cholesky
   *  factor is lower traiangular. */
  void IpLapackDpotrs(Index ndim, Index nrhs, const Number *a, Index lda,
                      Number *b, Index ldb);

  /** Wrapper for LAPACK subroutine DPOTRF.  Compute Cholesky
   *  factorization (lower triangular factor).  info is the return
   *  value from the LAPACK routine. */
  void IpLapackDpotrf(Index ndim, Number *a, Index lda, Index& info);

  /** Wrapper for LAPACK subroutine DSYEV.  Compute the Eigenvalue
   *  decomposition for a given matrix.  If compute_eigenvectors is
   *  true, a will contain the eigenvectors in its columns on
   *  return.  */
  void IpLapackDsyev(bool compute_eigenvectors, Index ndim, Number *a,
                     Index lda, Number *w, Index& info);

} // namespace Ipopt

#endif


text:
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">

    <property file="build.properties"/>
    <property environment="env"/>

    <!-- Setting default value for username, password and session id properties to empty string
         so unset values are treated as empty. Without this, ant expressions such as ${sf.username}
         will be treated literally.
    -->
    <condition property="sf.username" value=""> <not> <isset property="sf.username"/> </not> </condition>
    <condition property="sf.password" value=""> <not> <isset property="sf.password"/> </not> </condition>
    <condition property="sf.sessionId" value=""> <not> <isset property="sf.sessionId"/> </not> </condition>

    <taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
        <classpath>
            <pathelement location="../ant-salesforce.jar" />
        </classpath>
    </taskdef>

    <!-- Test out deploy and retrieve verbs for package 'mypkg' -->
    <target name="test">
      <!-- Upload the contents of the "mypkg" package -->
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="mypkg" rollbackOnError="true"/>
      <mkdir dir="retrieveOutput"/>
      <!-- Retrieve the contents into another directory -->
      <sf:retrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieveOutput" packageNames="MyPkg"/>
    </target>

    <!-- Retrieve an unpackaged set of metadata from your org -->
    <!-- The file unpackaged/package.xml lists what is to be retrieved -->
    <target name="retrieveUnpackaged">
      <mkdir dir="retrieveUnpackaged"/>
      <!-- Retrieve the contents into another directory -->
      <sf:retrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieveUnpackaged" unpackaged="unpackaged/package.xml"/>
    </target>

    <!-- Retrieve all the items of a particular metadata type -->
    <target name="bulkRetrieve">
      <sf:bulkRetrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" metadataType="${sf.metadataType}" retrieveTarget="retrieveUnpackaged"/>
    </target>

    <!-- Retrieve metadata for all the packages specified under packageNames -->
    <target name="retrievePkg">
      <sf:retrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieveOutput" packageNames="${sf.pkgName}"/>
    </target>

    <!-- Deploy the unpackaged set of metadata retrieved with retrieveUnpackaged and run tests in this organization's namespace only-->
    <target name="deployUnpackaged">
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="retrieveUnpackaged" rollbackOnError="true"/>
    </target>

    <!-- Deploy a zip of metadata files to the org -->
    <target name="deployZip">
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" zipFile="${sf.zipFile}" pollWaitMillis="1000" rollbackOnError="true"/>
    </target>

    <!-- Shows deploying code & running tests for code in directory -->
    <target name="deployCode">
      <!-- Upload the contents of the "codepkg" directory, running the tests for just 1 class -->
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="codepkg" testLevel="RunSpecifiedTests" rollbackOnError="true">
      	 <runTest>SampleDeployClass</runTest>
      </sf:deploy>
    </target>

	 <!-- Shows deploying code with no TestLevel sepcified -->
    <target name="deployCodeNoTestLevelSpecified">
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="codepkg" rollbackOnError="true"/>
    </target>

	<!-- Shows deploying code and running tests only within the org namespace -->
	<target name="deployCodeRunLocalTests">
	  <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="codepkg" rollbackOnError="true"  testlevel="RunLocalTests"/>
	</target>

    <!-- Shows removing code; only succeeds if done after deployCode -->
    <target name="undeployCode">
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="removecodepkg"/>
    </target>

    <!-- Shows retrieving code; only succeeds if done after deployCode -->
    <target name="retrieveCode">
      <!-- Retrieve the contents listed in the file codepkg/package.xml into the codepkg directory -->
      <sf:retrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="codepkg" unpackaged="codepkg/package.xml"/>
    </target>

    <!-- Shows deploying code, running all tests, and running tests (1 of which fails), and logging. -->
    <target name="deployCodeFailingTest">
      <!-- Upload the contents of the "codepkg" package, running all tests -->
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="codepkg" testLevel="RunAllTestsInOrg" rollbackOnError="true" logType="Debugonly"/>
    </target>

    <!-- Shows check only; never actually saves to the server -->
    <target name="deployCodeCheckOnly">
      <sf:deploy username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="codepkg" checkOnly="true"/>
    </target>

	<!-- Shows quick deployment of recent validation. Set the property sf.recentValidationId to your recent check only deployment Id -->
	<target name="quickDeploy">
	  <sf:deployRecentValidation  username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" recentValidationId="${sf.recentValidationId}"/>
	</target>

	<!-- Shows cancel deployment of deploy request either pending or in progress. Set property sf.requestId to Id of pending or in progress deploy request -->
	<target name="cancelDeploy">
	  <sf:cancelDeploy  username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" requestId="${sf.requestId}"/>
	</target>

	<!-- Retrieve the information of all items of a particular metadata type -->
    <target name="listMetadata">
      <sf:listMetadata username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" metadataType="${sf.metadataType}"/>
    </target>

	<!-- Retrieve the information on all supported metadata type -->
    <target name="describeMetadata">
      <sf:describeMetadata username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}"/>
    </target>
</project>


text:
.PHONY: docker-push docker-build build clean

VERSION_LIST := 1 2
HUB ?= gcr.io/istio-testing
IMAGE_PREFIX ?= /wasm
IMG := $(HUB)$(IMAGE_PREFIX)/header-injector

all: docker-push

build: plugin.cc plugin.h BUILD WORKSPACE
	rm -f *.wasm
	$(foreach VERSION, $(VERSION_LIST), bazel build :plugin-0.0.$(VERSION).wasm && cp bazel-bin/plugin-0.0.$(VERSION).wasm .;)

docker-build: build
	$(foreach VERSION, $(VERSION_LIST), docker buildx build . -t $(IMG):0.0.$(VERSION) --build-arg WASM_BINARY=plugin-0.0.$(VERSION).wasm;)

docker-push: docker-build
	$(foreach VERSION, $(VERSION_LIST), docker push $(IMG):0.0.$(VERSION);)

clean:
	rm -rf bazel-*
	rm -f *.wasm


text:
package ru.stga.pft.mantis.appmanager;

import org.openqa.selenium.By;
import org.openqa.selenium.NoAlertPresentException;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import ru.stga.pft.mantis.appmanager.ApplicationManager;

import java.io.File;

public class HelperBase {
  protected ApplicationManager app;
  protected WebDriver wd;

  public HelperBase(ApplicationManager app) {
    this.app = app;
    this.wd = app.getDriver();
  }

  protected void click(By lokator) {
    wd.findElement(lokator).click();
  }

  protected void type(By lokator, String text) {
    click(lokator);
    if (text != null) {
      String existingText = wd.findElement(lokator).getAttribute("value");
      if (!text.equals(existingText)) {
        wd.findElement(lokator).clear();
        wd.findElement(lokator).sendKeys(text);
      }
    }
  }

  protected void attach(By lokator, File file) {
    if (file != null) {
      wd.findElement(lokator).sendKeys(file.getAbsolutePath());
    }
  }

  public boolean isAlertPresent() {
    try {
      wd.switchTo().alert();
      return true;
    } catch (NoAlertPresentException e) {
      return false;
    }
  }

  public boolean isElementPresent(By locator) {
    try {
      wd.findElement(locator);
      return true;
    } catch (NoSuchElementException ex) {
      return false;
    }
  }
}


text: <input type="checkbox" ng-model="property.value" ng-change="changeValue()"/>


text:
\hypertarget{dir_a530dcadf61afaa559694c04db5f3ecd}{\section{robotpy Directory Reference}
\label{dir_a530dcadf61afaa559694c04db5f3ecd}\index{robotpy Directory Reference@{robotpy Directory Reference}}
}
\subsection*{Files}
\begin{DoxyCompactItemize}
\item
file \hyperlink{____main_____8py}{\-\_\-\-\_\-main\-\_\-\-\_\-.\-py}
\item
file \hyperlink{constants_8py}{constants.\-py}
\item
file \hyperlink{helper_8py}{helper.\-py}
\item
file \hyperlink{translate_8py}{translate.\-py}
\end{DoxyCompactItemize}


text:
<?php
declare(strict_types=1);

namespace Infrastructure;

use Infrastructure\Database\Queries\QueryBuilder;
use Infrastructure\UserInterface\Forms\FormHelper;
use Slim\Container;
use Slim\Http\Request;
use Slim\Http\Response;

abstract class Controller
{
    protected $container; // dependency injection container

    public function __construct(Container $container)
    {
        $this->container = $container;
    }

    public function __get($name)
    {
        return $this->container->{$name};
    }

    /** may want a config var bool trimAllInputs */
    protected function setRequestInput(Request $request)
    {
        $_SESSION[SESSION_REQUEST_INPUT_KEY] = [];
        foreach ($request->getParsedBody() as $key => $value) {
            $_SESSION[SESSION_REQUEST_INPUT_KEY][$key] = ($this->settings['trimAllUserInput']) ? trim($value) : $value;
        }
    }

    protected function setIndexFilter(Request $request, Response $response, $args, array $listViewColumns, string $redirectRoute, ListView $view)
    {
        $this->setRequestInput($request);

        if (!isset($_SESSION[SESSION_REQUEST_INPUT_KEY][$view->getSessionFilterFieldKey()])) {
            throw new \Exception("session filter input must be set");
        }

        if (!$filterColumnsInfo = $this->getFilterColumns($view->getSessionFilterFieldKey(), $listViewColumns)) {
            // redisplay form with error
            return $view->indexView($response);
        } else {
            $_SESSION[$view->getSessionFilterColumnsKey()] = $filterColumnsInfo;
            $_SESSION[$view->getSessionFilterValueKey()] = $_SESSION[SESSION_REQUEST_INPUT_KEY][$view->getSessionFilterFieldKey()];
            FormHelper::unsetSessionVars();
            return $response->withRedirect($this->router->pathFor($redirectRoute));
        }
    }

    // parse the where filter field
    protected function getFilterColumns(string $filterFieldName, array $listViewColumns): ?array
    {
        $filterColumnsInfo = [];
        $filterParts = explode(",", $_SESSION[SESSION_REQUEST_INPUT_KEY][$filterFieldName]);
        if (strlen($filterParts[0]) == 0) {
            FormHelper::setFieldErrors([$filterFieldName => 'Not Entered']);
            return null;
        } else {

            foreach ($filterParts as $whereFieldOperatorValue) {
                //field:operator:value
                $whereFieldOperatorValueParts = explode(":", $whereFieldOperatorValue);
                if (count($whereFieldOperatorValueParts) != 3) {
                    FormHelper::setFieldErrors([$filterFieldName => 'Malformed']);
                    return null;
                }
                $columnName = trim($whereFieldOperatorValueParts[0]);
                $whereOperator = strtoupper(trim($whereFieldOperatorValueParts[1]));
                $whereValue = trim($whereFieldOperatorValueParts[2]);

                // validate the column name
                if (isset($listViewColumns[strtolower($columnName)])) {
                    $columnNameSql = $listViewColumns[strtolower($columnName)];
                } else {
                    FormHelper::setFieldErrors([$filterFieldName => "$columnName not found"]);
                    return null;
                }

                // validate the operator
                if (!QueryBuilder::validateWhereOperator($whereOperator)) {
                    FormHelper::setFieldErrors([$filterFieldName => "Invalid Operator $whereOperator"]);
                    return null;
                }

                // null value only valid with IS and IS NOT operators
                if (strtolower($whereValue) == 'null') {
                    if ($whereOperator != 'IS' && $whereOperator != 'IS NOT') {
                        FormHelper::setFieldErrors([$filterFieldName => "Mismatched null, $whereOperator"]);
                        return null;
                    }
                    $whereValue = null;
                }

                if (!isset($filterColumnsInfo[$columnNameSql])) {
                    $filterColumnsInfo[$columnNameSql] = [
                        'operators' => [$whereOperator],
                        'values' => [$whereValue]
                    ];
                } else {
                    $filterColumnsInfo[$columnNameSql]['operators'][] = $whereOperator;
                    $filterColumnsInfo[$columnNameSql]['values'][] = $whereValue;
                }
            }
        }

        return $filterColumnsInfo;
    }
}


text:
PYTHONIC_NS_BEGIN

namespace numpy
{
  template <class E, class dtype>
  auto empty_like(E const &expr, dtype d)
      -> decltype(empty(sutils::getshape(expr), d))
  {
    return empty(sutils::getshape(expr), d);
  }

  template <class E>
  auto empty_like(E const &expr, types::none_type)
      -> decltype(empty(sutils::getshape(expr),
                        types::dtype_t<typename E::dtype>()))
  {
    return empty(sutils::getshape(expr), types::dtype_t<typename E::dtype>());
  }
}
PYTHONIC_NS_END

#endif


text:
@interface LoLStaticMastery : LoLBaseDTO

@property (nonatomic, strong) NSArray *rawDescription; // List[string]
@property (nonatomic, assign) NSInteger id;
@property (nonatomic, strong) LoLStaticImage *image;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *prereq;
@property (nonatomic, assign) NSInteger ranks;
@property (nonatomic, strong) NSArray *sanitizedDescription; // List[string]

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
	<string name="welcome">Welcome to %s!</string>
	<string name="close">Close</string>
	<string name="login2brag">Log in to Brag!</string>
	<string name="brag">Brag!</string>
	<string name="pleasewait">please wait ...</string>
	<string name="listbrags">List Brags</string>
	<string name="login">Log in</string>
	<string name="logout">Log out</string>
	<string name="username">username</string>
	<string name="password">password</string>
	<string name="confirm">confirm</string>
	<string name="createuser">Create Account</string>
	<string name="messages">Messsages</string>
	<string name="cancel">Cancel</string>
	<string name="message">Ain't I grand? I caught </string>
</resources>


text:
<?php defined('C5_EXECUTE') or die("Access Denied.");
?>

Card

		<?php echo t('Card Type')?>

			<select name="cardType" id="cardType">
				<option value="0" <?php echo ($cardType == 0 ? 'selected="selected"' : '')?>><?php echo t('Organisation')?></option>
				<option value="1" <?php echo ($cardType == 1 ? 'selected="selected"' : '')?>><?php echo t('Person')?></option>
			</select>

		<?php echo t('Enable vCard download link')?>

			<input type="checkbox" name="vcardDownload" id="vcardDownload" value="true" <?php echo ($vcardDownload == 'true' ? 'checked="checked"' : '')?>>

Name

		<?php echo t('Organisation Name')?>

			<?php  echo $form->text('orgName', $orgName, array('style' => 'width: 250px')); ?>
			Required

			<?php echo t('Honorific')?>

				<?php  echo $form->text('honorificName', $honorificName, array('style' => 'width: 60px')); ?>
				e.g. Mr., Mrs., Miss.

			<?php echo t('First Name')?>

				<?php  echo $form->text('firstName', $firstName, array('style' => 'width: 250px')); ?>
				Required

			<?php echo t('Middle Name')?>

				<?php  echo $form->text('midName', $midName, array('style' => 'width: 250px')); ?>

			<?php echo t('Last Name')?>

				<?php  echo $form->text('lastName', $lastName, array('style' => 'width: 250px')); ?>

			Required if First Name is empty

			<?php echo t('Honorific Suffix')?>

				<?php  echo $form->text('honorificSuffixName', $honorificSuffixName, array('style' => 'width: 60px')); ?>
				e.g. Ph.D., Esq.

Details

		<?php echo t('Category or Department')?>

			<?php  echo $form->text('category', $category, array('style' => 'width: 250px;')); ?>
			e.g. Marketing, Support

		<?php echo t('Role')?>

			<?php  echo $form->text('role', $role, array('style' => 'width: 250px;')); ?>
			e.g. Designer, Marketer

		<?php echo t('Email')?>

			<?php  echo $form->text('email', $email, array('style' => 'width: 300px;')); ?>

Telephone

Number 1

					<?php echo t('Type')?>

						<select name="phoneType1" id="phoneType1">
							<option value="home" <?php echo ($phoneType1 == 'home' ? 'selected="selected"' : '')?>><?php echo t('Home')?></option>
							<option value="work" <?php echo ($phoneType1 == 'work' ? 'selected="selected"' : '')?>><?php echo t('Work')?></option>
							<option value="cell" <?php echo ($phoneType1 == 'cell' ? 'selected="selected"' : '')?>><?php echo t('Mobile')?></option>
							<option value="fax" <?php echo ($phoneType1 == 'fax' ? 'selected="selected"' : '')?>><?php echo t('Fax')?></option>
						</select>

					<?php echo t('Number')?>

						<?php  echo $form->text('phoneNumber1', $phoneNumber1, array('style' => 'width: 150px;')); ?>

Number 2

					<?php echo t('Type')?>

						<select name="phoneType2" id="phoneType2">
							<option value="home" <?php echo ($phoneType2 == 'home' ? 'selected="selected"' : '')?>><?php echo t('Home')?></option>
							<option value="work" <?php echo ($phoneType2 == 'work' ? 'selected="selected"' : '')?>><?php echo t('Work')?></option>
							<option value="cell" <?php echo ($phoneType2 == 'cell' ? 'selected="selected"' : '')?>><?php echo t('Mobile')?></option>
							<option value="fax" <?php echo ($phoneType2 == 'fax' ? 'selected="selected"' : '')?>><?php echo t('Fax')?></option>
						</select>

					<?php echo t('Number')?>

						<?php  echo $form->text('phoneNumber2', $phoneNumber2, array('style' => 'width: 150px;')); ?>

Address

		<?php echo t('Street')?>

			<?php  echo $form->text('addressStreet', $addressStreet, array('style' => 'width: 250px;')); ?>

		<?php echo t('Town/City')?>

			<?php  echo $form->text('addressCity', $addressCity, array('style' => 'width: 250px;')); ?>

		<?php echo t('County/State')?>

			<?php  echo $form->text('addressCounty', $addressCounty, array('style' => 'width: 250px;')); ?>

		<?php echo t('Post/Zip Code')?>

			<?php  echo $form->text('addressCode', $addressCode, array('style' => 'width: 250px;')); ?>


text:
package ca.pfv.spmf.algorithms.frequentpatterns.upgrowth_ihup;

public class Item {

	int name = 0; // item
	int utility = 0; // utility of item

	// constructor that takes item name
	public Item(int name) {
		this.name = name;
	}

	// constructor that takes item name and utility
	public Item(int name, int utility) {
		this.name = name;
		this.utility = utility;

	}

	/**
	 * method to get node utility
	 */
	public int getUtility() {
		return utility;
	}

	/**
	 * method to set node utility
	 */
	public void setUtility(int utility) {
		this.utility = utility;
	}

	/**
	 * method to get perticular item
	 */
	public int getName() {
		return name;
	}
}


text:
using System.Collections.Generic;
using System.IO;
using System.Web;

namespace FairlyLocal
{
	public static class Internationalization
	{
		public static class Settings
		{
			/// <summary>
			/// The language that MsgIDs are given in (generally the language the project is being developed in).
			/// </summary>
			public static string WorkingLanguage = "en";

			/// <summary>
			/// This is the base path under which localizations will
			/// be stored.
			/// </summary>
			public static string BasePath = "~/locale/";

			/// <summary>
			/// The session key that will be used to store a user's language preference
			/// </summary>
			public static string LanguageCodeSessionKey = "LanguageCode";

			/// <summary>
			/// FOR TESTING ONLY!  If true, all calls to GetText will return an empty string.
			/// this is useful when searching for any strings that might not be flagged for localization.
			/// </summary>
			public static bool HideAllLocalizedText;
		}

		private static string _basePathAbsolute;
		public static Dictionary<string, Localization> Localizations;

		static Internationalization()
		{
			Localizations = new Dictionary<string, Localization>();
			_basePathAbsolute = HttpContext.Current.Server.MapPath(Settings.BasePath).ToLower();

			if (!Directory.Exists(_basePathAbsolute))
			{
				Directory.CreateDirectory(_basePathAbsolute);
			}

			foreach (string dir in Directory.GetDirectories(_basePathAbsolute))
			{
				string lcPath = Path.Combine(dir, "LC_MESSAGES");
				if (!Directory.Exists(lcPath))
				{
					continue;
				}

				Localization l = new Localization();
				foreach (string filename in Directory.GetFiles(lcPath, "*.po"))
				{
					l.LoadFromFile(filename);
				}

				if (l.Messages.Count > 0)
				{
					Localizations.Add(dir.Replace(_basePathAbsolute, "").ToLower(), l);
				}
			}

			if (!Localizations.ContainsKey(Settings.WorkingLanguage))
			{
				Localizations.Add(Settings.WorkingLanguage, new Localization());
			}
		}

		#region public methods

		/// <summary>
		/// Get a translated version of the supplied text message.
		/// </summary>
		/// <param name="msgID">Text to be translated</param>
		/// <param name="languageCode">Language to translate into</param>
		/// <returns></returns>
		public static string GetText(string msgID, string languageCode)
		{
			if (Settings.HideAllLocalizedText)
			{
				return "";
			}

			if (!Localizations.ContainsKey(languageCode.ToLower()))
			{
				languageCode = Settings.WorkingLanguage;
			}

			return Localizations[languageCode.ToLower()].GetMessage(msgID);
		}

		/// <summary>
		/// Spins through the language preferences in the supplied HttpRequest,
		/// returning the first complete or partial match on a loaded language.
		/// </summary>
		/// <param name="request"></param>
		/// <param name="fallback"></param>
		/// <returns></returns>
		public static string GetBestLanguage(HttpRequest request, string fallback)
		{
			if (request.UserLanguages == null || request.UserLanguages.Length == 0)
			{
				return Settings.WorkingLanguage;
			}

			foreach (string lang in request.UserLanguages)
			{
				if (Localizations.ContainsKey(lang.ToLower()))
				{
					return lang;
				}

				string fragment = lang.ToLower().Split('-')[0];
				if (Localizations.ContainsKey(fragment))
				{
					return fragment;
				}

			}

			return fallback;
		}

		#endregion

	}
}


text:
package com.emistoolbox.lib.pdf.layout;

import java.awt.Color;
import java.io.Serializable;

public class PDFLayoutFont implements Serializable
{
	public static final String FONT_TIMES = "Times";
	public static final String FONT_HELVETICA = "Helvetica";
	public static final String FONT_COURIER= "Courier";

	private String fontName;
	private double fontSize;

	private double lineSpacing = 1;
	private PDFLayoutFontStyle fontStyle;
	private Color color = Color.BLACK;

	public PDFLayoutFont()
	{}

	public PDFLayoutFont(String name, double size, PDFLayoutFontStyle style)
	{
		this.fontName = name;
		this.fontSize = size;
		this.fontStyle = style;
	}

	public PDFLayoutFont(String name, double size, PDFLayoutFontStyle style,Color color)
	{
		this.fontName = name;
		this.fontSize = size;
		this.fontStyle = style;
		this.color = color;
	}

	public String getFontName () {
		return fontName;
	}

	public void setFontName (String fontName) {
		this.fontName = fontName;
	}

	public double getFontSize () {
		return fontSize;
	}

	public void setFontSize (double fontSize) {
		this.fontSize = fontSize;
	}

	public PDFLayoutFontStyle getFontStyle () {
		return fontStyle;
	}

	public void setFontStyle (PDFLayoutFontStyle fontStyle) {
		this.fontStyle = fontStyle;
	}

	public Color getColor () {
		return color;
	}

	public void setColor (Color color) {
		this.color = color;
	}

	public double getLineSpacing () {
		return lineSpacing;
	}

	public void setLineSpacing (double lineSpacing) {
		this.lineSpacing = lineSpacing;
	}
}


text:
<ion-view>
    <ion-nav-title ng-bind-html="postsCtrl.title | translate"></ion-nav-title>
    <ion-content class="padding bg-gray-lighter">
        <wphc-empty-list list="postsCtrl.list"></wphc-empty-list>
        <wphc-loader ng-if="!postsCtrl.list" on-load="postsCtrl.init()"></wphc-loader>
        <ion-refresher pulling-text="{{ 'pullToRefresh' | translate}}" on-refresh="postsCtrl.refresh()"></ion-refresher>
        <wphc-posts show-author posts="postsCtrl.list"></wphc-posts>
        <ion-infinite-scroll immediate-check="true" ng-if="postsCtrl.list && !postsCtrl.isPaginationOver" on-infinite="postsCtrl.loadMore()" distance="1%"></ion-infinite-scroll>
    </ion-content>
</ion-view>