text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (c) 2014 Kinvey Inc.
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software distributed under the License
  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  or implied. See the License for the specific language governing permissions and limitations under
  the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#fff3f3f3"
    android:orientation="vertical"
    tools:context=".CityWatchActivity" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >

            <ImageView
                android:id="@+id/edit_details_image"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:padding="10dp"
                android:scaleType="center"
                android:contentDescription="@string/incident_image"
                android:src="@drawable/ic_menu_camera" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:orientation="vertical"
                android:padding="10dp" >

                <TextView
                    android:id="@+id/header_edit_details"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="5dp"
                    android:text="@string/create_report"
                    android:textSize="36dp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="#ffffff"
                    android:orientation="horizontal"
                    android:paddingBottom="10dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp"
                    android:paddingTop="10dp" >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="3"
                        android:gravity="right"
                        android:text="@string/name"
                        android:textSize="14sp" />

                    <EditText
                        android:id="@+id/edit_details_name"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:hint="@string/name_hint"
                        android:paddingLeft="5dp"
                        android:textSize="14sp" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#969696" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="#ffffff"
                    android:orientation="horizontal"
                    android:paddingBottom="10dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp"
                    android:paddingTop="10dp" >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="3"
                        android:gravity="right"
                        android:text="@string/category"
                        android:textSize="14sp" />

                    <Spinner
                        android:id="@+id/edit_details_category"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:paddingLeft="5dp"
                        android:text="@string/wildlife"
                        android:textSize="14sp" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#969696" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="#ffffff"
                    android:orientation="horizontal"
                    android:paddingBottom="10dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp"
                    android:paddingTop="10dp" >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="3"
                        android:gravity="right"
                        android:text="@string/location"
                        android:textSize="14sp" />

                    <EditText
                        android:id="@+id/edit_details_location"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:hint="@string/address_hint"
                        android:paddingLeft="5dp"
                        android:textSize="14sp" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#969696" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="#ffffff"
                    android:orientation="horizontal"
                    android:paddingBottom="10dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp"
                    android:paddingTop="10dp" >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="3"
                        android:gravity="right"
                        android:text="@string/description"
                        android:textSize="14sp" />

                    <EditText
                        android:id="@+id/edit_details_description"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:hint="@string/description_hint"
                        android:paddingLeft="5dp"
                        android:textSize="14sp" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#969696" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="#ffffff"
                    android:orientation="horizontal"
                    android:paddingBottom="10dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp"
                    android:paddingTop="10dp" >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="3"
                        android:gravity="right"
                        android:text="@string/severity"
                        android:textSize="14sp" />

                    <Spinner
                        android:id="@+id/edit_details_severity"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:paddingLeft="5dp"
                        android:text="@string/severity_high"
                        android:textSize="14sp" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#969696" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="#ffffff"
                    android:orientation="horizontal"
                    android:paddingBottom="10dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp"
                    android:paddingTop="10dp" >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="3"
                        android:gravity="right"
                        android:text="@string/risk"
                        android:textSize="14sp" />

                    <Spinner
                        android:id="@+id/edit_details_risk"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:paddingLeft="5dp"
                        android:text="@string/risk_none"
                        android:textSize="14sp" />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </ScrollView>


text:
clone-all
=========

Clone all the github repositories of a particular user.

This package is available on [hackage](http://hackage.haskell.org/package/clone-all)
so can be installed with

````
cabal install clone-all
````

Alternatively, you can clone this repo and install with cabal

````
git clone https://github.com/silky/clone-all.git
cd clone-all
cabal install
````

Example usage:

    mkdir temp
    clone-all temp -u silky

This will clone all the repositories I have (note: It's a lot.)

````
Usage: clone-all [DIRECTORY] (-u|--user ARG)

Available options:
  -h,--help                Show this help text
  DIRECTORY                Directory to clone everything into
  -u,--user ARG            Name of the user to clone the repos of.
````

redpajama_set_name: RedPajamaGithub


text:
from .proxy_resource import ProxyResource

class TrafficManagerGeographicHierarchy(ProxyResource):
    """Class representing the Geographic hierarchy used with the Geographic
    traffic routing method.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar id: Fully qualified resource Id for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
    :vartype id: str
    :ivar name: The name of the resource
    :vartype name: str
    :ivar type: The type of the resource. Ex-
     Microsoft.Network/trafficmanagerProfiles.
    :vartype type: str
    :param geographic_hierarchy: The region at the root of the hierarchy from
     all the regions in the hierarchy can be retrieved.
    :type geographic_hierarchy: :class:`Region
     <azure.mgmt.trafficmanager.models.Region>`
    """

    _validation = {
        'id': {'readonly': True},
        'name': {'readonly': True},
        'type': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'},
    }

    def __init__(self, geographic_hierarchy=None):
        super(TrafficManagerGeographicHierarchy, self).__init__()
        self.geographic_hierarchy = geographic_hierarchy


text:
from setuptools import setup
import os.path

import versioneer

setup(name='conda-execute',
      version=versioneer.get_version(),
      description='A tool for executing scripts in a consistent environment.',
      author='Phil Elson',
      author_email='pelson.pub@gmail.com',
      url='https://github.com/pelson/conda-execute',
      packages=['conda_execute'],
      entry_points={
          'console_scripts': [
              'conda-execute = conda_execute.execute:main',
              'conda-tmpenv = conda_execute.tmpenv:main',
          ]
      },
      cmdclass=versioneer.get_cmdclass(),
     )


text:
use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
use ::test::run_test;

#[test]
fn cvtsd2ss_1() {
    run_test(&Instruction { mnemonic: Mnemonic::CVTSD2SS, operand1: Some(Direct(XMM3)), operand2: Some(Direct(XMM0)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[242, 15, 90, 216], OperandSize::Dword)
}

#[test]
fn cvtsd2ss_2() {
    run_test(&Instruction { mnemonic: Mnemonic::CVTSD2SS, operand1: Some(Direct(XMM3)), operand2: Some(IndirectScaledDisplaced(EDI, Four, 2123315284, Some(OperandSize::Qword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[242, 15, 90, 28, 189, 84, 56, 143, 126], OperandSize::Dword)
}

#[test]
fn cvtsd2ss_3() {
    run_test(&Instruction { mnemonic: Mnemonic::CVTSD2SS, operand1: Some(Direct(XMM0)), operand2: Some(Direct(XMM2)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[242, 15, 90, 194], OperandSize::Qword)
}

#[test]
fn cvtsd2ss_4() {
    run_test(&Instruction { mnemonic: Mnemonic::CVTSD2SS, operand1: Some(Direct(XMM2)), operand2: Some(IndirectDisplaced(RBX, 1833285246, Some(OperandSize::Qword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[242, 15, 90, 147, 126, 182, 69, 109], OperandSize::Qword)
}


text:
using System;
using System.IO;

namespace Sourcerer.Persistence.Disk
{
    public interface ICustomSerializer
    {
        [Obsolete]
        void Serialize(Stream stream, object item);

        byte[] Serialize(object o);

        [Obsolete]
        T Deserialize<T>(Stream stream);

        T Deserialize<T>(byte[] bytes);
    }
}


text:
package io.android_tech.myexample.Location;

import android.content.Context;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.content.ContextCompat;
import android.widget.Toast;

import io.android_tech.myexample.R;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.LatLng;

public class Location_07_Activity extends FragmentActivity {
    MyListener gpsListener = new MyListener();
    GoogleMap map;
    boolean isMoved = false;
    private LocationManager manager;
    private String provider;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_location_04);

        LocationManager manager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
        long minTime = 1000;
        float minDistance = 0;

        if ( Build.VERSION.SDK_INT >= 23 &&
                ContextCompat.checkSelfPermission( this, android.Manifest.permission.ACCESS_FINE_LOCATION ) != PackageManager.PERMISSION_GRANTED &&
                ContextCompat.checkSelfPermission( this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
            return  ;
        }

        manager.requestLocationUpdates(LocationManager.GPS_PROVIDER, minTime, minDistance, gpsListener);
    }

    private class MyListener implements LocationListener {
        public void onLocationChanged(Location location) {
            if (!isMoved) {
                isMoved = true;
                Double latitude = location.getLatitude();
                Double longitude = location.getLongitude();
                String msg = "Latitude : " + latitude + "\nLongitude:" + longitude;
                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();

                LatLng curPoint = new LatLng(latitude, longitude);
                map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
                map.animateCamera(CameraUpdateFactory.newLatLngZoom(curPoint, 15));
            }
        }

        public void onProviderDisabled(String provider) {
        }

        public void onProviderEnabled(String provider) {
        }

        public void onStatusChanged(String provider, int status, Bundle extras) {
        }
    }

}


text:
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;
using System.Threading.Tasks;
using Dapper;
using Kachuwa.Data;
using Kachuwa.Data.Extension;
using Kachuwa.OTP.Model;
using PureOtp;

namespace Kachuwa.OTP.Services
{
    public class OTPService: IOTPService
    {
        public OTPService()
        {

        }

        public CrudService<OTPSetting> SettingService { get; set; }=new CrudService<OTPSetting>();
        public CrudService<UserSecretKey> UserSecretService { get; set; }=new CrudService<UserSecretKey>();
        public CrudService<UserOTP> OTPLogService { get; set; }=new CrudService<UserOTP>();

        private async Task<string> GetUserSecret(long userId)
        {

            var dbFactory = DbFactoryProvider.GetFactory();
            using (var db = (DbConnection)dbFactory.GetConnection())
            {
                await db.OpenAsync();
               return await db.ExecuteScalarAsync<string>("select SecretKey from  [dbo].[UserSecretKey] Where UserId=@UserId " ,new { UserId = userId});
            }
        }

        public async Task<string> Generate(long userId)
        {
            var us = await GetUserSecret(userId);
            if (string.IsNullOrEmpty(us))
            {
                Guid g = Guid.NewGuid();
                string guidString = Convert.ToBase64String(g.ToByteArray());
                guidString = guidString.Replace("=", "");
                guidString = guidString.Replace("+", "");
                us = guidString;
                var userSec = new UserSecretKey
                {
                    UserId = userId,
                    SecretKey = us
                };
                userSec.AutoFill();
               await  UserSecretService.InsertAsync<long>(userSec);
            }
            var totp = new PureOtp.Totp(Encoding.UTF8.GetBytes(us),300);
            var otpCode = totp.ComputeTotp();
            var otpLog = new UserOTP {OTPCode = otpCode, UserId = userId};
           await  OTPLogService.InsertAsync(otpLog);
            return otpCode;
        }

        public async Task<bool> Verify(string otpCode, long userId)
        {
            var us = await GetUserSecret(userId);
            var totp = new PureOtp.Totp(Encoding.UTF8.GetBytes(us), 300);
            var isGood = totp.VerifyTotp(otpCode, out var timeStepMatched, VerificationWindow.RfcSpecifiedNetworkDelay);
            var otpLog = new UserOTP { OTPCode = otpCode, UserId = userId,IsExpired = true};
            await OTPLogService.UpdateAsync(otpLog, " Where UserId=@UserId and OTPCode=@OTPCode", new {  IsExpired = true, UserId =userId, OTPCode= otpCode });
            return isGood;
        }
    }
}


text:
See [here](../user/turbinia-local-stack.md) on how to setup the local Turbinia stack with Docker.

After you have the local stack up and running a usual development cycle would look like below.

## Before you start
*   Check out the [How it Works](../user/how-it-works.md) page to see how the different
    components work within Turbinia.
*   Make sure to follow the Turbinia
    [developer contribution guide](contributing.md).

#### Step 1
Fork Turbinia on github and create a new feature branch to work on.
```
$ git clone https://github.com/[your-github-user-id]/turbinia.git
$ git checkout -b my-new-feature
$ cd turbinia
```
#### Step 2
Add some awesome new feature, maybe [develop a new task](./developing-new-tasks.md)?
#### Step 3
Rebuild Turbinia server and/or worker Docker images.
```
$ docker build -t turbinia-worker-dev -f docker/worker/Dockerfile .
```
#### Step 4
Change the ```image:``` location in the ```docker/local/docker-compose.yml``` file to point to your localy build image (eg turbinia-worker-dev).

#### Step 5
Let's bring up the local Turbinia stack
```
$ docker-compose -f ./docker/local/docker-compose.yml up
```
#### Step 6
Let's process evidence to test your setup, in this case a Chrome Browser history file but you will likely want to use specific evidence to test your new functionality.
```
$ curl https://raw.githubusercontent.com/obsidianforensics/hindsight/master/tests/fixtures/profiles/60/History > History
$ tar -vzcf ./evidence/history.tgz History
$ docker exec -ti turbinia-server turbiniactl compresseddirectory -l /evidence/history.tgz
```
This will create a task in Turbinia to process the evidence file. A task ID will be returned and we can query the status with below command.
```
$ docker exec -ti turbinia-server turbiniactl -a status -r b998efb5dcb64949963d9c72ba143c1a
```
#### Step 7
Test and debug your new feature and repeat steps 1-7 until satisfied.


text:
using System;
using System.Threading.Tasks;
using Nethereum.JsonRpc.Client;
using Nethereum.RPC.Web3;

namespace Nethereum.RPC.Tests.Testers
{
    public class Web3ClientVersionTester : IRPCRequestTester
    {
        public async Task<object> ExecuteTestAsync(IClient client)
        {
            var web3ClientVersion = new Web3ClientVersion(client);
            return await web3ClientVersion.SendRequestAsync().ConfigureAwait(false);
        }

        public Type GetRequestType()
        {
            return typeof (Web3ClientVersion);
        }
    }
}


text:
package armdatadog_test

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog"
)

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json
func ExampleMonitorsClient_GetDefaultKey() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefaultKey(ctx,
		"myResourceGroup",
		"myMonitor",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json
func ExampleMonitorsClient_SetDefaultKey() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.SetDefaultKey(ctx,
		"myResourceGroup",
		"myMonitor",
		&armdatadog.MonitorsClientSetDefaultKeyOptions{Body: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json
func ExampleMonitorsClient_NewListHostsPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListHostsPager("myResourceGroup",
		"myMonitor",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json
func ExampleMonitorsClient_NewListLinkedResourcesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListLinkedResourcesPager("myResourceGroup",
		"myMonitor",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json
func ExampleMonitorsClient_NewListMonitoredResourcesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListMonitoredResourcesPager("myResourceGroup",
		"myMonitor",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json
func ExampleMonitorsClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json
func ExampleMonitorsClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json
func ExampleMonitorsClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"myMonitor",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json
func ExampleMonitorsClient_BeginCreate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"myResourceGroup",
		"myMonitor",
		&armdatadog.MonitorsClientBeginCreateOptions{Body: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json
func ExampleMonitorsClient_BeginUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx,
		"myResourceGroup",
		"myMonitor",
		&armdatadog.MonitorsClientBeginUpdateOptions{Body: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json
func ExampleMonitorsClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"myMonitor",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json
func ExampleMonitorsClient_RefreshSetPasswordLink() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdatadog.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.RefreshSetPasswordLink(ctx,
		"myResourceGroup",
		"myMonitor",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}


text:
package tp.skt.onem2m.binder.mqtt_v1_1.response;

import com.google.gson.annotations.Expose;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

import tp.skt.onem2m.binder.mqtt_v1_1.Definitions;
import tp.skt.onem2m.net.mqtt.MQTTUtils;

@Root(strict = false)
public class AEResponse extends ResponseBase {

    @Element(required = false)
    private Pc pc;

    /**
     * get resource type
     *
     * @return ty
     */
    public String getTy() {
        return pc.ae.ty;
    }

    /**
     * get resource id
     *
     * @return ri
     */
    public String getRi() {
        return pc.ae.ri;
    }

    /**
     * get resource name
     *
     * @return rn
     */
    public String getRn() {
        return pc.ae.rn;
    }

    /**
     * get parent id
     *
     * @return pi
     */
    public String getPi() {
        return pc.ae.pi;
    }

    /**
     * get creation time
     *
     * @return ct
     */
    public String getCt() {
        return pc.ae.ct;
    }

    /**
     * get last modified time
     *
     * @return lt
     */
    public String getLt() {
        return pc.ae.lt;
    }

    /**
     * get appName
     *
     * @return apn
     */
    public String getApn() {
        return pc.ae.apn;
    }

    /**
     * get App-ID
     *
     * @return api
     */
    public String getApi() {
        return pc.ae.api;
    }

    /**
     * get AE-ID
     *
     * @return aei
     */
    public String getAei() {
        return pc.ae.aei;
    }

    @Root
    private static class Pc {

        @Element(required = false)
        private Ae ae;

        @Root
        private static class Ae {
            @Expose
            @Element(required = false)
            private String ty;

            @Expose
            @Element(required = false)
            private String ri;

            @Expose
            @Element(required = false)
            private String rn;

            @Expose
            @Element(required = false)
            private String pi;

            @Expose
            @Element(required = false)
            private String ct;

            @Expose
            @Element(required = false)
            private String lt;

            @Expose
            @Element(required = false)
            private String apn;

            @Expose
            @Element(required = false)
            private String api;

            @Expose
            @Element(required = false)
            private String aei;
        }
    }

    @Override
    public String getRequestIdentifier() {
        return null;
    }

    @Override
    public void print() {
        MQTTUtils.log("[" + Definitions.getResourceName(Definitions.ResourceType.AE) + "]");
        super.print();
        if (pc.ae == null) return;
        MQTTUtils.log("ty : " + pc.ae.ty);
        MQTTUtils.log("ri : " + pc.ae.ri);
        MQTTUtils.log("rn : " + pc.ae.rn);
        MQTTUtils.log("ct : " + pc.ae.ct);
        MQTTUtils.log("lt : " + pc.ae.lt);
        MQTTUtils.log("apn : " + pc.ae.apn);
        MQTTUtils.log("api : " + pc.ae.api);
        MQTTUtils.log("aei : " + pc.ae.aei);
    }
}


text:
import * as React from "react";
import { CarbonIconProps } from "../../";
declare const IotPlatform32: React.ForwardRefExoticComponent<
  CarbonIconProps & React.RefAttributes<SVGSVGElement>
>;
export default IotPlatform32;


text:
package com.fortutech.tcheckit.ejb.sessions;

import java.util.Hashtable;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;

public final class ResponseQuestionInputNumber extends SoapObject {
    private java.lang.Float oneAnswer;

    public ResponseQuestionInputNumber() {
        super("", "");
    }
    public void setOneAnswer(java.lang.Float oneAnswer) {
        this.oneAnswer = oneAnswer;
    }

    public java.lang.Float getOneAnswer(java.lang.Float oneAnswer) {
        return this.oneAnswer;
    }

    public int getPropertyCount() {
        return 1;
    }

    public Object getProperty(int __index) {
        switch(__index)  {
        case 0: return oneAnswer;
        }
        return null;
    }

    public void setProperty(int __index, Object __obj) {
        switch(__index)  {
        case 0: oneAnswer = (java.lang.Float) __obj; break;
        }
    }

    public void getPropertyInfo(int __index, Hashtable __table, PropertyInfo __info) {
        switch(__index)  {
        case 0:
            __info.name = "oneAnswer";
            __info.type = java.lang.Float.class; break;
        }
    }

}


text:
Use Uploadify
=============

Download [Uploadify](http://www.uploadify.com/download/) and include it in your template. Connect the `uploader` property to the dynamic route `_uploader_{mapping_name}` and include the FlashUploader file.

> If you are using UploadiFive, please drop me a note. I'd like to know if this bundle also works for the HTML5-Version of this frontend library.

```html

<script type="text/javascript" src="{{ asset('bundles/acmedemo/js/jquery.uploadify.js') }}"></script>
<script type="text/javascript">
$(document).ready(function()
{
    $('#fileupload').uploadify(
    {
        swf: "{{ asset('bundles/acmedemo/js/uploadify.swf') }}",
        uploader: "{{ oneup_uploader_endpoint('gallery') }}"
    });

});
</script>

<div id="fileupload" />
```

Configure the OneupUploaderBundle to use the correct controller:

```yaml
# app/config/config.yml

oneup_uploader:
    mappings:
        gallery:
            frontend: uploadify
```

Be sure to check out the [official manual](http://www.uploadify.com/documentation/) for details on the configuration.

Next steps
----------

After this setup, you can move on and implement some of the more advanced features. A full list is available [here](https://github.com/1up-lab/OneupUploaderBundle/blob/master/Resources/doc/index.md#next-steps).

* [Process uploaded files using custom logic](custom_logic.md)
* [Return custom data to frontend](response.md)
* [Include your own Namer](custom_namer.md)
* [Configuration Reference](configuration_reference.md)


text:
<?php
/**
 * Created by PhpStorm.
 * User: 01523931
 * Date: 12.09.2016
 * Time: 11:30
 */

namespace sapi\core\transactionCoordinator;

class SapiResponse {
    public $result;
    public $timestamp;
    public $errors;
}


text:
<?php

declare(strict_types = 1);

namespace OctoLab\Common\Doctrine\Util;

/**
 * @author Kamil Samigullin <kamil@samigullin.info>
 */
final class Limiter
{
    /** @var int */
    private $limit;
    /** @var int */
    private $offset;
    /** @var int */
    private $total;

    /**
     * @param int $limit how many records to get (e.g. LIMIT part of SQL queries)
     * @param int $offset how many records to skip (e.g. OFFSET part of SQL queries)
     * @param int|null $total how many total records were found (e.g. SELECT COUNT(*) FROM)
     *
     * @throws \InvalidArgumentException if the values are negative
     *
     * @api
     */
    public function __construct(int $limit, int $offset = 0, int $total = null)
    {
        if (min($limit, $offset, (int)$total) < 0) {
            throw new \InvalidArgumentException('Values must be unsigned.');
        }
        $this->total = $total ?: PHP_INT_MAX;
        $this->limit = min($limit, $this->total);
        $this->offset = $offset;
    }

    /**
     * @param int $table1Count
     * @param int $table2Count
     * @param int $limit
     * @param int $offset
     *
     * @return array<string,int>
     *
     * @api
     */
    public static function getTwoTablePagination(int $table1Count, int $table2Count, int $limit, int $offset = 0): array
    {
        \assert('$table1Count >= 0 && $table2Count >= 0 && $limit >= 0 && $offset >= 0');
        $offset1 = min($offset, $table1Count);
        $limit1 = min($limit, $table1Count - $offset1);
        $offset2 = min($offset - $offset1, $table2Count);
        $limit2 = min($limit - $limit1, $table2Count - $offset2);
        return [
            'limit1' => $limit1,
            'offset1' => $offset1,
            'limit2' => $limit2,
            'offset2' => $offset2,
        ];
    }

    /**
     * @return int
     *
     * @api
     */
    public function getLimit(): int
    {
        return $this->limit;
    }

    /**
     * @return int
     *
     * @api
     */
    public function getOffset(): int
    {
        return $this->offset;
    }

    /**
     * @return bool
     *
     * @api
     */
    public function hasPortion(): bool
    {
        return $this->offset < $this->total;
    }

    /**
     * @return Limiter
     *
     * @api
     */
    public function nextPortion(): Limiter
    {
        \assert('$this->limit > 0');
        if ($this->limit) {
            $this->offset = min($this->offset + $this->limit, $this->total);
            $this->limit = min($this->limit, $this->total - $this->offset);
        }
        return $this;
    }
}


text:
#ifndef ADPCM_H
#define ADPCM_H

#define MAX_ADPCM 8

/* NOTE: Actual sample data is specified in the sound_prom parameter of the game driver, but
   since the MAME code expects this to be an array of char *'s, we do a small kludge here */

struct ADPCMsample
{
	int num;       /* trigger number (-1 to mark the end) */
	int offset;    /* offset in that region */
	int length;    /* length of the sample */
};

/* a generic ADPCM interface, for unknown chips */

struct ADPCMinterface
{
	int num;			       /* total number of ADPCM decoders in the machine */
	int frequency;             /* playback frequency */
	int region;                /* memory region where the samples come from */
	void (*init)(const struct ADPCMinterface *, struct ADPCMsample *, int max); /* initialization function */
	int mixing_level[MAX_ADPCM];     /* master volume */
};

int ADPCM_sh_start(const struct MachineSound *msound);
void ADPCM_sh_stop(void);
void ADPCM_sh_update(void);

void ADPCM_trigger(int num, int which);
void ADPCM_play(int num, int offset, int length);
void ADPCM_setvol(int num, int vol);
void ADPCM_stop(int num);
int ADPCM_playing(int num);

/* an interface for the OKIM6295 and similar chips */

#define MAX_OKIM6295 			2
#define MAX_OKIM6295_VOICES		4
#define ALL_VOICES				-1

struct OKIM6295interface
{
	int num;                  		/* total number of chips */
	int frequency[MAX_OKIM6295];	/* playback frequency */
	int region[MAX_OKIM6295];		/* memory region where the sample ROM lives */
	int mixing_level[MAX_OKIM6295];	/* master volume */
};

int OKIM6295_sh_start(const struct MachineSound *msound);
void OKIM6295_sh_stop(void);
void OKIM6295_sh_update(void);
void OKIM6295_set_bank_base(int which, int voice, int base);	/* set voice to ALL_VOICES to set all banks at once */
void OKIM6295_set_frequency(int which, int voice, int frequency);	/* set voice to ALL_VOICES to set all banks at once */

READ_HANDLER( OKIM6295_status_0_r );
READ_HANDLER( OKIM6295_status_1_r );
WRITE_HANDLER( OKIM6295_data_0_w );
WRITE_HANDLER( OKIM6295_data_1_w );

#endif


text:
define(module, function(exports, require) {

  var qp = require('qp-utility');

  qp.make(exports, {

    ns: 'qp-model/model',

    $state: null,
    $members: null,

    init: function(o) {
      var data = qp.delete_key(o, this.schema.name);
      if (qp.defined(data) && data !== null) {
        this.set_data(data, o);
        this.$state = { created: o.create || false, modified: false, deleted: false };
        this.$members = [];
        if (o && o.display) this.initialise({ create: o.create });
        if (o && o.members) this.set_members(o.members);
        if (o && o.display) this.refresh();
      }
    },

    initialise: function(o) { },
    refresh: function() { },

    set_members: function(members) {
      qp.each_own(members, function(member, name) {
        this['set_' + name](member);
      }.bind(this));
    },

    add_member: function(name) {
      if (this.$members.indexOf(name) === -1) this.$members.push(name);
    },

    set_member: function(name, model, pk, fk) {
      pk = pk || 'id';
      fk = fk || (name + '_' + pk);
      var fk_value = this[fk];
      if (qp.is(model, 'array')) { model = qp.find(model, function(o) { return o[pk] === fk_value; }); }
      if (qp.is(model, 'object')) {
        this[name] = model;
        this[fk] = model[pk];
      }
      this.add_member(name);
    },

    set_list_member: function(name, model_list, pk, fk) {
      this[name] = qp.map(this[fk], function(id) {
        return qp.find(model_list, function(o) { return o[pk] === id; });
      });
      this.add_member(name);
    },

    set_user: function(user) { this.set_member('user', user); },

    set_data: function(source, options) {
      qp.each(this.schema.columns, function(column) {
        var key = column.name;
        if (column.primary || column.primary_key) {
          var _key = '_' + key;
          this[key] = source[key] || source[_key] || qp.id();
          this[_key] = source[key] || 0;
        } else if (column.datetime) {
          this[key] = qp.date(source[key]) || column.default();
        } else {
          this[key] = source[key] || column.default();
        }
      }.bind(this));
    },

    get_data: function(options) {
      var target = options ? (options.target || {}) : {};
      qp.each(this.schema.columns, function(column) {
        var key = column.name;
        if (column.primary || column.primary_key) {
          var _key = '_' + key;
          target[key] = this[key] === this[_key] ? this[key] : 0;
          target[_key] = this[key] || 0;
        } else if (column.datetime) {
          target[key] = qp.date(this[key], 'iso');
        } else {
          target[key] = this[key];
        }
      }.bind(this));
      return target;
    },

    clone: function() {
      var config = { display: true };
      config[this.schema.name] = this.get_data();
      var clone = this.self.create(config);
      qp.each(this.$members, function(name) {
        var member = this[name];
        if (member) {
          if (qp.is_array(member)) {
            clone['set_' + name](qp.map(member, function(item) { return (item.clone ? item.clone() : null); }));
          } else if (member.clone) {
            clone['set_' + name](member.clone());
          } else {
            clone['set_' + name](qp.clone(member));
          }
          clone.add_member(name);
        }
      }.bind(this));
      return clone;
    }

  });

});


text:
import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { task } from 'ember-concurrency';

export default Component.extend({
  router: service(),
  store: service(),
  flashMessages: service(),
  deleteAppearanceModal: false,
  deleteAppearanceModalError: false,
  deleteAppearance: task(function *() {
    try {
      yield this.model.destroyRecord({
        'by': this.get('currentUser.user.id'),
      });
      this.set('deleteAppearanceModal', false);
      this.set('deleteAppearanceModalError', false);
      this.flashMessages.success("Deleted!");
      this.router.transitionTo('dashboard.conventions.convention.sessions.session.rounds.round.appearances');
    } catch(e) {
      this.set('deleteAppearanceModalError', true);
    }
  }).drop(),
});


text:
"use strict";

var _ = require("lodash");

module.exports = function(tweets) {
    return _.flatten(tweets);
};


text:
package eu.intent.sdktests;

import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import eu.intent.sdk.api.ITRetrofitUtils;
import eu.intent.sdk.model.ITData;
import eu.intent.sdk.model.ITStream;

import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;

@RunWith(AndroidJUnit4.class)
public class ITStreamTest {
    @Test
    public void jsonToStreams() {
        String json = TestUtils.readRawFile(InstrumentationRegistry.getContext(), eu.intent.sdktests.test.R.raw.stream);
        ITStream stream = ITRetrofitUtils.getGson().fromJson(json, ITStream.class);
        assertEquals(1461757500884L, stream.lastUpdate);
        assertEquals("c1fe60e5-7f1e-4272-bd55-7b61adf9ecc8", stream.id);
        assertEquals("demo1", stream.owner);
        assertNotNull(stream.lastValue);
        assertEquals(1461754800000L, stream.lastValue.timestamp);
        assertEquals(ITData.TrustLevel.COMPUTED, stream.lastValue.trustLevel);
        assertEquals(22.416, stream.lastValue.value);
        assertTrue(Double.isNaN(stream.lastValue.valueMin));
        assertTrue(Double.isNaN(stream.lastValue.valueMax));
        assertEquals(7, stream.tags.size());
        assertEquals("airTempAgg", stream.tags.get("measureType"));
        assertEquals("celcius", stream.tags.get("unit"));
        assertEquals("inside", stream.tags.get("position"));
        assertEquals("AggSiteTemp", stream.tags.get("activityKey"));
        assertEquals("SITE-ROMAGNAT-000538", stream.tags.get("siteId"));
        assertEquals("temp", stream.tags.get("icon"));
        assertEquals("Site-Démo2", stream.tags.get("siteExternalRef"));
    }
}


text:
package qiita

import (
	"context"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"path"
	"runtime"
)

type Client struct {
	URL        *url.URL
	HTTPClient *http.Client
	Token      string
}

var userAgent = fmt.Sprintf("QiitaGoClient/%s (%s)", version, runtime.Version())

func NewClient(token string, config Config) (*Client, error) {
	parsedURL, err := url.ParseRequestURI(config.Endpoint)
	if err != nil {
		return nil, err
	}
	return &Client{
		URL:        parsedURL,
		HTTPClient: &http.Client{},
		Token:      token,
	}, nil
}

func (c *Client) newRequest(ctx context.Context, method, p string, body io.Reader) (*http.Request, error) {
	u := *c.URL
	u.Path = path.Join(c.URL.Path, p)
	req, err := http.NewRequest(method, u.String(), body)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	req.Header.Set("Authorization", "Bearer "+c.Token)
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("User-Agent", userAgent)
	return req, nil
}

func decodeBody(res *http.Response, out interface{}) error {
	defer res.Body.Close()
	decoder := json.NewDecoder(res.Body)
	return decoder.Decode(out)
}

func (c *Client) url(endpoint string) string {
	u := *c.URL
	u.Path = path.Join(c.URL.Path, endpoint)
	return u.String()
}

func (c *Client) do(ctx context.Context, req *http.Request) (*http.Response, error) {
	req.Header.Set("Authorization", "Bearer "+c.Token)
	req.Header.Set("User-Agent", userAgent)
	return c.HTTPClient.Do(req)
}

func (c *Client) get(ctx context.Context, endpoint string, rawQuery *string) (*http.Response, error) {
	req, err := http.NewRequest(http.MethodGet, c.url(endpoint), nil)
	if rawQuery != nil {
		req.URL.RawQuery = *rawQuery
	}
	if err != nil {
		return nil, err
	}
	return c.do(ctx, req)
}

func (client *Client) post(ctx context.Context, endpoint string, body io.Reader) (*http.Response, error) {
	req, err := http.NewRequest(http.MethodPost, client.url(endpoint), body)
	if err != nil {
		return nil, err
	}
	req.Header.Set("Content-Type", "application/json; charset=UTF-8")
	return client.do(ctx, req)
}

func (client *Client) patch(ctx context.Context, endpoint string, body io.Reader) (*http.Response, error) {
	req, err := http.NewRequest(http.MethodPatch, client.url(endpoint), body)
	if err != nil {
		return nil, err
	}
	req.Header.Set("Content-Type", "application/json; charset=UTF-8")
	return client.do(ctx, req)
}

func (client *Client) put(ctx context.Context, endpoint string, body io.Reader) (*http.Response, error) {
	req, err := http.NewRequest(http.MethodPut, client.url(endpoint), body)
	if err != nil {
		return nil, err
	}
	req.Header.Set("Content-Type", "application/json; charset=UTF-8")
	return client.do(ctx, req)
}

func (c *Client) delete(ctx context.Context, endpoint string) (*http.Response, error) {
	req, err := http.NewRequest(http.MethodDelete, c.url(endpoint), nil)
	if err != nil {
		return nil, err
	}
	return c.do(ctx, req)
}


text:
(function() {
  ////////////////////
  /* container size */
  ////////////////////
  var container = document.getElementsByClassName('container')[0];
  var resizeTimer;
  function resized() {
    container.style.minHeight = (window.innerWidth * 0.4) + 'px';
  }
  resized();
  function resize() {
    clearTimeout(resizeTimer);
    resizeTimer = setTimeout(resized, 500);
  }
  window.onresize = resize;

  ////////////
  /* clouds */
  ////////////
  clouds = [].slice.call(document.getElementsByClassName('cloud'));
  var startCloud = function(cloud, i, clouds) {
    // cloud.style.left = '100%';
    // cloud.style.transition = 'transform';
    var left = parseInt(window.getComputedStyle(cloud, null).left);
    var newLeft = window.innerWidth - left;
    cloud.style.transform = 'translateX(' + newLeft + 'px)';
    var resetTime = parseInt(window.getComputedStyle(cloud, null).transitionDuration) * 1000;
    setTimeout(function() {
        resetCloud(cloud);
      }, resetTime);
  };
  var resetCloud = function(cloud) {
    cloud.style.transition = 'none';
    cloud.style.transform = 'none';
    if (isSmall()) {
      cloud.style.left = '-30%';
    } else {
      cloud.style.left = '-15%';
    }
    setTimeout(function() {
      // var seconds = parseInt(Math.random() * (10 - 2) + 2);
      var seconds = parseInt(Math.random() * (120 - 60) + 60);
      var top = parseInt(Math.random() * 10);
      // cloud.style.transition = 'left ' + seconds + 's linear';
      // cloud.style.left = '100%';
      var left = parseInt(window.getComputedStyle(cloud, null).left);
      var newLeft = window.innerWidth - left;
      cloud.style.transition = 'transform ' + seconds + 's linear';
      cloud.style.top = top + '%';
      cloud.style.transform = 'translateX(' + newLeft + 'px)';
      setTimeout(function() {
        resetCloud(cloud);
      }, seconds * 1000);
    }, Math.random() * (9000) + 1000);

  };
  var setCloudTranslate = function() {

  };

  /////////////
  /* content */
  /////////////
  var section = document.getElementsByTagName('section')[0];

  var ground = document.getElementById('ground');
  var horizon = document.getElementById('horizon');

  // var sliders = [].slice.call(section.getElementsByTagName('p'));
  var prodTime = 6000;
  var fadeTime = '0.5s';
  var fadeTimeout = 500;
  var sliders = [];
  var prodNum = 0;
  var prodLink = document.createElement('a');
  container.appendChild(prodLink);
  prodLink.id = 'prod-link';

  var createSliders = function() {
    sliders = [].slice.call(section.children);
  };

  var startSlider = function(slider, i, sliders) {
    slider.style.opacity = '0';
    setTimeout(function() {
      showSlider(slider, i, sliders);
    }, fadeTimeout * (1 + i * 2));
  };

  var showSlider = function(slider, i, sliders) {
    slider.style.transition = 'opacity ' + fadeTime;
    slider.style.opacity = '1';
    if (i === sliders.length - 1) {
      setTimeout(startProductShow, prodTime);
    }
  };

  var hideSlider = function(slider) {
    slider.style.opacity = '0';
  };

  var startProductShow = function() {
    sliders.forEach(hideSlider);
    setTimeout(showProduct, fadeTimeout);
  };

  var showProduct = function() {
    section.innerHTML = '';

    var product = products[prodNum];
    prodNum += 1;
    if (prodNum >= products.length) {
      prodNum = 0;
    }
    var title = document.createElement('h1');
    var subtitle = document.createElement('h3');

    section.appendChild(title);
    section.appendChild(subtitle);

    title.innerHTML = product.title;
    title.style.opacity = '0';

    subtitle.innerHTML = product.excerpt;
    subtitle.style.opacity = '0';

    prodLink.style.transition = 'width ' + fadeTime + ' ease-in';
    prodLink.style.width = '0px';
    var prodImg = prodLink.getElementsByTagName('img')[0];
    if (prodImg) {
      prodImg.style.transition = 'transform ' + fadeTime + ' ease-in';
      prodImg.style.transform = 'rotate(180deg)';
      prodImg.style.border = 'thin solid transparent';
    }
    setTimeout(function() {
      prodLink.href = product.url;
      prodLink.innerHTML = product.img;
      // prodLink.style.bottom = horizon.clientHeight / 2.3 + 'px';
      // return;
      prodLink.style.transition = 'width ' + fadeTime + ' ease-out';
      var prodImg = prodLink.getElementsByTagName('img')[0];
      prodImg.style.border = 'none';
      prodImg.style.transform = 'rotate(-180deg)';
      prodImg.addEventListener('load', function() {
        setTimeout(function() {
          // prodLink.style.width = '';
          prodImg.style.border = '';
          // prodImg.style.border = 'thin solid transparent';
          prodImg.style.transition = 'transform ' + fadeTime + ' ease-out, border 0.25s';
          prodImg.style.transform = '';
          // if (isSmall()) {
          // var w = (window.innerHeight - subtitle.getBoundingClientRect().bottom - horizon.clientHeight / 2) / 1.5;
          var w = (window.innerHeight - subtitle.getBoundingClientRect().bottom) / 2;

          prodLink.style.width = w + 'px';
          // prodLink.style.bottom = (w/2) + 'px';
          prodLink.style.bottom = '10%';
          // } else {
          // prodLink.style.width = '200px';
          // }
          // prodLink.style.bottom = horizon.clientHeight + 'px';

          createSliders();
          sliders.forEach(startSlider);
        }, fadeTimeout);
      });
    }, fadeTimeout);
  };

  var isSmall = function() {
    return window.innerWidth <= 768;
  };
  ////////////////////////
  /* get things started */
  ////////////////////////
  document.addEventListener('DOMContentLoaded', function(event) {
    clouds.forEach(startCloud);
    createSliders();
    sliders.forEach(startSlider);
    /*debug*/
    // sliders.forEach(hideSlider);
    // showProduct();
  });

})();


text:
#include <quic/client/QuicClientAsyncTransport.h>

#include <folly/Conv.h>
#include <folly/experimental/symbolizer/Symbolizer.h>

namespace quic {

QuicClientAsyncTransport::QuicClientAsyncTransport(
    const std::shared_ptr<quic::QuicClientTransport>& clientSock) {
  setSocket(clientSock);
  clientSock->start(this, this);
}

void QuicClientAsyncTransport::onNewBidirectionalStream(
    StreamId /*id*/) noexcept {
  CHECK(false);
}
void QuicClientAsyncTransport::onNewUnidirectionalStream(
    StreamId /*id*/) noexcept {
  CHECK(false);
}

void QuicClientAsyncTransport::onStopSending(
    StreamId /*id*/,
    ApplicationErrorCode /*error*/) noexcept {}

void QuicClientAsyncTransport::onConnectionEnd() noexcept {
  folly::AsyncSocketException ex(
      folly::AsyncSocketException::UNKNOWN, "Quic connection ended");
  // TODO: closeNow inside this callback may actually trigger gracefull close
  closeNowImpl(std::move(ex));
}

void QuicClientAsyncTransport::onConnectionError(QuicError error) noexcept {
  folly::AsyncSocketException ex(
      folly::AsyncSocketException::UNKNOWN,
      folly::to<std::string>("Quic connection error", error.message));
  // TODO: closeNow inside this callback may actually trigger gracefull close
  closeNowImpl(std::move(ex));
}

void QuicClientAsyncTransport::onTransportReady() noexcept {
  auto streamId = sock_->createBidirectionalStream();
  if (!streamId) {
    folly::AsyncSocketException ex(
        folly::AsyncSocketException::UNKNOWN, "Quic failed to create stream");
    closeNowImpl(std::move(ex));
  }
  setStreamId(streamId.value());
}

} // namespace quic


text:
"""
This sample illustrates a simple LLVM IR -> PTX compiler implemented using
libNVVM. All command-line options are passed along to libNVVM. Arguments that
start with '-' are assumed to be options and are passed along accordingly.
Otherwise, options are treated as file names and are read as IR input(s). All
inputs will be linked together into a final PTX module.

NOTE: If you get errors about not being able to load libnvvm, please make sure
your [DY]LD_LIBRARY_PATH/PATH environment variable points to the libnvvm binary
in your CUDA installation, e.g.

  $ export LD_LIBRARY_PATH=/usr/local/cuda-5.5/nvvm/lib64
"""

import sys
from pynvvm.compiler import Program, ProgramException

if len(sys.argv) < 2:
    print('Usage: %s [options] ir-file-1 [ir-file-2 [ir-file-3 ...]]' % sys.argv[0])
    sys.exit(1)

try:
    # Create program object
    p = Program()
    options = []

    # Parse all options
    for a in sys.argv[1:]:
        if a.startswith('-'):
            # Treat as compiler option
            options.append(a)
        else:
            # Treat as compiler input
            with open(a, 'rb') as f:
                p.add_module(f.read())

    # Verify the input
    p.verify()

    # Run the compile
    ptx = p.compile(options)

    # Dump the output to stdout
    print(ptx)

    sys.exit(0)

except ProgramException as e:
    # An error occurred, dump it to stdout
    print('ERROR:\n%s\n' % repr(e))


text:
const express = require('express'),
    userController = require('../../modules/user/UserController'),
    requiredParameters = require('../../middleware/RequiredParameters.js');

module.exports = function(app){
/**
 * @api {post} /users/login Login registered user
 * @apiName postLogin
 * @apiGroup User
 *
 * @apiParam {String} username is currently email format.
 * @apiParam {String} password currently not encrypted!
 *
 * @apiSuccess {jwtToken} JWT Token containing user information without password.
 */
  app.post('/users/login',
            requiredParameters({body: ['username', 'password']}),
            userController.postLogin);
/**
 * @api {post} /users/register Registers new user
 * @apiName postRegister
 * @apiGroup User
 *
 * @apiParam {String} username checks to see if username not registered already.
 * @apiParam {String} company
 * @apiParam {String} password currently not encrypted!
 * @apiParam {String} admin Yes/no.
 *
 * @apiSuccess {jwtToken} JWT Token containing user information without password.
 */
  app.post('/users/register',
            requiredParameters({body: ['username', 'password']}),
            userController.postRegister);

/**
 * @api {post} /users/forgot Sends reset password token by email
 * @apiName postForgotPassword
 * @apiGroup User
 *
 * @apiParam {String} username if username registered, sends token email.
 *
 * @apiSuccess 200 Status ok
 */
  app.post('/users/forgot',
              requiredParameters({body: ['username']}),
              userController.postForgotPassword);
/**
 * @api {post} /users/forgot Sends reset password token by email
 * @apiName postResetPassword
 * @apiGroup User
 *
 * @apiParam {String} passwordResetToken JWT token found in the email, no database check.
 * @apiParam {String} newPassword the updated password
 *
 * @apiSuccess 200 Status ok
 */
  app.post('/users/reset',
              requiredParameters({body: ['passwordResetToken', 'newPassword']}),
              userController.postResetPassword);

/**
 * @api {post} /users/logout Writes on the log that user logged out. Since there is no session, not much to do - in the future can invalidate token if used in combination with Redis
 * Client side is expected to delete token.
 * TODO currently token is not informed to specify which user logged out.
 * @apiName postLogout
 *
 *
 * @apiSuccess 200 Status ok
 */
  app.post('/users/logout', userController.postLogout);
};


text:
This is a starting place for those wanting to learn how to run headless Jasmine JavaScript tests locally and on Travis CI.

Once you're familiar with how it works, it should be easy to add to your own projects.

Project includes:

* how to setup Jasmine gem

* sample Jasmine layout, created via `jasmine init`

* tweak of Rakefile to use 'jasmine:ci' task by default (for Travis and other CI systems)

* Travis CI integration via .travis.yml -- see [Travis CI Getting Started](http://about.travis-ci.org/docs/user/getting-started/)

# Setup and seeing test runner in action

1. Clone this repository

2. Ruby should already be installed on your system. Or install via Homebrew (on OSX). Or use Ruby Version Manager (https://rvm.io) if you want to isolate these Ruby dependencies.

3. Make sure you're in the root of the repository (which contains the gem and rake files)

4. Install dependencies using bundler

        # run 'gem install bundler' if you don't already have bundler
        bundle install

5. Run tests

        bundle exec rake jasmine    # for a local web server version at http://localhost:8888
        bundle exec rake            # for default headless CI version. See "How to run headless" below.

## How to run headless (for Continuous Integration)

Headless CI requires additional dependencies.

If running on your own desktop, just install Firefox.

If running on a server:

1. a virtual framebuffer such as Xvfb

2. a headless DOM via such as `iceweasel on Ubuntu` (which is headless Firefox), PhantomJS, etc.

Travis CI has these dependencies installed (see .travis.yml file). If you're
running your own CI server, you'll need to install these.

# Are we running ok on Travis CI?

[![Build Status](https://secure.travis-ci.org/briangershon/headless-jasmine-boilerplate.png?branch=master)](http://travis-ci.org/briangershon/headless-jasmine-boilerplate)

# Helpful resources

* New to Jasmine? Take a [Quick Tour](https://jasmine.github.io/). See also the ["Matchers" reference](https://jasmine.github.io/api/3.0/matchers.html) (Jasmine's equivalent to asserts).

* [Writing a CoffeeScript web application using TDD](http://watirmelon.com/2012/01/23/writing-a-coffeescript-web-application-using-tdd/)

* [Javascript Loves CI](http://www.zendesk.com/blog/javascript-loves-ci)

* [Travis CI Docs](http://about.travis-ci.org/docs/)

# Why Jasmine?

* enjoyable to use and easy to pickup. BDD-styled tests have nice readability.

* well supported, well maintained.

* JavaScript platform agnostic -- works fine with the JS libraries you're already using (jQuery, Closure Library, require.js, etc).

* popular in the industry.  Used by Cordova/PhoneGap for example.

* easy (easiest?) to run headless on server (via Jasmine Ruby Gem and a few dependencies).

* has spies and mocks built-in. There's also the [Sinon.js](http://sinonjs.org) library.


text:
<?php

require_once('core/action/Action.php');
require_once('core/action/ActionResponse_Default.php');
require_once('model/entities/ActionRestriction.php');
require_once('model/containers/ActionRestrictionContainer.php');
require_once('model/containers/AccessLevelContainer.php');
require_once('model/entities/AccessLevel.php');

class Action_actionRestriction_displayEditForm implements Action
{
	public function run(HttpRequest $httpRequest)
	{
		$actionResponse = new ActionResponse_Default();
		$actionRestrictionContainer = ActionRestrictionContainer::getInstance();

		$actionRestrictionId = $httpRequest->actionRestrictionId;

		if(isset($actionRestrictionId))
		{
			$actionRestriction = $actionRestrictionContainer->getById($actionRestrictionId);
		}
		else
		{
			throw new Exception('The required action restriction does not exist.');
		}

		$actionResponse->setElement('actionRestriction', $actionRestriction);

		$accessLevelContainer = AccessLevelContainer::getInstance();
		$accessLevels = $accessLevelContainer->getAll();

		$actionResponse->setElement('accessLevels', $accessLevels);

		return $actionResponse;
	}
}
?>


text:
require "sass"
require "sprockets"
require "sprockets-sass"

# Sass renderer
module Middleman::Renderers::Sass

  # Setup extension
  class << self

    # Once registered
    def registered(app)
      # Default sass options
      app.set :sass, {}
    end
    alias :included :registered
  end

  # A SassTemplate for Sprockets/Tilt which outputs debug messages
  class SassPlusCSSFilenameTemplate < ::Sprockets::Sass::SassTemplate

    # Add exception messaging
    # @param [Class] context
    # @param [Hash] locals
    # @return [String]
    def evaluate(context, locals, &block)
      begin
        super
      rescue Sass::SyntaxError => e
        Sass::SyntaxError.exception_to_css(e, :full_exception => true)
      end
    end

  protected
    # Change Sass path, for url functions, to the build folder if we're building
    # @return [Hash]
    def sass_options
      location_of_sass_file = if @context.build?
        File.expand_path(@context.build_dir, @context.root)
      else
        File.expand_path(@context.source, @context.root)
      end

      parts = basename.split('.')
      parts.pop
      css_filename = File.join(location_of_sass_file, @context.css_dir, parts.join("."))

      super.merge(:css_filename => css_filename)
    end
  end

  # Tell Sprockets to use our custom Sass template
  ::Sprockets.register_engine ".sass", SassPlusCSSFilenameTemplate

  # Tell Tilt to use it as well (for inline sass blocks)
  ::Tilt.register 'sass', SassPlusCSSFilenameTemplate
  ::Tilt.prefer(SassPlusCSSFilenameTemplate)

  # SCSS version of the above template
  class ScssPlusCSSFilenameTemplate < SassPlusCSSFilenameTemplate
    # Define the expected syntax for the template
    # @return [Symbol]
    def syntax
      :scss
    end
  end

  # Tell Sprockets to use our custom Scss template
  ::Sprockets.register_engine ".scss", ScssPlusCSSFilenameTemplate

  # Tell Tilt to use it as well (for inline scss blocks)
  ::Tilt.register 'scss', ScssPlusCSSFilenameTemplate
  ::Tilt.prefer(ScssPlusCSSFilenameTemplate)
end


text:
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ToyBox.Services
{
    interface IBasicQueryExecutorService
    {
        Task<IEnumerable<T>> ReadAsync<T>(string connString, string query) where T : class;
        Task<IEnumerable<T>> ReadAsync<T>(string connString, string query, dynamic args) where T : class;
    }
}


text:
package com.signalcollect.dcop.evaluation.bestresponse

import com.signalcollect.StateForwarderEdge
import com.signalcollect.interfaces.AggregationOperation
import com.signalcollect.ExecutionConfiguration
import com.signalcollect.Graph
import com.signalcollect.dcop.evaluation.candidates.BestResponseVertexBuilder
import com.signalcollect.dcop.evaluation.candidates.BinaryConstraintGraphProvider
import com.signalcollect.GraphBuilder
import com.signalcollect.configuration.TerminationReason
import com.signalcollect.dcop.util.ProblemConstants

class BRExecutor(file: String, config: ExecutionConfiguration,  isAdopt: Boolean, aggregation: AggregationOperation[Int], randomInit: Boolean, p: Double, graphSize: Int) {

  val fileName = file
  val numColors = ProblemConstants.numOfColors
  val executionConfig = config
  val isInputAdopt = isAdopt
  val randomInitialState = randomInit
  val probability = p
  val aggregator = aggregation

  var graph: Graph[Any, Any] = _

  val algorithm = new BestResponseVertexBuilder(randomInitialState, probability)
  val graphProvider: BinaryConstraintGraphProvider = new BinaryConstraintGraphProvider(graphSize, numColors, 2, loadFrom = file, isAdopt = isInputAdopt)
  val graphBuilder = new GraphBuilder[Any, Any]()

  var conflictsOverTime: Map[Int, Int] = Map()

  // What edgeBuilder to use with this algorithm
  val edgeBuilder = algorithm match {
    case otherwise => (x: Int, y: Int) => new StateForwarderEdge(y)
  }

  graph = graphBuilder.build
  graphProvider.populate(graph, algorithm, edgeBuilder)
  graph.awaitIdle

  def executeWithAggregation(): Int = {
    if (aggregation != null) {
      graph.execute(config)
      graph.aggregate(aggregator)
    } else {
      -1
    }
  }

  def executeForConvergenceSteps(): Long = {
    val executionInfo = graph.execute(executionConfig)
    if (executionInfo.executionStatistics.terminationReason == TerminationReason.Converged) {
      executionInfo.executionStatistics.signalSteps
    } else {
      -1
    }
  }

  def executeForConvergenceTime(): Long = {
    val executionInfo = graph.execute(executionConfig)
    if (executionInfo.executionStatistics.terminationReason == TerminationReason.Converged) {
      executionInfo.executionStatistics.computationTime.toMillis
    } else {
      -1
    }
  }
}


text:
namespace Kvasir {
//Real-time clock
    namespace RtcTr{    ///<RTC time register
        using Addr = Register::Address<0x40002800,0xff808080,0x00000000,unsigned>;
        ///AM/PM notation
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,22),Register::ReadWriteAccess,unsigned> pm{};
        ///Hour tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> ht{};
        ///Hour units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,16),Register::ReadWriteAccess,unsigned> hu{};
        ///Minute tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,12),Register::ReadWriteAccess,unsigned> mnt{};
        ///Minute units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,8),Register::ReadWriteAccess,unsigned> mnu{};
        ///Second tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,4),Register::ReadWriteAccess,unsigned> st{};
        ///Second units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,unsigned> su{};
    }
    namespace RtcDr{    ///<RTC date register
        using Addr = Register::Address<0x40002804,0xff0000c0,0x00000000,unsigned>;
        ///Year tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,20),Register::ReadWriteAccess,unsigned> yt{};
        ///Year units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,16),Register::ReadWriteAccess,unsigned> yu{};
        ///Week day units
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,13),Register::ReadWriteAccess,unsigned> wdu{};
        ///Month tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,12),Register::ReadWriteAccess,unsigned> mt{};
        ///Month units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,8),Register::ReadWriteAccess,unsigned> mu{};
        ///Date tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> dt{};
        ///Date units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,unsigned> du{};
    }
    namespace RtcCr{    ///<RTC control register
        using Addr = Register::Address<0x40002808,0xff000080,0x00000000,unsigned>;
        ///Calibration output enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,23),Register::ReadWriteAccess,unsigned> coe{};
        ///Output selection
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,21),Register::ReadWriteAccess,unsigned> osel{};
        ///Output polarity
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(20,20),Register::ReadWriteAccess,unsigned> pol{};
        ///Calibration output              selection
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,19),Register::ReadWriteAccess,unsigned> cosel{};
        ///Backup
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(18,18),Register::ReadWriteAccess,unsigned> bkp{};
        ///Subtract 1 hour (winter time              change)
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,17),Register::Access<Register::AccessType::writeOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> sub1h{};
        ///Add 1 hour (summer time              change)
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(16,16),Register::Access<Register::AccessType::writeOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> add1h{};
        ///Time-stamp interrupt              enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,15),Register::ReadWriteAccess,unsigned> tsie{};
        ///Wakeup timer interrupt              enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,14),Register::ReadWriteAccess,unsigned> wutie{};
        ///Alarm B interrupt enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,13),Register::ReadWriteAccess,unsigned> alrbie{};
        ///Alarm A interrupt enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,12),Register::ReadWriteAccess,unsigned> alraie{};
        ///timestamp enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,11),Register::ReadWriteAccess,unsigned> tse{};
        ///Wakeup timer enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(10,10),Register::ReadWriteAccess,unsigned> wute{};
        ///Alarm B enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,9),Register::ReadWriteAccess,unsigned> alrbe{};
        ///Alarm A enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,8),Register::ReadWriteAccess,unsigned> alrae{};
        ///Hour format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,6),Register::ReadWriteAccess,unsigned> fmt{};
        ///Bypass the shadow              registers
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,unsigned> bypshad{};
        ///RTC_REFIN reference clock detection              enable (50 or 60 Hz)
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,unsigned> refckon{};
        ///Time-stamp event active              edge
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,unsigned> tsedge{};
        ///Wakeup clock selection
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> wucksel{};
    }
    namespace RtcIsr{    ///<RTC initialization and status          register
        using Addr = Register::Address<0x4000280c,0xffff8000,0x00000000,unsigned>;
        ///RTC_TAMP2 detection flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,14),Register::ReadWriteAccess,unsigned> tamp2f{};
        ///RTC_TAMP1 detection flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,13),Register::ReadWriteAccess,unsigned> tamp1f{};
        ///Time-stamp overflow flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,12),Register::ReadWriteAccess,unsigned> tsovf{};
        ///Time-stamp flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,11),Register::ReadWriteAccess,unsigned> tsf{};
        ///Wakeup timer flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(10,10),Register::ReadWriteAccess,unsigned> wutf{};
        ///Alarm B flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,9),Register::ReadWriteAccess,unsigned> alrbf{};
        ///Alarm A flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,8),Register::ReadWriteAccess,unsigned> alraf{};
        ///Initialization mode
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,unsigned> init{};
        ///Initialization flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,6),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> initf{};
        ///Registers synchronization              flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,unsigned> rsf{};
        ///Initialization status flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> inits{};
        ///Shift operation pending
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> shpf{};
        ///Wakeup timer write flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> wutwf{};
        ///Alarm B write flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> alrbwf{};
        ///Alarm A write flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> alrawf{};
    }
    namespace RtcPrer{    ///<RTC prescaler register
        using Addr = Register::Address<0x40002810,0xff800000,0x00000000,unsigned>;
        ///Asynchronous prescaler              factor
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,16),Register::ReadWriteAccess,unsigned> predivA{};
        ///Synchronous prescaler              factor
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,0),Register::ReadWriteAccess,unsigned> predivS{};
    }
    namespace RtcWutr{    ///<RTC wakeup timer register
        using Addr = Register::Address<0x40002814,0xffff0000,0x00000000,unsigned>;
        ///Wakeup auto-reload value              bits
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,0),Register::ReadWriteAccess,unsigned> wut{};
    }
    namespace RtcAlrmar{    ///<RTC alarm A register
        using Addr = Register::Address<0x4000281c,0x00000000,0x00000000,unsigned>;
        ///Alarm A date mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,31),Register::ReadWriteAccess,unsigned> msk4{};
        ///Week day selection
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(30,30),Register::ReadWriteAccess,unsigned> wdsel{};
        ///Date tens in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> dt{};
        ///Date units or day in BCD              format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(27,24),Register::ReadWriteAccess,unsigned> du{};
        ///Alarm A hours mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,23),Register::ReadWriteAccess,unsigned> msk3{};
        ///AM/PM notation
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,22),Register::ReadWriteAccess,unsigned> pm{};
        ///Hour tens in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> ht{};
        ///Hour units in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,16),Register::ReadWriteAccess,unsigned> hu{};
        ///Alarm A minutes mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,15),Register::ReadWriteAccess,unsigned> msk2{};
        ///Minute tens in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,12),Register::ReadWriteAccess,unsigned> mnt{};
        ///Minute units in BCD              format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,8),Register::ReadWriteAccess,unsigned> mnu{};
        ///Alarm A seconds mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,unsigned> msk1{};
        ///Second tens in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,4),Register::ReadWriteAccess,unsigned> st{};
        ///Second units in BCD              format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,unsigned> su{};
    }
    namespace RtcAlrmbr{    ///<RTC alarm B register
        using Addr = Register::Address<0x40002820,0x00000000,0x00000000,unsigned>;
        ///Alarm B date mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,31),Register::ReadWriteAccess,unsigned> msk4{};
        ///Week day selection
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(30,30),Register::ReadWriteAccess,unsigned> wdsel{};
        ///Date tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> dt{};
        ///Date units or day in BCD              format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(27,24),Register::ReadWriteAccess,unsigned> du{};
        ///Alarm B hours mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,23),Register::ReadWriteAccess,unsigned> msk3{};
        ///AM/PM notation
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,22),Register::ReadWriteAccess,unsigned> pm{};
        ///Hour tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> ht{};
        ///Hour units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,16),Register::ReadWriteAccess,unsigned> hu{};
        ///Alarm B minutes mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,15),Register::ReadWriteAccess,unsigned> msk2{};
        ///Minute tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,12),Register::ReadWriteAccess,unsigned> mnt{};
        ///Minute units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,8),Register::ReadWriteAccess,unsigned> mnu{};
        ///Alarm B seconds mask
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,unsigned> msk1{};
        ///Second tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,4),Register::ReadWriteAccess,unsigned> st{};
        ///Second units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,unsigned> su{};
    }
    namespace RtcWpr{    ///<write protection register
        using Addr = Register::Address<0x40002824,0xffffff00,0x00000000,unsigned>;
        ///Write protection key
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,0),Register::ReadWriteAccess,unsigned> key{};
    }
    namespace RtcSsr{    ///<RTC sub second register
        using Addr = Register::Address<0x40002828,0xffff0000,0x00000000,unsigned>;
        ///Sub second value
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,0),Register::ReadWriteAccess,unsigned> ss{};
    }
    namespace RtcShiftr{    ///<RTC shift control register
        using Addr = Register::Address<0x4000282c,0x7fff8000,0x00000000,unsigned>;
        ///Add one second
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,31),Register::ReadWriteAccess,unsigned> add1s{};
        ///Subtract a fraction of a              second
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,0),Register::ReadWriteAccess,unsigned> subfs{};
    }
    namespace RtcTstr{    ///<RTC timestamp time register
        using Addr = Register::Address<0x40002830,0xff808080,0x00000000,unsigned>;
        ///AM/PM notation
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,22),Register::ReadWriteAccess,unsigned> pm{};
        ///Hour tens in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> ht{};
        ///Hour units in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,16),Register::ReadWriteAccess,unsigned> hu{};
        ///Minute tens in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,12),Register::ReadWriteAccess,unsigned> mnt{};
        ///Minute units in BCD              format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,8),Register::ReadWriteAccess,unsigned> mnu{};
        ///Second tens in BCD format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,4),Register::ReadWriteAccess,unsigned> st{};
        ///Second units in BCD              format.
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,unsigned> su{};
    }
    namespace RtcTsdr{    ///<RTC timestamp date register
        using Addr = Register::Address<0x40002834,0xffff00c0,0x00000000,unsigned>;
        ///Week day units
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,13),Register::ReadWriteAccess,unsigned> wdu{};
        ///Month tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,12),Register::ReadWriteAccess,unsigned> mt{};
        ///Month units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,8),Register::ReadWriteAccess,unsigned> mu{};
        ///Date tens in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> dt{};
        ///Date units in BCD format
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,0),Register::ReadWriteAccess,unsigned> du{};
    }
    namespace RtcTsssr{    ///<RTC time-stamp sub second          register
        using Addr = Register::Address<0x40002838,0xffff0000,0x00000000,unsigned>;
        ///Sub second value
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,0),Register::ReadWriteAccess,unsigned> ss{};
    }
    namespace RtcCalr{    ///<RTC calibration register
        using Addr = Register::Address<0x4000283c,0xffff1e00,0x00000000,unsigned>;
        ///Use an 8-second calibration cycle              period
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,15),Register::ReadWriteAccess,unsigned> calp{};
        ///Use a 16-second calibration cycle              period
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,14),Register::ReadWriteAccess,unsigned> calw8{};
        ///Reserved
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,13),Register::ReadWriteAccess,unsigned> calw16{};
        ///Calibration minus
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> calm{};
    }
    namespace RtcTampcr{    ///<RTC tamper configuration          register
        using Addr = Register::Address<0x40002840,0xffc00060,0x00000000,unsigned>;
        ///Tamper 2 mask flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,21),Register::ReadWriteAccess,unsigned> tamp2mf{};
        ///Tamper 2 no erase
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(20,20),Register::ReadWriteAccess,unsigned> tamp2noerase{};
        ///Tamper 2 interrupt enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(19,19),Register::ReadWriteAccess,unsigned> tamp2ie{};
        ///Tamper 1 mask flag
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(18,18),Register::ReadWriteAccess,unsigned> tamp1mf{};
        ///Tamper 1 no erase
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,17),Register::ReadWriteAccess,unsigned> tamp1noerase{};
        ///Tamper 1 interrupt enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(16,16),Register::ReadWriteAccess,unsigned> tamp1ie{};
        ///RTC_TAMPx pull-up disable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,15),Register::ReadWriteAccess,unsigned> tamppudis{};
        ///RTC_TAMPx precharge              duration
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,13),Register::ReadWriteAccess,unsigned> tampprch{};
        ///RTC_TAMPx filter count
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,11),Register::ReadWriteAccess,unsigned> tampflt{};
        ///Tamper sampling frequency
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(10,8),Register::ReadWriteAccess,unsigned> tampfreq{};
        ///Activate timestamp on tamper detection              event
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,unsigned> tampts{};
        ///Active level for RTC_TAMP2              input
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,unsigned> tamp2Trg{};
        ///RTC_TAMP2 input detection              enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,unsigned> tamp2e{};
        ///Tamper interrupt enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,unsigned> tampie{};
        ///Active level for RTC_TAMP1              input
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> tamp1trg{};
        ///RTC_TAMP1 input detection              enable
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> tamp1e{};
    }
    namespace RtcAlrmassr{    ///<RTC alarm A sub second          register
        using Addr = Register::Address<0x40002844,0xf0ff8000,0x00000000,unsigned>;
        ///Mask the most-significant bits starting              at this bit
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(27,24),Register::ReadWriteAccess,unsigned> maskss{};
        ///Sub seconds value
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,0),Register::ReadWriteAccess,unsigned> ss{};
    }
    namespace RtcAlrmbssr{    ///<RTC alarm B sub second          register
        using Addr = Register::Address<0x40002848,0xf0ff8000,0x00000000,unsigned>;
        ///Mask the most-significant bits starting              at this bit
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(27,24),Register::ReadWriteAccess,unsigned> maskss{};
        ///Sub seconds value
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(14,0),Register::ReadWriteAccess,unsigned> ss{};
    }
    namespace RtcOr{    ///<option register
        using Addr = Register::Address<0x4000284c,0xfffffffc,0x00000000,unsigned>;
        ///RTC_ALARM on PC13 output              type
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> rtcOutRmp{};
        ///RTC_ALARM on PC13 output              type
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> rtcAlarmType{};
    }
    namespace RtcBkp0r{    ///<RTC backup registers
        using Addr = Register::Address<0x40002850,0x00000000,0x00000000,unsigned>;
        ///BKP
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> bkp{};
    }
    namespace RtcBkp1r{    ///<RTC backup registers
        using Addr = Register::Address<0x40002854,0x00000000,0x00000000,unsigned>;
        ///BKP
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> bkp{};
    }
    namespace RtcBkp2r{    ///<RTC backup registers
        using Addr = Register::Address<0x40002858,0x00000000,0x00000000,unsigned>;
        ///BKP
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> bkp{};
    }
    namespace RtcBkp3r{    ///<RTC backup registers
        using Addr = Register::Address<0x4000285c,0x00000000,0x00000000,unsigned>;
        ///BKP
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> bkp{};
    }
    namespace RtcBkp4r{    ///<RTC backup registers
        using Addr = Register::Address<0x40002860,0x00000000,0x00000000,unsigned>;
        ///BKP
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> bkp{};
    }
}