text:
<#
   .SYNOPSIS
   Apply the Defender exclusions based on recommendations by Microsoft

   .DESCRIPTION
   Apply the Defender exclusions based on recommendations by Microsoft,
   Some additional Controlled Folder Access Allowed Applications will be added as well

   .EXAMPLE
   PS C:\> Optimize-MicrosoftDefenderExclusions.ps1

   .NOTES
   Do not just use set-mppreference here, this might remove any existing exclusions.
   Might be the right thing to do, but with add-mppreference you append to the list (if exists).

   Changelog:
   1.0.4: Reformated
   1.0.3: Add ControlledFolderAccessAllowedApplications handling
   1.0.2: First real release
   1.0.0: Intital beta version

   Version 1.0.4

   .LINK
   http://enatec.io

   .LINK
   https://support.microsoft.com/en-ie/help/822158/virus-scanning-recommendations-for-enterprise-computers-that-are-runni

   .LINK
   https://docs.microsoft.com/en-us/powershell/module/defender/add-mppreference

   .LINK
   https://docs.microsoft.com/en-us/powershell/module/defender/set-mppreference
#>
[CmdletBinding(ConfirmImpact = 'Medium',
   SupportsShouldProcess)]
param ()

begin
{
   Write-Output -InputObject 'Apply the Defender exclusions based on recommendations by Microsoft'

   #region
   $SCT = 'SilentlyContinue'
   #endregion

   if (Get-Command -Name 'Set-MpPreference' -ErrorAction $SCT)
   {
      $null = (Set-MpPreference -EnableControlledFolderAccess Disabled -Force -ErrorAction $SCT)
   }

   #region DefaultExclusions
   $ExcludePathList = @(
      "$env:windir\SoftwareDistribution\DataStore\Datastore.edb",
      "$env:windir\SoftwareDistribution\DataStore\Logs\Edb*.jrs",
      "$env:windir\SoftwareDistribution\DataStore\Logs\Edb.chk",
      "$env:windir\SoftwareDistribution\DataStore\Logs\Tmp.edb",
      "$env:windir\Security\Database\*.edb",
      "$env:windir\Security\Database\*.sdb",
      "$env:windir\Security\Database\*.log",
      "$env:windir\Security\Database\*.chk",
      "$env:windir\Security\Database\*.jrs",
      "$env:windir\Security\Database\*.xml",
      "$env:windir\Security\Database\*.csv",
      "$env:windir\Security\Database\*.cmtx",
      "$env:windir\System32\GroupPolicy\Machine\Registry.pol",
      "$env:windir\System32\GroupPolicy\Machine\Registry.tmp",
      "$env:windir\System32\GroupPolicy\User\Registry.pol",
      "$env:windir\System32\GroupPolicy\User\Registry.tmp",
      "$env:ProgramData\ntuser.pol",
      "$env:ProgramData\chocolatey\lib\sysinternals\tools\*.exe"
   )
   #endregion DefaultExclusions

   #region AdExclusions
   # Turn off scanning of Active Directory and Active Directory-related files

   # Exclude the Main NTDS database files.
   $DSADatabaseFile = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters'
   $DSADatabaseFilePath = ('Registry::' + $DSADatabaseFile)
   $paramTestPath = @{
      Path        = $DSADatabaseFilePath
      ErrorAction = $SCT
   }
   if (Test-Path @paramTestPath)
   {
      $paramGetItemProperty = @{
         Path        = $DSADatabaseFilePath
         ErrorAction = $SCT
      }
      $DSADatabaseFileValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'DSA Database file')

      if ($DSADatabaseFileValue)
      {
         $ExcludePathList += ($DSADatabaseFileValue)
         $ExcludePathList += ($DSADatabaseFileValue).Replace('.dit', '.pat')
      }
   }
   else
   {
      Write-Verbose -Message 'No NTDS database files to exclude'
   }

   # Exclude the Active Directory transaction log files.
   $DatabaseLogFiles = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters'
   $DatabaseLogFilesPath = ('Registry::' + $DatabaseLogFiles)

   $paramTestPath = @{
      Path        = $DatabaseLogFilesPath
      ErrorAction = $SCT
   }
   if (Test-Path @paramTestPath)
   {
      $paramGetItemProperty = @{
         Path        = $DatabaseLogFilesPath
         ErrorAction = $SCT
      }
      $DatabaseLogFilesPathValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'Database Log Files Path')

      if ($DatabaseLogFilesPathValue)
      {
         $ExcludePathList += ($DatabaseLogFilesPathValue + '\EDB*.log')
         $ExcludePathList += ($DatabaseLogFilesPathValue + '\Res*.log')
         $ExcludePathList += ($DatabaseLogFilesPathValue + '\Edb*.jrs')
         $ExcludePathList += ($DatabaseLogFilesPathValue + '\Ntds.pat')
      }
   }
   else
   {
      Write-Verbose -Message 'No Active Directory transaction log files to exclude'
   }

   # Exclude the files in the NTDS Working folder
   $DSAWorkingDir = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters'
   $DSAWorkingDirPath = ('Registry::' + $DSAWorkingDir)

   $paramTestPath = @{
      Path        = $DSAWorkingDirPath
      ErrorAction = $SCT
   }
   if (Test-Path @paramTestPath)
   {
      $paramGetItemProperty = @{
         Path        = $DSAWorkingDirPath
         ErrorAction = $SCT
      }
      $DSAWorkingDirValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'DSA Working Directory')

      if ($DSAWorkingDirValue)
      {
         $ExcludePathList += ($DSAWorkingDirValue + '\Temp.edb')
         $ExcludePathList += ($DSAWorkingDirValue + '\Edb.chk')
      }
   }
   else
   {
      Write-Verbose -Message 'No NTDS Working folder to exclude'
   }
   #endregion AdExclusions

   #region SysVolExclusions
   # Turn off scanning of SYSVOL files

   # Turn off scanning of files in the File Replication Service (FRS) Working folder
   $SysVolWorkingDir = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NtFrs\Parameters'
   $SysVolWorkingDirPath = ('Registry::' + $SysVolWorkingDir)

   $paramTestPath = @{
      Path        = $SysVolWorkingDirPath
      ErrorAction = $SCT
   }
   if (Test-Path @paramTestPath)
   {
      $paramGetItemProperty = @{
         Path        = $SysVolWorkingDirPath
         ErrorAction = $SCT
      }
      $SysVolWorkingDirValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'Working Directory')
      if ($SysVolWorkingDirValue)
      {
         $ExcludePathList += ($SysVolWorkingDirValue + '\jet\sys\edb.chk')
         $ExcludePathList += ($SysVolWorkingDirValue + '\jet\Ntfrs.jdb')
         $ExcludePathList += ($SysVolWorkingDirValue + '\jet\log\*.log')
      }
   }
   else
   {
      Write-Verbose -Message 'No File Replication Service Working folder to exclude'
   }

   # Turn off scanning of files in the File Replication Service Database Log files
   $SysVolDBLogFileDir = 'HKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\Services\Ntfrs\Parameters'
   $SysVolDBLogFileDirPath = ('Registry::' + $SysVolDBLogFileDir)

   if (Test-Path -Path $SysVolDBLogFileDirPath -ErrorAction $SCT)
   {
      $paramGetItemProperty = @{
         Path        = $SysVolWorkingDirPath
         ErrorAction = $SCT
      }
      $SysVolDBLogFileDirValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'Working Directory')

      if ($SysVolDBLogFileDirValue)
      {
         $ExcludePathList += ($SysVolDBLogFileDirValue + '\Jet\Log\Edb*.jrs')
      }
      else
      {
         if ($SysVolWorkingDirValue)
         {
            $ExcludePathList += ($SysVolWorkingDirValue + '\jet\Log\Edb*.log')
         }
      }
   }
   else
   {
      Write-Verbose -Message 'No File Replication Service Database Log files to exclude'
   }
   #endregion SysVolExclusions

   #region DhcpExclusions
   # Turn off scanning of DHCP files
   $DhcpFiles = 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DHCPServer\Parameters'
   $DhcpFilesPath = ('Registry::' + $DhcpFiles)

   $paramTestPath = @{
      Path        = $DhcpFilesPath
      ErrorAction = $SCT
   }
   if (Test-Path @paramTestPath)
   {
      $paramGetItemProperty = @{
         Path        = $DhcpFilesPath
         ErrorAction = $SCT
      }
      $DhcpDatabasePathValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'DatabasePath')
      if ($DhcpDatabasePathValue)
      {
         $ExcludePathList += ($DhcpDatabasePathValue + '\*.mdb')
         $ExcludePathList += ($DhcpDatabasePathValue + '\*.pat')
         $ExcludePathList += ($DhcpDatabasePathValue + '\*.chk')
         $ExcludePathList += ($DhcpDatabasePathValue + '\*.edb')
      }

      $paramGetItemProperty = @{
         Path        = $DhcpFilesPath
         ErrorAction = $SCT
      }
      $DhcpLogFilePathValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'DhcpLogFilePath')

      if (($DhcpLogFilePathValue) -and ($DhcpLogFilePathValue -ne $DhcpDatabasePathValue))
      {
         $ExcludePathList += ($DhcpLogFilePathValue + '\*.log')
      }
      else
      {
         $ExcludePathList += ($DhcpDatabasePathValue + '\*.log')
      }

      $paramGetItemProperty = @{
         Path        = $DhcpFilesPath
         ErrorAction = $SCT
      }

      $DhcpBackupDatabasePathValue = (Get-ItemProperty @paramGetItemProperty | Select-Object -ExpandProperty 'BackupDatabasePath')

      if ($DhcpBackupDatabasePathValue)
      {
         $ExcludePathList += ($DhcpBackupDatabasePathValue + '\new\*.mdb')
         $ExcludePathList += ($DhcpBackupDatabasePathValue + '\new\*.pat')
         $ExcludePathList += ($DhcpBackupDatabasePathValue + '\new\*.chk')
         $ExcludePathList += ($DhcpBackupDatabasePathValue + '\new\*.edb')
         $ExcludePathList += ($DhcpBackupDatabasePathValue + '\new\*.log')
      }
   }
   else
   {
      Write-Verbose -Message 'No DHCP Server Directory found'
   }
   #endregion DhcpExclusions

   #region DnsExclusions
   $DnsServerDir = "$env:windir\System32\dns"

   $paramTestPath = @{
      Path        = $DnsServerDir
      ErrorAction = $SCT
   }
   if (Test-Path @paramTestPath)
   {
      $ExcludePathList += ($DnsServerDir + '\*.log')
      $ExcludePathList += ($DnsServerDir + '\*.dns')
      $ExcludePathList += ($DnsServerDir + '\BOOT')

      $DnsBackupServerDir = ($DnsServerDir + '\backup')

      $paramTestPath = @{
         Path        = $DnsBackupServerDir
         ErrorAction = $SCT
      }
      if (Test-Path @paramTestPath)
      {
         $ExcludePathList += ($DnsBackupServerDir + '\*.log')
         $ExcludePathList += ($DnsBackupServerDir + '\*.dns')
         $ExcludePathList += ($DnsBackupServerDir + '\BOOT')
      }
   }
   else
   {
      Write-Verbose -Message 'No DNS Server Directory found'
   }
   #endregion DnsExclusions

   #region WinsExclusions
   $WinsServerDir = "$env:windir\System32\Wins"

   $paramTestPath = @{
      Path        = $WinsServerDir
      ErrorAction = $SCT
   }
   if (Test-Path @paramTestPath)
   {
      Write-Warning -Message 'WINS is still installed on this system!' -WarningAction Continue

      $ExcludePathList += ($WinsServerDir + '\*.chk')
      $ExcludePathList += ($WinsServerDir + '\*.log')
      $ExcludePathList += ($WinsServerDir + '\*.mdb')
   }
   else
   {
      Write-Verbose -Message 'No WINS Server Directory found'
   }
   #endregion WinsExclusions
}

process
{
   if ($pscmdlet.ShouldProcess($ExcludePathList, 'Exclude from Microsoft Defender Scanning'))
   {
      # Loop over the list we created
      foreach ($ExcludePath in $ExcludePathList)
      {
         try
         {
            # Splat the parameters for Add-MpPreference
            $SplatAddMpPreference = @{
               ExclusionPath = $ExcludePath
               Force         = $true
               ErrorAction   = 'Stop'
               WarningAction = 'Continue'
            }
            $null = (Add-MpPreference @SplatAddMpPreference)
         }
         catch
         {
            #region ErrorHandler
            # get error record
            [Management.Automation.ErrorRecord]$e = $_

            # retrieve information about runtime error
            $info = @{
               Exception = $e.Exception.Message
               Reason    = $e.CategoryInfo.Reason
               Target    = $e.CategoryInfo.TargetName
               Script    = $e.InvocationInfo.ScriptName
               Line      = $e.InvocationInfo.ScriptLineNumber
               Column    = $e.InvocationInfo.OffsetInLine
            }

            # Error Stack
            $info | Out-String | Write-Verbose

            # Just display the info on continue with the rest of the list
            Write-Warning -Message ($info.Exception) -ErrorAction Continue -WarningAction Continue

            # Cleanup
            $info = $null
            $e = $null
            #endregion ErrorHandler
         }
      }
   }

   if ($pscmdlet.ShouldProcess($ExcludePathList, 'Tweak Controlled Folder AccessAllowed Applications'))
   {
      $paramGetMpPreference = @{
         ErrorAction = $SCT
      }
      $CurrentAllowedApplications = ((Get-MpPreference @paramGetMpPreference).ControlledFolderAccessAllowedApplications)

      # Prevent issues with missing allowed applications
      if (-not ($CurrentAllowedApplications))
      {
         # New installations might not have allowed applications, let us create an empty object
         $CurrentAllowedApplications = @()
      }

      $AllowedApplications = @(
         'C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe'
         'C:\Program Files\Intel\Intel(R) Rapid Storage Technology\IAStorDataMgrSvc.exe'
         'C:\ProgramData\chocolatey\lib\vlc\tools\vlc-*-win64_x64.exe'
         'C:\swsetup\SP*\HPImageAssistant.dll'
         'C:\Users\*\AppData\Local\Programs\Mark Text\Mark Text.exe'
         'C:\Users\*\AppData\Local\Temp\chocolatey\is-*.tmp\WinSCP-*-Setup.tmp'
         'C:\Windows\explorer.exe'
         'C:\Windows\System32\svchost.exe'
         'C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe'
      )

      $AllowedApplications | ForEach-Object -Process {
         if (-not ($CurrentAllowedApplications.Contains($_)))
         {
            # Not the fasted way, but this will work just fine
            $CurrentAllowedApplications += $_
         }
      }

      try
      {
         # Apply the new (merged) allowed application list to the Defender Controlled Folder Access Allowed feature
         $paramAddMpPreference = @{
            ControlledFolderAccessAllowedApplications = $CurrentAllowedApplications
            Force                                     = $true
            ErrorAction                               = 'Stop'
         }
         $null = (Add-MpPreference @paramAddMpPreference)
      }
      catch
      {
         Write-Warning -Message 'Unable to modify the allow list...'
      }
   }
}

end
{
   if (Get-Command -Name 'Set-MpPreference' -ErrorAction $SCT)
   {
      $null = (Set-MpPreference -EnableControlledFolderAccess Enabled -Force -ErrorAction $SCT)
   }
}

#region LICENSE
<#
BSD 3-Clause License

Copyright (c) 2021, enabling Technology
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#>
#endregion LICENSE

#region DISCLAIMER
<#
DISCLAIMER:
- Use at your own risk, etc.
- This is open-source software, if you find an issue try to fix it yourself. There is no support and/or warranty in any kind
- This is a third-party Software
- The developer of this Software is NOT sponsored by or affiliated with Microsoft Corp (MSFT) or any of its subsidiaries in any way
- The Software is not supported by Microsoft Corp (MSFT)
- By using the Software, you agree to the License, Terms, and any Conditions declared and described above
- If you disagree with any of the Terms, and any Conditions declared: Just delete it and build your own solution
#>
#endregion DISCLAIMER


text:
M2_REPOSITORY=https://repository.apache.org/service/local/staging/deploy/maven2

VERSION=@VERSION@
DSTAMP=@DSTAMP@

for artifactId in poi poi-scratchpad poi-ooxml poi-examples poi-ooxml-schemas poi-excelant
do
  SENDS="-Dfile=$artifactId-$VERSION-$DSTAMP.jar"
  SENDS="$SENDS -DpomFile=$artifactId-$VERSION.pom"
  if [ -r $artifactId-$VERSION-sources-$DSTAMP.jar ]; then
     SENDS="$SENDS -Dsources=$artifactId-$VERSION-sources-$DSTAMP.jar"
  fi
  if [ -r $artifactId-$VERSION-javadocs-$DSTAMP.jar ]; then
     SENDS="$SENDS -Djavadoc=$artifactId-$VERSION-javadocs-$DSTAMP.jar"
  fi

  mvn gpg:sign-and-deploy-file \
    -DrepositoryId=apache-releases -P apache-releases \
    -Durl=$M2_REPOSITORY \
    $SENDS
done

redpajama_set_name: RedPajamaGithub


text:
// HopperWindow.cpp

// Representing the UI window for the hopper block

#include "Globals.h"
#include "../BlockEntities/HopperEntity.h"
#include "HopperWindow.h"
#include "../BlockEntities/DropperEntity.h"
#include "SlotArea.h"

cHopperWindow::cHopperWindow(cHopperEntity * a_Hopper):
	Super(wtHopper, "Hopper")
{
	m_SlotAreas.push_back(new cSlotAreaItemGrid(a_Hopper->GetContents(), *this));
	m_SlotAreas.push_back(new cSlotAreaInventory(*this));
	m_SlotAreas.push_back(new cSlotAreaHotBar(*this));
}

void cHopperWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply)
{
	cSlotAreas AreasInOrder;

	if (a_ClickedArea == m_SlotAreas[0])
	{
		// Hopper Area
		AreasInOrder.push_back(m_SlotAreas[2]);  /* Hotbar    */
		AreasInOrder.push_back(m_SlotAreas[1]);  /* Inventory */
		Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
	}
	else
	{
		// Inventory or Hotbar
		AreasInOrder.push_back(m_SlotAreas[0]);  /* Hopper */
		Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
	}
}


text:
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models

class Migration(migrations.Migration):

	dependencies = [
		migrations.swappable_dependency(settings.AUTH_USER_MODEL),
		('push_notifications', '0003_wnsdevice'),
	]

	operations = [
		migrations.AddField(
			model_name='gcmdevice',
			name='cloud_message_type',
			field=models.CharField(choices=[('FCM', 'Google Cloud Message'), ('GCM', 'Firebase Cloud Message')],
								default='GCM', help_text='You should choose GCM or FCM', max_length=3,
								verbose_name='Cloud Message Type')
		),
	]


text:
package apple.corefoundation;

import java.io.*;
import java.nio.*;
import java.util.*;
import com.google.j2objc.annotations.*;
import com.google.j2objc.runtime.*;
import com.google.j2objc.runtime.block.*;
import apple.audiotoolbox.*;
import apple.corefoundation.*;
import apple.coregraphics.*;
import apple.coreservices.*;
import apple.dispatch.*;
import apple.foundation.*;

/*<javadoc>*/
/*</javadoc>*/
@Mapping("CFDictionaryRef") @Library("CoreFoundation/CoreFoundation.h")
public class CFDictionary
    extends CFPropertyList
     {

    protected CFDictionary() {}

    @GlobalConstant("kCFTypeDictionaryKeyCallBacks")
    public static native CFDictionaryKeyCallBacks getTypeKeyCallBacks();
    @GlobalConstant("kCFCopyStringDictionaryKeyCallBacks")
    public static native CFDictionaryKeyCallBacks getCopyStringKeyCallBacks();
    @GlobalConstant("kCFTypeDictionaryValueCallBacks")
    public static native CFDictionaryValueCallBacks getTypeValueCallBacks();

    @GlobalFunction("CFDictionaryGetTypeID")
    public static native @MachineSizedUInt long getClassTypeID();
    @GlobalFunction("CFDictionaryCreate")
    public static native CFDictionary create(CFAllocator allocator, Todo keys, Todo values, @MachineSizedSInt long numValues, CFDictionaryKeyCallBacks keyCallBacks, CFDictionaryValueCallBacks valueCallBacks);
    @GlobalFunction("CFDictionaryCreateCopy")
    public static native CFDictionary createCopy(CFAllocator allocator, CFDictionary theDict);
    @GlobalFunction("CFDictionaryGetCount")
    public static native @MachineSizedSInt long getCount(CFDictionary theDict);
    @GlobalFunction("CFDictionaryGetCountOfKey")
    public static native @MachineSizedSInt long getCountOfKey(CFDictionary theDict, Todo key);
    @GlobalFunction("CFDictionaryGetCountOfValue")
    public static native @MachineSizedSInt long getCountOfValue(CFDictionary theDict, Todo value);
    @GlobalFunction("CFDictionaryContainsKey")
    public static native boolean containsKey(CFDictionary theDict, Todo key);
    @GlobalFunction("CFDictionaryContainsValue")
    public static native boolean containsValue(CFDictionary theDict, Todo value);
    @GlobalFunction("CFDictionaryGetValue")
    public static native Todo getValue(CFDictionary theDict, Todo key);
    @GlobalFunction("CFDictionaryGetValueIfPresent")
    public static native boolean getValueIfPresent(CFDictionary theDict, Todo key, Todo value);
    @GlobalFunction("CFDictionaryGetKeysAndValues")
    public static native void getKeysAndValues(CFDictionary theDict, Todo keys, Todo values);
    @GlobalFunction("CFDictionaryApplyFunction")
    public static native void applyFunction(CFDictionary theDict, FunctionPtr applier, Todo context);

}


text:
function createlegend(axes1)
%CREATELEGEND(AXES1)
%  AXES1:  legend axes

%  Auto-generated by MATLAB on 21-May-2009 02:42:09

%% Create legend
legend1 = legend(axes1,{'Velocity','Position'});


text:
package router

import (
	"net/http"
	"os"
	"path"
	"strings"
	"time"

	"github.com/kataras/iris/context"
	"github.com/kataras/iris/core/errors"
	"github.com/kataras/iris/core/router/macro"
)

const (
	// MethodNone is a Virtual method
	// to store the "offline" routes
	MethodNone = "NONE"
)

var (
	// AllMethods contains the valid http methods:
	// "GET", "POST", "PUT", "DELETE", "CONNECT", "HEAD",
	// "PATCH", "OPTIONS", "TRACE".
	AllMethods = [...]string{
		"GET",
		"POST",
		"PUT",
		"DELETE",
		"CONNECT",
		"HEAD",
		"PATCH",
		"OPTIONS",
		"TRACE",
	}
)

// repository passed to all parties(subrouters), it's the object witch keeps
// all the routes.
type repository struct {
	routes []*Route
}

func (r *repository) register(route *Route) {
	r.routes = append(r.routes, route)
}

func (r *repository) get(routeName string) *Route {
	for _, r := range r.routes {
		if r.Name == routeName {
			return r
		}
	}
	return nil
}

func (r *repository) getAll() []*Route {
	return r.routes
}

// APIBuilder the visible API for constructing the router
// and child routers.
type APIBuilder struct {
	// the api builder global macros registry
	macros *macro.Map
	// the api builder global handlers per status code registry (used for custom http errors)
	errorCodeHandlers *ErrorCodeHandlers
	// the api builder global routes repository
	routes *repository
	// the api builder global route path reverser object
	// used by the view engine but it can be used anywhere.
	reverser *RoutePathReverser
	// the api builder global errors, can be filled by the Subdomain, WildcardSubdomain, Handle...
	// the list of possible errors that can be
	// collected on the build state to log
	// to the end-user.
	reporter *errors.Reporter

	// the per-party middleware
	middleware context.Handlers
	// the per-party routes (useful only for done middleware)
	apiRoutes []*Route
	// the per-party done middleware
	doneHandlers context.Handlers
	// the per-party
	relativePath string
}

var _ Party = &APIBuilder{}
var _ RoutesProvider = &APIBuilder{} // passed to the default request handler (routerHandler)

// NewAPIBuilder creates & returns a new builder
// which is responsible to build the API and the router handler.
func NewAPIBuilder() *APIBuilder {
	rb := &APIBuilder{
		macros:            defaultMacros(),
		errorCodeHandlers: defaultErrorCodeHandlers(),
		reporter:          errors.NewReporter(),
		relativePath:      "/",
		routes:            new(repository),
	}

	return rb
}

// GetReport returns an error may caused by party's methods.
func (rb *APIBuilder) GetReport() error {
	return rb.reporter.Return()
}

// Handle registers a route to the server's rb.
// if empty method is passed then handler(s) are being registered to all methods, same as .Any.
//
// Returns a *Route, app will throw any errors later on.
func (rb *APIBuilder) Handle(method string, registeredPath string, handlers ...context.Handler) *Route {
	// if registeredPath[0] != '/' {
	// 	return nil, errors.New("path should start with slash and should not be empty")
	// }

	if method == "" || method == "ALL" || method == "ANY" { // then use like it was .Any
		return rb.Any(registeredPath, handlers...)[0]
	}

	// no clean path yet because of subdomain indicator/separator which contains a dot.
	// but remove the first slash if the relative has already ending with a slash
	// it's not needed because later on we do normalize/clean the path, but better do it here too
	// for any future updates.
	if rb.relativePath[len(rb.relativePath)-1] == '/' {
		if registeredPath[0] == '/' {
			registeredPath = registeredPath[1:]
		}
	}

	fullpath := rb.relativePath + registeredPath // for now, keep the last "/" if any,  "/xyz/"

	routeHandlers := joinHandlers(rb.middleware, handlers)

	// here we separate the subdomain and relative path
	subdomain, path := splitSubdomainAndPath(fullpath)
	if len(rb.doneHandlers) > 0 {
		routeHandlers = append(routeHandlers, rb.doneHandlers...) // register the done middleware, if any
	}

	r, err := NewRoute(method, subdomain, path, routeHandlers, rb.macros)
	if err != nil { // template path parser errors:
		rb.reporter.Add("%v -> %s:%s:%s", err, method, subdomain, path)
		return nil
	}

	// global
	rb.routes.register(r)

	// per -party, used for done handlers
	rb.apiRoutes = append(rb.apiRoutes, r)

	return r
}

// Party is just a group joiner of routes which have the same prefix and share same middleware(s) also.
// Party could also be named as 'Join' or 'Node' or 'Group' , Party chosen because it is fun.
func (rb *APIBuilder) Party(relativePath string, handlers ...context.Handler) Party {
	parentPath := rb.relativePath
	dot := string(SubdomainPrefix[0])
	if len(parentPath) > 0 && parentPath[0] == '/' && strings.HasSuffix(relativePath, dot) {
		// if ends with . , i.e admin., it's subdomain->
		parentPath = parentPath[1:] // remove first slash
	}

	// this is checked later on but for easier debug is better to do it here:
	if rb.relativePath[0] == '/' && relativePath[0] == '/' {
		parentPath = parentPath[1:] // remove  first slash if parent ended with / and new one started with /.
	}

	// if it's subdomain then it has priority, i.e:
	// rb.relativePath == "admin."
	// relativePath == "panel."
	// then it should be panel.admin.
	// instead of admin.panel.
	if hasSubdomain(parentPath) && hasSubdomain(relativePath) {
		relativePath = relativePath + parentPath
		parentPath = ""
	}

	fullpath := parentPath + relativePath
	// append the parent's +child's handlers
	middleware := joinHandlers(rb.middleware, handlers)

	return &APIBuilder{
		// global/api builder
		macros:            rb.macros,
		routes:            rb.routes,
		errorCodeHandlers: rb.errorCodeHandlers,
		doneHandlers:      rb.doneHandlers,
		reporter:          rb.reporter,
		// per-party/children
		middleware:   middleware,
		relativePath: fullpath,
	}
}

// Subdomain returns a new party which is responsible to register routes to
// this specific "subdomain".
//
// If called from a child party then the subdomain will be prepended to the path instead of appended.
// So if app.Subdomain("admin.").Subdomain("panel.") then the result is: "panel.admin.".
func (rb *APIBuilder) Subdomain(subdomain string, middleware ...context.Handler) Party {
	if rb.relativePath == SubdomainWildcardIndicator {
		// cannot concat wildcard subdomain with something else
		rb.reporter.Add("cannot concat parent wildcard subdomain with anything else ->  %s , %s",
			rb.relativePath, subdomain)
		return rb
	}
	return rb.Party(subdomain, middleware...)
}

// WildcardSubdomain returns a new party which is responsible to register routes to
// a dynamic, wildcard(ed) subdomain. A dynamic subdomain is a subdomain which
// can reply to any subdomain requests. Server will accept any subdomain
// (if not static subdomain found) and it will search and execute the handlers of this party.
func (rb *APIBuilder) WildcardSubdomain(middleware ...context.Handler) Party {
	if hasSubdomain(rb.relativePath) {
		// cannot concat static subdomain with a dynamic one, wildcard should be at the root level
		rb.reporter.Add("cannot concat static subdomain with a dynamic one. Dynamic subdomains should be at the root level -> %s",
			rb.relativePath)
		return rb
	}
	return rb.Subdomain(SubdomainWildcardIndicator, middleware...)
}

// Macros returns the macro map which is responsible
// to register custom macro functions for all routes.
//
// Learn more at:  https://github.com/kataras/iris/tree/master/_examples/routing/dynamic-path
func (rb *APIBuilder) Macros() *macro.Map {
	return rb.macros
}

// GetRoutes returns the routes information,
// some of them can be changed at runtime some others not.
//
// Needs refresh of the router to Method or Path or Handlers changes to take place.
func (rb *APIBuilder) GetRoutes() []*Route {
	return rb.routes.getAll()
}

// GetRoute returns the registered route based on its name, otherwise nil.
// One note: "routeName" should be case-sensitive.
func (rb *APIBuilder) GetRoute(routeName string) *Route {
	return rb.routes.get(routeName)
}

// Use appends Handler(s) to the current Party's routes and child routes.
// If the current Party is the root, then it registers the middleware to all child Parties' routes too.
func (rb *APIBuilder) Use(middleware ...context.Handler) {
	rb.middleware = append(rb.middleware, middleware...)
}

// Done appends to the very end, Handler(s) to the current Party's routes and child routes
// The difference from .Use is that this/or these Handler(s) are being always running last.
func (rb *APIBuilder) Done(handlers ...context.Handler) {
	if len(rb.apiRoutes) > 0 { // register these middleware on previous-party-defined routes, it called after the party's route methods (Handle/HandleFunc/Get/Post/Put/Delete/...)
		for i, n := 0, len(rb.apiRoutes); i < n; i++ {
			routeInfo := rb.apiRoutes[i]
			routeInfo.Handlers = append(routeInfo.Handlers, handlers...)
		}
	} else {
		// register them on the doneHandlers, which will be used on Handle to append these middlweare as the last handler(s)
		rb.doneHandlers = append(rb.doneHandlers, handlers...)
	}
}

// UseGlobal registers Handler middleware  to the beginning, prepends them instead of append
//
// Use it when you want to add a global middleware to all parties, to all routes in  all subdomains
// It should be called right before Listen functions
func (rb *APIBuilder) UseGlobal(handlers ...context.Handler) {
	for _, r := range rb.routes.routes {
		r.Handlers = append(handlers, r.Handlers...) // prepend the handlers
	}
	rb.middleware = append(handlers, rb.middleware...) // set as middleware on the next routes too
	// rb.Use(handlers...)
}

// None registers an "offline" route
// see context.ExecRoute(routeName) and
// party.Routes().Online(handleResultRouteInfo, "GET") and
// Offline(handleResultRouteInfo)
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) None(path string, handlers ...context.Handler) *Route {
	return rb.Handle(MethodNone, path, handlers...)
}

// Get registers a route for the Get http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Get(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodGet, path, handlers...)
}

// Post registers a route for the Post http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Post(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodPost, path, handlers...)
}

// Put registers a route for the Put http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Put(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodPut, path, handlers...)
}

// Delete registers a route for the Delete http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Delete(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodDelete, path, handlers...)
}

// Connect registers a route for the Connect http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Connect(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodConnect, path, handlers...)
}

// Head registers a route for the Head http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Head(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodHead, path, handlers...)
}

// Options registers a route for the Options http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Options(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodOptions, path, handlers...)
}

// Patch registers a route for the Patch http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Patch(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodPatch, path, handlers...)
}

// Trace registers a route for the Trace http method.
//
// Returns a *Route and an error which will be filled if route wasn't registered successfully.
func (rb *APIBuilder) Trace(path string, handlers ...context.Handler) *Route {
	return rb.Handle(http.MethodTrace, path, handlers...)
}

// Any registers a route for ALL of the http methods
// (Get,Post,Put,Head,Patch,Options,Connect,Delete).
func (rb *APIBuilder) Any(registeredPath string, handlers ...context.Handler) []*Route {
	routes := make([]*Route, len(AllMethods), len(AllMethods))

	for i, k := range AllMethods {
		r := rb.Handle(k, registeredPath, handlers...)
		routes[i] = r
	}

	return routes
}

// StaticCacheDuration expiration duration for INACTIVE file handlers, it's the only one global configuration
// which can be changed.
var StaticCacheDuration = 20 * time.Second

const (
	lastModifiedHeaderKey       = "Last-Modified"
	ifModifiedSinceHeaderKey    = "If-Modified-Since"
	contentDispositionHeaderKey = "Content-Disposition"
	cacheControlHeaderKey       = "Cache-Control"
	contentEncodingHeaderKey    = "Content-Encoding"
	acceptEncodingHeaderKey     = "Accept-Encoding"
	// contentLengthHeaderKey represents the header["Content-Length"]
	contentLengthHeaderKey = "Content-Length"
	contentTypeHeaderKey   = "Content-Type"
	varyHeaderKey          = "Vary"
)

func (rb *APIBuilder) registerResourceRoute(reqPath string, h context.Handler) *Route {
	rb.Head(reqPath, h)
	return rb.Get(reqPath, h)
}

// StaticHandler returns a new Handler which is ready
// to serve all kind of static files.
//
// Note:
// The only difference from package-level `StaticHandler`
// is that this `StaticHandler`` receives a request path which
// is appended to the party's relative path and stripped here.
//
// Usage:
// app := iris.New()
// ...
// mySubdomainFsServer := app.Party("mysubdomain.")
// h := mySubdomainFsServer.StaticHandler("./static_files", false, false)
// /* http://mysubdomain.mydomain.com/static/css/style.css */
// mySubdomainFsServer.Get("/static", h)
// ...
//
func (rb *APIBuilder) StaticHandler(systemPath string, showList bool, enableGzip bool) context.Handler {
	// Note: this doesn't need to be here but we'll keep it for consistently
	return StaticHandler(systemPath, showList, enableGzip)
}

// StaticServe serves a directory as web resource
// it's the simpliest form of the Static* functions
// Almost same usage as StaticWeb
// accepts only one required parameter which is the systemPath,
// the same path will be used to register the GET and HEAD method routes.
// If second parameter is empty, otherwise the requestPath is the second parameter
// it uses gzip compression (compression on each request, no file cache).
//
// Returns the GET *Route.
func (rb *APIBuilder) StaticServe(systemPath string, requestPath ...string) *Route {
	var reqPath string

	if len(requestPath) == 0 {
		reqPath = strings.Replace(systemPath, string(os.PathSeparator), "/", -1) // replaces any \ to /
		reqPath = strings.Replace(reqPath, "//", "/", -1)                        // for any case, replaces // to /
		reqPath = strings.Replace(reqPath, ".", "", -1)                          // replace any dots (./mypath -> /mypath)
	} else {
		reqPath = requestPath[0]
	}

	return rb.Get(joinPath(reqPath, WildcardParam("file")), func(ctx context.Context) {
		filepath := ctx.Params().Get("file")

		spath := strings.Replace(filepath, "/", string(os.PathSeparator), -1)
		spath = path.Join(systemPath, spath)

		if !DirectoryExists(spath) {
			ctx.NotFound()
			return
		}

		if err := ctx.ServeFile(spath, true); err != nil {
			ctx.StatusCode(http.StatusInternalServerError)
		}
	})
}

// StaticContent registers a GET and HEAD method routes to the requestPath
// that are ready to serve raw static bytes, memory cached.
//
// Returns the GET *Route.
func (rb *APIBuilder) StaticContent(reqPath string, cType string, content []byte) *Route {
	modtime := time.Now()
	h := func(ctx context.Context) {
		ctx.ContentType(cType)
		if _, err := ctx.WriteWithExpiration(content, modtime); err != nil {
			ctx.StatusCode(http.StatusInternalServerError)
			// ctx.Application().Logger().Infof("error while serving []byte via StaticContent: %s", err.Error())
		}
	}

	return rb.registerResourceRoute(reqPath, h)
}

// StaticEmbeddedHandler returns a Handler which can serve
// embedded into executable files.
//
//
// Examples: https://github.com/kataras/iris/tree/master/_examples/file-server
func (rb *APIBuilder) StaticEmbeddedHandler(vdir string, assetFn func(name string) ([]byte, error), namesFn func() []string) context.Handler {
	// Notes:
	// This doesn't need to be APIBuilder's scope,
	// but we'll keep it here for consistently.
	return StaticEmbeddedHandler(vdir, assetFn, namesFn)
}

// StaticEmbedded  used when files are distributed inside the app executable, using go-bindata mostly
// First parameter is the request path, the path which the files in the vdir will be served to, for example "/static"
// Second parameter is the (virtual) directory path, for example "./assets"
// Third parameter is the Asset function
// Forth parameter is the AssetNames function.
//
// Returns the GET *Route.
//
// Examples: https://github.com/kataras/iris/tree/master/_examples/file-server
func (rb *APIBuilder) StaticEmbedded(requestPath string, vdir string, assetFn func(name string) ([]byte, error), namesFn func() []string) *Route {
	fullpath := joinPath(rb.relativePath, requestPath)
	requestPath = joinPath(fullpath, WildcardParam("file"))

	h := StripPrefix(fullpath, rb.StaticEmbeddedHandler(vdir, assetFn, namesFn))
	return rb.registerResourceRoute(requestPath, h)
}

// errDirectoryFileNotFound returns an error with message: 'Directory or file %s couldn't found. Trace: +error trace'
var errDirectoryFileNotFound = errors.New("Directory or file %s couldn't found. Trace: %s")

// Favicon serves static favicon
// accepts 2 parameters, second is optional
// favPath (string), declare the system directory path of the __.ico
// requestPath (string), it's the route's path, by default this is the "/favicon.ico" because some browsers tries to get this by default first,
// you can declare your own path if you have more than one favicon (desktop, mobile and so on)
//
// this func will add a route for you which will static serve the /yuorpath/yourfile.ico to the /yourfile.ico
// (nothing special that you can't handle by yourself).
// Note that you have to call it on every favicon you have to serve automatically (desktop, mobile and so on).
//
// Returns the GET *Route.
func (rb *APIBuilder) Favicon(favPath string, requestPath ...string) *Route {
	favPath = Abs(favPath)

	f, err := os.Open(favPath)
	if err != nil {
		rb.reporter.AddErr(errDirectoryFileNotFound.Format(favPath, err.Error()))
		return nil
	}

	// ignore error f.Close()
	defer f.Close()
	fi, _ := f.Stat()
	if fi.IsDir() { // if it's dir the try to get the favicon.ico
		fav := path.Join(favPath, "favicon.ico")
		f, err = os.Open(fav)
		if err != nil {
			//we try again with .png
			return rb.Favicon(path.Join(favPath, "favicon.png"))
		}
		favPath = fav
		fi, _ = f.Stat()
	}

	cType := TypeByFilename(favPath)
	// copy the bytes here in order to cache and not read the ico on each request.
	cacheFav := make([]byte, fi.Size())
	if _, err = f.Read(cacheFav); err != nil {
		// Here we are before actually run the server.
		// So we could panic but we don't,
		// we just interrupt with a message
		// to the (user-defined) logger.
		rb.reporter.AddErr(errDirectoryFileNotFound.
			Format(favPath, "favicon: couldn't read the data bytes for file: "+err.Error()))
		return nil
	}
	modtime := ""
	h := func(ctx context.Context) {
		if modtime == "" {
			modtime = fi.ModTime().UTC().Format(ctx.Application().ConfigurationReadOnly().GetTimeFormat())
		}
		if t, err := time.Parse(ctx.Application().ConfigurationReadOnly().GetTimeFormat(), ctx.GetHeader(ifModifiedSinceHeaderKey)); err == nil && fi.ModTime().Before(t.Add(StaticCacheDuration)) {

			ctx.ResponseWriter().Header().Del(contentTypeHeaderKey)
			ctx.ResponseWriter().Header().Del(contentLengthHeaderKey)
			ctx.StatusCode(http.StatusNotModified)
			return
		}

		ctx.ResponseWriter().Header().Set(contentTypeHeaderKey, cType)
		ctx.ResponseWriter().Header().Set(lastModifiedHeaderKey, modtime)
		ctx.StatusCode(http.StatusOK)
		if _, err := ctx.Write(cacheFav); err != nil {
			// ctx.Application().Logger().Infof("error while trying to serve the favicon: %s", err.Error())
			ctx.StatusCode(http.StatusInternalServerError)
		}
	}

	reqPath := "/favicon" + path.Ext(fi.Name()) //we could use the filename, but because standards is /favicon.ico/.png.
	if len(requestPath) > 0 && requestPath[0] != "" {
		reqPath = requestPath[0]
	}

	return rb.registerResourceRoute(reqPath, h)
}

// StaticWeb returns a handler that serves HTTP requests
// with the contents of the file system rooted at directory.
//
// first parameter: the route path
// second parameter: the system directory
//
// for more options look router.StaticHandler.
//
//     rb.StaticWeb("/static", "./static")
//
// As a special case, the returned file server redirects any request
// ending in "/index.html" to the same path, without the final
// "index.html".
//
// StaticWeb calls the StaticHandler(systemPath, listingDirectories: false, gzip: false ).
//
// Returns the GET *Route.
func (rb *APIBuilder) StaticWeb(requestPath string, systemPath string) *Route {

	paramName := "file"

	fullpath := joinPath(rb.relativePath, requestPath)

	h := StripPrefix(fullpath, rb.StaticHandler(systemPath, false, false))

	handler := func(ctx context.Context) {
		h(ctx)
		// re-check the content type here for any case,
		// although the new code does it automatically but it's good to have it here.
		if ctx.GetStatusCode() >= 200 && ctx.GetStatusCode() < 400 {
			if fname := ctx.Params().Get(paramName); fname != "" {
				cType := TypeByFilename(fname)
				ctx.ContentType(cType)
			}
		}
	}
	requestPath = joinPath(fullpath, WildcardParam(paramName))
	return rb.registerResourceRoute(requestPath, handler)
}

// OnErrorCode registers an error http status code
// based on the "statusCode" >= 400.
// The handler is being wrapepd by a generic
// handler which will try to reset
// the body if recorder was enabled
// and/or disable the gzip if gzip response recorder
// was active.
func (rb *APIBuilder) OnErrorCode(statusCode int, handlers ...context.Handler) {
	rb.errorCodeHandlers.Register(statusCode, handlers...)
}

// OnAnyErrorCode registers a handler which called when error status code written.
// Same as `OnErrorCode` but registers all http error codes.
// See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
func (rb *APIBuilder) OnAnyErrorCode(handlers ...context.Handler) {
	// we could register all >=400 and <=511 but this way
	// could override custom status codes that iris developers can register for their
	//  web apps whenever needed.
	// There fore these are the hard coded http error statuses:
	var errStatusCodes = []int{
		http.StatusBadRequest,
		http.StatusUnauthorized,
		http.StatusPaymentRequired,
		http.StatusForbidden,
		http.StatusNotFound,
		http.StatusMethodNotAllowed,
		http.StatusNotAcceptable,
		http.StatusProxyAuthRequired,
		http.StatusRequestTimeout,
		http.StatusConflict,
		http.StatusGone,
		http.StatusLengthRequired,
		http.StatusPreconditionFailed,
		http.StatusRequestEntityTooLarge,
		http.StatusRequestURITooLong,
		http.StatusUnsupportedMediaType,
		http.StatusRequestedRangeNotSatisfiable,
		http.StatusExpectationFailed,
		http.StatusTeapot,
		http.StatusUnprocessableEntity,
		http.StatusLocked,
		http.StatusFailedDependency,
		http.StatusUpgradeRequired,
		http.StatusPreconditionRequired,
		http.StatusTooManyRequests,
		http.StatusRequestHeaderFieldsTooLarge,
		http.StatusUnavailableForLegalReasons,
		http.StatusInternalServerError,
		http.StatusNotImplemented,
		http.StatusBadGateway,
		http.StatusServiceUnavailable,
		http.StatusGatewayTimeout,
		http.StatusHTTPVersionNotSupported,
		http.StatusVariantAlsoNegotiates,
		http.StatusInsufficientStorage,
		http.StatusLoopDetected,
		http.StatusNotExtended,
		http.StatusNetworkAuthenticationRequired}

	for _, statusCode := range errStatusCodes {
		rb.OnErrorCode(statusCode, handlers...)
	}
}

// FireErrorCode executes an error http status code handler
// based on the context's status code.
//
// If a handler is not already registered,
// then it creates & registers a new trivial handler on the-fly.
func (rb *APIBuilder) FireErrorCode(ctx context.Context) {
	rb.errorCodeHandlers.Fire(ctx)
}

// Layout oerrides the parent template layout with a more specific layout for this Party
// returns this Party, to continue as normal
// Usage:
// app := iris.New()
// my := app.Party("/my").Layout("layouts/mylayout.html")
// 	{
// 		my.Get("/", func(ctx context.Context) {
// 			ctx.MustRender("page1.html", nil)
// 		})
// 	}
func (rb *APIBuilder) Layout(tmplLayoutFile string) Party {
	rb.Use(func(ctx context.Context) {
		ctx.ViewLayout(tmplLayoutFile)
		ctx.Next()
	})

	return rb
}

// joinHandlers uses to create a copy of all Handlers and return them in order to use inside the node
func joinHandlers(Handlers1 context.Handlers, Handlers2 context.Handlers) context.Handlers {
	nowLen := len(Handlers1)
	totalLen := nowLen + len(Handlers2)
	// create a new slice of Handlers in order to store all handlers, the already handlers(Handlers) and the new
	newHandlers := make(context.Handlers, totalLen)
	//copy the already Handlers to the just created
	copy(newHandlers, Handlers1)
	//start from there we finish, and store the new Handlers too
	copy(newHandlers[nowLen:], Handlers2)
	return newHandlers
}


text:
Quick Draft
            Save a quick draft post:

        @include('canvas::backend.shared.partials.errors')

        <form class="keyboard-save" role="form" method="POST" id="postCreate" action="{{ route('canvas.admin.post.store') }}">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">

            @include('canvas::backend.home.partials.form')

                <button type="submit" class="btn btn-primary btn-icon-text"> Save Draft</button>

        </form>


text:
/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <debug.h>

#include <nuttx/net/netconfig.h>
#include <apps/netutils/tftp.h>

#include "tftpc_internal.h"

#if defined(CONFIG_NET) && defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0

/****************************************************************************
 * Pre-processor Definitions
 ****************************************************************************/

#define TFTP_RETRIES 3

/****************************************************************************
 * Private Function Prototypes
 ****************************************************************************/

/****************************************************************************
 * Private Functions
 ****************************************************************************/

/****************************************************************************
 * Name: tftp_read
 ****************************************************************************/

static inline ssize_t tftp_read(int fd, uint8_t *buf, size_t buflen)
{
  ssize_t nbytesread;
  ssize_t totalread = 0;

  while (totalread < buflen)
    {
      /* Read the data... repeating the read in the event that it was
       * interrupted by a signal.
       */

      do
        {
          nbytesread = read(fd, buf, buflen - totalread);
        }
      while (nbytesread < 0 && errno == EINTR);

      /* Check for non-EINTR errors */

      if (nbytesread < 0)
        {
          ndbg("read failed: %d\n", errno);
          return ERROR;
        }

      /* Check for end of file */

      else if (nbytesread == 0)
        {
          break;
        }

      /* Handle partial reads.  Partial reads can happen normally
       * when the source is some device driver that returns data
       * in bits and pieces as received (such as a pipe)
       */

      totalread += nbytesread;
      buf       += nbytesread;
    }
  return totalread;
}

/****************************************************************************
 * Name: tftp_mkdatapacket
 *
 * Description:
 *   DATA message format:
 *
 *     2 bytes: Opcode (network order == big-endian)
 *     2 bytes: Block number (network order == big-endian)
 *     N bytes: Data (where N <= 512)
 *
 * Input Parameters:
 *   fd      - File descriptor used to read from the file
 *   offset  - File offset to read from
 *   packet  - Buffer to write the data packet into
 *   blockno - The block number of the packet
 *
 * Return Value:
 *   Number of bytes read into the packet. <TFTP_PACKETSIZE means end of file;
 *   <1 if an error occurs.
 *
 ****************************************************************************/

int tftp_mkdatapacket(int fd, off_t offset, uint8_t *packet, uint16_t blockno)
{
  off_t tmp;
  int nbytesread;

  /* Format the DATA message header */

  packet[0] = TFTP_DATA >> 8;
  packet[1] = TFTP_DATA & 0xff;
  packet[2] = blockno >> 8;
  packet[3] = blockno & 0xff;

  /* Seek to the correct offset in the file */

  tmp = lseek(fd, offset, SEEK_SET);
  if (tmp == (off_t)-1)
    {
      ndbg("lseek failed: %d\n", errno);
      return ERROR;
    }

  /* Read the file data into the packet buffer */

  nbytesread = tftp_read(fd, &packet[TFTP_DATAHEADERSIZE], TFTP_DATASIZE);
  if (nbytesread < 0)
    {
      return ERROR;
    }
  return nbytesread + TFTP_DATAHEADERSIZE;
}

/****************************************************************************
 * Name: tftp_rcvack
 *
 * Description:
 *   ACK message format:
 *
 *     2 bytes: Opcode (network order == big-endian)
 *     2 bytes: Block number (network order == big-endian)
 *
 * Input Parameters:
 *   sd      - Socket descriptor to use in in the transfer
 *   packet   - buffer to use for the tranfers
 *   server  - The address of the server
 *   port    - The port number of the server (0 if not yet known)
 *   blockno - Location to return block number in the received ACK
 *
 * Returned Value:
 *   OK:success and blockno valid, ERROR:failure.
 *
 ****************************************************************************/

static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server,
                       uint16_t *port, uint16_t *blockno)
{
  struct sockaddr_in from;     /* The address the last UDP message recv'd from */
  ssize_t nbytes;              /* The number of bytes received. */
  uint16_t opcode;             /* The received opcode */
  uint16_t rblockno;           /* The received block number */
  int packetlen;               /* Packet length */
  int retry;                   /* Retry counter */

  /* Try up to TFTP_RETRIES times */

  for (retry = 0; retry < TFTP_RETRIES; retry++)
    {
      /* Try for until a valid ACK is received or some error occurs */

      for (;;)
        {
          /* Receive the next UDP packet from the server */

          nbytes = tftp_recvfrom(sd, packet, TFTP_IOBUFSIZE, &from);
          if (nbytes < TFTP_ACKHEADERSIZE)
            {
              /* Failed to receive a good packet */

              if (nbytes == 0)
                {
                  ndbg("Connection lost: %d bytes\n", nbytes);
                }
              else if (nbytes > 0)
                {
                  ndbg("Short packet: %d bytes\n", nbytes);
                }
              else
                {
                  ndbg("Recveid failure\n");
                }

              /* Break out to bump up the retry count */

              break;
            }
          else
            {
               /* Get the port being used by the server if that has not yet been established */

               if (!*port)
                 {
                   *port            = from.sin_port;
                   server->sin_port = from.sin_port;
                 }

               /* Verify that the packet was received from the correct host and port */

               if (server->sin_addr.s_addr != from.sin_addr.s_addr)
                 {
                   nvdbg("Invalid address in DATA\n");
                   continue;
                 }

              if (*port != server->sin_port)
                {
                  nvdbg("Invalid port in DATA\n");
                  packetlen = tftp_mkerrpacket(packet, TFTP_ERR_UNKID, TFTP_ERRST_UNKID);
                  (void)tftp_sendto(sd, packet, packetlen, server);
                  continue;
                }

              /* Parse the error message */

               opcode   = (uint16_t)packet[0] << 8 | (uint16_t)packet[1];
               rblockno = (uint16_t)packet[2] << 8 | (uint16_t)packet[3];

              /* Verify that the message that we received is an ACK for the
               * expected block number.
               */

               if (opcode != TFTP_ACK)
                 {
                   nvdbg("Bad opcode\n");
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET)
                  if (opcode == TFTP_ERR)
                    {
                      (void)tftp_parseerrpacket(packet);
                    }
                  else
#endif
                  if (opcode > TFTP_MAXRFC1350)
                    {
                      packetlen = tftp_mkerrpacket(packet, TFTP_ERR_ILLEGALOP, TFTP_ERRST_ILLEGALOP);
                      (void)tftp_sendto(sd, packet, packetlen, server);
                    }

                  /* Break out an bump up the retry count */

                  break;
                }

              /* Success! */

              nvdbg("Received ACK for block %d\n", rblockno);
              *blockno = rblockno;
              return OK;
            }
        }
    }

  /* We have tried TFTP_RETRIES times */

  ndbg("Timeout, Waiting for ACK\n");
  return ERROR; /* Will never get here */
}

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/****************************************************************************
 * Name: tftpput
 *
 * Input Parameters:
 *   local  - Path to the file system object to be sent.
 *   remote - The name of the file on the TFTP server.
 *   addr   - The IP address of the server in network order
 *   binary - TRUE:  Perform binary ('octect') transfer
 *            FALSE: Perform text ('netascii') transfer
 *
 ****************************************************************************/

int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
{
  struct sockaddr_in server;         /* The address of the TFTP server */
  uint8_t *packet;                   /* Allocated memory to hold one packet */
  off_t offset;                      /* Offset into source file */
  uint16_t blockno;                  /* The current transfer block number */
  uint16_t rblockno;                 /* The ACK'ed block number */
  uint16_t port = 0;                 /* This is the port number for the transfer */
  int packetlen;                     /* The length of the data packet */
  int sd;                            /* Socket descriptor for socket I/O */
  int fd;                            /* File descriptor for file I/O */
  int retry;                         /* Retry counter */
  int result = ERROR;                /* Assume failure */
  int ret;                           /* Generic return status */

  /* Allocate the buffer to used for socket/disk I/O */

  packet = (uint8_t*)zalloc(TFTP_IOBUFSIZE);
  if (!packet)
    {
      ndbg("packet memory allocation failure\n");
      set_errno(ENOMEM);
      goto errout;
    }

  /* Open the file for reading */

  fd = open(local, O_RDONLY);
  if (fd < 0)
    {
      ndbg("open failed: %d\n", errno);
      goto errout_with_packet;
    }

  /* Initialize a UDP socket and setup the server addresss */

  sd = tftp_sockinit(&server, addr);
  if (sd < 0)
    {
      goto errout_with_fd;
    }

  /* Send the write request using the well known port.  This may need
   * to be done several times because (1) UDP is inherenly unreliable
   * and packets may be lost normally, and (2) uIP has a nasty habit
   * of droppying packets if there is nothing hit in the ARP table.
   */

  blockno = 1;
  retry   = 0;
  for (;;)
    {
      packetlen = tftp_mkreqpacket(packet, TFTP_WRQ, remote, binary);
      ret = tftp_sendto(sd, packet, packetlen, &server);
      if (ret != packetlen)
        {
          goto errout_with_sd;
        }

      /* Receive the ACK for the write request */

      if (tftp_rcvack(sd, packet, &server, &port, NULL) == 0)
        {
          break;
        }

      ndbg("Re-sending request\n");

      /* We are going to loop and re-send the request packet. Check the
       * retry count so that we do not loop forever.
        */

      if (++retry > TFTP_RETRIES)
        {
          ndbg("Retry count exceeded\n");
          set_errno(ETIMEDOUT);
          goto errout_with_sd;
        }
    }

  /* Then loop sending the entire file to the server in chunks */

  offset     = 0;
  retry      = 0;

  for (;;)
    {
      /* Construct the next data packet */

      packetlen = tftp_mkdatapacket(fd, offset, packet, blockno);
      if (packetlen < 0)
        {
          goto errout_with_sd;
        }

      /* Send the next data chunk */

      ret = tftp_sendto(sd, packet, packetlen, &server);
      if (ret != packetlen)
        {
          goto errout_with_sd;
        }

      /* Check for an ACK for the data chunk */

      if (tftp_rcvack(sd, packet, &server, &port, &rblockno) == OK)
        {
          /* Check if the packet that we just sent was ACK'ed.  If not,
           * we just loop to resend the same packet (same blockno, same
           * file offset).
           */

          if (rblockno == blockno)
            {
               /* Yes.. If we are at the end of the file and if all of the packets
                * have been ACKed, then we are done.
                */

              if (packetlen < TFTP_PACKETSIZE)
                {
                  break;
                }

               /* Not the last block.. set up for the next block */

               blockno++;
               offset += TFTP_DATASIZE;
               retry  = 0;

               /* Skip the retry test */

               continue;
            }
        }

      /* We are going to loop and re-send the data packet. Check the retry
       * count so that we do not loop forever.
       */

      if (++retry > TFTP_RETRIES)
        {
          ndbg("Retry count exceeded\n");
          set_errno(ETIMEDOUT);
          goto errout_with_sd;
        }
    }

  /* Return success */

  result = OK;

errout_with_sd:
  close(sd);
errout_with_fd:
  close(fd);
errout_with_packet:
  free(packet);
errout:
  return result;
}

#endif /* CONFIG_NET && CONFIG_NET_UDP && CONFIG_NFILE_DESCRIPTORS > 0 */


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <corners android:radius="16dp"></corners>
    <size android:width="32dp"
        android:height="32dp"></size>
    <solid android:color="#ffffff"></solid>
</shape>


text:
package io.indexcity.report.config;

import io.indexcity.report.aop.logging.LoggingAspect;
import org.springframework.context.annotation.*;

@Configuration
@EnableAspectJAutoProxy
public class LoggingAspectConfiguration {

    @Bean
    @Profile(Constants.SPRING_PROFILE_DEVELOPMENT)
    public LoggingAspect loggingAspect() {
        return new LoggingAspect();
    }
}


text:
php-ssh2-demo
=============

Demo application for the ssh2 PHP extension

Dependências
============

Extensão php-ssh2

Execução
========

```cd public```

```php -S localhost:8000 index.php```

Acessar no navegador: http://localhost:8000


text:
import sys
import glob
import serial

def serial_ports():
    """ Lists serial port names - Linux Only!

    """
#     ports = glob.glob('/dev/tty[A-Za-z]*')
    ports = glob.glob('/dev/ttyACM*')
    result = []
    for port in ports:
        try:
            s = serial.Serial(port)
            s.close()
            result.append(port)
        except (serial.SerialException) as e:
            print(e)
    return result

if __name__ == '__main__':
    print(serial_ports())


text:
_[www.codever.land/bookmarks/t/meetups](https://www.codever.land/bookmarks/t/meetups)_
---
#### [Brisbane Gophers](https://www.meetup.com/Brisbane-Golang-Meetup/)
_https://www.meetup.com/Brisbane-Golang-Meetup/_

Meet and share your Golang projects and experiences with other Gophers in Brisbane.Follow us on Twitter at https://twitter.com/golangbris
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Go Language NYC](https://www.meetup.com/golanguagenewyork/)
_https://www.meetup.com/golanguagenewyork/_

Go Language meetups and more in the greatest city in the world!Our purpose is to help build the Go community within NYC. We are here to support individuals by providing a safe platform for them to spe
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Go London User Group](https://www.meetup.com/Go-London-User-Group/)
_https://www.meetup.com/Go-London-User-Group/_

London Gophers, aka Go London User Group (GLUG), is a London-based community for anyone interested in the Go programming language.London Gophers provides opportunities to:- Discuss Go and related topi
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Go Toronto](https://www.meetup.com/go-toronto/)
_https://www.meetup.com/go-toronto/_

This is GoTO, meant to bring GTA Gophers together so we can learn and collaborate, regardless of skill level. This group is intended to provide:- avenues for continuous improvement and growth.- an ave
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Go User Group Atlanta](https://www.meetup.com/Go-Users-Group-Atlanta/)
_https://www.meetup.com/Go-Users-Group-Atlanta/_

Go Users Group Atlanta is a meeting place for people interested in developing and promoting the local Go development community.Many of us hang out in golang (https://tech404.slack.com/messages/golang
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [GoBridge, San Francisco, CA](https://www.meetup.com/gobridge/)
_https://www.meetup.com/gobridge/_

GoBridge is dedicated to building bridges that educate and empower underrepresented communities to teach and learn technical skills and foster diversity in Go. If you are new to GoBridge, please visit
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [GoJakarta](https://www.meetup.com/GoJakarta/)
_https://www.meetup.com/GoJakarta/_

A meetup group to discuss the Go Programming Language in Jakarta.(from golang.org)The Go programming language is an open source project to make programmers more productive. Go is expressive, concise,
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Amsterdam](https://www.meetup.com/golang-amsterdam/)
_https://www.meetup.com/golang-amsterdam/_

This group is for everybody who is interested in the Go programming language (https://golang.org/). We organize meetups with technical talks and social events. Contact us if you're interested in hosti
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Argentina](https://www.meetup.com/Golang-Argentina/)
_https://www.meetup.com/Golang-Argentina/_

Gophers en Argentina! Queremos impulsar el uso y el conocimiento de este hermoso, simple y eficiente lenguaje en Argentina. Juntarse a compartir conocimiento y experiencias, con una cerveza de por med
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Baltimore, MD](https://www.meetup.com/BaltimoreGolang/)
_https://www.meetup.com/BaltimoreGolang/_

If you're interested in the Go Programming Language (aka Golang), newbie, experienced or just curious, this is the meetup for you. We're an inclusive group that aims for diversity in our membership, t
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Bangalore](https://www.meetup.com/Golang-Bangalore/)
_https://www.meetup.com/Golang-Bangalore/_

A meetup group to discuss the Go Programming Language (https://golang.org/). The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Belo Horizonte - Brazil](https://www.meetup.com/go-belo-horizonte/)
_https://www.meetup.com/go-belo-horizonte/_

Brazil](https://www.meetup.com/go-belo-horizonte/)
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Boston](https://www.meetup.com/bostongo/)
_https://www.meetup.com/bostongo/_

A forum for people working with Go to discuss ideas, issues and share solutions. We will start to put together meetings as the group grows and topics are suggested.Submit a talk proposal (https://www.
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Bulgaria](https://www.meetup.com/Golang-Bulgaria/)
_https://www.meetup.com/Golang-Bulgaria/_

An open meetup for everybody and anybody interested in Golang, CSP, software development. Experienced & aspiring software developers as well as actual gophers are all welcome!
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Cardiff, UK](https://www.meetup.com/Cardiff-Go-Meetup/)
_https://www.meetup.com/Cardiff-Go-Meetup/_

Hey there, if you're in the Cardiff area and interested in Go, this is for you. We run a mix of hack nights, training sessions, guest speakers and social evening. Speaker? Event ideas? Topic requests?
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Copenhagen](https://www.meetup.com/Go-Cph/)
_https://www.meetup.com/Go-Cph/_

(English below)Denne gruppe er for folk interesseret i Go i København og omegn.Vi mødes ca hver anden måned et sted i København og vi tilstræber både at have et fagligt indhold i form af tech talks og
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang DC, Arlington, VA](https://www.meetup.com/Golang-DC/)
_https://www.meetup.com/Golang-DC/_

A group focused on the Go programming language(golang). We want to learn about Golang's role in highly concurrent network services, concurrency, language design, and other related topics.
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Dorset, UK](https://www.meetup.com/golang-dorset/)
_https://www.meetup.com/golang-dorset/_

Golang Dorsetis a user group for people interested in theGo programming language (https://golang.org/) and assorted related technologies and methodologies (kubernetes / docker / DevOps etc)We aim to m
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Hamburg - Germany](https://www.meetup.com/Go-User-Group-Hamburg/)
_https://www.meetup.com/Go-User-Group-Hamburg/_

Germany](https://www.meetup.com/Go-User-Group-Hamburg/)
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Israel](https://www.meetup.com/Go-Israel/)
_https://www.meetup.com/Go-Israel/_

This is the group for programmers who are interested in the High Performance, Scalable, lightweight, cross platform development tool that also promises ease of programming, agility and the fun you don
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Joinville - Brazil](https://www.meetup.com/Joinville-Go-Meetup/)
_https://www.meetup.com/Joinville-Go-Meetup/_

Brazil](https://www.meetup.com/Joinville-Go-Meetup/)
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Korea](https://www.meetup.com/GDG-Golang-Korea/)
_https://www.meetup.com/GDG-Golang-Korea/_

권리포기서 (Disclaimer)GDG Golang Korea는 Google과 독립적인 단체로, GDG Golang Korea에서 진행하는 활동과 발표되는 내용들은 Google과 관련이 없습니다. GDG 프로그램에 대한 자세한 내용을 보려면 https://developers.google.com/groups/ 을 방문하십시오.DisclaimerGDG Gola
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Lima - Peru](https://www.meetup.com/Golang-Peru/)
_https://www.meetup.com/Golang-Peru/_

Peru](https://www.meetup.com/Golang-Peru/)
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Lyon](https://www.meetup.com/Golang-Lyon/)
_https://www.meetup.com/Golang-Lyon/_

Ce groupe s'adresse à toute personne s'intéressant de près ou de loin au langage Go : curieux, débutants ou personnes expérimentées !Plus d'informations sur le langage Go : https://golang.org/Crédits
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Marseille](https://www.meetup.com/fr-FR/Golang-Marseille/)
_https://www.meetup.com/fr-FR/Golang-Marseille/_

Ce groupe est ouvert à tous ceux qui s'intéressent de près ou de loin au langage Go : des curieux aux utilisateurs expérimentés.
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Melbourne](https://www.meetup.com/golang-mel/)
_https://www.meetup.com/golang-mel/_

Calling all Melbourne Gophers. Any skill level, even those that have just heard about go and are interested
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Paris](https://www.meetup.com/Golang-Paris/)
_https://www.meetup.com/Golang-Paris/_

Ce groupe est ouvert à tous ceux qui s'intéressent de près ou de loin au langage Go : des curieux aux utilisateurs expérimentés."Go, aussi connu sous le nom de Golang, est un langage de programmation
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Pune](https://www.meetup.com/Golang-Pune/)
_https://www.meetup.com/Golang-Pune/_

This is a group for anyone that is interested in the Go programming language. We invite novice developers to experienced developers to attend. We will make sure we have appropriate topics and presenta
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Singapore](https://www.meetup.com/golangsg/)
_https://www.meetup.com/golangsg/_

About Go languageThe Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Stockholm](https://www.meetup.com/Go-Stockholm/)
_https://www.meetup.com/Go-Stockholm/_

A group intended to enable golang nuts from Stockholm to meet up and share experiences. Join if you are interested in meeting other golang nuts for informal presentations and possibly even beer and pi
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Sydney, AU](https://www.meetup.com/golang-syd/)
_https://www.meetup.com/golang-syd/_

Let's talk about using Go.
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang São Paulo - Brazil](https://www.meetup.com/golangbr/)
_https://www.meetup.com/golangbr/_

Brazil](https://www.meetup.com/golangbr/)
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Taipei](https://www.meetup.com/golang-taipei-meetup/)
_https://www.meetup.com/golang-taipei-meetup/_

At Golang Taipei, we promote Golang development and sharing the latest information about Golang.Join our Facebook group (https://www.facebook.com/groups/269001993248363/) to connect with other 6,138 m
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Vancouver, BC](https://www.meetup.com/golangvan/)
_https://www.meetup.com/golangvan/_

We are a group of Go lovers (a.k.a. Gophers) in the Vancouver area (http://golangvan.org/). This is a semi regular group hoping to get Gophers in the Vancouver area together to discuss their experienc
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Казань](https://www.meetup.com/GolangKazan/)
_https://www.meetup.com/GolangKazan/_

Встречи русскоязычного сообщества разработчиков на Go в Казани.Мы рады видеть всех – от любознательных новичков до профессионалов.Disclaimer: GDG Kazan Golang is an independent group; our activities a
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Москва](https://www.meetup.com/Golang-Moscow/)
_https://www.meetup.com/Golang-Moscow/_

Встречи русскоязычного сообщества разработчиков на Go (http://golang.org/). Мы рады видеть всех – от любознательных новичков до маститых профессионалов.Google-группа: golang-ru (https://groups.google.
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Golang Питер](https://www.meetup.com/Golang-Peter/)
_https://www.meetup.com/Golang-Peter/_

Встречи русскоязычного сообщества разработчиков на Go (http://golang.org/). Мы рады видеть всех – от любознательных новичков до маститых профессионалов.Google-группа: golang-ru (https://groups.google.
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Istanbul Golang](https://www.meetup.com/Istanbul-Golang/)
_https://www.meetup.com/Istanbul-Golang/_

This is a meetup group for Go Programming Language for interested Gophers living in Istanbul. Interest in the language is all you need, no experience is necessary.
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Seattle Go Programmers](https://www.meetup.com/golang/)
_https://www.meetup.com/golang/_

The Seattle Go User Group is a community for anyone interested in the Go programming language.We provide opportunities to:• Discuss Go and related topics• Socialize with people who are interested in G
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Ukrainian Golang User Groups](https://www.meetup.com/uagolang/)
_https://www.meetup.com/uagolang/_

Kyiv meetups for gophers. Let's share our experiace!
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Utah Go User Group](https://www.meetup.com/utahgophers/)
_https://www.meetup.com/utahgophers/_

The Utah Go User Group (UTGO) is a community of people interested in software development and Google's Go programming language (Golang). Everyone is welcome. We currently meet in Lehi. To discuss and
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---
#### [Women Who Go - San Francisco, CA](https://www.meetup.com/Women-Who-Go/)
_https://www.meetup.com/Women-Who-Go/_

San Francisco, CA](https://www.meetup.com/Women-Who-Go/)
* **tags**: [go](../tagged/go.md), [meetups](../tagged/meetups.md)
---


text:
package org.apache.commons.math4.legacy.fitting;

import java.util.List;

import org.junit.Assert;
import org.junit.Test;
import org.apache.commons.numbers.core.Precision;

/**
 * Tests {@link WeightedObservedPoints}.
 *
 */
public class WeightedObservedPointsTest {
    @Test
    public void testAdd1() {
        final WeightedObservedPoints store = new WeightedObservedPoints();

        final double x = 1.2;
        final double y = 34.56;
        final double w = 0.789;

        store.add(w, x, y);

        Assert.assertTrue(lastElementIsSame(store, new WeightedObservedPoint(w, x, y)));
    }

    @Test
    public void testAdd2() {
        final WeightedObservedPoints store = new WeightedObservedPoints();

        final double x = 1.2;
        final double y = 34.56;
        final double w = 0.789;

        store.add(new WeightedObservedPoint(w, x, y));

        Assert.assertTrue(lastElementIsSame(store, new WeightedObservedPoint(w, x, y)));
    }

    @Test
    public void testAdd3() {
        final WeightedObservedPoints store = new WeightedObservedPoints();

        final double x = 1.2;
        final double y = 34.56;

        store.add(x, y);

        Assert.assertTrue(lastElementIsSame(store, new WeightedObservedPoint(1, x, y)));
    }

    @Test
    public void testClear() {
        final WeightedObservedPoints store = new WeightedObservedPoints();

        store.add(new WeightedObservedPoint(1, 2, 3));
        store.add(new WeightedObservedPoint(2, -1, -2));
        Assert.assertTrue(store.toList().size() == 2);

        store.clear();
        Assert.assertTrue(store.toList().isEmpty());
    }

    // Ensure that an instance returned by "toList()" is independent from
    // the original container.
    @Test
    public void testToListCopy() {
        final WeightedObservedPoints store = new WeightedObservedPoints();

        store.add(new WeightedObservedPoint(1, 2, 3));
        store.add(new WeightedObservedPoint(2, -3, -4));

        final List<WeightedObservedPoint> list = store.toList();
        Assert.assertEquals(2, list.size());

        // Adding an element to "list" has no impact on "store".
        list.add(new WeightedObservedPoint(1.2, 3.4, 5.6));
        Assert.assertNotEquals(list.size(), store.toList().size());

        // Clearing "store" has no impact on "list".
        store.clear();
        Assert.assertFalse(list.isEmpty());
    }

    /**
     * Checks that the contents of the last element is equal to the
     * contents of {@code p}.
     *
     * @param store Container.
     * @param point Observation.
     * @return {@code true} if both elements have the same contents.
     */
    private boolean lastElementIsSame(WeightedObservedPoints store,
                                      WeightedObservedPoint point) {
        final List<WeightedObservedPoint> list = store.toList();
        final WeightedObservedPoint lastPoint = list.get(list.size() - 1);

        if (!Precision.equals(lastPoint.getX(), point.getX())) {
            return false;
        }
        if (!Precision.equals(lastPoint.getY(), point.getY())) {
            return false;
        }
        if (!Precision.equals(lastPoint.getWeight(), point.getWeight())) {
            return false;
        }

        return true;
    }
}


text:
module Magento
  # http://www.magentocommerce.com/wiki/doc/webservices-api/api/customer
  # 100  Invalid customer data. Details in error message.
  # 101  Invalid filters specified. Details in error message.
  # 102  Customer does not exist.
  # 103  Customer not deleted. Details in error message.
  class Customer < Base
    class << self
      # customer.list
      # Retrieve customers
      #
      # Return: array
      #
      # Arguments:
      #
      # array filters - filters by customer attributes (optional)
      # filter list - "updated_at", "website_id", "increment_id", "lastname", "group_id",
      #   "firstname", "created_in", "customer_id", "password_hash", "store_id", "email", "created_at"
      #
      # Note: password_hash will only match exactly with the same MD5 and salt as was used when
      # Magento stored the value. If you try to match with an unsalted MD5 hash, or any salt other
      # than what Magento used, it will not match. This is just a straight string comparison.
      def list(*args)
        results = commit("list", *args)
        results.collect do |result|
          new(result)
        end
      end

      # customer.create
      # Create customer
      #
      # Return: int
      #
      # Arguments:
      #
      # array customerData - cutomer data (email, firstname, lastname, etc...)
      def create(attributes)
        id = commit("create", attributes)
        record = new(attributes)
        record.id = id
        record
      end

      # customer.info
      # Retrieve customer data
      #
      # Return: array
      #
      # Arguments:
      #
      # int customerId - Customer ID.
      # array attributes | string attribute (optional depending on version) -
      #   return only these attributes. Possible attributes are updated_at, increment_id,
      #   customer_id, created_at. The value, customer_id, is always returned.
      def info(*args)
        new(commit("info", *args))
      end

      # customer.update
      # Update customer data
      #
      # Return: boolean
      #
      # Arguments:
      #
      # int customerId - customer ID
      # array customerData - customer data (email, firstname, etc...)
      def update(*args)
        commit("update", *args)
      end

      # customer.delete
      # Delete customer
      #
      # Return: boolean
      #
      # Arguments:
      #
      # int customerId - customer ID.
      def delete(*args)
        commit("delete", *args)
      end

      def find_by_id(id)
        info(id)
      end

      def find(find_type, options = {})
        filters = {}
        options.each_pair { |k, v| filters[k] = {:eq => v} }
        results = list(filters)
        if find_type == :first
          results.first
        else
          results
        end
      end

      def all
        list
      end
    end

    def addresses
      Magento::CustomerAddress.list(self.id)
    end

    def delete
      self.class.delete(self.id)
    end

    def update_attribute(name, value)
      @attributes[name] = value
      self.class.update(self.id, Hash[*[name.to_sym, value]])
    end

    def update_attributes(attrs)
      attrs.each_pair { |k, v| @attributes[k] = v }
      self.class.update(self.id, attrs)
    end
  end
end


text:
namespace peloton {
namespace test {

class AggregateSQLTests : public PelotonTest {};

TEST_F(AggregateSQLTests, EmptyTableTest) {
  PL_ASSERT(&TestingSQLUtil::counter_);
  PL_ASSERT(&TestingSQLUtil::traffic_cop_);
  auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
  auto txn = txn_manager.BeginTransaction();
  catalog::Catalog::GetInstance()->CreateDatabase(DEFAULT_DB_NAME, txn);
  txn_manager.CommitTransaction(txn);

  // Create a table first
  TestingSQLUtil::ExecuteSQLQuery(
      "CREATE TABLE xxx(a INT PRIMARY KEY, b INT);");
  LOG_DEBUG("execute one query");
  std::vector<ResultValue> result;
  std::vector<FieldInfo> tuple_descriptor;
  std::string error_message;
  int rows_affected;
//  optimizer::Optimizer optimizer;

  // All of these aggregates should return null
  std::vector<std::string> nullAggregates = {"MIN", "MAX", "AVG", "SUM"};
  std::vector<type::TypeId> expectedTypes = {
      type::TypeId::INTEGER, type::TypeId::INTEGER, type::TypeId::DECIMAL,
      type::TypeId::INTEGER};
  for (int i = 0; i < (int)nullAggregates.size(); i++) {
    std::string expected;

    std::ostringstream os;
    os << "SELECT " << nullAggregates[i] << "(b) FROM xxx";
    TestingSQLUtil::ExecuteSQLQuery(os.str(), result, tuple_descriptor,
                                    rows_affected, error_message);
    std::string resultStr(result[0].begin(), result[0].end());

    EXPECT_EQ(expected, resultStr);
  }

  // These aggregates should return zero
  std::vector<std::string> zeroAggregates = {"COUNT"};
  for (int i = 0; i < (int)zeroAggregates.size(); i++) {
    std::string expected = type::ValueFactory::GetIntegerValue(0).ToString();

    std::ostringstream os;
    os << "SELECT " << zeroAggregates[i] << "(b) FROM xxx";
    TestingSQLUtil::ExecuteSQLQuery(os.str(), result, tuple_descriptor,
                                    rows_affected, error_message);
    std::string resultStr(result[0].begin(), result[0].end());

    EXPECT_EQ(expected, resultStr);
  }
}

TEST_F(AggregateSQLTests, MinMaxTest) {
  // Create a table first
  // TODO: LM: I didn't test boolean here because we can't insert booleans
  // into the table
  TestingSQLUtil::ExecuteSQLQuery(
      "CREATE TABLE test(a INT PRIMARY KEY, b SMALLINT, c "
      "INT, d BIGINT, e DECIMAL, f DOUBLE, g VARCHAR, h TIMESTAMP);");

  // Insert tuples into table
  TestingSQLUtil::ExecuteSQLQuery(
      "INSERT INTO test VALUES (2, 2, 2, 2, 2.0, "
      "2.0, '23', '2016-12-06 00:00:02-04');");
  TestingSQLUtil::ExecuteSQLQuery(
      "INSERT INTO test VALUES (1, 1, 1, 1, 1.0, "
      "1.0, '15', '2016-12-06 00:00:01-04');");
  TestingSQLUtil::ExecuteSQLQuery(
      "INSERT INTO test VALUES (4, 4, 4, 4, 4.0, "
      "4.0, '41', '2016-12-06 00:00:04-04');");
  TestingSQLUtil::ExecuteSQLQuery(
      "INSERT INTO test VALUES (3, 3, 3, 3, 3.0, "
      "3.0, '33', '2016-12-06 00:00:03-04');");

  TestingSQLUtil::ShowTable(DEFAULT_DB_NAME, "test");

  std::vector<ResultValue> result;
  std::vector<FieldInfo> tuple_descriptor;
  std::string error_message;
  int rows_affected;
//  optimizer::Optimizer optimizer;

  // test small int
  TestingSQLUtil::ExecuteSQLQuery("SELECT min(b) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  // Check the return value
  EXPECT_EQ(result[0][0], '1');
  // Check the return type
  // TODO: LM: Right now we cannot deduce TINYINT
  // EXPECT_EQ(PostgresValueType::TINYINT, std::get<1>(tuple_descriptor[0]));

  TestingSQLUtil::ExecuteSQLQuery("SELECT max(b) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '4');
  // EXPECT_EQ(PostgresValueType::TINYINT, std::get<1>(tuple_descriptor[0]));

  // test int
  TestingSQLUtil::ExecuteSQLQuery("SELECT min(a) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  // Check the return value
  EXPECT_EQ(result[0][0], '1');
  // Check the return type
  EXPECT_EQ(static_cast<oid_t>(PostgresValueType::INTEGER),
            std::get<1>(tuple_descriptor[0]));

  TestingSQLUtil::ExecuteSQLQuery("SELECT max(a) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '4');
  EXPECT_EQ(static_cast<oid_t>(PostgresValueType::INTEGER),
            std::get<1>(tuple_descriptor[0]));

  // test big int
  TestingSQLUtil::ExecuteSQLQuery("SELECT min(d) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '1');
  // Check the return type
  // TODO: LM: Right now we cannot deduce BIGINT
  // EXPECT_EQ(PostgresValueType::BIGINT,
  //          std::get<1>(tuple_descriptor[0]));

  TestingSQLUtil::ExecuteSQLQuery("SELECT max(d) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '4');
  // EXPECT_EQ(PostgresValueType::BIGINT,
  //          std::get<1>(tuple_descriptor[0]));

  // test double
  TestingSQLUtil::ExecuteSQLQuery("SELECT min(e) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '1');
  EXPECT_EQ(static_cast<oid_t>(PostgresValueType::DOUBLE),
            std::get<1>(tuple_descriptor[0]));

  TestingSQLUtil::ExecuteSQLQuery("SELECT max(e) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '4');
  EXPECT_EQ(static_cast<oid_t>(PostgresValueType::DOUBLE),
            std::get<1>(tuple_descriptor[0]));

  // test decimal
  TestingSQLUtil::ExecuteSQLQuery("SELECT min(f) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '1');
  // Right now we treat all double and decimal as double
  EXPECT_EQ(static_cast<oid_t>(PostgresValueType::DOUBLE),
            std::get<1>(tuple_descriptor[0]));

  TestingSQLUtil::ExecuteSQLQuery("SELECT max(f) from test", result,
                                  tuple_descriptor, rows_affected,
                                  error_message);
  EXPECT_EQ(result[0][0], '4');
  EXPECT_EQ(static_cast<oid_t>(PostgresValueType::DOUBLE),
            std::get<1>(tuple_descriptor[0]));

  // test varchar
  TestingSQLUtil::ExecuteSQLQuery("SELECT min(g) from test", result);
  EXPECT_EQ(result[0][0], '1');
  TestingSQLUtil::ExecuteSQLQuery("SELECT max(g) from test", result);
  EXPECT_EQ(result[0][0], '4');

  // test timestamp
  TestingSQLUtil::ExecuteSQLQuery("SELECT min(h) from test", result);
  EXPECT_EQ(result[0][18], '1');
  TestingSQLUtil::ExecuteSQLQuery("SELECT max(h) from test", result);
  EXPECT_EQ(result[0][18], '4');

  // free the database just created
  auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
  auto txn = txn_manager.BeginTransaction();
  catalog::Catalog::GetInstance()->DropDatabaseWithName(DEFAULT_DB_NAME, txn);
  txn_manager.CommitTransaction(txn);
  LOG_DEBUG("Finish test");
}

}  // namespace test
}  // namespace peloton


text:
{% extends "base.html" %}

{% load bootstrap_toolkit i18n strings %}

{% block title %}{% trans "file upload doc" %} §{{ docid.id }}{% endblock %}

{% block content %}

{% trans "doc" %} §{{ docid.id }} {{ docid }}

	<form id="data" name="data" action="" method="post" enctype="multipart/form-data">
  {% csrf_token %}
  {{ form|as_bootstrap:"vertical" }}

	<input class="btn btn-primary" type="submit" value="{% trans "upload" %}" />
	</form>

{% endblock %}


text:
require 'rails_helper'

RSpec.describe Item, type: :model do
  it "should require a price" do
    item = Item.new({ description: "Nintendo Entertainment System" })
    expect(item.valid?).to eq(false)
  end

  it "should require a description" do
    item = Item.new({ price: 29.99 })
    expect(item.valid?).to be(false)
  end

  it "should require a unique description but not price" do
    item1 = Item.new({ price: 245.99, description: "Samsung TV" })
    expect(item1.valid?).to be(true)
    item1.save!

    item2 = Item.new({ price: 299.99, description: "Samsung TV" })
    expect(item2.valid?).to be(false)
  end

  it "should allow 2 different items to be sold at the same price" do
    item1 = Item.new({ price: 199.99, description: "Super Nintendo" })
    expect(item1.valid?).to be(true)
    item1.save!

    item2 = Item.new({ price: 199.99, description: "Sega Genesis" })
    expect(item2.valid?).to be(true)
    item2.save!
  end

  it "should not allow saving 2 identical items" do
    item1 = Item.new({ price: 199.99, description: "Intellivision" })
    expect(item1.valid?).to be(true)
    item1.save!

    item2 = Item.new({ price: 199.99, description: "Intellivision" })
    expect(item2.valid?).to be(false)
    expect { item2.save! }.to raise_error(ActiveRecord::RecordInvalid)
  end
end


text:
#import <Cocoa/Cocoa.h>

/**
 @class CLASS_HERE
 DESCRIPTION_HERE
 @since Available in M3AppKit 1.0 and later
 */
@interface M3PittedRubberView : NSView {
	NSImage *dots;
}

/**
 ABSTRACT_HERE
 DISCUSSION_HERE
 @param PARAM_HERE
 @param PARAM_HERE
 @result RESULT_HERE
 @since Available in M3AppKit 1.0 and later
 */
- (void)drawDots;

@end


text:
<?php

namespace Cecil\Renderer;

use Cecil\Collection\Page\Page as PageItem;
use Cecil\Config;

/**
 * Class Renderer\Page.
 */
class Page
{
    /** @var Config */
    protected $config;

    public function __construct(Config $config)
    {
        $this->config = $config;
    }

    /**
     * Returns the path to the output (rendered) file.
     *
     * Use cases:
     * - default: path + suffix + extension (ie: blog/post-1/index.html)
     * - subpath: path + subpath + suffix + extension (ie: blog/post-1/amp/index.html)
     * - ugly: path + extension (ie: 404.html, sitemap.xml, robots.txt)
     * - path only (ie: _redirects)
     * - l10n: language + path + suffix + extension (ie: fr/blog/page/index.html)
     *
     * @param string $format Output format (ie: html, amp, json, etc.)
     */
    public function getOutputFile(PageItem $page, string $format): string
    {
        $path = $page->getPath();
        $subpath = (string) $this->config->getOutputFormatProperty($format, 'subpath');
        $suffix = (string) $this->config->getOutputFormatProperty($format, 'suffix');
        $extension = (string) $this->config->getOutputFormatProperty($format, 'extension');
        $uglyurl = (bool) $page->getVariable('uglyurl');
        $language = $page->getVariable('language');
        // if ugly URL: not suffix
        if ($uglyurl) {
            $suffix = '';
        }
        // add extension
        if ($extension) {
            $extension = \sprintf('.%s', $extension);
        }
        // homepage special case: path = 'index'
        if (empty($path) && empty($suffix)) {
            $path = 'index';
        }
        // do not prefix URL for default language
        if ($language == $this->config->getLanguageDefault() || $language === null) {
            $language = '';
        }

        return \Cecil\Util::joinPath($language, $path, $subpath, $suffix).$extension;
    }

    /**
     * Returns the public URL.
     *
     * @param string $format Output format (ie: html, amp, json, etc.)
     */
    public function getUrl(PageItem $page, string $format = 'html'): string
    {
        $uglyurl = $page->getVariable('uglyurl') ? true : false;
        $output = $this->getOutputFile($page, $format);

        if (!$uglyurl) {
            $output = str_replace('index.html', '', $output);
        }

        return $output;
    }
}


text:
@implementation QHCUserModel

@end


text:
package enumeratum.internal

import scala.language.experimental.macros
import scala.reflect.macros.blackbox.Context

private[internal] trait TypeNameRuntimePlatform {
  implicit final def typeName[A]: TypeName[A] =
    macro TypeNameRuntimePlatform.typeName[A]
}

private[internal] object TypeNameRuntimePlatform {
  final def typeName[A](c: Context): c.Expr[TypeName[A]] = {
    import c.universe._
    val TypeApply(_, List(typeTree)) = c.macroApplication: @unchecked
    c.Expr(q"_root_.enumeratum.internal.TypeName(${typeTree.toString})")
  }
}