text:
[![Build status](https://ci.appveyor.com/api/projects/status/x1xa4ilqfllewosp/branch/master?svg=true)](https://ci.appveyor.com/project/Zoltu/gradle-plugin-versioning/branch/master)
![License](https://img.shields.io/github/license/Zoltu/Gradle.Plugin.Versioning.svg)
[![Join the chat at https://gitter.im/Zoltu/Gradle.Plugin.Versioning](https://badges.gitter.im/Zoltu/Gradle.Plugin.Versioning.svg)](https://gitter.im/Zoltu/Gradle.Plugin.Versioning?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A Gradle plugin for automatically generating versions from git tags and commits.

## Usage
1. Add the plugin to your `build.gradle` file as shown [here](https://plugins.gradle.org/plugin/com.zoltu.git-versioning).
2. Tag your repository (anywhere in history) with an annotated tag (light tags won't work) named like `v1.2`.
3. Remove the `version` property from your `build.gradle` file.
4. (Optional) Use `gradle version` or `./gradlew version` to see the current `version`.

## Advanced Usage
If you want more control over how you version, you can directly access the [`VersionInfo`](https://github.com/Zoltu/Gradle.Plugin.Versioning/blob/master/src/main/kotlin/com/zoltu/gradle/plugin/VersionInfo.kt) object inside your gradle script.
```groovy
def versionInfo = ZoltuGitVersioning.versionInfo
print "${versionInfo.major}.${versionInfo.minor}.${versionInfo.commitCount}"
```
Additionally, you may also change how the plugin processes version information by specifying custom processors.

### Custom Describe Processor
The plugin no longer supports semantic versioning out-of-box. Instead, you may specify a custom provider function which accepts the result of `git describe` and returns a map of each versioning component like so:
```groovy
ZoltuGitVersioning {
    customDescribeProcessor { describeResults ->
        def matcher = (describeResults =~ /(?<major>[0-9]+?)\.(?<minor>[0-9]+?)(?:\-(?<tags>[0-9A-Za-z\.\-]+))?\-(?<commitCount>[0-9]+?)\-g(?<sha>[a-zA-Z0-9]+)/)
        matcher.matches()
        [
            major: matcher.group('major'),
            minor: matcher.group('minor'),
            commitCount: matcher.group('commitCount'),
            sha: matcher.group('sha'),
            tags: matcher.group('tags')
        ]
    }
}
```

### Custom Output Processor
The default implementation merely assigns the value of `VersionInfo.toString()` as the project version. If you want to perform your own processing on the version information produced by the plugin, you may do so as follows:
```groovy
// With input tag '1.0.0-36'
ZoltuGitVersioning {
    customVersionToString { versionInfo ->
        "${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}.${versionInfo.commitCount}"
    }
}
```
Will produce: '<IP_ADDRESS>'.

## Notes
* Please keep in mind that any calls to `ZoltuGitVersioning.versionInfo` must occur only *after* declaring any custom processors.
* If you need to reference `version` in your build.gradle file (outside of a lazily executed closure) then you will need to reference `ZoltuGitVersioning.versionInfo` somewhere *before* you reference `version`.  This plugin lazily populates `version` and referencing `ZoltuGitVersioning.versionInfo` will trigger that lazy population.  If you do nothing, it will be triggered after your build.gradle has finished processing (before any tasks are executed).

gha_language: Kotlin


text:
# Scully - Pre-Requisites

Before you start building awesome sites with **Scully**, you'll need to familiarized and understand how some web technologies works.

- Command Line Interface (CLI)
- GIT
- Node

Those 3 topics are very important to start to use Scully successfully.

### Software tools to be able to work with Scully are:

- Node 10 or higher.
- Angular CLI version 9.

Prev: [Scully ⬅](scully.md) | Next: [Getting Started ➡](getting-started.md)

license: MIT

repository: sandyeveliz/scully

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: sandyeveliz/scully


text:
Role Name
========

This role installs and setup NFS server.

Requirements
------------

Ansible 1.4 or higher.

Role Variables
--------------

```yaml
nfs_exported_directories: []
nfs_ports:
  - {name: LOCKD_TCPPORT,       value: 32803}
  - {name: LOCKD_UDPPORT,       value: 32769}
  - {name: MOUNTD_PORT,         value: 892}
  - {name: RQUOTAD_PORT,        value: 875}
  - {name: STATD_PORT,          value: 662}
  - {name: STATD_OUTGOING_PORT, value: 2020}
```

Dependencies
------------

None.

Example Playbook
-------------------------

```yaml

- role: nfs
  nfs_exported_directories:
      - path: /export/test1
        hosts:
          - {name: <IP_ADDRESS>/16, options: ["ro", "sync"]}
          - {name: <IP_ADDRESS>, options: ["rw", "sync", "no_root_squash"]}
      - path: /export/test2
        hosts:
          - {name: "*", options: []}
```

License
-------

BSD

Author Information
------------------

This role was created in 2014 by Atsushi Sasaki (@atsaki).

repository: artefactual/deploy-pub

gha_language: Ruby

gha_license_id: NOASSERTION

repo_name: artefactual/deploy-pub


text:
# Hashtag Composer Docker Glue

This directory is meant for starting a dockerized nginx server, which unifies
the vuejs and flask development servers on their repective ports to one
single dev server on localhost:9000.

Doesn't work out of the box on Docker for Mac.

## Setup

Install docker. Install docker-compose. Start respective dev servers.

```
docker-compose up
```

## Links

https://docs.docker.com/compose/compose-file/#short-syntax

repository: piviitech/hashtag-composer

repo_name: piviitech/hashtag-composer


text:
# purescript-type-data

This experiment attempts to model data types at the type level and provide tools for computing with said definitions.  Including type variance checking and determining whether or not a data type could have a functor instance.

Check at the bottom of /src/Main.purs for an example with `Maybe`

Currently not very expressive: it can't talk about data types which refer to existing types - but it will do soon.

repository: LiamGoodacre/purescript-type-data

repo_name: LiamGoodacre/purescript-type-data


text:
# MapasDeCampos
Created by: Joao Rodrigues @ hidromod https://hidromod.com/

Last Update: 01-10-2019

MapasDeCampos creates figures for almost any MOHID hdf5 file format and MOHID time series files and any variable. Main purpose is for production and operational use, it can generate:

   - 2D plots of any variable inside MOHID hdf5 files
   - 1D plots of MOHID time series
   - Plot statistical comparison between two hdf5 in mohid format, that come from ComapreHDF5 tool

## Prerequisities:
        - Python 3.7
        - h5py
        - basemap
        - proj4

## How to use this code:
This code has several test cases, each test case, has their own bash and PythonFigures.dat which is the main driver of the code.

### TestFiles/Compare2Hdf5
Produce a .png images with 4 plots:
   - Time averge model
   - Time average obervation
   - Time average bias
   - Space averge  Time series

INPUT:
   - RGF0.hdf5  – hdf5 with differences that come from Compare2Hdf5 tool
   - 0/1/2, time series
   - PythonFigures.dat rules for the python

RUN:
Just run the bash :)
    Run.bat where you need to adapt the python.exe path.

## Known Errors:
If you get an error like this:

         from mpl_toolkits.basemap import Basemap
        File "C:\ProgramData\Anaconda3\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 155, in <module>
         pyproj_datadir = os.environ['PROJ_LIB']
        File "C:\ProgramData\Anaconda3\lib\os.py", line 678, in __getitem__
          raise KeyError(key) from None
        KeyError: 'PROJ_LIB'

Go to src/moduloMapsBasemaps.py and uncomment line 5 and add the path where project4 is located

gha_language: Python

gha_license_id: MIT


text:
---
name: Bug Report
labels: bug
about: Report errors and problems
---

# Bug Report

<!-- First, thank you for reporting a bug. That takes time and we appreciate that! -->

| Subject        | Details                                                         |
| :------------- | :---------------------------------------------------------------|
| Rector version | e.g. v0.11.5 (invoke `vendor/bin/rector --version`)             |

<!-- Please describe your problem here. -->

## Minimal PHP Code Causing Issue

<!-- Reproduce the issue using https://getrector.com/demo/ and post the URL here. -->

## Expected Behaviour

<!-- How should Rector change the code? Or should Rector skip it? -->

repository: rectorphp/rector

branch_name: refs/heads/main

gha_language: PHP

repo_name: rectorphp/rector


text:
Getting Confident
================

Once you've got a feel for the language, and some of the patterns here's some advice to start speeding you up in getting around the systems.

Use Reveal
---------------
[Reveal](http://revealapp.com) is a tool for inspecting the view hierarchy. Folio was _featured_ on their website as an example of how pretty it looks. You should have Reveal installed, and when our app is loaded you select the simulator type in the top left of Reveal. See this [gist](https://gist.github.com/raven/8553761) for getting started, or be lazy: quit Xcode and run:

    mkdir -p ~/Library/Developer/Xcode/UserData/xcdebugger && curl https://gist.githubusercontent.com/raven/8553761/raw/Breakpoints_v2.xcbkptlist -o ~/Library/Developer/Xcode/UserData/xcdebugger/Breakpoints_v2.xcbkptlist

Use AppCode
---------------
AppCode is Xcode but with a lot of extra goodies because they don't have to say no to everything. It's a Java app and I _orta_ can understand when you wince but I can promise you that the 1%ers use it. You should too.

My install settings are in my [AppCode Repo](https://github.com/orta/AppCode), you can import them via _File > Import Settings_. They are a mix of TextMate + Xcode.

Use Base & Chairs
---------------
Core Data is nice to introspect as it's just a sqlite database, use this to your advantage by installing my gem _chairs_ to open the app's build folder then you can look in the Documents folder and open the DB in [Base](http://menial.co.uk) (or similar) for inspection.

Use Dash
---------------
Documentation is essential. Having quick access is even more useful. With Dash I partially type the class then guess the method name after pressing space. [Dash](http://kapeli.com) makes this very very fast.

If you insist on using Xcode
---------------
I kinda understand, it's worth the switch. Anyway.

* Use Xcode Plugins. The Git & FuzzyAutoComplete ones especially. See http://alcatraz.io
* Make "Open Quickly" command + t in Xcode

repository: alyshaharris/energy

repo_name: alyshaharris/energy


text:
# 01-Guessing
GLaDOS is an Artificial Intelligence, who is the main antagonist in the video game "Portal" by Valve.

Her priority protocol is to perform tests for Aperture Science's products.

In this specialized test, she generates a random integer between 1 and 100. It is your job to guess her number. She expects you to do it in less than 5 guesses.

The only hints she will give you is whether your number is too high or low.


text:
+++
# Accomplishments widget.
widget = "accomplishments"  # See https://sourcethemes.com/academic/docs/page-builder/
headless = true  # This file represents a page section.
active = true  # Activate this widget? true/false
weight = 50  # Order that this section will appear.

title = "Accomplishments"
subtitle = ""

# Date format
#   Refer to https://sourcethemes.com/academic/docs/customization/#date-format
date_format = "Jan 2006"

# Accomplishments.
#   Add/remove as many `[[item]]` blocks below as you like.
#   `title`, `organization` and `date_start` are the required parameters.
#   Leave other parameters empty if not required.
#   Begin/end multi-line descriptions with 3 quotes `"""`.

[[item]]
  organization = "CISCO NETWORKING"
  organization_url = "https://www.netcad.com"
  title = "IT Essentials"
  url = ""
  certificate_url = "https://www.netcad.com"
  date_start = "2018-08-17"
  date_end = ""
  description = "Basic introduction to Software and Hardware.Operating Systems,Networking and Trouble-Shooting"

[[item]]
  organization = "Udemy"
  organization_url = "https://www.udemy.com"
  title = "Python3 BootCamp"
  url = ""
  certificate_url = "https://www.udemy.com"
  date_start = "2019-03-01"
  date_end = ""
  description = "Design a web or desktop application in Python."

[[item]]
  organization = "Udemy"
  organization_url = "https://www.udemy.com/course"
  title = " JavaScript Basics"
  url = ""
  certificate_url = "https://www.udemy.com/course/javascript-basics-start-coding-in-5-minutes-2019"
  date_start = "2019-07-01"
  date_end = ""
  description = "Learn Basic Java Skill sets."

+++

repository: KelvinHalx/KnightOfCodeNet

gha_language: Jupyter Notebook

repo_name: KelvinHalx/KnightOfCodeNet


text:
```scala
libraryDependencies += "io.laminext" %%% "websocket" % "{{laminextVersion}}"
```

```scala
import io.laminext.websocket._
```

In order to build a WebSocket connection, you first need to specify the endpoint to connect to:

## Absolute endpoint URL:

```scala
import io.laminext.websocket._
val ws = WebSocket.url("wss://echo.websocket.org")
```

## Relative endpoint URL:

```scala
import io.laminext.websocket._
val ws = WebSocket.path("/my-ws-endpoint")
```

## Receive

Then you specify the type of the messages to be received:

```scala
import io.laminext.websocket._
WebSocket.path("/my-ws-endpoint").receiveString
WebSocket.path("/my-ws-endpoint").receiveBlob
WebSocket.path("/my-ws-endpoint").receiveArrayBuffer
```

If you want to decode the received messages (JSON, etc), you can specify a decoder:

```scala
import io.laminext.websocket._
case class MyData()
val myDecode: String => Either[Throwable, MyData] = ???
WebSocket.path("/my-ws-endpoint").receiveText(myDecode)
```

## Send

After that, in a similar way you specify the type of messages to be sent:

```scala
import io.laminext.websocket._
WebSocket.path("/my-ws-endpoint").receiveString.sendString
WebSocket.path("/my-ws-endpoint").receiveString.sendBlob
WebSocket.path("/my-ws-endpoint").receiveString.sendArrayBuffer
```

If you want to encode the messages before sending (JSON, etc), you can specify an encoder:

```scala
import io.laminext.websocket._
case class MyData()
val myEncode: MyData => MyData = ???
WebSocket.path("/my-ws-endpoint").receiveString.sendText(myEncode)
```

## Shortcuts

There are functions to specify the send and receive types at once:

```scala
import io.laminext.websocket._
WebSocket.path("/my-ws-endpoint").string // send and receive strings
WebSocket.path("/my-ws-endpoint").blob // send and receive blobs
WebSocket.path("/my-ws-endpoint").arraybuffer // send and receive array buffers
```

## Configure and build

The final step is to call the `.build` method.

This method accepts the following parameters:

### Managed

```scala
import io.laminext.websocket._
WebSocket.path("/my-ws-endpoint").string.build(managed = true)
```

When `managed` is `true`, the websocket connection will be managed by the lifecycle of the `.connect` binder:

```scala
import io.laminext.websocket._
val ws = WebSocket.path("/my-ws-endpoint").string.build(managed = true)
div(
  ws.connect
)
```

When the `div` is mounted, the websocket will try to connect (and re-connect, see below). When the div is unmounted,
the websocket will disconnect. You can "bind" multiple times (adding `ws.connect` to multiple elements) — in that case
the websocket will connect when the first element is mounted, and disconnect when all of them are unmounted.

If `managed` is `false`, then you control the websocket using its `.disconnectNow()`/`.reconnectNow()` methods, or the
`disconnect`/`reconnect` observers.

### Buffer sent messages when disconnected

```scala
import io.laminext.websocket._
WebSocket.path("/my-ws-endpoint").string.build(bufferWhenDisconnected = true, bufferSize = 50)
```

When `bufferWhenDisconnected` is `true`, the sent messages will be buffered (up to `bufferSize` messages) and sent out when
the connection is established. The buffer will be keeping the latest messages (dropping the oldest ones if the `bufferSize` is
exceeded).

### Auto-reconnect

```scala
import io.laminext.websocket._
import scala.concurrent.duration._
WebSocket.path("/my-ws-endpoint").string
  .build(autoReconnect = true, reconnectDelay = 1.second, reconnectDelayOffline = 20.seconds, reconnectRetries = 10)
```

When in managed mode, and `autoReconnect` is true, the websocket will try to re-connect whenever the connection is closed.

It will try to re-connect up to `reconnectRetries` times, with a delay of `reconnectDelay` between each try.

If the websocket detects that the browser is offline (no internet connection, etc), it will delay for `reconnectDelayOffline` instead.

## Sending messages

You can use the `.sendOne` method:

```scala
import io.laminext.websocket._

val ws = WebSocket.path("/my-ws-endpoint").string.build()
ws.sendOne("a message")
```

or use the `.send` observer:

```scala
import com.raquo.laminar.api.L._
import io.laminext.websocket._

val ws = WebSocket.path("/my-ws-endpoint").string.build()
val outgoingMessages: EventStream[String] = ???

div(
  ws.connect,
  outgoingMessages --> ws.send
)
```

## Receiving messages

The websocket provides the `.received` event stream.

## Monitoring the state

Additionally, the websocket provides the following event streams:

```scala
import com.raquo.laminar.api.L._
import io.laminext.websocket._

val ws = WebSocket.path("/my-ws-endpoint").string.build()

ws.connected // EventStream[raw.WebSocket]
             // fires whenever a new connection is estableshed

ws.closed // EventStream[(raw.WebSocket, Boolean)]
          // fires whenever the connection is closed,
          // the Boolean specifies whether the websocket will try to re-connect

ws.errors // EventStream[Throwable] a stream of websocket errors

ws.isConnected // Signal[Boolean]

ws.isConnecting // Signal[Boolean]

ws.events // EventStream[WebSocketEvent[Receive]]
          // all websocket events: Connected, Closed, Error, Received

```

## circe support

If you use [circe](https://circe.github.io/circe/), there's a `websocket-circe` module available. See [circe support](/websocket/circe).

repository: kitlangton/laminext

repo_name: kitlangton/laminext


text:
# Coach Motivati
Simple Discord bot that acts as a motivational coach tracker

## TODO - Basic Requirements
Coach Motivati **shall** ...
 1. keep track of users
 1. keep track of user ToDos
 1. give weekly status reports of Todos

## TODO - Requirements - Maybe
Coach Motivati **shall** ...
 1. keep track of user dailies
 1. allow user specified times for member updates

repository: romedtino/coachmotivati

repo_name: romedtino/coachmotivati


text:
---
title: "C# Init-Only Setters Property"
date: "2021-07-15"
coverImage: "coverimage.png"
author: "Hemant Manwani"
tags: ["C#","Properties","Init"]
description: "In this article, we will talk about Init-Only Setters Property in C#."
---
## Introduction

In C# 9.0, there are multiple features introduced. One of them is the **Init-Only setters property** feature. To use this feature, there are two pre-requisite.

1. You should have the .NET 5 SDK installed in your system. If not, you can download and install it from [here](https://dotnet.microsoft.com/download/dotnet/5.0).

2. You should have at least a 16.7 version or the latest version of Visual Studio 2019. If not, then you have to update your Visual Studio 2019 to the latest version.

After this setup, you are ready to go with the Init-Only setters property feature.

Before knowing more about this feature, first, we will understand how we are using properties currently in C#.

## How we are using the properties currently

```c#
public int Id { get; set; }
```

This is the way how we are using the properties, but whenever if we don't want to change the value of a property outside of a class and make them readable publicly, then we generally define the property as below.

```c#
public int Id { get; private set; }
```
In that case, the Id property can not be set outside of the class, and to set this property, we have to introduce a constructor or a public method that can set the value of the Id field. Like below

```c#
public class Company
{
    public int Id { get; private set; }

    public Company(int id) // Constructor
    {
        Id = id;
    }
    public void SetId(int id) //Public method
    {
        Id = id;
    }
}
```
Below are the problems which arise by using the above method

1. We are not able to set the property value by using the *object initialization*

2. If we want to set the property as *immutable* (Value can not be changed), then we can not achieve this because any public method can change the value of that property, so here the property is *mutable* (Value can be changed).

To fix those issues, In C# 9.0 Init-Only setters property feature was introduced. Have a look at this.

## Init-Only Setters Property

Init-Only setters property gives us the flexibility to set the value of a property by using the object initializer as well the property is also immutable. So that will resolve the above issues, which were with the *private set* property.

```c#
public class Company
{
    public int Id { get; init; }
}
```

```c#
Company comp=new Company{
    Id=1
}; // It works fine if we initialize here
```
As we can, it is perfectly fine to set the value during object initialization.

```c#
public class Company
{
    public int Id { get; init; }

     public Company(int id)
    {
        this.Id = Id;
    }
}
```
We can define the constructor as well to initialize the Init-Only setters property.

If we will try to create a method in the class and want to change the value Init-Only setters property, then it will give us the compile-time error.

```c#
public class Company
{
    public int Id { get; init; }

    public void SetId(int Id)
    {
        this.Id = Id; // Compile-time Error
    }
}
```

## Conclusion

In this article, we learned how we are setting the properties in C# currently and the new C# 9.0 feature Init-Only Setters Property. Also, we understood how this feature helps us to set the property value with the object initialization.

repository: iamdarshshah/engineering-portal

repo_name: iamdarshshah/engineering-portal


text:
# Usage Examples

This directory (`/examples`) can be deleted when forking this project. It contains some simple examples of how forks of `typescript-starter` can be used by other projects. (Usually you'll want to provide these instructions in your root `readme.md`.)

## Node (Vanilla)

This shows the simplest use case – a quick, hacked-together Node.js project with no type safety, and no pre-processing. This is the way most of the Node.js ecosystem currently expects to import a node modules.

```bash
cd examples/node-vanilla

# install and run the example
npm install
npm run
```

## Node (Typescript)

This is for larger and more established Node.js projects which use Typescript for type safety. You'll notice that the type declarations and inline documentation from `typescript-starter` are accessible to [Typescript-compatible editors](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support) like [vscode](https://code.visualstudio.com/).

```bash
cd examples/node-typescript

 # install the dependencies
npm install
# type-check and build the example
npm run build
# run the example
npm start
```

## Browser (tree-shaking with Rollup)

This project imports the `power` and `asyncABC` functions from the ES6 output of `typescript-starter`, without importing the `double` function. This allows for the `double` method to be completely excluded from output via [Rollup's tree-shaking](http://rollupjs.org/), making the final javascript bundle potentially much smaller, even before using a minifier like [Uglify](https://github.com/mishoo/UglifyJS2).

To demonstrate, this example doesn't minify or remove comments. You can see where some javascript has been excluded from the bundle.

```bash
cd examples/browser

# install the dependencies
npm install
# build the javascript bundle
npm run build
# start a server and open the test in a browser
npm start
```

repository: fossabot/frets

repo_name: fossabot/frets


text:
---
layout: post
title: "How to Recover the Password for the Cisco ASA 5505 Adaptive Security Appliance"
date: 2013-01-18 23:13
author: Gerald L. Hevener Jr., M.S.
comments: true
categories:
---
This blog will discuss how to reset the password on Cisco's ASA 5505 Adaptive Security Appliance.  First I will assume you are using Cisco's gudie for recovering your password located at http://www.cisco.com/en/US/docs/security/asa/asa71/configuration/guide/trouble.pdf .  Start at page 7 entited "Performing password Recovery for the ASA 5500 Series Adaptive Security Appliance.
<!-- more -->
I won't copy what's in Cisco's guide but I'll add the following:

1.  Below is what steps 4 - 8 actually look like on Cisco's ASA 5505:
{% codeblock Output from Cisco ASA 5505 %}
rommon #1> confreg
Current Configuration Register: 0x00000000
Configuration Summary:
boot ROMMON
Do you wish to change this configuration? y/n [n]: y
enable boot to ROMMON prompt? y/n [n]:
enable TFTP netboot? y/n [n]:
enable Flash boot? y/n [n]:
select specific Flash image index? y/n [n]:
disable system configuration? y/n [n]: y
go to ROMMON prompt if netboot fails? y/n [n]:
enable passing NVRAM file specs in auto-boot mode? y/n [n]:
disable display of BREAK or ESC key prompt during auto-boot? y/n [n]:
Current Configuration Register: 0x00000040
Configuration Summary:
boot ROMMON
ignore system configuration
Update Config Register (0x40) in NVRAM...
rommon #2>
Next reload the ASA by typing boot.
rommon #2> boot
Launching BootLoader...
Default configuration file contains 1 entry.
Searching / for images to boot.
Loading /asa722-k8.bin... Booting...
###############################################################################################################################################################################################
256MB RAM
Total SSMs found: 0
Total NICs found: 10
88E6095 rev 2 Gigabit Ethernet @ index 09 MAC:
88E6095 rev 2 Ethernet @ index 08 MAC:
88E6095 rev 2 Ethernet @ index 07 MAC:
88E6095 rev 2 Ethernet @ index 06 MAC:
88E6095 rev 2 Ethernet @ index 05 MAC:
88E6095 rev 2 Ethernet @ index 04 MAC:
88E6095 rev 2 Ethernet @ index 03 MAC:
88E6095 rev 2 Ethernet @ index 02 MAC:
88E6095 rev 2 Ethernet @ index 01 MAC:
y88acs06 rev16 Gigabit Ethernet @ index 00 MAC:
Licensed features for this platform:
Maximum Physical Interfaces : 8
VLANs : 3, DMZ Restricted
Inside Hosts : 10
Failover : Disabled
VPN-DES : Enabled
VPN-3DES-AES : Enabled
VPN Peers : 10
WebVPN Peers : 2
Dual ISPs : Disabled
VLAN Trunk Ports : 0
This platform has a Base license.
Encryption hardware device : Cisco ASA-5505 on-board accelerator (revision 0x0)
Boot microcode : #CNlite-MC-Boot-Cisco-1.2
SSL/IKE microcode: #CNlite-MC-IPSEC-Admin-3.03
IPSec microcode : #CNlite-MC-IPSECm-MAIN-2.04
--------------------------------------------------------------------------
. .
| |
||| |||
.|| ||. .|| ||.
.:||| | |||:..:||| | |||:.
C i s c o S y s t e m s
--------------------------------------------------------------------------
Cisco Adaptive Security Appliance Software Version )

****************************** Warning *******************************
This product contains cryptographic features and is
subject to United States and local country laws
governing, import, export, transfer, and use.
Delivery of Cisco cryptographic products does not
imply third-party authority to import, export,
distribute, or use encryption. Importers, exporters,
distributors and users are responsible for compliance
with U.S. and local country laws. By using this
product you agree to comply with applicable laws and
regulations. If you are unable to comply with U.S.
and local laws, return the enclosed items immediately.
A summary of U.S. laws governing Cisco cryptographic
products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by
sending email to<EMAIL_ADDRESS>******************************* Warning *******************************
Copyright (c) 1996-2006 by Cisco Systems, Inc.
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec.<PHONE_NUMBER>.
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Ignoring startup configuration as instructed by configuration register.
INFO: Converting to disk0:/
Type help or '?' for a list of available commands.
ciscoasa>
{% endcodeblock %}
2.  You should follow steps 9 - 12 exactly as in Cisco's guide.
3.  I would like to add to Cisco's step 13.  Cisco uses the command "password password" which should actually be "passwd password".
4.  Cisco's step 14 is where the fun begins!  Cisco says to type the command "config-register value" where value is the number you recorded in step 5.  THIS IS WRONG WRONG WRONG!!!!!.   If you follow Cisco's step 14 and then step 15, yes you will have successfully reset your password, but if you reboot your ASA or loose power your ASA will stop at the ROMMON prompt (i.e. rommon #1>).  Instead, in step 14 you should type "config-register 0x10011" and then precede to step 15.  Then, if you ever reboot you ASA or loose power, it should fully reboot and not be stuck at the rommon #1> prompt.

extension: markdown


text:
---
layout: post
title:  "Installing Caffe in Arch Linux"
date:   2016-05-25 14:00:00
category: professional
tags: caffe arch
---

# Why Arch?

We are migrating our OS for development at [Sadako][sadako], from [Xubuntu][xubuntu] to [Arch Linux][arch]. Ubuntu is great when installing things because most of the developers test their software on this OS, but when compared to Arch, it lacks control over the system.

Arch is a minimalistic distribution, and that's what we were looking for. After only two weeks of use I know all the daemons running in my laptop. A clear advantadge if you don't want any unexpected errors conflicting with your software.

It has its counterpart too. It's way more technical than Ubuntu and it requires some initial learning, but I found its documentation very useful and the official forum has a lot of support from the community.

# Caffe

[Caffe][caffe] is a deep learning framework. At Sadako we use it to train and test our neural network models.

Installing caffe in Arch shouldn't be difficult. Caffe is well documented and clearly specifies all of its dependencies. It is distributed in source and the user has to compile it himself. That's very useful for configurationn purposes, because offers the possibility to use or not the GPU and many other interesting but optional features.

# Installation process

I downloaded the caffe-master branch in zip format on 18/05/2016, from [its page][caffe-src] on GitHub. Most of the prerequisites where installed using `pacman`.

In Arch, some configurations have to be done before compiling Caffe:

- `OPENCV_VERSION := 3`
- `CUDA_DIR := /opt/cuda`
- Replace `/usr/lib/python2.7/dist-packages/numpy/core/include` with `/usr/lib/python2.7/site-packages/numpy/core/include` (dist-packages -> site-packages)

My first attempt was to configure Caffe to use only the CPU and not the GPU, the building process went straight forward.

# Problem #1: CUDA-7.5 vs GCC-6.1

When adding GPU support, I got the following error:

```
NVCC src/caffe/util/im2col.cu
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier "nullptr" is undefined
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a ";"
/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a ";"
/usr/include/c++/6.1.1/exception(63): error: expected a ";"
[Ommited similar lines of error]
Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00004b9c_00000000-16_im2col.compute_50.cpp1.ii".
Compilation terminated.
Makefile:585: recipe for target '.build_release/cuda/src/caffe/util/im2col.o' failed
make: *** [.build_release/cuda/src/caffe/util/im2col.o] Error 1
```

This error is due to incompatibility issues between CUDA-7.5 and GCC-6.1. CUDA only supports GCC up to its 4.9 version (officially), but the CUDA compiler doesn't complain about GCC if you use newer versions up to the 5.2. Unfortunately, when using newer versions, errors like these appear. I could have tried to compile Caffe using an older version of GCC, but then there would be problems with all its dependencies, because most of them were installed by the system[^1].

[^1]: In Arch, like in most of the major linux distributions, the software is distributed using binary format, in packages. This means that every library and executable installed by the system has been compiled using the current version of GCC, which in Arch is GCC-6.1.1 at the moment of writing this. [Gentoo][gentoo] is a clear exception, all the software in Gentoo is distributed in code, and it is compiled by the user during the installation.

Fortunately, there is another solution. We can use one version of the compiler for the CUDA code, and another one for the rest of Caffe. Simply create a couple of links in the `bin` folder of CUDA, named `g++` and `gcc`, pointing to your desired version of the GCC binaries, and `nvcc` (the compiler of CUDA) will use them to compile its C code, instead of the ones in the system.

# Problem #2: ABI

At the beginning I did this using GCC-4.9, since it is the official supported version. But I got the following errors.

```
CXX/LD -o .build_release/tools/compute_image_mean.bin
.build_release/lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<double>*>::pop(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::NameOfEnum(google::protobuf::EnumDescriptor const*, int)'
.build_release/lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<float>*>::pop(std::string const&)'
collect2: error: ld returned 1 exit status
Makefile:616: recipe for target '.build_release/tools/compute_image_mean.bin' failed
make: *** [.build_release/tools/compute_image_mean.bin] Error 1
```

This is different, now the syntax errors have disappeared, which is a very good signal. But the compiler still complains about missing symbols.

This was a headache. At first I checked in the code that every function was declared, and they were. I couldn't understand why the compiler wasn't finding its references. I tried more or less everything... from trying to install caffe using an [Arch package][caffe-git] from the AUR, to read as many forums on the internet as I could.

In an attempt to reduce the distance between the two GCC versions that I was using (at the end this is a compiling issue), I configured CUDA to use the GCC-5.2 version, like in Ubuntu-15.10. But the problem persisted. Fortunately, this was a step in the right direction.

To understand the problem, one must know about the [ABI][abi], the object code interface between user C++ code and the implementation-provided system and libraries. GCC-5.1 [can be configured][dualAbi] to use the old library ABI, or a new one conforming to the 2011 C++ standard. To configure it, I had to modify the following lines of the `Makefile`:

```diff
COMMON_FLAGS += -D_GLIBCXX_USE_CXX11_ABI=1
CXXFLAGS += -MMD -MP -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=1
```

After using this configuration, the compilation finally succeeded.

[sadako]: http://www.sadako.es/
[xubuntu]: http://xubuntu.org/
[arch]: https://www.archlinux.org/
[caffe]: http://caffe.berkeleyvision.org/
[caffe-src]: https://github.com/BVLC/caffe
[gentoo]: https://www.gentoo.org/
[caffe-git]: https://aur.archlinux.org/packages/caffe-git/
[abi]: https://en.wikipedia.org/wiki/Application_binary_interface
[dualAbi]: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html


text:
# Service on Left Sidebar

All available services are listed in the left sidebar when edit the workflows. As illustrated below, it's organized in 3-level hierarchy - top level as **Hubs**, and 2nd level as **Things** under these **Hubs**, and the last level as **Services** under **Things**.

One may quickly find by **Service** by typing a substring related to the Service in the search bar at the top. The search could be cancelled by pressing the ESC in keyboard.

The **Services** is draggable from left sidebar and could be dropped to the canvas on the right side to form the workflows.

Some **Services** are editable, and click the `</>` adjacent to it would enter the edit user interface. And you may see [Edit Service](#getstarted/advanced/edit_service) for more details and  [add service:abs](#getstarted/example/add_service) for an example.

![](./doc/pic/advanced/use_service/left_sidebar.png){.viewer}

The **Service** may have help. Move mouse over it for a while, a small dialog may prompt to show some description about that, and if there is an icon on the top right corner, you may click it access more detailed help, as illustrated below.

![](./doc/pic/advanced/use_service/help.png){.viewer}


text:
FORMAT: 1A
HOST: https://api.usaspending.gov

# State Award Breakdown [/api/v2/recipient/state/awards/{fips}/{?year}]

This endpoint is used to power USAspending.gov's state profile pages. This data can be used to visualize the government spending that occurs in a specific state or territory.

## GET

This endpoint returns the award amounts and totals, based on award type, of a specific state or territory, given its USAspending.gov `id`.

+ Parameters

    + `fips`: `51` (required, string)
        The FIPS code for the state you want to view. You must include leading zeros.
    + `year`: `2017` (optional, string)
        The fiscal year you would like data for. Use `all` to view all time or `latest` to view the latest 12 months.

+ Response 200 (application/json)

    + Attributes (array[StateBreakdown], fixed-type)

# Data Structures

## StateBreakdown (object)
+ `type`: `contracts` (required, string)
    Award types include 'contracts', 'grants', 'direct_payments', 'loans', 'other_financial_assistance'.
+ `amount`: 41725.9 (required, number)
    The aggregate value of awards of this type.
+ `count`: 4 (required, number)
    The number of awards of this type.

repository: fedspendingtransparency/usaspending-api

repo_name: fedspendingtransparency/usaspending-api


text:
### [CVE-2021-38202](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-38202)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

fs/nfsd/trace.h in the Linux kernel before 5.13.4 might allow remote attackers to cause a denial of service (out-of-bounds read in strlen) by sending NFS traffic when the trace event framework is being used for nfsd.

### POC

#### Reference
- https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.13.4

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Remap Array

Takes an input array and iterates through each object in the the array, creates a new object with only the matching keys from the Values property, and outputs an array of the new objects.

For example, given this input array of objects:

`[{"URL": "https://magick.com/", "Title": "Magick"}, {"URL": "https://www.foo.bar/", "Title": "Foo Bar"}]`

and a Values property "URL" it will return an array of objects with only the URL key:

`[{"URL": "https://magick.com/"}, {"URL": "https://www.foo.bar/"}]`

repository: Oneirocom/Magick

branch_name: refs/heads/development

gha_language: TypeScript

repo_name: Oneirocom/Magick


text:
## Run Angular 2 app with jspm and babel as a transpiler
1.  `npm install -g jspm live-server`
2.  Clone this repo
3.  `jspm install`
4.  Run `live-server` and observe the results

### Bundle project
`npm run build`

MIT License


text:
# 3D Tesseract-Engine

This is a 3D Engine created as the main project of the Engines subject of the
 [Bachelor’s Degree in Video Games by UPC at CITM](https://www.citm.upc.edu/ing/estudis/graus-videojocs/).
 We are using different libraries to create our own 3D engine with some basics features and then, for the final delivery, we are a creating one "high-level" system.
 In this case, it will be skeletal animation.

## Contributors:
This engine is created by [Adrià Ferrer](https://github.com/Adria-F) and [Marc Garcia](https://github.com/MaxitoSama):

## Members Tasks:

### Both:
* GameObjects
* Panel Hierarchy
* FBX importing
* Mouse picking
* Resource Manager
* Guizmos
* Animations importing
* Animation Component
* Animation Resource
* Game Panel

### Adrià Ferrer:
* Panel Assets
* Panel Inspector
* Panel FileDialog
* Textures Importing
* meshes and scenes own format
* .meta files management
* File system
* JSON_Manager
* Bone Components
* Skeleton animation
* Bone hierarchy and mesh linking

### Marc garcia:
* AABBs
* Game Components
* QuadTree
* Frustum Culling
* Time manager
* Resources (classes)
* Bone Resource
* Animation timeline panel
* Animation interpolations
* Skinning
* Animation Blending

## Main Core Sub-systems
* It has a hierarchy of gameObjects, each can have multiple components that define and complement them (transformation, mesh, material, animation, bone, camera).
* Can manipulate their transformation directly from the scene panel through the usage of a guizmo.
* Can freely add, remove and change parent and order of gameObjects into the hierarchy panel.
* It has a file and resource systems, to manage asset files, imort them and store them as binaries for easily usage.
* It is using a QuadTree to optimize frustum culling of static gameObjects.
* It has scene serialization of json files through rapidjson library.

## Skeletal Animation system
The importing of animations is done with Assimp, from fbx and dae files.

When creating meshes, it reads the bones that it is using and create the corresponding bone resource. It then reads all the animations of the scene and creates
the animation resources, storing the corresponding transformations over time of the bones (linked by name).

When assigning a resource to a component animation, it looks for the used bones inside the gameObjects hierarchy and save the UID of the components to later usage.

On the Update, it loops through all the bones and apply the corresponding transformation to the gameObjects, calculating interpolations if activated, as well as
animation blending when changing them.

To do the interpolation, it basically does a Lerp operation of the current frame and the next frame based on the percentage of time elapsed.
For animation blending, it temporally keeps the new resource that will be assigned and do interpolation between the frame of the current animation and the first frame
of the next animation before finally swaping the animations.

Before the render of the mesh, it calculates a morphed version of it, adapting to the linked bones and rendering it instead of the original one.

* Editor gif

* In-game gif

* Innovation gif

## How does it work

If you want to take a look to our repository click [Here](https://github.com/Adria-F/Engines).

If you want to download the latest release click [here](https://github.com/Adria-F/Engines/releases/latest).

## Libraries used

* STL to use the basic containers.
* [SDL](https://www.libsdl.org/index.php) to create the window and imputs.
* [ImGui](https://github.com/ocornut/imgui) to create the UI.
* [OpenGL](https://www.opengl.org/) to create the renderer, 3D shapes, buffers and textures.
* [rapidjson](https://github.com/Tencent/rapidjson) to read and write JSON files.
* [PCG](http://www.pcg-random.org/download.html) to create random numbers.
* [MathGeolib](https://github.com/juj/MathGeoLib) to make all the math operations.
* [Assimp](http://www.assimp.org/) to import .FBX/.fbx of 3D models.
* [DevIL](http://openil.sourceforge.net/) to import the .png and .dds to create te textures.
* [mmgr](http://www.flipcode.com/archives/Presenting_A_Memory_Manager.shtml) to manage the memory used.
* [PHYSFS](https://icculus.org/physfs/) to manage files.
* [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo) Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui

## License

MIT License

Copyright (c) 2018 Adrià Ferrer and Marc Garcia.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: Adria-F/Tesseract-Engine

repo_name: Adria-F/Tesseract-Engine


text:
---
layout: page
sidebar: right
subheadline: Discrete Modeling
title:  "Salabim Discrete Modeling Tutorial"
teaser: "Using a DES model to simulate women queueing at a water collection point"
tags:
    - discrete modeling
    - Salabim
    - water well simulation
    - WASH
    - data analytics
    - tutorials
    - modeling
categories:
    - modeling
image:
    title: /water-well-collection.jpg
image:
    thumb: /water-well-collection_thumb.jpg
header: no
show_meta: true
comments: true
---
Figuring out the best way to route components through a system is a complicated problem, with many real-world applications. For example, disaster responders may want to know the best way to distribute relief items after a hurricane. Or, hospital administrators may want to know the best way to set up their rooms to ensure patients are seen as quickly as possible. In either of these examples, the problems are too critical to just find the best way through trial-and-error. Instead, it can be highly useful to create a **simulation**, which models the transport of relief goods or patients through a process. In the following article, I'll cover some key points on simulations as well as how you can start building your own for free using the Salabim library in Python.

**Table of Contents**
{: #toc }
*  TOC
{:toc}

# Discrete Event Simulation (DES)
A model helps to perform "what if?" analysis, where questions about the system are posed and tested in the simulation, helping decision makers prepare for different future scenarios. Injecting elements of stochasticity help reflect the uncertainty inherent in the real world and can provide a better understanding of the system. **Discrete event simulation** in particular, is well-suited to problems where components change at different points in time as a result of events. Between two consecutive events, the system is assumed to be steady-state, so the simulation effectively skips from one event to the following event. This is different than **continuous simulation**, where the dynamics of the system are tracked over time uninterrupted.

![discrete vs continuous model]({{site.baseurl}}/images/discrete-vs-continuous.jpg)

## Salabim Tutorial
One library for discrete simulation is **Salabim**, an open-source python library. There ar
e many alternatives for performing discrete simulation (for instance, see [this Wikipedia list](https://wiki2.org/en/List_of_discrete_event_simulation_software)) however, many of them have considerable learning curves and expensive licenses.

The Salabim library was written by Ruud van der Ham, an expert in discrete modeling from the Netherlands, who wrote the library to make discrete modeling more accessible to python users. The library can be installed easily using pip:

`pip install salabim`

Documentation and examples are available [here](https://www.salabim.org/manual/index.html).

### Components
To begin modeling in Salabim, the most important part of the library to understand are **components**. Components are defined as classes in Salabim, using the syntax `sim.Component`. Unlike traditional definitions in python however, Salabim components do not *return* something, they *yield* something. Basically, the best way to create a component is to define it like so:
{% highlight ruby %}
    class Patient(sim.Component):
        def process(self):
            ....
{% endhighlight %}

There are two kinds of components in Salabim simulations: data components and active components.

#### (1) Active components
An active component contains one or more **processes**. To create an active component, you have to define a class first, and then you can add processes (which usually contain at least one yield statement).
{% highlight ruby %}
    class Doctor(sim.Component):
        def process(self):
        ...
        yield ...
        ...
{% endhighlight %}

Once this class is created, it is then *activated* at some point in time. you can activate the class you created by making a new instance of the class:
{% highlight ruby %}
     doctor_1 = Doctor()
     doctor_2 = Doctor()
     doctor_3 = Doctor()
{% endhighlight %}

An active component can later become a data component through one of two ways: (1) using *cancel* or (2) by reaching the end of its process. If no processes are found in a class you created, it will be treated as a data component.

#### (2) Data components
A data component is one that has no associated process method. To create a data component, simpy use:
`data_component = sim.Component()`

You can make a data component active later by means of an activate statement.
{% highlight ruby %}
     nurse1 = Nurse()
     nurse1.activate(process='treat')
{% endhighlight %}

## Water collection example
In this example, we'll use Salabim to simulate women walking to a public well in order to fill up a container of water. Today, [tens of millions of women](https://www.npr.org/sections/goatsandsoda/2016/07/07/484793736/millions-of-women-take-a-long-walk-with-a-40-pound-water-can) still walk long distances to collect water for household use. These water containers are heavy and bulky (generally weighing 40 pounds or more) and trips take 30 minutes or longer. Often, multiple trips are taken per day.

### Simulation setup
We'll create the following processes:
- The **person generator** creates the women, with a uniform inter arrival time.
- The **women** who visit the well. They wait in a queue and are served in a first-in, first out order.
- The **water well** collection point, which we'll model as a *resource* in Salabim.
  - Resources have a limited capacity, just like our water collection point. They are useful for simulation because they can be claimed by components and released later, which is the case here because not every woman who arrives can fill her bucket all at once. Instead, they must form a queue.

To make things a little more interesting, we'll also include two environmental features:
- The **number who turn around** when they arrive at the well and see that the line is too long.
- The **number who leave early** after waiting in the queue for a long time.

{% highlight ruby %}
import salabim as sim

class PersonGenerator(sim.Component):
    def process(self):
        while True:
            Woman()
            yield self.hold(sim.Uniform(5, 25).sample())
            #Uniform sample time between 5 and 25 minutes until next person is created

class Woman(sim.Component):
    def process(self):
        if len(well.requesters()) >= 5:
            env.num_turn_around += 1   #women who turn around because lines are too long
            env.print_trace("","","Too many other people in line, turned around.")
            yield self.cancel()        #this makes the current component a data component if queue length is greater than 5 people
        yield self.request(well, fail_delay=50)
                                       #if the request is not honored within 50 time units,
                                       #the process continues to next statement
        if self.failed():              #check if the request failed
            env.num_leave_early +=1    #women who turn around because they have waited in queue too long
            env.print_trace("","","Waited in line too long, left queue early.")
        else:
            yield self.hold(50)
            self.release()

##Setup the Environment
env = sim.Environment()        #create environment
PersonGenerator()              #activate component
env.num_turn_around = 0        #initialize list
env.num_leave_early = 0        #initialize list
well = sim.Resource("well", 3) #3 places where women can fill up at the well resource

##Run the simulation for 2000 time units
env.run(till=2000)

##Display key information
well.requesters().length_of_stay.print_histogram(30,0,10)
print("number who turned around when seeing the line length: ", env.num_turn_around)
print("number who waited too long and left early: ", env.num_leave_early)
{% endhighlight %}

You can download the full Jupyter notebook of this example from [github](https://github.com/shannongross/website_tutorials/tree/master/salabim_discrete_example).

## You Might Also Like...
{: .t60 }
{% include list-posts tag='policy analysis with python' %}


text:
# Reset Image Aspect Ratio plugin for Sketch
[![Download from Sketchpacks.com](https://badges.sketchpacks.com/plugins/com.gilesperry.reset-image-aspect-ratio/version.svg)](https://api.sketchpacks.com/v1/plugins/com.gilesperry.reset-image-aspect-ratio/download) [![Compatible Sketch Version](https://badges.sketchpacks.com/plugins/com.gilesperry.reset-image-aspect-ratio/compatibility.svg)](https://sketchpacks.com/perrysmotors/reset-image-aspect-ratio)

A Sketch plugin that resets the aspect ratio of selected images.

## Features
- Resets bitmaps to their original aspect ratio
- Rectangles with one image fill are set to match the aspect ratio of the image (to the nearest pixel)

## Installation

* [Download](../../releases/latest/download/ResetImageAspectRatio.sketchplugin.zip) the latest release of the plugin
* Un-zip
* Double-click on `ResetImageAspectRatio.sketchplugin`.

or...

[![Install Reset Image Aspect Ratio with Sketchpacks](http://sketchpacks-com.s3.amazonaws.com/assets/badges/sketchpacks-badge-install.png "Install Reset Image Aspect Ratio with Sketchpacks")](https://sketchpacks.com/perrysmotors/reset-image-aspect-ratio/install)

---

**If you are using this plugin, please 'star' the project**. It's a simple way to help me see how many people are using it.

If you ***love*** this plugin, why not shout me a coffee ☕ via [PayPal](https://www.paypal.me/perrysmotors/2) to share the love!

repository: perrysmotors/reset-image-aspect-ratio

gha_language: JavaScript

repo_name: perrysmotors/reset-image-aspect-ratio


text:
---
title: Basic knowledge of C / C ++
post_id: '3089'
date: '2003-12-04T19:22:00+09:00'
draft: true
tags: []
---

For the time being as well as memos for yourself, there are some statements that will not be memorable.

*   `while(式1) 式2` : Continue to execute expression 2 while expression 1 is correct
*   `do 式1 while(式2)` : Execution of Expression 1 once and continuing to execute Expression 1 while Equation 2 is correct
*   `for(式1;式2;式3) 式4` : Initialization in Expression 1 and continuing to execute Equations 3 and 4 while Equation 2 is Correct
*   `if(式1) 式2 else 式3` : `if(式1) 式2 else 式3` 1 is correct, and expression 3 otherwise
*   `break` : Immediately from the innermost loop