_entry_value = hashmap.no_entry_value;
         if (this.no_entry_value != 0) {
            Arrays.fill(this._values, this.no_entry_value);
         }

         this.setUp((int)Math.ceil((double)(10.0F / this._loadFactor)));
      }

      this.putAll(map);
   }

   @Override
   public int setUp(int initialCapacity) {
      int capacity = super.setUp(initialCapacity);
      this._values = new byte[capacity];
      return capacity;
   }

   @Override
   protected void rehash(int newCapacity) {
      int oldCapacity = this._set.length;
      K[] oldKeys = (K[])this._set;
      byte[] oldVals = this._values;
      this._set = new Object[newCapacity];
      Arrays.fill(this._set, FREE);
      this._values = new byte[newCapacity];
      Arrays.fill(this._values, this.no_entry_value);
      int i = oldCapacity;

      while(i-- > 0) {
         if (oldKeys[i] != FREE && oldKeys[i] != REMOVED) {
            K o = oldKeys[i];
            int index = this.insertKey(o);
            if (index < 0) {
               this.throwObjectContractViolation(this._set[-index - 1], o);
            }

            this._set[index] = o;
            this._values[index] = oldVals[i];
         }
      }
   }

   @Override
   public byte getNoEntryValue() {
      return this.no_entry_value;
   }

   @Override
   public boolean containsKey(Object key) {
      return this.contains(key);
   }

   @Override
   public boolean containsValue(byte val) {
      Object[] keys = this._set;
      byte[] vals = this._values;
      int i = vals.length;

      while(i-- > 0) {
         if (keys[i] != FREE && keys[i] != REMOVED && val == vals[i]) {
            return true;
         }
      }

      return false;
   }

   @Override
   public byte get(Object key) {
      int index = this.index(key);
      return index < 0 ? this.no_entry_value : this._values[index];
   }

   @Override
   public byte put(K key, byte value) {
      int index = this.insertKey(key);
      return this.doPut(value, index);
   }

   @Override
   public byte putIfAbsent(K key, byte value) {
      int index = this.insertKey(key);
      return index < 0 ? this._values[-index - 1] : this.doPut(value, index);
   }

   private byte doPut(byte value, int index) {
      byte previous = this.no_entry_value;
      boolean isNewMapping = true;
      if (index < 0) {
         index = -index - 1;
         previous = this._values[index];
         isNewMapping = false;
      }

      this._values[index] = value;
      if (isNewMapping) {
         this.postInsertHook(this.consumeFreeSlot);
      }

      return previous;
   }

   @Override
   public byte remove(Object key) {
      byte prev = this.no_entry_value;
      int index = this.index(key);
      if (index >= 0) {
         prev = this._values[index];
         this.removeAt(index);
      }

      return prev;
   }

   @Override
   protected void removeAt(int index) {
      this._values[index] = this.no_entry_value;
      super.removeAt(index);
   }

   @Override
   public void putAll(Map<? extends K, ? extends Byte> map) {
      for(Entry<? extends K, ? extends Byte> entry : map.entr


3)
})

test('queues can resolve all past gets', async () => {
  const q = queue<number>()

  const gets = [q.get(), q.get()]
  q.resolveAll(3)
  await expect(Promise.all(gets)).resolves.toEqual([3, 3])
})

test('queues can reject all future gets', async () => {
  const q = queue<number>()

  q.resolve(1)
  q.resolve(2)
  q.rejectAll(new Error('no more for you'))

  await expect(q.get()).resolves.toEqual(1)
  await expect(q.get()).resolves.toEqual(2)
  await expect(q.get()).rejects.toThrowError('no more for you')
  await expect(q.get()).rejects.toThrowError('no more for you')
  await expect(q.get()).rejects.toThrowError('no more for you')
})

test('queues can reject all past gets', async () => {
  const q = queue<number>()

  const gets = [q.get(), q.get()]
  q.rejectAll(NaN)
  await expect(Promise.allSettled(gets)).resolves.toEqual([
    { status: 'rejected', reason: NaN },
    { status: 'rejected', reason: NaN },
  ])
})

test('queues disallow mutation after resolveAll', async () => {
  const q = queue<number>()

  q.resolveAll(1)

  expect(() => q.resolve(2)).toThrowError(
    'resolveAll or rejectAll already called'
  )
  expect(() => q.reject()).toThrowError(
    'resolveAll or rejectAll already called'
  )
  expect(() => q.resolveAll(3)).toThrowError(
    'resolveAll or rejectAll already called'
  )
  expect(() => q.rejectAll()).toThrowError(
    'resolveAll or rejectAll already called'
  )
})

test('queues disallow mutation after rejectAll', async () => {
  const q = queue<number>()

  q.rejectAll()

  expect(() => q.resolve(2)).toThrowError(
    'resolveAll or rejectAll already called'
  )
  expect(() => q.reject()).toThrowError(
    'resolveAll or rejectAll already called'
  )
  expect(() => q.resolveAll(3)).toThrowError(
    'resolveAll or rejectAll already called'
  )
  expect(() => q.rejectAll()).toThrowError(
    'resolveAll or rejectAll already called'
  )
})
import { create, getNumericDate, verify } from "../deps.ts";

export class JwtUtil {
  async create(id: string): Promise<string> {
    const key = Deno.env.get("SECRET_KEY") || "";
    const payload = {
      id,
      exp: getNumericDate(60 * 60 * 24),
    };
    const jwt = await create({ alg: "HS512", typ: "JWT" }, payload, key);
    return jwt;
  }

  async verify(jwt: string): Promise<boolean> {
    const key = Deno.env.get("SECRET_KEY") || "";
    try {
      const payload = await verify(jwt, key, "HS512");
      return !!payload;
    } catch {
      return false;
    }
  }

  async userId(jwt: string): Promise<string> {
    const key = Deno.env.get("SECRET_KEY") || "";
    const { id } = await verify(jwt, key, "HS512");
    if (typeof id === "string") {
      return id;
    }
    throw new Error("JWT contains an invalid user_id");
  }
}
/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import {WorkerContainer} from './WorkerManager';
import Master from './Master';
import {AbsoluteFilePath} from '@romejs/path';

type Queue<M> = Array<[AbsoluteFilePath, M]>;

type WorkerQueueItem<M> = {
  running: boolean;
  queue: Queue<M>;
};

type Callba


e: volume,
      looping: looping,
      asAlarm: asAlarm,
    );
  }

  /// Play default notification sound
  @override
  Future<void> playNotification({
    double? volume,
    bool? looping,
    bool asAlarm = false,
  }) {
    return play(
      android: AndroidSounds.notification,
      ios: IosSounds.triTone,
      volume: volume,
      looping: looping,
      asAlarm: asAlarm,
    );
  }

  /// Play default system ringtone (looping on Android)
  @override
  Future<void> playRingtone({
    double? volume,
    bool looping = true,
    bool asAlarm = false,
  }) {
    return play(
      android: AndroidSounds.ringtone,
      ios: IosSounds.electronic,
      volume: volume,
      looping: looping,
      asAlarm: asAlarm,
    );
  }

  /// Stop looping sounds like alarms & ringtones on Android.
  /// This is no-op on iOS.
  @override
  Future<void> stop() async {
    try {
      _channel.invokeMethod('stop');
    } on PlatformException {
      // Not handled
    }
  }

  /// Generate asset uri according to platform.
  static Future<String> _generateAssetUri(String asset) async {
    if (Platform.isAndroid) {
      // read local asset from rootBundle
      final byteData = await rootBundle.load(asset);

      // create a temporary file on the device to be read by the native side
      final file = File('${(await getTemporaryDirectory()).path}/$asset');
      await file.create(recursive: true);
      await file.writeAsBytes(byteData.buffer.asUint8List());
      return file.uri.path;
    } else if (Platform.isIOS) {
      if (!['wav', 'mp3', 'aiff', 'caf']
          .contains(asset.split('.').last.toLowerCase())) {
        throw 'Format not supported for iOS. Only mp3, wav, aiff and caf formats are supported.';
      }
      return asset;
    } else {
      return asset;
    }
  }

  /// Generate asset uri according to platform.
  static Future<String> _generateFileUri(String asset) async {
    if (Platform.isIOS) {
      if (!['wav', 'mp3', 'aiff', 'caf']
          .contains(asset.split('.').last.toLowerCase())) {
        throw 'Format not supported for iOS. Only mp3, wav, aiff and caf formats are supported.';
      }
    }

    return asset;
  }
}
import 'package:devtools_app_shared/ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hive_ce_inspector/model/box_data.dart';
import 'package:hive_ce_inspector/model/hive_internal.dart';
import 'package:hive_ce_inspector/service/connect_client.dart';
import 'package:two_dimensional_scrollables/two_dimensional_scrollables.dart';
import 'package:flutter/foundation.dart';

class BoxView extends StatefulWidget {
  final ConnectClient client;
  final BoxData data;

  const BoxView({super.key, required this.client, required this.data});

  @override
  State<StatefulWidget> createState() => _BoxViewState();
}

class _BoxViewState extends State<BoxView> {
  /// Stack of table views
  final List<KeyedObject<List<KeyedObject>>> _stack = [];

  List<KeyedObject<List<KeyedObject>>> get stack => [
    KeyedObject(
      widget.data.name,
      widget.data.frames.values
          .map(
            (e) => KeyedObject(
              e.key,
              e.value,
              load: e.lazy
                  ? () => widget.client.loadValue(widget.data.name, e)
                  : null,


.viewport.Viewport;
import com.watabou.glscripts.Script;
import com.watabou.glwrap.Blending;
import com.watabou.glwrap.Quad;
import com.watabou.glwrap.Texture;
import com.watabou.noosa.ui.Component;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.FileUtils;
import com.watabou.utils.Point;

//essentially contains a libGDX text input field, plus a PD-rendered background
public class TextInput extends Component {

	private Stage stage;
	private Container container;
	private TextField textField;

	private Skin skin;

	private NinePatch bg;

	public TextInput( NinePatch bg, boolean multiline, int size ){
		super();
		this.bg = bg;
		add(bg);

		//use a custom viewport here to ensure stage camera matches game camera
		Viewport viewport = new Viewport() {};
		viewport.setWorldSize(Game.width, Game.height);
		viewport.setScreenBounds(0, 0, Game.width, Game.height);
		viewport.setCamera(new OrthographicCamera());
		//TODO this is needed for the moment as Spritebatch switched to using VAOs in libGDX v1.13.1
		//  This results in HARD crashes atm, whereas old vertex arrays work fine
		SpriteBatch.overrideVertexType = Mesh.VertexDataType.VertexArray;
		stage = new Stage(viewport);
		Game.inputHandler.addInputProcessor(stage);

		container = new Container<TextField>();
		stage.addActor(container);
		container.setTransform(true);

		skin = new Skin(FileUtils.getFileHandle(Files.FileType.Internal, "gdx/textfield.json"));

		TextField.TextFieldStyle style = skin.get(TextField.TextFieldStyle.class);
		style.font = Game.platform.getFont(size, "", false, false);
		style.background = null;
		if (multiline){
			textField = new TextArea("", style){
				@Override
				public void cut() {
					super.cut();
					onClipBoardUpdate();
				}

				@Override
				public void copy() {
					super.copy();
					onClipBoardUpdate();
				}
			};
		} else {
			textField = new TextField("", style){
				@Override
				public void cut() {
					super.cut();
					onClipBoardUpdate();
				}

				@Override
				public void copy() {
					super.copy();
					onClipBoardUpdate();
				}
			};
		}
		textField.setProgrammaticChangeEvents(true);

		if (!multiline) textField.setAlignment(Align.center);

		textField.addListener(new ChangeListener() {
			@Override
			public void changed(ChangeEvent event, Actor actor) {
				BitmapFont f = Game.platform.getFont(size, textField.getText(), false, false);
				TextField.TextFieldStyle style = textField.getStyle();
				if (f != style.font){
					style.font = f;
					textField.setStyle(style);
				}
				onChanged();
			}
		});

		if (!multiline){
			textField.setTextFieldListener(new TextField.TextFieldListener(){
				public void keyTyped (TextField textField, char c){
					if (c == '\r' || c == '\n'){
						enterPressed();
					}
				}

			});
		}

		textField.setOnscreenKeyboard(new TextField.OnscreenKeyboard() {
			@Override
			public void show(boolean visible) {
				Game.platform.setOnscreenKeyboardVisible(visible, multiline);
			}
		});

		container.setActor(textField);
		stage.setKeyboardFocus(textField);
		Game.platform.setOnscreenKeyboardVisible(true, multiline);
	}

	public void enterPressed(){
		//fires any time enter is pressed, do nothing by default
	};

	public void onChan


,
      terminal_mappings = true,
    },
    keys = {
      { "<C-\\>", mode = "n", desc = "Toggle terminal" },
    },
  },
  {
    "ThePr


ntment,
        appointmentType = Manual,
        appointmentFacilityUuid = facility.uuid,
        creationFacilityUuid = facility.uuid
    )

    clock.advanceBy(Duration.ofDays(1))

    val scheduledDateForSecondAppointment = LocalDate.parse("2018-02-08")
    val secondAppointment = appointmentRepository.schedule(
        patientUuid = patientUuid,
        appointmentUuid = UUID.fromString("634b4807-d3a8-42a9-8411-7c921ed57f49"),
        appointmentDate = scheduledDateForSecondAppointment,
        appointmentType = Manual,
        appointmentFacilityUuid = facility.uuid,
        creationFacilityUuid = facility.uuid
    )

    // when
    val appointment = appointmentRepository.lastCreatedAppointmentForPatient(patientUuid).toNullable()!!

    // then
    assertThat(appointment).isEqualTo(secondAppointment)
  }

  @Test
  fun marking_appointment_older_than_current_date_as_visited_should_work_correctly() {
    // given
    val firstAppointmentUuid = UUID.fromString("96b21ba5-e12d-41ec-bfc9-f09bac6ed435")
    val secondAppointmentUuid = UUID.fromString("2fbbf320-3b78-4f26-a8d6-5a90d2800711")

    val appointmentScheduleDate = LocalDate.parse("2018-02-01")

    clock.advanceBy(Duration.ofHours(1))
    database
        .appointmentDao()
        .save(listOf(testData.appointment(
            uuid = firstAppointmentUuid,
            patientUuid = patientUuid,
            status = Scheduled,
            syncStatus = DONE,
            scheduledDate = appointmentScheduleDate,
            createdAt = Instant.now(clock),
            updatedAt = Instant.now(clock)
        )))
    val firstAppointmentBeforeMarkingAsCreatedOnCurrentDay = getAppointmentByUuid(firstAppointmentUuid)

    // then
    clock.advanceBy(Duration.ofHours(1))
    appointmentRepository.markAppointmentsCreatedBeforeTodayAsVisited(patientUuid)
    assertThat(getAppointmentByUuid(firstAppointmentUuid)).isEqualTo(firstAppointmentBeforeMarkingAsCreatedOnCurrentDay)

    // then
    clock.advanceBy(Duration.ofDays(1))
    database
        .appointmentDao()
        .save(listOf(testData.appointment(
            uuid = secondAppointmentUuid,
            patientUuid = patientUuid,
            scheduledDate = appointmentScheduleDate,
            status = Scheduled,
            syncStatus = PENDING,
            createdAt = Instant.now(clock),
            updatedAt = Instant.now(clock)
        )))

    val secondAppointmentBeforeMarkingAsCreatedOnNextDay = getAppointmentByUuid(secondAppointmentUuid)
    appointmentRepository.markAppointmentsCreatedBeforeTodayAsVisited(patientUuid)

    val firstAppointmentAfterMarkingAsCreatedOnNextDay = getAppointmentByUuid(firstAppointmentUuid)

    with(firstAppointmentAfterMarkingAsCreatedOnNextDay) {
      assertThat(status).isEqualTo(Visited)
      assertThat(syncStatus).isEqualTo(PENDING)
      assertThat(createdAt).isEqualTo(firstAppointmentBeforeMarkingAsCreatedOnCurrentDay.createdAt)
      assertThat(createdAt).isLessThan(updatedAt)
      assertThat(updatedAt).isEqualTo(Instant.now(clock))
    }
    assertThat(getAppointmentByUuid(secondAppointmentUuid))
        .isEqualTo(secondAppointmentBeforeMarkingAsCreatedOnNextDay)
  }

  @Test
  fun when_scheduling_appointment_for_defaulter_patient_then_the_appointment_should_be_saved_as_defaulter() {
    // given
    val appointmentScheduleDate = LocalDate.parse("2018-01-01")


im=self.mlp_transient.get_out_dim())

    def get_density(self, ray_samples: RaySamples):
        """Computes and returns the densities."""
        encoded_xyz = self.position_encoding(ray_samples.frustums.get_positions())
        encoded_xyz = self.position_encoding(ray_samples.frustums.get_positions())
        base_mlp_out = self.mlp_base(encoded_xyz)
        density = self.field_head_density(base_mlp_out)
        return density, base_mlp_out

    def get_outputs(
        self, ray_samples: RaySamples, density_embedding: Optional[TensorType[..., "embedding_size"]] = None
    ) -> Dict[FieldHeadNames, TensorType]:
        """Returns the outputs of the NeRF-W field.

        Args:
            ray_samples (RaySamples): Ray samples.
            density_embedding (TensorType[..., "embedding_size"], optional): Density embedding.

        Returns:
            Dict[FieldHeadNames, TensorType]: Outputs of the NeRF-W field.
        """
        outputs = {}
        encoded_dir = self.direction_encoding(ray_samples.frustums.directions)
        if ray_samples.camera_indices is None:
            raise AttributeError("Camera indices are not provided.")
        camera_indices = ray_samples.camera_indices.squeeze().to(ray_samples.frustums.origins.device)
        embedded_appearance = self.embedding_appearance(camera_indices)
        mlp_in = torch.cat([density_embedding, encoded_dir, embedded_appearance], dim=-1)  # type: ignore
        mlp_head_out = self.mlp_head(mlp_in)
        outputs[self.field_head_rgb.field_head_name] = self.field_head_rgb(mlp_head_out)  # static rgb
        embedded_transient = self.embedding_transient(camera_indices)
        transient_mlp_in = torch.cat([density_embedding, embedded_transient], dim=-1)  # type: ignore
        transient_mlp_out = self.mlp_transient(transient_mlp_in)
        outputs[self.field_head_transient_uncertainty.field_head_name] = self.field_head_transient_uncertainty(
            transient_mlp_out
        )  # uncertainty
        outputs[self.field_head_transient_rgb.field_head_name] = self.field_head_transient_rgb(
            transient_mlp_out
        )  # transient rgb
        outputs[self.field_head_transient_density.field_head_name] = self.field_head_transient_density(
            transient_mlp_out
        )  # transient density
        return outputs


 -> anyhow::Result<SolanaWallet> {
        SolanaWallet::create_random(PhraseType::Standard, None)
    }

    fn tesseract_with_random_key() -> anyhow::Result<Tesseract> {
        let mut tesseract = Tesseract::default();
        let key = warp::crypto::generate(32);
        tesseract.unlock(&key)?;
        Ok(tesseract)
    }

    #[allow(unused)]
    fn tesseract_with_preset_key() -> anyhow::Result<Arc<Mutex<Tesseract>>> {
        let mut tesseract = Tesseract::default();
        tesseract.unlock(
            b"this is my totally secured password that should nnever be embedded in code",
        )?;
        Ok(Arc::new(Mutex::new(tesseract)))
    }

    #[test]
    fn use_mp_with_pregenerated_wallet() -> anyhow::Result<()> {
        let tesseract = tesseract_with_random_key()?;
        let mut account = SolanaAccount::with_devnet(&tesseract);

        account.insert_solana_wallet(pregenerated_wallet()?)?;

        let ident = account.get_own_identity()?;

        let pubkey = Pubkey::new(ident.public_key().as_ref());

        assert_eq!(
            pubkey.to_string(),
            "<KEY>"
        );

        Ok(())
    }

    //TODO: Add a skip when there is an error due to network or retry test

    // #[test]
    // fn use_mp_with_new_wallet() -> anyhow::Result<()> {
    //     let mut account = SolanaAccount::with_devnet();
    //     let tesseract = tesseract_with_random_key()?;
    //     account.set_tesseract(tesseract);
    //
    //     account.create_identity("RandomUser", "")?;
    //
    //     let ident = account.get_own_identity()?;
    //
    //     let pubkey = Pubkey::new(ident.public_key.to_bytes());
    //
    //     assert_ne!(
    //         pubkey.to_string(),
    //         "<KEY>"
    //     );
    //
    //     Ok(())
    // }
    //
    // #[test]
    // fn use_mp_to_find_account() -> anyhow::Result<()> {
    //     let mut account = Account::with_devnet();
    //     let tesseract = tesseract_with_random_key()?;
    //     account.set_tesseract(tesseract);
    //
    //     account.create_identity("RandomUser", "")?;
    //
    //     let real_pubkey = Pubkey::from_str("<KEY>")?;
    //
    //     let _ = account.get_identity(Identifier::PublicKey(PublicKey::from_bytes(
    //         &real_pubkey.to_bytes(),
    //     )))?;
    //
    //     //TODO: Assert test here
    //
    //     Ok(())
    // }
}
<gh_stars>1000+
extern "C" {
    fn printf(s: &str, ...);
}

fn main() {
    unsafe {
        printf("int %d", 1);
        printf("char %c", 65);
        printf("multi %d %c %x", 65, 65, 65);

        // Needs to be properly implemented still
        // printf("star %*d %*.*d %.*d", 1, 2, 3, 4, 5, 6, 7);

        // Used to trigger a bug with macro collapsing, fixed in 3a721469
        printf("%c%c%c\x00", 27i32,
               '(' as i32, 'B' as i32);
    }
}
<gh_stars>0
use std::cmp::Ordering;
use std::collections::HashMap;

impl std::str::FromStr for Room {
    type Err = String;
    fn from_str(line: &str) -> Result<Self, Self::Err> {


Of2sinRange(int n)
{

    // Initialize result
    int count = 0;

    // Count 2's in every number
    // from 2 to n
    for (int i = 2; i <= n; i++)
    count += number0f2s(i);

    return count;
}

// Driver code
public static void main(String[] args)
{
    System.out.print(numberOf2sinRange(22));
    System.out.println();
    System.out.print(numberOf2sinRange(100));
}
}

// This code is contributed by Anant Agarwal.
```

## 蟒蛇 3

```
# Python3 program to count
# 2s from 0 to n

# Counts the number of
# '2' digits in a
# single number
def number0f2s(n):

    count = 0
    while (n > 0):

        if (n % 10 == 2):
            count = count + 1

        n = n // 10

    return count

# Counts the number of '2'
# digits between 0 and n
def numberOf2sinRange(n):

    # Initialize result
    count = 0

    # Count 2's in every number
    # from 2 to n
    for i in range(2, n + 1):
        count = count + number0f2s(i)

    return count

# Driver code

print(numberOf2sinRange(22))
print(numberOf2sinRange(100))

# This code is contributed
# by Anant Agarwal.
```

## C#

```
// C# program to count 2s from 0 to n
using System;

class GFG
{

// Counts the number of '2' digits
// in a single number
static int number0f2s(int n)
{
    int count = 0;
    while (n > 0)
    {
        if (n % 10 == 2)
            count++;

    n = n / 10;
    }
    return count;
}

// Counts the number of '2' digits
// between 0 and n
static int numberOf2sinRange(int n)
{

    // Initialize result
    int count = 0;

    // Count 2's in every number
    // from 2 to n
    for (int i = 2; i <= n; i++)
    count += number0f2s(i);

    return count;
}

// Driver code
public static void Main()
{
    Console.Write(numberOf2sinRange(22));
    Console.WriteLine();
    Console.Write(numberOf2sinRange(100));
}
}

// This code is contributed by nitin mittal
```

## 服务器端编程语言（Professional Hypertext Preprocessor 的缩写）

```
<?php
// php program to count 2s from 0 to n

// Counts the number of '2'
// digits in a single number
function number0f2s($n)
{
    $count = 0;
    while ($n > 0)
    {
        if ($n % 10 == 2)
            $count++;

        $n = $n / 10;
    }
    return $count;
}

// Counts the number of '2'
// digits between 0 and n
function numberOf2sinRange($n)
{

    // Initialize result
    $count = 0 ;

    // Count 2's in every number
    // from 2 to n
    for ($i = 2; $i <= $n; $i++)
        $count += number0f2s($i);

    return $count;
}

// Driver Code
    echo (numberOf2


}
	return sb.toString();
}

Home

<!DOCTYPE html>

<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="/releases/7.1.0/css/style.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<title>dir ( ‘;’ FILE )* | bnd</title>
<meta name="generator" content="Jekyll v3.9.3" />
<meta property="og:title" content="dir ( ‘;’ FILE )*" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="public String _dir(String[] args) { if (args.length < 2) { reporter.warning("Need at least one file name for ${dir;...}"); return null; } String result = Arrays.stream(args, 1, args.length) .map(domain::getFile) .filter(File::exists) .map(File::getParentFile) .filter(File::exists) .map(IO::absolutePath) .collect(Strings.joining()); return result; }" />
<meta property="og:description" content="public String _dir(String[] args) { if (args.length < 2) { reporter.warning("Need at least one file name for ${dir;...}"); return null; } String result = Arrays.stream(args, 1, args.length) .map(domain::getFile) .filter(File::exists) .map(File::getParentFile) .filter(File::exists) .map(IO::absolutePath) .collect(Strings.joining()); return result; }" />
<meta property="og:site_name" content="bnd" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="dir ( ‘;’ FILE )*" />

<img


he event is obsolete, return <time_t>::min().
	 *
	 * If the time is lower than the previous time,
	 * then dependencies may not be resolved perfectly anymore
	 * (if other events have already been calculated before that).
	 */
	virtual time::time_t predict_invoke_time(const std::shared_ptr<EventEntity> &target,
	                                         const std::shared_ptr<State> &state,
	                                         const time::time_t &at) = 0;

private:
	/**
	 * String identifier for this event handler.
	 */
	std::string _id;
};

// helper classes

class DependencyEventHandler : public EventHandler {
public:
	DependencyEventHandler(const std::string &name);
};

class DependencyImmediatelyEventHandler : public EventHandler {
public:
	DependencyImmediatelyEventHandler(const std::string &name);
};

class TriggerEventHandler : public EventHandler {
public:
	TriggerEventHandler(const std::string &name);
};

class RepeatEventHandler : public EventHandler {
public:
	RepeatEventHandler(const std::string &name);
};

class OnceEventHandler : public EventHandler {
public:
	OnceEventHandler(const std::string &name);
};

} // namespace openage::event


 ? ";
				objectParamWhere.add(taskQuery.getTaskVariableKey());
			} else {
				if (taskQuery.isTaskVariableValueIsLike()) {
					selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + "AND BIZ_DATA LIKE '%" + taskQuery.getTaskVariableValue() + "%') ";
				} else {

					selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + "AND BIZ_DATA=?) ";
					objectParamWhere.add(taskQuery.getTaskVariableValue());
				}
			}
		}
		if (taskQuery.getProcessInstanceVariableValue() != null && !taskQuery.getProcessInstanceVariableValue().equals("")) {
			selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " and T.PROCESSINSTANCE_ID in ( SELECT PROCESSINSTANCE_ID FROM "
					+ QueryTableUtil.getTableSelect("fixflow_run_variable", taskQuery.getQueryLocation())
					+ " WHERE PROCESSINSTANCE_ID IS NOT NULL AND VARIABLE_TYPE='queryBizVariable' ";
			if (taskQuery.getProcessInstanceVariableKey() != null && !taskQuery.getProcessInstanceVariableKey().equals("")) {

				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + "AND VARIABLE_KEY = ? ";
				objectParamWhere.add(taskQuery.getProcessInstanceVariableKey());
			}
			if (taskQuery.isProcessInstanceVariableValueIsLike()) {
				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + "AND BIZ_DATA LIKE '%" + taskQuery.getProcessInstanceVariableValue()
						+ "%') ";
			} else {
				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + "AND BIZ_DATA=?) ";
				objectParamWhere.add(taskQuery.getProcessInstanceVariableValue());
			}

		}
		if (taskQuery.getEnd() != null) {
			selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " and T.END_TIME " + taskQuery.getEnd() + " ";

		}
		if (taskQuery.getCandidateUser() != null || taskQuery.getCandidateGroup() != null) {
			List<GroupTo> candidateGroups = taskQuery.getCandidateGroups();
			selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " and ((T.ASSIGNEE is null " + " and I.TYPE = 'candidate' " + " and ( ";
			if (taskQuery.getCandidateUser() != null) {
				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " (I.USER_ID=? or I.USER_ID='fixflow_allusers')";
				objectParamWhere.add(taskQuery.getCandidateUser());
			}

			if (taskQuery.getCandidateUser() != null && candidateGroups.size() > 0) {
				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " or ";
			}
			if (candidateGroups != null && candidateGroups.size() > 0) {
				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " (";
				for (int i = 0; i < candidateGroups.size(); i++) {
					if (i == 0) {
						selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + "(group_id ='" + candidateGroups.get(i).getGroupId()
								+ "' and group_type ='" + candidateGroups.get(i).getGroupType() + "' )";
					} else {
						selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " or (group_id ='" + candidateGroups.get(i).getGroupId()
								+ "' and group_type ='" + candidateGroups.get(i).getGroupType() + "' )";
					}
				}
				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " )";
			}
			selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " )";
			selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " ) ";
			if (taskQuery.getAssignee() != null) {
				selectTaskByQueryCriteriaSql = selectTaskByQueryCriteriaSql + " or ( ";
				selectTaskByQueryCri


B8A56E5FDF0BC99D1BA0E0DCC0A`),
        Qy: toBigint(`06527F314C706414FD45519940D05D0BBF5420DF3A52B0DDF4A3D7A2C88`),
        R:  toBigint(`7FC7E258B004952F53FCB80F2503FBB29793FE9DD26B5B93049A887BC4BCA944`),
        S:  toBigint(`315E021AE5DD3239214E4B35E9D3EA856D9FECECE5E860237FD352899B`),
    },
    {
        M:  fromHex(`FA96CB448953AA81EDC3BF783F9E5669D042E7A8E49A12D1BC23108BEA1AEA0776153DD7F108CA5BDB18A451881E44C4F34A40018FC8FDA5A4D2128C371BB5AF03EFF2A6A1FAEFED422210A6254B39E24180043D2B5919D1C419904AB45090233F8BF4D075D94AEA49A9E70B99D66186AB4E30A12744C86D1745E3FDFB30580B`),
        Qx: toBigint(`046B3C7575A2C4BAB4F99A4193638E6BF1513BE5F28BE0F7D0004483079`),
        Qy: toBigint(`09552C145A43F09540DED7F38E32DA5A913BC89523A5859FA3AFC0BAD97`),
        R:  toBigint(`C7C060E9BB927CD8E1895DC540F0EA1A7BAD94926D29CBD25F9B99E477D55E31`),
        S:  toBigint(`6478D653E5D26AC6E9144A88D0924E124BC9AF6F7BA8FCEAC3255D7931`),
    },
    {
        M:  fromHex(`6F5935C16EDD71CCC080F65B92FA4A3ECC2AACBB1802D75640AC4B25CCB951D880D08E2AB7C763D71E7FF0BCE579EF5EE48D4461BE9A77358BABEF890F712AC20970C205A3DF8814838772998D9EB003DDFBAFB100964477ECA7E03BD566F6CB47C07C94ADF6AF58B78200A4AF3A571249008B11EA0D4253000E1690572F34BC`),
        Qx: toBigint(`1CDC4B0544432DA493BF9CFF3ECA82D4D54E0F11CAE7458574B230C7E5D`),
        Qy: toBigint(`11F0F89CCA8C813FD86C7F0FBD868137EB73EB5AFDAC25B0F345D017268`),
        R:  toBigint(`C812DD022C7DD35B0B7CFEC01DD83FCA014F9E2283CF79A01F21194CB7104A9A`),
        S:  toBigint(`47A4996C75EA78C1AFE5D5E004AA1D0980808C59B7DC768D9757D7C903`),
    },
    {
        M:  fromHex(`1F4F4C6077630E3D296205DB98A71438612F5E2EB599DAC806557029F4EBC7241FB5AD3BCB074425F01FD681BDCA81EA072396FEBF5FE19EEEF9B7EF373EFE5E7D9001409C4A5A3CCDBBAF22BA0B9F64C48089BF8E0B9062497F9B10CF598D89168893


            Some(len) => Ok((&mut self.input).take(len).collect()),
            None => {
                bail!(ErrorKind::Eof);
            }
        }
    }
}

impl<'a, 'de> de::Deserializer<'de> for &'a mut Deserializer<'de> {
    type Error = Error;

    fn deserialize_string<V>(self, visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        visitor.visit_string(String::from_utf8(self.parse_sequence()?)
            .chain_err(|| ErrorKind::InvalidInput)?)
    }

    fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        self.deserialize_string(visitor)
    }

    fn deserialize_option<V>(self, visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        visitor.visit_some(self)
    }

    fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        self.deserialize_string(visitor)
    }

    fn deserialize_map<V>(self, visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        visitor.visit_map(SequenceParser { de: self })
    }

    fn deserialize_struct<V>(
        self,
        _name: &'static str,
        _fields: &'static [&'static str],
        visitor: V,
    ) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        self.deserialize_map(visitor)
    }

    fn deserialize_any<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_bool<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_i8<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_i16<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_i32<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_i64<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_u8<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_u16<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_u32<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: de::Visitor<'de>,
    {
        unimplemented!()
    }

    fn deserialize_u64<V>(self, _visitor: V) -> Result<V::Value>
    where
        V: d


Show all",scaleFit:"Exact Fit",scaleNoBorder:"No Border",title:"Flash Properties",vSpace:"Вертикален простор",validateHSpace:"HSpace must be a number.",validateSrc:"URL must not be empty.",validateVSpace:"VSpace must be a number.",windowMode:"Window mode",windowModeOpaque:"Opaque",windowModeTransparent:"Transparent",windowModeWindow:"Window"});CKEDITOR.plugins.setLang("flash","si",{access:"පිටපත් ප්‍රවේශය",accessAlways:"හැමවිටම",accessNever:"කිසිදා නොවේ",accessSameDomain:"එකම වසමේ",alignAbsBottom:"පතුල",alignAbsMiddle:"Abs ",alignBaseline:"පාද රේඛාව",alignTextTop:"වගන්තිය ඉහල",bgcolor:"පසුබිම් වර්ණය",chkFull:"පුර්ණ තිරය සදහා අවසර",chkLoop:"පුඩුව",chkMenu:"සක්‍රිය බබලන මෙනුව",chkPlay:"ස්‌වයංක්‍රිය ක්‍රියාත්මක වීම",flashvars:"වෙනස්වන දත්ත",hSpace:"HSpace",properties:"බබලන ගුණ",propertiesTab:"ගුණ",quality:"තත්වය",qualityAutoHigh:"ස්‌වයංක්‍රිය  ",
qualityAutoLow:" ස්‌වයංක්‍රිය   ",qualityBest:"වඩාත් ගැලපෙන",qualityHigh:"ඉහළ",qualityLow:"පහළ",qualityMedium:"මධ්‍ය",scale:"පරිමාණ",scaleAll:"සියල්ල ",scaleFit:"හරියටම ගැලපෙන",scaleNoBorder:"මාඉම් නොමැති",title:"බබලන ",vSpace:"VSpace",validateHSpace:"HSpace සංක්‍යාවක් විය යුතුය.",validateSrc:"URL හිස් නොවිය ",validateVSpace:"VSpace සංක්‍යාවක් විය යුතුය",windowMode:"ජනෙල ක්‍රමය",windowModeOpaque:"විනිවිද පෙනෙන",windowModeTransparent:"විනිවිද පෙනෙන",windowModeWindow:"ජනෙල"});
// -- kriszyp Kris Zyp

exports.createEnvironment = function(){
    var workerQueue,
        workerGlobal = new org.mozilla.javascript.tools.shell.Global();
    javaWorkerGlobal = new org.mozilla.javascript.NativeJavaObject(global, workerGlobal, null);


 I/Os queued in RAIDframe as well as those at the physical
 * disk are counted as members of the "queue"
 */
void
rf_SelectMirrorDiskIdle(RF_DagNode_t * node)
{
	RF_Raid_t *raidPtr = (RF_Raid_t *) node->dagHdr->raidPtr;
	RF_RowCol_t colData, colMirror;
	int     dataQueueLength, mirrorQueueLength, usemirror;
	RF_PhysDiskAddr_t *data_pda = (RF_PhysDiskAddr_t *) node->params[0].p;
	RF_PhysDiskAddr_t *mirror_pda = (RF_PhysDiskAddr_t *) node->params[4].p;
	RF_PhysDiskAddr_t *tmp_pda;
	RF_RaidDisk_t *disks = raidPtr->Disks;
	RF_DiskQueue_t *dqs = raidPtr->Queues, *dataQueue, *mirrorQueue;

	/* return the [row col] of the disk with the shortest queue */
	colData = data_pda->col;
	colMirror = mirror_pda->col;
	dataQueue = &(dqs[colData]);
	mirrorQueue = &(dqs[colMirror]);

#ifdef RF_LOCK_QUEUES_TO_READ_LEN
	RF_LOCK_QUEUE_MUTEX(dataQueue, "SelectMirrorDiskIdle");
#endif				/* RF_LOCK_QUEUES_TO_READ_LEN */
	dataQueueLength = dataQueue->queueLength + dataQueue->numOutstanding;
#ifdef RF_LOCK_QUEUES_TO_READ_LEN
	RF_UNLOCK_QUEUE_MUTEX(dataQueue, "SelectMirrorDiskIdle");
	RF_LOCK_QUEUE_MUTEX(mirrorQueue, "SelectMirrorDiskIdle");
#endif				/* RF_LOCK_QUEUES_TO_READ_LEN */
	mirrorQueueLength = mirrorQueue->queueLength + mirrorQueue->numOutstanding;
#ifdef RF_LOCK_QUEUES_TO_READ_LEN
	RF_UNLOCK_QUEUE_MUTEX(mirrorQueue, "SelectMirrorDiskIdle");
#endif				/* RF_LOCK_QUEUES_TO_READ_LEN */

	usemirror = 0;
	if (RF_DEAD_DISK(disks[colMirror].status)) {
		usemirror = 0;
	} else
		if (RF_DEAD_DISK(disks[colData].status)) {
			usemirror = 1;
		} else
			if (raidPtr->parity_good == RF_RAID_DIRTY) {
				/* Trust only the main disk */
				usemirror = 0;
			} else
				if (dataQueueLength < mirrorQueueLength) {
					usemirror = 0;
				} else
					if (mirrorQueueLength < dataQueueLength) {
						usemirror = 1;
					} else {
						/* queues are equal length. attempt
						 * cleverness. */
						if (SNUM_DIFF(dataQueue->last_deq_sector, data_pda->startSector)
						    <= SNUM_DIFF(mirrorQueue->last_deq_sector, mirror_pda->startSector)) {
							usemirror = 0;
						} else {
							usemirror = 1;
						}
					}

	if (usemirror) {
		/* use mirror (parity) disk, swap params 0 & 4 */
		tmp_pda = data_pda;
		node->params[0].p = mirror_pda;
		node->params[4].p = tmp_pda;
	} else {
		/* use data disk, leave param 0 unchanged */
	}
	/* printf("dataQueueLength %d, mirrorQueueLength
	 * %d\n",dataQueueLength, mirrorQueueLength); */
}
#if (RF_INCLUDE_CHAINDECLUSTER > 0) || (RF_INCLUDE_INTERDECLUSTER > 0) || (RF_DEBUG_VALIDATE_DAG > 0)
/*
 * Do simple partitioning. This assumes that
 * the data and parity disks are laid out identically.
 */
void
rf_SelectMirrorDiskPartition(RF_DagNode_t * node)
{
	RF_Raid_t *raidPtr = (RF_Raid_t *) node->dagHdr->raidPtr;
	RF_RowCol_t colData, colMirror;
	RF_PhysDiskAddr_t *data_pda = (RF_PhysDiskAddr_t *) node->params[0].p;
	RF_PhysDiskAddr_t *mirror_pda = (RF_PhysDiskAddr_t *) node->params[4].p;
	RF_PhysDiskAddr_t *tmp_pda;
	RF_RaidDisk_t *disks = raidPtr->Disks;
	int     usemirror;

	/* return the [row col] of the disk with the shortest queue */
	colData = data_pda->col;
	colMirror = mirror_pda->col;

	usemirror = 0;
	if (RF_DEAD_DISK(disks[colMirror].status)) {
		usemirror = 0;
	} else
		if (RF_DEAD_DISK(disks[colData].status)) {
			usemirror = 1;
		} else
			if (raidPtr->parity_good == RF_RAID_DIRTY) {
				/* Trust only the main disk */
				usemirror = 0;
			} else
				if (data_pda->startSector <
				    (disks[colData].numBlocks / 2)) {
					usemirror = 0;
				} else {
					usemirror = 1;
				}

	if (usemirror) {
		/* use mirror (parity) disk, swap params 0 & 4 */
		tmp_pda = data_pda;
		node->params[0].p = mirror_pda;
		node->params[4].p = tmp_pda;
	} else {
		/* use data disk, leave param 0 unchanged */
	}
}
#endif


BLADESEDGE\\Ogrila\\OgrilaHut\\Ogrila_Hut.mdx'
    ModelA[76508] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdgeCliffRock03.mdx'
    ModelA[76507] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdgeGroundRock01.mdx'
    ModelA[76506] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdgeGroundRock02.mdx'
    ModelA[76505] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdgeGroundRock03.mdx'
    ModelA[76504] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdgeRockarch01.mdx'
    ModelA[76503] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdgeRockarch02.mdx'
    ModelA[76502] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdgeRockbridge01.mdx'
    ModelA[76501] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdge_OverhangRock_Large_01.mdx'
    ModelA[76500] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdge_OverhangRock_Large_02.mdx'
    ModelA[76499] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdge_OverhangRock_Small_01.mdx'
    ModelA[76498] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdge_OverhangRock_Small_02.mdx'
    ModelA[76497] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\ROCKS\\BladesEdge_OverhangRock_Small_03.mdx'
    ModelA[76496] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_FloatingCrystal.mdx'
    ModelA[76495] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_LargeBase.mdx'
    ModelA[76494] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_LargeBlueTree.mdx'
    ModelA[76493] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_LargeGreenTree.mdx'
    ModelA[76492] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_LargeRedTree.mdx'
    ModelA[76491] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_LargeYellowTree.mdx'
    ModelA[76490] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_SmallBlueBase.mdx'
    ModelA[76489] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_SmallBlueTree.mdx'
    ModelA[76488] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_SmallGreenBase.mdx'
    ModelA[76487] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\SimonGame_SmallGreenTree.mdx'
    ModelA[76486] = 'World\\EXPANSION01\\DOODADS\\BLADESEDGE\\SIMON\\Simon


on<PathBuf>) -> sev::Chain {
        match filename {
            None => chain(),
            Some(f) => {
                let mut file =
                    File::open(f).unwrap_or_exit("unable to open SEV certificate chain file");

                sev::Chain::decode(&mut file, ()).unwrap_or_exit("unable to decode chain")
            }
        }
    }

    fn ca_chain(filename: PathBuf) -> ca::Chain {
        let mut file =
            File::open(&filename).unwrap_or_exit("unable to open CA certificate chain file");
        ca::Chain::decode(&mut file, ()).unwrap_or_exit("unable to decode chain")
    }
}

mod generate {
    use super::*;

    pub fn cmd(oca_path: PathBuf, key_path: PathBuf) -> ! {
        let (mut oca, prv) = sev::Certificate::generate(sev::Usage::OCA)
            .unwrap_or_exit("unable to generate OCA key pair");
        prv.sign(&mut oca).unwrap();

        // Write the certificate
        let mut crt = File::create(oca_path).unwrap_or_exit("unable to create certificate file");
        oca.encode(&mut crt, ())
            .unwrap_or_exit("unable to write certificate file");

        // Write the private key
        let mut key = File::create(key_path).unwrap_or_exit("unable to create key file");
        prv.encode(&mut key, ())
            .unwrap_or_exit("unable to write key file");

        exit(0)
    }
}

mod rotate {
    use super::*;

    pub fn cmd() -> ! {
        pdh()
    }

    fn pdh() -> ! {
        firmware()
            .pdh_generate()
            .unwrap_or_exit("unable to rotate PDH");
        exit(0)
    }
}
day!(
    day07,
    "https://adventofcode.com/2015/day/7/input",
    part1,
    part2
);

use itertools::Itertools;
use std::collections::HashMap;
use std::str::FromStr;

type Value = u16;
type Ident = String;

#[derive(Debug, Clone)]
struct Instruction {
    target: Ident,
    action: Action,
}

#[derive(Debug, Clone)]
enum Action {
    Set(Operand),
    Not(Operand),
    And(Operand, Operand),
    Or(Operand, Operand),
    LShift(Operand, Value),
    RShift(Operand, Value),
}

#[derive(Debug, Clone)]
enum Operand {
    Value(Value),
    Ident(Ident),
}

impl FromStr for Operand {
    type Err = ();

    fn from_str(s: &str) -> ::std::result::Result<Operand, ()> {
        Ok(if let Ok(nr) = s.parse() {
            Operand::Value(nr)
        } else {
            Operand::Ident(s.to_string())
        })
    }
}

fn transform(input: String) -> Vec<Instruction> {
    use self::Action::*;
    input
        .split("\n")
        .filter_map(|line| {
            let pivot = line.find(" -> ")?;
            let target = line.get(pivot + 4..)?.to_string();
            let action = line.get(0..pivot)?;
            let action = if action.starts_with("NOT ") {
                Not(action.get(4..)?.parse().ok()?)
            } else if let None = action.find(" ") {
                Set(action.parse().ok()?)
            } else {
                let mut iter = action.split(" ");
                let ident = iter.next()?.to_string();
                match iter.next()? {
                    "AND" => And(ident.parse().ok()?, iter.next()?.parse().ok()?),
                    "OR" => Or(ident.parse


.113 4.113 0 0124 4.125c0 1.384-.476 2.794-1.128 4.16-.652 1.365-1.515 2.757-2.352 4.104l-.008.013c-.849 1.368-1.669 2.691-2.28 3.97-.614 1.283-.982 2.45-.982 3.503a2.625 2.625 0 104.083-2.183.75.75 0 01.834-1.247A4.125 4.125 0 0119.875 24H4.5a4.125 4.125 0 01-4.125-4.125c0-2.234 1.258-4.656 2.59-6.902.348-.586.702-1.162 1.05-1.728.8-1.304 1.567-2.553 2.144-3.738H3.39c-.823 0-1.886-.193-2.567-1.035A3.647 3.647 0 010 4.125 4.125 4.125 0 014.125 0zM1.5 4.125A2.625 2.625 0 014.125 1.5h12.568a4.108 4.108 0 00-.943 2.625c0 .723.185 1.349.499 1.882H3.389c-.662 0-1.148-.166-1.402-.479A2.148 2.148 0 011.5 4.125zm14.25 15.75c0 .997.354 1.912.943 2.625H4.5a2.625 2.625 0 01-2.625-2.625c0-1.766 1.025-3.85 2.38-6.137.314-.529.646-1.068.98-1.612.953-1.55 1.927-3.136 2.577-4.619H18a.75.75 0 00.417-1.373c-.746-.5-1.167-1.144-1.167-2.009A2.625 2.625 0 0119.875 1.5 2.613 2.613 0 0122.5 4.125c0 1.057-.368 2.229-.982 3.514-.611 1.28-1.431 2.605-2.28 3.972l-.017.028c-.834 1.343-1.694 2.728-2.343 4.086-.652 1.364-1.128 2.77-1.128 4.15z"/></svg>';
  static const String logo_gist_16 =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="16" preserveAspectRatio="xMidYMid meet" viewBox="0 0 25 16"><path fill="currentColor" fill-rule="evenodd" d="M4.7 8.73h2.45v4.02c-.55.27-1.64.34-2.53.34-2.56 0-3.47-2.2-3.47-5.05 0-2.85.91-5.06 3.48-5.06 1.28 0 2.06.23 3.28.73V2.66C7.27 2.33 6.25 2 4.63 2 1.13 2 0 4.69 0 8.03c0 3.34 1.11 6.03 4.63 6.03 1.64 0 2.81-.27 3.59-.64V7.73H4.7v1zm6.39 3.72V6.06h-1.05v6.28c0 1.25.58 1.72 1.72 1.72v-.89c-.48 0-.67-.16-.67-.7v-.02zm.25-8.72c0-.44-.33-.78-.78-.78s-.77.34-.77.78.33.78.77.78.78-.34.78-.78zm4.34 5.69c-1.5-.13-1.78-.48-1.78-1.17 0-.77.33-1.34 1.88-1.34 1.05 0 1.66.16 2.27.36v-.94c-.69-.3-1.52-.39-2.25-.39-2.2 0-2.92 1.2


사 8명과 사바릭을 처치해 달라고 했습니다. 임무를 마치면 에리단에게 가야 합니다."}},
[4907] = {"팅키 스팀보일", nil, {"불타는 평원의 화염 마루에 있는 팅키 스팀보일과 대화해야 합니다."}},
[4921] = {"전쟁으로 잃은 아내", nil, {"십자로에 있는 만크릭을 위해 그의 아내의 흔적을 찾아가야 합니다."}},
[4941] = {"아이트리그의 지혜", nil, {"오그리마의 스랄의 요새에 있는 아이트리그와 대화해야 합니다. 아이트리그의 얘기를 듣고 난 후에는 대족장 스랄과 상의해야 합니다."}},
[4962] = {"지옥사냥개의 영혼", nil, {"지옥의 루비를 가지고 가서 잊혀진 땅에 서식하는 지옥사냥개 중 한 마리에게 사용해야 합니다. 성공하면 지옥의 루비와 사로잡은 지옥사냥개의 영혼을 불모의 땅에 있는 미네라에게 가져가야 합니다."}},
[4963] = {"지옥불정령의 영혼", nil, {"지옥불 에메랄드를 가지고 가서 잊혀진 땅의 지옥불정령 중 하나에게 사용해 영혼을 생포해야 합니다. 성공하면 지옥불 에메랄드와 사로잡은 지옥불정령의 영혼을 불모의 땅에 있는 미네라에게 가져가야 합니다."}},
[4965] = {"오라힐 보주의 지혜", nil, {"불모의 땅에 있는 미네라 보이드렌더와 대화해야 합니다."}},
[4966] = {"카나티 그레이클라우드 보호", nil, {"켄타우로스의 공격으로부터 카나티 그레이클라우드를 보호해야 합니다."}},
[4967] = {"오라힐 보주의 지혜", nil, {"불모의 땅에 있


IGluc3Bpcg== IE1vbm8= Vmlld01vZGVs b21ldGltZXM= IGJhY2tncm91bmRDb2xvcg== IHJvdGF0aW9u IG1hcmk= L3Rlc3Q= SU5TRVJU U3Rhcg== cGh5 SWRz X0dFVA== IGluY3JlYXNlcw== X2Nsb3Nl MjMz X0ZPUk0= IFvigKZdCgo= YXph VEVYVA== IMOk IFZhbg== IGxpZ2h0cw== IEd1aWRl IGRhdGVz LkNvbW1hbmQ= YW1hbg== IHBhdGhz LmVkaXQ= CWFkZA== ZHg= IHJlYWN0aW9u IEJlYWNo LmdldE1lc3NhZ2U= RW52aXJvbm1lbnQ= aW50ZXJlc3Q= IG1pbmlzdGVy IHJlYWRlcnM= CUY= IGRvbWVzdGlj IGZpbGVk Q2l0eQ== IG1hcHBpbmc= IERFUw== IHJlcGFpcg== dGljcw== aXh0dXJl IG5vbWJyZQ== LklTdXBwb3J0SW5pdGlhbGl6ZQ== em8= LklzTnVsbE9y IENhcm9saW5h IERlcg== IEVWRU5U IGdlc3Q= IGhpc3Q= cmVzb3VyY2Vz IG9ycGhhbg== LkFyZQ== IEludmVzdA== UkVGRVJSRUQ= LkxvZ2dlcg== IFJvbWFu IGN1bHR1cmFs ZmVhdHVyZQ== cHRz YnQ= IGRvdA== IGRpYW0= dXNwZW5k X2FjY2Vzcw== KCl7DQo= IHN1cnByaXNl YWJpbA== IHZpcnQ= IGJvbWI= YXJvbg== X0lT IHZhc3Q= UmVhbA== ZXBlbmQ= aWN0ZWQ= IHBpY2tlZA== IEZM IFJlcHVibGljYW5z Lnplcm9z UHJlc3NlZA== c3Vw LkNvcmU= TWljcm9zb2Z0 c2VydmljZXM= YWdpYw== aXZlbmVzcw== IHBkZg== IHJvbGVz NDAz cmFz IGluZHVzdHJpYWw= IGZhY2lsaXRpZXM= MjQ1 6KE= IG5p IGJh IGNscw== CUI= Q3VzdG9tZXI= IGltYWdpbmU= IGV4cG9ydHM= T3V0cHV0U3RyZWFt IG1hZA== KGRl KXsKCg== IGZybw== aHVz IGNvbW1pdHRlZQ== 7J20 LHg= IGRpdmlzaW9u KGNsaWVudA== KGphdmE= b3B0aW9uYWw= LkVxdWFs IFBoeXM= aW5ndQ== MDMz NzIw IHN5bmM= IE5h fX08Lw== T0xVTQ== aXTDqQ== IGlkZW50aWZpZXI= b3dlZA== IGV4dGVudA== IGh1cg== VkE= Y2xhcg== IGVkZ2Vz Q3JpdGVyaWE= IGluZGVlZA== aW5oZXJpdA== IE5pZ2h0 MzAy IHJlcG9ydGluZw== IGVuY291bnRlcg== IGtpbmRz X3ByZWQ= IGNvbnNpZGVyaW5n Lig= IHByb3R


x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs'
  Proj4js.defs['EPSG:3410'] = '+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs'
  Proj4js.defs['EPSG:3411'] = '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs'
  Proj4js.defs['EPSG:3412'] = '+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs'
  Proj4js.defs['EPSG:3413'] = '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'
  Proj4js.defs['EPSG:3414'] = '+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs'
  Proj4js.defs['EPSG:3415'] = '+proj=lcc +lat_1=18 +lat_2=24 +lat_0=21 +lon_0=114 +x_0=500000 +y_0=500000 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs'
  Proj4js.defs['EPSG:3416'] = '+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'
  Proj4js.defs['EPSG:3417'] = '+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs'
  Proj4js.defs['EPSG:3418'] = '+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs'
  Proj4js.defs['EPSG:3419'] = '+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs'
  Proj4js.defs['EPSG:3436'] = '+proj=tmerc +lat_0=36.666666


  }

            void Cancel() const
            {
                OsTimer.Cancel();
            }

        private:
            // The underlying os timer object is mutable
            // as it does not contribute to the identity
            // of the object. The handler+arg determines
            // the identity. This allows placing instances
            // of this class into standard collections.
            mutable Timer_t OsTimer;
            sys_timeout_handler handler;
            void* arg;
        };
    }
}


doAndNext(value);
  }

  public [Symbol.iterator](): IterableIterator<V> {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    return new (this.constructor as any)(this.collection);
  }

  abstract isValid(value: [K, V]): boolean;
  abstract doAndNext(value: [K, V]): IteratorResult<V>;
}
import { createGunzip } from 'zlib';
import { createReadStream, createWriteStream } from 'fs';

export function ungzFile(filepath: string, extractPath: string): Promise<void> {
  return new Promise((resolve, reject) => {
    const fileContents = createReadStream(filepath);
    const writeStream = createWriteStream(extractPath);
    const unzip = createGunzip();
    const file = fileContents.pipe(unzip);
    file.pipe(writeStream);
    file.on('finish', resolve);
    file.on('error', reject);
  });
}
/// <reference path="Tablify.ts" />

module Tablify {
    "use strict";

    /*
     * Contains all Tables, that are currently active on the web page.
     */
    class TableStore {
        /*[Readonly]*/ tableList: Table[] = [];                 //List of all Tables that are available on the page. This list is neccessary in order to find/retrieve Table objects by an element selector

        //Callback handlers:
        onTableRegistered: (table: Table) => void = null;       //Is called everytime a new table is initialised
        onTableUnregistered: (table: Table) => void = null;     //Is called everytime an existing table is destroyed

        /*
         * Returns the Table-instance that manages a specific HTMLTableElement. If the given HTMLElement is not managed by any Table instance, null is returned
         * @table   Selector        If the referenced HTMLElement is managed by an existing table object, the corresponding object is returned
         * @return  Table           The Table-Object that manages the given HTTMLTableElement. If the Element isn't managed, null is being returned.
         */
        getTableByElement(table: Selector): Table {
            for (var i = 0; i < this.tableList.length; ++i) {
                if (this.tableList[i].representsTable(table)) {
                    return this.tableList[i];
                }
            }
            return null;
        }

        /*
         * Returns the Table-instance with a specific id. If the id does not exist, null is returned
         * @tableId     string      tableId of the table, whose instance should be returned
         * @return      Table       The Table-Object with the given tableId. If the id does not exist, null is being returned.
         */
        getTableById(tableId: string): Table {
            assert_argumentsNotNull(arguments);
            for (var i = 0; i < this.tableList.length; ++i) {
                if (this.tableList[i].tableId === tableId) {
                    return this.tableList[i];
                }
            }
            return null;
        }

        /*
         * Returns the requested Table instance.
         * @tableId     string      First tries to return the table with the given tableId. If there is no such table, the string will be interpreted as a jQuery selector
         *              Selector    If the referenced HTMLElement is managed by an existing table object, the corresponding object is returned
         * @return      Table       The Table-Object with the given tableId. If the id does not exist, null is being returned.
         * Note: Using "getTableByElement" and "getTableById()" might be slightly more efficient
         */
        getTable(table: string|Selector): Table {
            if (typeof table === "string") {        //First try to interpret it as a tableId, then inte


tivation_message()
  if self.activate_url ~= nil then
    log:info([[Thank you for installing Supermaven!

Use :SupermavenUsePro to set up Supermaven Pro, or use the command :SupermavenUseFree to use the Free Tier]])
  end
end

function BinaryLifecycle:use_free_version()
  local message = vim.json.encode({ kind = "use_free_version" }) .. "\n"
  loop.write(self.stdin, message) -- fails silently
end

function BinaryLifecycle:logout()
  self.service_message_displayed = false
  local message = vim.json.encode({ kind = "logout" }) .. "\n"
  loop.write(self.stdin, message) -- fails silently
end

function BinaryLifecycle:use_pro()
  if self.activate_url ~= nil then
    log:debug("Visit " .. self.activate_url .. " to set up Supermaven Pro")
    self:open_popup(self.activate_url)
  else
    log:error("Could not find an activation URL.")
  end
end

function BinaryLifecycle:close_popup()
  if self.win ~= nil and vim.api.nvim_win_is_valid(self.win) then
    vim.api.nvim_win_close(self.win, true)
  end
  self.win = nil
end

function BinaryLifecycle:open_popup(message, include_free)
  if self.win ~= nil and vim.api.nvim_win_is_valid(self.win) then
    return
  end
  local buf = vim.api.nvim_create_buf(false, true)

  local width = 0
  local height = 0
  width = u.nvim_get_option_value("columns", { scope = "local" })
  height = u.nvim_get_option_value("lines", { scope = "local" })

  local intro_message = "Please visit the following URL to set up Supermaven Pro"
  if include_free then
    intro_message = intro_message .. " (or use :SupermavenUseFree)."
  end
  local win_height = 3
  local win_width = math.max(#message, #intro_message) + 3
  local row = math.floor((height - win_height) / 2)
  local col = math.floor((width - win_width) / 2)

  local opts = {
    style = "minimal",
    relative = "editor",
    width = win_width,
    height = win_height,
    row = row,
    col = col,
    border = "rounded",
    focusable = true,
    noautocmd = true,
  }

  local win = vim.api.nvim_open_win(buf, true, opts)
  vim.api.nvim_buf_set_lines(buf, 0, -1, false, { intro_message, "", message .. " " })
  u.nvim_set_option_value("winhl", "Normal:Normal", { scope = "local", win = win })
  u.nvim_set_option_value("wrap", true, { scope = "local", win = win })

  self.win = win
end

---@param full_path string
---@param buffer_text string
function BinaryLifecycle:document_changed(full_path, buffer_text)
  self.changed_document_list[full_path] = {
    path = full_path,
    content = buffer_text,
    cursor = api.nvim_win_get_cursor(0),
  }
  local outgoing_message = {
    kind = "inform_file_changed",
    path = full_path,
  }
  self:send_json(outgoing_message)
end

return BinaryLifecycle


t).length;
    const calendarEventsCountElement = document.getElementById('calendar-events-count');
    if (calendarEventsCountElement) {
        calendarEventsCountElement.textContent = calendarEventsCount;
    }

    // Count action items (placeholder - actual count would come from server)
    const actionItemsCountElement = document.getElementById('action-items-count');
    if (actionItemsCountElement) {
        actionItemsCountElement.textContent = '0'; // This would be updated with actual data
    }
}

/**
 * Render the email list
 */
function renderEmailList(emails) {
    const emailListContainer = document.getElementById('email-list-container');
    if (!emailListContainer) return;

    if (emails.length === 0) {
        emailListContainer.innerHTML = '
No emails to display.
';
        return;
    }

    // Apply filters
    const priorityFilter = document.getElementById('priority-filter');
    const categoryFilter = document.getElementById('category-filter');
    const readFilter = document.getElementById('read-filter');

    let filteredEmails = emails;

    if (priorityFilter && priorityFilter.value !== 'all') {
        filteredEmails = filteredEmails.filter(email => email.priority === priorityFilter.value);
    }

    if (categoryFilter && categoryFilter.value !== 'all') {
        filteredEmails = filteredEmails.filter(email => email.category === categoryFilter.value);
    }

    if (readFilter && readFilter.value !== 'all') {
        if (readFilter.value === 'unread') {
            filteredEmails = filteredEmails.filter(email => email.is_unread);
        } else {
            filteredEmails = filteredEmails.filter(email => !email.is_unread);
        }
    }

    // Generate HTML
    let html = '';

    filteredEmails.forEach(email => {
        html += `

${email.subject}

${email.sender} - ${email.snippet || 'No preview available'}

${formatDate(email.date)}

                        ${email.has_calendar_event ? '📅' : ''}
                        ${email.requires_response ? '↩' : ''}

        `;
    });

    emailListContainer.innerHTML = html;

    // Add click event to email items
    const emailItems = document.querySelectorAll('.email-item');
    emailItems.forEach(item => {
        item.addEventListener('click', function() {
            const emailId = this.getAttribute('data-id');
            showEmailDetails(emailId);
        });
    });
}

/**
 * Render calendar events
 */
function renderCalendarEvents(emails) {
    const calendarEventsContainer = document.getElementById('calendar-events-container');
    if (!calendarEventsContainer) return;

    // Filter emails with calendar events
    const emailsWithEvents = emails.filter(email => email.has_calendar_event);

    if (emailsWithEvents.length === 0) {
        calendarEventsContainer.innerHTML = '
No calendar events detected.
';
        return;
    }

    // Placeholder for calendar events (actual data would come from server)
    let html = '';

    html += `

Team Meeting

Tomorrow, 10:00 AM

Weekly team sync to discuss project progress.


",bottom:"0px",border:"1px solid gray",position:"absolute"}),l.appendChild(p);var d=document.createElement("div");a(d,{position:"absolute",right:"0px",bottom:"0px",cursor:"nw-resize",border:"solid 9px",borderColor:"lightblue gray gray #ceade6",zIndex:101});var v=document.createElement("div"),m={top:"0px",left:"20%",right:"0px",bottom:"0px",position:"absolute",padding:"5px",zIndex:100,color:"white",display:"none",overflow:"auto",fontSize:"14px",boxShadow:"-5px 2px 3px gray"};i.isOldIE?m.backgroundColor="#333":m.backgroundColor="rgba(0, 0, 0, 0.6)",a(v,m),l.appendChild(v),n=n||t.defaultOptions;var g=o.edit(p);u=g.getSession(),u.setValue(e.value||e.innerHTML),s&&g.focus(),l.appendChild(d),c(g,p,v,o,n),h(v,d,g);var y="";return r.addListener(d,"mousemove",function(e){var t=this.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;n+r<(t.width+t.height)/2?(this.style.cursor="pointer",y="toggle"):(y="resize",this.style.cursor="nw-resize")}),r.addListener(d,"mousedown",function(e){e.preventDefault();if(y=="toggle"){g.setDisplaySettings();return}l.style.zIndex=1e5;var t=l.getBoundingClientRect(),n=t.width+t.left-e.clientX,i=t.height+t.top-e.clientY;r.capture(d,function(e){l.style.width=e.clientX-t.left+n+"px",l.style.height=e.clientY-t.top+i+"px",g.resize()},function(){})}),g},t.defaultOptions={mode:"javascript",theme:"textmate",wrap:"off",fontSize:"12px",showGutter:"false",keybindings:"ace",showPrintMargin:"false",useSoftTabs:"true",showInvisibles:"false"}});                (function() {
                    window.require(["ace/ext/textarea"], function(m) {
                        if (typeof module == "object" && typeof exports == "object" && module) {
                            module.exports = m;
                        }
                    });
                })();
            define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";function f(e){this.type=e,this.style={},this.textContent=""}var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;white-space: pre-wrap}.ace_static_highlight .ace_gutter {width: 2em;text-align: right;padding: 0 3px 0 0;margin-right: 3px;contain: none;}.ace_static_highlight.ace_show_gutter .ace_line {padding-left: 2.6em;}.ace_static_highlight .ace_line { position: relative; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;u


(conds ...gen.Condition) ISpaceDo {
	return s.withDO(s.DO.Having(conds...))
}

func (s spaceDo) Limit(limit int) ISpaceDo {
	return s.withDO(s.DO.Limit(limit))
}

func (s spaceDo) Offset(offset int) ISpaceDo {
	return s.withDO(s.DO.Offset(offset))
}

func (s spaceDo) Scopes(funcs ...func(gen.Dao) gen.Dao) ISpaceDo {
	return s.withDO(s.DO.Scopes(funcs...))
}

func (s spaceDo) Unscoped() ISpaceDo {
	return s.withDO(s.DO.Unscoped())
}

func (s spaceDo) Create(values ...*model.Space) error {
	if len(values) == 0 {
		return nil
	}
	return s.DO.Create(values)
}

func (s spaceDo) CreateInBatches(values []*model.Space, batchSize int) error {
	return s.DO.CreateInBatches(values, batchSize)
}

// Save : !!! underlying implementation is different with GORM
// The method is equivalent to executing the statement: db.Clauses(clause.OnConflict{UpdateAll: true}).Create(values)
func (s spaceDo) Save(values ...*model.Space) error {
	if len(values) == 0 {
		return nil
	}
	return s.DO.Save(values)
}

func (s spaceDo) First() (*model.Space, error) {
	if result, err := s.DO.First(); err != nil {
		return nil, err
	} else {
		return result.(*model.Space), nil
	}
}

func (s spaceDo) Take() (*model.Space, error) {
	if result, err := s.DO.Take(); err != nil {
		return nil, err
	} else {
		return result.(*model.Space), nil
	}
}

func (s spaceDo) Last() (*model.Space, error) {
	if result, err := s.DO.Last(); err != nil {
		return nil, err
	} else {
		return result.(*model.Space), nil
	}
}

func (s spaceDo) Find() ([]*model.Space, error) {
	result, err := s.DO.Find()
	return result.([]*model.Space), err
}

func (s spaceDo) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Space, err error) {
	buf := make([]*model.Space, 0, batchSize)
	err = s.DO.FindInBatches(&buf, batchSize, func(tx gen.Dao, batch int) error {
		defer func() { results = append(results, buf...) }()
		return fc(tx, batch)
	})
	return results, err
}

func (s spaceDo) FindInBatches(result *[]*model.Space, batchSize int, fc func(tx gen.Dao, batch int) error) error {
	return s.DO.FindInBatches(result, batchSize, fc)
}

func (s spaceDo) Attrs(attrs ...field.AssignExpr) ISpaceDo {
	return s.withDO(s.DO.Attrs(attrs...))
}

func (s spaceDo) Assign(attrs ...field.AssignExpr) ISpaceDo {
	return s.withDO(s.DO.Assign(attrs...))
}

func (s spaceDo) Joins(fields ...field.RelationField) ISpaceDo {
	for _, _f := range fields {
		s = *s.withDO(s.DO.Joins(_f))
	}
	return &s
}

func (s spaceDo) Preload(fields ...field.RelationField) ISpaceDo {
	for _, _f := range fields {
		s = *s.withDO(s.DO.Preload(_f))
	}
	return &s
}

func (


果牛将铁丝吞下，小孩也吓跑了。事后，杨向黄母（一九六○年病亡）说明此事，黄母反复叮嘱不要再往外讲，怕被黄的寄父知道对小孩不利。因此，杨一直未向任何人说过。

   四、我们的结论意见

   根据上述调查情况，我们认为牛的死亡，系原牛主彭炳泉的寄子黄光辉因年幼无知，出于好奇心所为，而不是带有政治性的破坏耕牛案件。据此，我们建议应将此事向当地群众公开宣布查清结案，并摘掉冯国全父子破坏耕牛的帽子，恢复其名誉，以挽回党在群众中的政治影响。

   以上报告当否，请领导阅示。

   一九六一年六月三十日

   来源：《人民公安》1961年第11期（1961年7月21日）

    [返回索引页面]

   Copyright (C)  2024  Marxist-Leninist-Maoist.

   Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

  <title>
   刘少奇关


ListResponseBodyList) SetUnit(v string) *IndustryManufactureMaterialListResponseBodyList {
	s.Unit = &v
	return s
}

type IndustryManufactureMaterialListResponse struct {
	Headers    map[string]*string                           `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                                       `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *IndustryManufactureMaterialListResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s IndustryManufactureMaterialListResponse) String() string {
	return tea.Prettify(s)
}

func (s IndustryManufactureMaterialListResponse) GoString() string {
	return s.String()
}

func (s *IndustryManufactureMaterialListResponse) SetHeaders(v map[string]*string) *IndustryManufactureMaterialListResponse {
	s.Headers = v
	return s
}

func (s *IndustryManufactureMaterialListResponse) SetStatusCode(v int32) *IndustryManufactureMaterialListResponse {
	s.StatusCode = &v
	return s
}

func (s *IndustryManufactureMaterialListResponse) SetBody(v *IndustryManufactureMaterialListResponseBody) *IndustryManufactureMaterialListResponse {
	s.Body = v
	return s
}

type IndustryManufactureMesDispatchTaskHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s IndustryManufactureMesDispatchTaskHeaders) String() string {
	return tea.Prettify(s)
}

func (s IndustryManufactureMesDispatchTaskHeaders) GoString() string {
	return s.String()
}

func (s *IndustryManufactureMesDispatchTaskHeaders) SetCommonHeaders(v map[string]*string) *IndustryManufactureMesDispatchTaskHeaders {
	s.CommonHeaders = v
	return s
}

func (s *IndustryManufactureMesDispatchTaskHeaders) SetXAcsDingtalkAccessToken(v string) *IndustryManufactureMesDispatchTaskHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type IndustryManufactureMesDispatchTaskRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// add
	Action *string `json:"action,omitempty" xml:"action,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// opsoft
	AppKey *string `json:"appKey,omitempty" xml:"appKey,omitempty"`
	// example:
	//
	// task
	BaseDataName *string `json:"baseDataName,omitempty" xml:"baseDataName,omitempty"`
	// example:
	//
	// 3
	DefectsAmount *string `json:"defectsAmount,omitempty" xml:"defectsAmount,omitempty"`
	// example:
	//
	// 张三
	DispatchStaffName *string `json:"dispatchStaffName,omitempty" xml:"dispatchStaffName,omitempty"`
	// example:
	//
	// 170000000332
	DispatchStaffNo *string `json:"dispatchStaffNo,omitempty" xml:"dispatchStaffNo,omitempty"`
	// example:
	//
	// 20
	FineAmount *string `json:"fineAmount,omitempty" xml:"fineAmount,omitempty"`
	// example:
	//
	// 1
	Overdue *int32 `json:"overdue,omitempty" xml:"overdue,omitempty"`
	// example:
	//
	// 321
	PlanQuantity *int64 `json:"planQuantity,omitempty" xml:"planQuantity,omitempty"`
	// example:
	//
	// 1
	Priority *int32 `json:"priority,omitempty" xml:"priority,omitempty"`
	// example:
	//
	// 打磨
	ProcessName *string `json:"processName,omitempty" xml:"processName,omitempty"`
	//


 style_class_map 存放style与class的对应关系，所有节点共用
 */
function unifyClassName(data: INode, style_class_map: any = {}) {
  if (!data || typeof data != 'object') return data;

  const sortedStyleStr: string = sortedStyleObjectAndToJsonStr(data.style);

  if (Object.keys(style_class_map).indexOf(sortedStyleStr) == -1) {
    style_class_map[sortedStyleStr] = {};
    style_class_map[sortedStyleStr][data.attrs.className] = data; // 记住引用
  } else {
    let shortStr = (classStore => {
      let nameArr = Object.keys(classStore);
      let short: any = null;
      nameArr.map(_v => {
        !short && (short = _v);
        if (short.length >= _v.length) {
          short = _v;
        }
      });
      return short;
    })(style_class_map[sortedStyleStr]);
    const shorterName = getShorterStr(data.attrs.className, shortStr);
    style_class_map[sortedStyleStr][data.attrs.className] = data;
    for (const _o in style_class_map[sortedStyleStr]) {
      style_class_map[sortedStyleStr][_o].attrs.className = shorterName;
    }
  }

  data.children &&
  data.children.forEach(childData => {
    unifyClassName(childData, style_class_map);
  });

  return data;
}

export default unifyClassName;
let fs = require('fs');
let afs = require('async-file');
let fse = require('fs-extra');

import { write } from './write';
import { mkdir } from './mkdir';

export async function copy(file:string, dest:string, failonnonexist:boolean = true, filter:(src:string, dest:string) => Promise<boolean> = null): Promise<boolean> {
    return new Promise<boolean>(async (res, rej) => {
        // first check if the file/folder exists.
        let exists = await afs.exists(file);
        if (!exists && failonnonexist) {
            write(`copy: Attempted to copy file that does not exist, marked as failure. "${file}"`, null, false);
            res(false);
            return;
        }
        else if (!exists) {
            write(`copy: Attempted to copy file that does not exist, continuing as normal. "${file}"`, null, false);
            res(true);
            return;
        }

        // if we have just 1 file, copy it over.
        let stats = await afs.lstat(file);
        if (stats.isFile()) {
            fs.createReadStream(file).pipe(fs.createWriteStream(dest));
            res(true);
        }

        // else if we have a directory, deep copy.
        else if (stats.isDirectory()) {
            try {
                await mkdir(dest);
                fse.copy(file, dest, { filter: filter }, (err) => {
                    if (err) {
                        write(err, null, false);
                        res(false);
                    }
                    res(true);
                })
            }
            catch (err) {
                write(`copy: error copying using ncp. ${err}`, null, false);
                res(false);
            }
        }
    });
}export type CssPosition = number | string;

export interface ISize {
  width: CssPosition;
  height: CssPosition;
}

export interface IPosition {
  left?: CssPosition;
  right?: CssPosition;
  top?: CssPosition;
  bottom?: CssPosition;
}

export interface IRect extends IPosition, ISize {}

export interface IAsset {
  image: string;
  width: number;
  height: number;
}

export interfa


-xxl-1 {
    width: 160px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-2 {
    width: 320px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-3 {
    width: 480px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-4 {
    width: 640px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-5 {
    width: 800px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-6 {
    width: 960px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-7 {
    width: 1120px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-8 {
    width: 1280px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-9 {
    width: 1440px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-10 {
    width: 1600px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-11 {
    width: 1760px;
  }
  .tiles-grid.size-xxl-half {
    width: 80px;
  }
  .tiles-grid.size-xxl-12 {
    width: 1920px;
  }
}
@media screen and (min-width: 2000px) {
  .tiles-grid .col-xxxl-1 {
    grid-column: 1;
  }
  .tiles-grid .row-xxxl-1 {
    grid-row: 1;
  }
  .tiles-grid .col-xxxl-2 {
    grid-column: 2;
  }
  .tiles-grid .row-xxxl-2 {
    grid-row: 2;
  }
  .tiles-grid .col-xxxl-3 {
    grid-column: 3;
  }
  .tiles-grid .row-xxxl-3 {
    grid-row: 3;
  }
  .tiles-grid .col-xxxl-4 {
    grid-column: 4;
  }
  .tiles-grid .row-xxxl-4 {
    grid-row: 4;
  }
  .tiles-grid .col-xxxl-5 {
    grid-column: 5;
  }
  .tiles-grid .row-xxxl-5 {
    grid-row: 5;
  }
  .tiles-grid .col-xxxl-6 {
    grid-column: 6;
  }
  .tiles-grid .row-xxxl-6 {
    grid-row: 6;
  }
  .tiles-grid .col-xxxl-7 {
    grid-column: 7;
  }
  .tiles-grid .row-xxxl-7 {
    grid-row: 7;
  }
  .tiles-grid .col-xxxl-8 {
    grid-column: 8;
  }
  .tiles-grid .row-xxxl-8 {
    grid-row: 8;
  }
  .tiles-grid .col-xxxl-9 {
    grid-column: 9;
  }
  .tiles


*/
      public static final int BreakoutActionType_ACTION_TYPE_LAUNCH_BALL_VALUE = 1;
      /**
       * BreakoutActionType_ACTION_TYPE_DESTROY_BALL = 2;
       */
      public static final int BreakoutActionType_ACTION_TYPE_DESTROY_BALL_VALUE = 2;
      /**
       * BreakoutActionType_ACTION_TYPE_FALLING_OBJECT = 3;
       */
      public static final int BreakoutActionType_ACTION_TYPE_FALLING_OBJECT_VALUE = 3;
      /**
       * BreakoutActionType_ACTION_TYPE_MISSILE = 4;
       */
      public static final int BreakoutActionType_ACTION_TYPE_MISSILE_VALUE = 4;

      public final int getNumber() {
        if (this == UNRECOGNIZED) {
          throw new java.lang.IllegalArgumentException(
              "Can't get the number of an unknown enum value.");
        }
        return value;
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static BreakoutActionType valueOf(int value) {
        return forNumber(value);
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static BreakoutActionType forNumber(int value) {
        switch (value) {
          case 0: return BreakoutActionType_ACTION_TYPE_NONE;
          case 1: return BreakoutActionType_ACTION_TYPE_LAUNCH_BALL;
          case 2: return BreakoutActionType_ACTION_TYPE_DESTROY_BALL;
          case 3: return BreakoutActionType_ACTION_TYPE_FALLING_OBJECT;
          case 4: return BreakoutActionType_ACTION_TYPE_MISSILE;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<BreakoutActionType>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          BreakoutActionType> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<BreakoutActionType>() {
              public BreakoutActionType findValueByNumber(int number) {
                return BreakoutActionType.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        if (this == UNRECOGNIZED) {
          throw new java.lang.IllegalStateException(
              "Can't get the descriptor of an unrecognized enum value.");
        }
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return emu.grasscutter.net.proto.BreakoutActionOuterClass.BreakoutAction.getDescriptor().getEnumTypes().get(0);
      }

      private static final BreakoutActionType[] VALUES = values();

      public static BreakoutActionType valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");


Saviour",
			sort_name = "C_Classics_H_Undercover_TheSaviour",
			unlock_id = true,
			tags = {
				tags.progress.heisting,
				tags.difficulty.normal,
				tags.unlock.mask,
				tags.tactics.loud,
				tags.contracts.classic
			}
		},
		man_5 = {
			additional_id = true,
			sort_name = "C_Classics_H_Undercover_BlowOut",
			icon_id = "C_Classics_H_Undercover_BlowOut",
			tags = {
				tags.progress.heisting,
				tags.difficulty.overkill,
				tags.tactics.loud,
				tags.contracts.classic
			}
		},
		masked_villain = {
			sort_name = "Other_H_None_Masked",
			icon_id = "Other_H_None_Masked",
			tags = {
				tags.progress.beginner,
				tags.progress.generic,
				tags.inventory.mask
			}
		},
		melt_1 = {
			icon_id = "C_Vlad_H_Meltdown_AllDiffs_D5",
			ladder = "H_Meltdown",
			sort_name = "C_Vlad_H_Meltdown_AllDiffs_D5",
			additional_id = true,
			tags = {
				tags.progress.completion,
				tags.difficulty.death_wish,
				tags.tactics.loud,
				tags.contracts.vlad
			}
		},
		melt_2 = {
			icon_id = "C_Vlad_H_Meltdown_AllDiffs_D0",
			ladder = "H_Meltdown",
			sort_name = "C_Vlad_H_Meltdown_AllDiffs_D0",
			additional_id = true,
			tags = {
				tags.progress.completion,
				tags.difficulty.normal,
				tags.tactics.loud,
				tags.contracts.vlad
			}
		},
		melt_3 = {
			need_unlock_icons = true,
			icon_id = "C_Vlad_H_Meltdown_TheyDontPay",
			sort_name = "C_Vlad_H_Meltdown_TheyDontPay",
			unlock_id = true,
			tags = {
				tags.progress.heisting,
				tags.difficulty.normal,
				tags.unlock.mask,
				tags.tactics.loud,
				tags.contracts.vlad
			}
		},
		melt_4 = {
			sort_name = "C_Vlad_H_Meltdown_ThereWas",
			icon_id = "C_Vlad_H_Meltdown_ThereWas",
			tags = {
				tags.progress.heisting,
				tags.difficulty.normal,
				tags.tactics.loud,
				tags.teamwork.players_1_to_4,
				tags.contracts.vlad
			}
		},
		moon_1 = {
			icon_id = "C_Vlad_H_StealingXmas_AllDiffs_D4",
			ladder = "H_StealingXmas",
			sort_name = "C_Vlad_H_StealingXmas_AllDiffs_D4",
			additional_id = true,
			tags = {
				tags.progress.completion,
				tags.difficulty.mayhem,
				tags.tactics.loud,
				tags.contracts.vlad
			}
		},
		moon_2 = {
			icon_id = "C_Vlad_H_StealingXmas_AllDiffs_D5",
			ladder = "H_StealingXmas",
			sort_name = "C_Vlad_H_StealingXmas_AllDiffs_D5",
			additional_id = true,
			tags = {
				tags.progress.completion,
				tags.d


nginx/pull/280) ([ok-devalias](https://github.com/ok-devalias))

## [v0.0.8](https://github.com/voxpupuli/puppet-nginx/tree/v0.0.8) (2014-03-20)

[Full Changelog](https://github.com/voxpupuli/puppet-nginx/compare/v0.0.7...v0.0.8)

**Closed issues:**

- Bypass proxy for static files [\#251](https://github.com/voxpupuli/puppet-nginx/issues/251)
- PR \#227 breaks setting multiple options of same type with location\_cfg\_append/location\_cfg\_prepend [\#234](https://github.com/voxpupuli/puppet-nginx/issues/234)
- location in vhost generated in wrong place, nginx syntax error [\#224](https://github.com/voxpupuli/puppet-nginx/issues/224)
- error\_page configuration [\#40](https://github.com/voxpupuli/puppet-nginx/issues/40)

**Merged pull requests:**

- fix missing ensure on concat::fragment resources [\#278](https://github.com/voxpupuli/puppet-nginx/pull/278) ([jfroche](https://github.com/jfroche))
- remove unknown parameter [\#277](https://github.com/voxpupuli/puppet-nginx/pull/277) ([jfroche](https://github.com/jfroche))
- Update README.markdown - set minimium ruby version [\#276](https://github.com/voxpupuli/puppet-nginx/pull/276) ([grooverdan](https://github.com/grooverdan))
- New parameter worker\_rlimit\_nofile [\#275](https://github.com/voxpupuli/puppet-nginx/pull/275) ([dkerwin](https://github.com/dkerwin))
- Make template for nginx.conf.erb configurable [\#272](https://github.com/voxpupuli/puppet-nginx/pull/272) ([DracoBlue](https://github.com/DracoBlue))
- Ensure that vhosts are purged with new parameter purge\_vhost [\#271](https://github.com/voxpupuli/puppet-nginx/pull/271) ([zdenekjanda](https://github.com/zdenekjanda))
- Allow values to be hashes at prepend,append,custom cfg for locations [\#266](https://github.com/voxpupuli/puppet-nginx/pull/266) ([ese](https://github.com/ese))
- Puppet removes dir only if "force =\> true" [\#265](https://github.com/voxpupuli/puppet-nginx/pull/265) ([huandu](https://github.com/huandu))
- add service\_ensure support [\#264](https://github.com/voxpupuli/puppet-nginx/pull/264) ([welterde](https://github.com/welterde))
- add location\_custom\_cfg\_prepend support [\#259](https://github.com/voxpupuli/puppet-nginx/pull/259) ([pessoa](https://github.com/pessoa))
- Bugfix: Add missing gzip parameter [\#257](https://github.com/voxpupuli/puppet-nginx/pull/257) ([swanke](https://github.com/swanke))
- Bugfix autoindex in nginx::resource::vhost [\#255](https://github.com/voxpupuli/puppet-nginx/pull/255) ([bionix](https://github.com/bionix))
- Added vhost ssl prepend and append [\#254](https://github.com/voxpupuli/puppet-nginx/pull/254) ([cdenneen](https://github.com/cdenneen))
- Allow location\_{allow,deny} parameter to be used for


    solve();
  }
}
void set_pb_func_MyStruct(const ::MyStruct &cppObj, test_namespace::test::MyStruct &pbObj) {
	pbObj.set_ip(cppObj.ip);
	pbObj.set_port(cppObj.port);
}
void get_pb_func_MyStruct(::MyStruct &cppObj, const test_namespace::test::MyStruct &pbObj) {
	cppObj.ip = pbObj.ip();
	cppObj.port = pbObj.port();
}
void set_pb_func_MyClass(const ::MyClass &cppObj, test_namespace::test::MyClass &pbObj) {
	pbObj.set_m1(cppObj.m1);
	pbObj.set_m2(cppObj.m2);
	pbObj.set_m3(cppObj.m3);
	pbObj.set_m4(cppObj.m4);
	pbObj.set_m5(cppObj.m5);
	pbObj.set_m6(cppObj.m6);
	set_pb_func_MyStruct(cppObj.s1, *(pbObj.mutable_s1()));
	set_pb_func_MyStruct(cppObj.s2, *(pbObj.mutable_s2()));
	for (int i = 0; i < (10); ++i) {
		pbObj.add_arr1(((unsigned*)cppObj.arr1)[i]);
	}
	for (int i = 0; i < (10 * 20); ++i) {
		pbObj.add_arr2(((unsigned*)cppObj.arr2)[i]);
	}
}
void get_pb_func_MyClass(::MyClass &cppObj, const test_namespace::test::MyClass &pbObj) {
	cppObj.m1 = pbObj.m1();
	cppObj.m2 = pbObj.m2();
	cppObj.m3 = pbObj.m3();
	cppObj.m4 = pbObj.m4();
	cppObj.m5 = pbObj.m5();
	cppObj.m6 = pbObj.m6();
	get_pb_func_MyStruct(cppObj.s1, pbObj.s1());
	get_pb_func_MyStruct(cppObj.s2, pbObj.s2());
	for (int i = 0; i < pbObj.arr1_size(); ++i) {
		((unsigned*)cppObj.arr1)[i] = pbObj.arr1(i);
	}
	for (int i = 0; i < pbObj.arr2_size(); ++i) {
		((unsigned*)cppObj.arr2)[i] = pbObj.arr2(i);
	}
}
#include "Nokta.h"
#include <iostream>
#include <cmath>
Nokta::Nokta() : x(0.0), y(0.0) {}

Nokta::Nokta(double x_, double y_) : x(x_), y(y_) {}
// Kopya constructor,other noktasnn x ve y deerlerine ofset_x ve ofset_y deerleri eklenerek yeni bir nokta oluturulur
Nokta::Nokta(const Nokta& other, double ofset_x, double ofset_y) : x(other.getX() + ofset_x), y(other.getY() + ofset_y) {}

double Nokta::getX() const {
    return x;
}

void Nokta::setX(double x_) {
    x = x_;
}

double Nokta::getY() const {
    return y;
}

void Nokta::setY(double y_) {
    y = y_;
}

void Nokta::set(double x_, double y_) {
    x = x_;
    y = y_;
}
// Noktann koordinatlarnn String gsterimini dndrr
std::string Nokta::toString() const {
    return "(" + std::to_string(x) + ", " + s


Indices(src: Primitive, dest: number[], delta: number): void {
    if (src.indices) {
        const iLen = src.indices.length;
        for (let i = 0; i < iLen; i++) {
            dest.push(src.indices[i] + delta);
        }
    }
}

/**
 * @hidden
 */
function max(xs: number[]): number {
    return xs.reduce(function (a, b) { return a > b ? a : b; });
}

/**
 * @hidden
 */
function joinIndices(previous: Primitive, current: Primitive, dest: number[]): void {
    if (previous.indices) {
        const lastIndex = previous.indices[previous.indices.length - 1];
        if (current.indices) {
            const nextIndex = current.indices[0] + max(previous.indices) + 1;
            // Make this triangle degenerate.
            dest.push(lastIndex);
            // Join to the next triangle strip.
            dest.push(nextIndex);
        }
    }
}

/**
 * @hidden
 */
function ensureAttribute(attributes: { [name: string]: Attribute }, name: string, size: AttributeSizeType): Attribute {
    if (!attributes[name]) {
        attributes[name] = { values: [], size };
    }
    return attributes[name];
}

/**
 * @hidden
 */
function copyAttributes(primitive: Primitive, attributes: { [name: string]: Attribute }) {
    const keys = Object.keys(primitive.attributes);
    const kLen = keys.length;
    for (let k = 0; k < kLen; k++) {
        const key = keys[k];
        const srcAttrib = primitive.attributes[key];
        const dstAttrib = ensureAttribute(attributes, key, srcAttrib.size);
        const svalues = srcAttrib.values;
        const vLen = svalues.length;
        for (let v = 0; v < vLen; v++) {
            dstAttrib.values.push(svalues[v]);
        }
    }
}

/**
 * reduces multiple TRIANGLE_STRIP Primitives to a single TRAINGLE_STRIP Primitive.
 * @hidden
 */
export function reduce(primitives: Primitive[]): Primitive {
    for (let i = 0; i < primitives.length; i++) {
        const primitive = primitives[i];
        if (primitive.mode !== BeginMode.TRIANGLE_STRIP) {
            throw new Error(`mode (${primitive.mode}) must be TRIANGLE_STRIP`);
        }
    }
    return primitives.reduce(function (previous: Primitive, current: Primitive) {
        const indices: number[] = [];

        copyIndices(previous, indices, 0);
        joinIndices(previous, current, indices);
        copyIndices(current, indices, max(previous.indices) + 1);

        const attributes: { [name: string]: Attribute } = {};

        copyAttributes(previous, attributes);
        copyAttributes(current, attributes);

        return {
            mode: BeginMode.TRIANGLE_STRIP,
            indices,
            attributes
        };
    });
}
import { Component, OnInit, ViewChild } from '@angular/core';
import { delay, map, switchMap, tap } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http';
import { Observable, Subject, Subscription, of } from 'rxjs';
import { BusyComponent } from '../busy/busy.component';

export interface SampleUser {
  id: number;
  name: string;
  email: string;
  phone: string;
}

@Component({
  selector: 'app-sample-content',
  templateUrl: './sample-content.component.html',
  styleUrls: ['./sample-content.component.scss']
})
export class SampleContentComponent implements OnI


base_node.clear();
   acc_limit_node.clear();
   acc_stride_node.clear();
   acc_doloop_body = NULL;
   for (UINT32 i = 0; i < acc_collapse_count; i++) {
	 ACC_Extract_Per_Level_Do_Info(do_tree, i);
	 do_tree = WN_first(WN_do_body(do_tree));
   }
 }

 /*extract indices information*/
 void
 ACC_Extract_Index_Info ( WN* pdo_node )
 {
   WN *prev_pdo = NULL;
   acc_forloop_index_st.clear();
   acc_forloop_index_type.clear();
   for (UINT32 i = 0; i < acc_collapse_count; i++) {
	 if (WN_operator(pdo_node) != OPR_DO_LOOP) {
	   /* in case collapse count exceeds number of do loops */
	   acc_collapse_count = i;
	   pdo_node = prev_pdo;
	   break;
	 }
	 ST * tmp_do_index_st = WN_st(WN_index(pdo_node));
	 TYPE_ID tmp_do_index_type = TY_mtype(ST_type(tmp_do_index_st));
	 if (tmp_do_index_type == MTYPE_I1 || tmp_do_index_type == MTYPE_I2)
	   tmp_do_index_type = MTYPE_I4;
	 else if (tmp_do_index_type == MTYPE_U1 || tmp_do_index_type == MTYPE_U2)
	   tmp_do_index_type = MTYPE_U4;
	 acc_forloop_index_st.push_back(tmp_do_index_st);
	 acc_forloop_index_type.push_back(tmp_do_index_type);
	 prev_pdo = pdo_node;
	 pdo_node = WN_first(WN_do_body(pdo_node));
   }
 }

static WN* ACC_Extract_Seq_Loops_Info(WN * tree )
{

	WN        *cur_node;
	WN        *first_node;
	WN        *prev_node;
	WN        *next_node;
  	BOOL 	  is_region;
	for (cur_node = WN_first(tree); cur_node; cur_node = next_node)
	{

		prev_node = WN_prev(cur_node);
		next_node = WN_next(cur_node);
		//Process the loop region which is inside the kernel region
		if ((is_region = (WN_opcode(cur_node) == OPC_REGION &&
	                     WN_first(WN_region_pragmas(cur_node)) &&
	                     WN_opcode(WN_first(
		        WN_region_pragmas(cur_node))) == OPC_PRAGMA) ) &&
	   		WN_pragma(WN_first(WN_region_pragmas(cur_node))) ==
					WN_PRAGMA_ACC_LOOP_BEGIN)
		{
		  //this for loop is seq, ignore any clauses
		  //stupid fortran will generate some trash code right before do-loop
		  WN* wn_region_bdy = WN_COPY_Tree(WN_region_body(cur_node));
		  WN* sequential_list = NULL;
		  WN* pdo_node = WN_first(wn_region_bdy);
		  //WN* sequential_tmp = NULL;
		  while(WN_operator(pdo_node) != OPR_DO_LOOP)
		  {
		  	if(sequential_list == NULL)
				sequential_list = WN_CreateBlock();
		    WN_INSERT_BlockLast(sequential_list, WN_COPY_Tree(pdo_node));
			pdo_node = WN_next(pdo_node);
		  }
		  WN* wn_doloop_body = ACC_Extract_Seq_Loops_Info(WN_do_body(pdo_node));


pt-br/3.6/library/stdtypes.html#string-methods) e a [mini-linguagem de formatação](https://docs.python.org/pt-br/3.6/library/string.html#formatstrings).

# Lendo todas as imagens de uma pasta

![exemplo de grade de imagens](https://raw.githubusercontent.com/villares/material-aulas/master/Processing-Python/assets/muitas_imagens.png)

> Exemplo de execução carregando 110 imagens medievais coletadas pelo artista e educador[Daniel Seda](https://www.danielseda.com/).

Tendo visto previamente como [ler e usar imagens de arquivos externos](imagens_externas.md) com `load_image()`, e a estrutura de dados lista (`list`), neste exemplo mais avançado vamos permitir que a pessoa escolha uma pasta (diretório/*folder*) e o *sketch* vai carregar todas as imagens nela encontradas e mostrá-las em uma grade. Vamos usar uma função do py5 que pede ao sistema operacional que abra uma janela na interface gŕafica para a seleção de pastas nos locais de armazenagem de arquivos.

**Cuidado!** Carregar na memória um grande número de imagens pesadas pode fazer o seu programa quebrar... neste caso pode ser interessante gerar e armazernar apenas *thumbnails*, versões reduzidas das imagens, um assunto que não é abordado aqui.

## A função `select_folder()` do py5

A seleção da pasta começa com uma chamada da função `select_folder()`, quando pressioanada a tecla 'o' (na função de evento `key_pressed()`).

```python
def setup():
    size(880, 550)

def draw():
    background(0)
    # aqui vai ter o código que põe as imagens na tela

def key_pressed():
    if key == 'o':
        select_folder('Selecione uma pasta', adicionar_imagens)

# este código ainda não funciona, falta definir a função `adicionar_imagens()`
```

Note que o primeiro argumento de `select_folder()` é `'Selecione uma pasta'` um simples texto (*string*) que vai como título da janela de seleção, já o segundo argumento, `adicionar_imagens`, é bastante curioso, trata-se de uma referência a uma função que será chamada quando a pessoa terminar de interagir com a janela de seleção de pastas apresentada pelo sistema operacional.

Estamos passando uma função como argumento de outra função e usando uma estratégia conhecida como "função de retorno" ou, em inglês, *callback*. Repare que a referência ao "objeto função" que é passado como segundo argumento da função `select_folder()` é o nome da função, sem aspas (não é um *string*!) e sem os parenteses `()`, os parenteses fariam disso uma chamada da função, ela seria executada imediatamente neste ponto do código.

Na estratégia de *callback* uma função que definimos é chamada para nós quando um certo evento acontece. Neste nosso exemplo, a função que vamos definir será `adicionar_imagens()` e a sua chamada acontece no envento do encerramento da janela de selecionar pastas. Note que a abertura da janela de seleção do sistema é iniciada com a execução de `select_folder()`, mas o momento do encerramento depende da pessoa usando o programa e não sabemos quanto tempo vai levar para acontecer.

## A função `adicionar_imagens()`

Então, com


& dims) noexcept`
  * 设置给定输入的形状。
  * 参数：
    * `tensorName`：输入张量的名称。
    * `dims`：输入张量的形状。
  * 返回值：调用成功返回 `true`，否则返回 `false`。

\

* `TRT_DEPRECATED Dims getBindingDimensions(int32_t bindingIndex) const noexcept`
  * 获取绑定的动态维度。
  * 参数：
    * `bindingIndex`：绑定索引。
  * 返回值：当前选择的绑定维度。

\

* `Dims getTensorShape(char const* tensorName) const noexcept`
  * 获取给定输入或输出的形状。
  * 参数：
    * `tensorName`：输入或输出张量的名称。
  * 返回值：输入或输出张量的形状。

\

* `TRT_DEPRECATED bool setInputShapeBinding(int32_t bindingIndex, int32_t const* data) noexcept`
  * 设置输入张量的形状绑定值。
  * 参数：
    * `bindingIndex`：输入张量的索引。
    * `data`：输入张量的形状值。
  * 返回值：调用成功返回 `true`，否则返回 `false`。

\

* `TRT_DEPRECATED bool getShapeBinding(int32_t bindingIndex, int32_t* data) const noexcept`
  * 获取输入张量的形状绑定值。
  * 参数：
    * `bindingIndex`：输入或输出张量的索引。
    * `data`：存储形状值的指针。
  * 返回值：获取成功返回 `true`，否则返回 `false`。

\

**名称和引擎**

\

* `void setName(char const* name) noexcept`
  * 设置执行上下文的名称。
  * 参数：
    * `name`：名称字符串。

\

* `char const* getName() const noexcept`
  * 获取执行上下文的名称。
  * 返回值：名称字符串。

\

* `ICudaEngine const& getEngine() const noexcept`
  * 获取关联的引擎。
  * 返回值：引擎引用。

\

**张量地址**

\

* `bool setTensorAddress(char const* tensorName, void* data) noexcept`
  * 设置给定输入或输出张量的内存地址。
  * 参数：
    * `tensorName`：张量名称。
    * `data`：数据指针。
  * 返回值：调用成功返回 `true`，否则返回 `false`。

\

* `void const* getTensorAddress(char const* tensorName) const noexcept`
  * 获取给定输入或输出张量的内存地址。
  * 参数：
    * `tensorName`：张量名称。
  * 返回值：数据指针。

\

* `bool setInputTensorAddress(char const* tensorName, void const* data) noexcept`
  * 设置给定输入的内存地址。
  * 参数：
    * `tensorName`：输入张量名称。
    * `data`：数据指针。
  *