text:
# How to increase screen resolution on XenServer 7 GUI Virtual Machine (VM)

Contents

*   *   [1. Objective][5]
    *   [2. Requirements][6]
    *   [3. Difficulty][7]
    *   [4. Conventions][8]
    *   [5. Instructions][9]
        *   [5.1. Obtain VM UUID][1]
        *   [5.2. Shutdown VM][2]
        *   [5.3. Update VGA a VIDEORAM settings][3]
        *   [5.4. Start VM][4]

### Objective

If your intention is to use XenServer's virtual machine as a remote desktop, the default screen resolution may not be satisfactory for your purposes.

 ![Default xenserver screen VM resolution](https://linuxconfig.org/images/xenserver-7-default-screen-resolution.png)

The objective is to increase screen resolution on XenServer 7 GUI Virtual Machine.

### Requirements

Privileged access to XenServer 7 system.

### Difficulty

EASY

### Conventions

*   **#** - requires given command to be executed with root privileges either directly as a root user or by use of `sudo` command
*   **$** - given command to be executed as a regular non-privileged user

### Instructions

### Obtain VM UUID

First, we need to obtain a relevant UUID of the Virtual Machine on which we wish to increase a screen resolution:
```
# xe vm-list
uuid ( RO)           : 09a3d0d3-f16c-b215-9460-50dde9123891
     name-label ( RW): CentOS 7
    power-state ( RO): running
```
Tip: It saves some time if you save this UUID as a shell variable:
```
# UUID=09a3d0d3-f16c-b215-9460-50dde9123891
```

### Shutdown VM

Gracefully shutdown your VM or shutdown using `xe vm-vm-shutdown` command:
```
# xe vm-shutdown uuid=$UUID
```

### Update VGA a VIDEORAM settings

Check your current VGA a VIDEORAM parameter settings:
```
# xe vm-param-get uuid=$UUID param-name="platform" param-key=vga
std
# xe vm-param-get uuid=$UUID param-name="platform" param-key=videoram
8
```
To increase a screen resolution, update your VGA to `std` ( if its already set, nothing needs to be done ) and `videoram` to some greater number in megabytes. Eg. 16:
```
# xe vm-param-set uuid=$UUID platform:vga=std
# xe vm-param-set uuid=$UUID platform:videoram=16
```

### Start VM

```
# xe vm-start uuid=$UUID
```

 ![increased xenserver screen VM resolution](https://linuxconfig.org/images/xenserver-7-increased-screen-resolution.png)

--------------------------------------------------------------------------------

via: https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm

作者：[Lubos Rendek][a]
译者：[译者ID](https://github.com/译者ID)
校对：[校对者ID](https://github.com/校对者ID)

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出

[a]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm
[1]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h5-1-obtain-vm-uuid
[2]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h5-2-shutdown-vm
[3]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h5-3-update-vga-a-videoram-settings
[4]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h5-4-start-vm
[5]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h1-objective
[6]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h2-requirements
[7]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h3-difficulty
[8]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h4-conventions
[9]:https://linuxconfig.org/how-to-increase-screen-resolution-on-xenserver-7-gui-virtual-machine-vm#h5-instructions

url: https://raw.githubusercontent.com/bobozaker/TranslateProject/7760fe57bd226b2b55741d5fe5cf03c68d24981f/sources/tech/20161111 How to increase screen resolution on XenServer 7 GUI Virtual Machine.md

repository: bobozaker/TranslateProject

repo_name: bobozaker/TranslateProject


text:
# MaintCLI
Presents a command-line interface to your app that is accessible via a web-browser.

![Preview](preview.png)

### Features:
* Define commands in the application, and handle them a/synchronously.
* Send asynchronous messages to connected clients.
* Modifiable appearance: Font/color, Background color/image/gradient.
* ILogger/ILoggerProvider implementations for use as a logging target.
* Supports HTTPS and basic authentication.
* Usable within any C# application type. No need for IIS, etc.

### Installation
Install the package _MaintCLI_ from Nuget.org. Or, from the package manager console:
```
PM> Install-Package MaintCLI
```

### Usage

To publish the interface, you can call _Start()_ on the default static instance:
```CSharp
MaintCli.Default.Start(httpEndPoint: new IPEndPoint(IPAddress.Any, 5000));
```

To add a command:
```CSharp
MaintCli.Default.AddCommand(
  new CommandBuilder("echo", "echos the argument you specify", "echo \"hello wrold\"")
	.AddArgument("text", "the string, surrounded by quotes, to echo")
	.Execute((sender, args) =>
	{
	  MaintCli.Default.SendMessageTo(sender, args["text"]);
	})
	.Build());
```
See [SimpleTest](/SimpleTest/Program.cs) for a more feature-complete example.

repository: bmdub/MaintCLI

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: bmdub/MaintCLI


text:
# CodeInSwift
Solutions for some common problems statements in Swift.

# Data Structure and Algorithms Problems

**One of my goal in 2018 is to get better at problem solving. Hence this repo** 🤨

> Atleast one problem a day, keeps your lazy brain away (Mostly weekdays) :P

| Day    | Total Problems  |
| :----: | :-------------: |
|  1     |      2          |

## Numbers & Array

| Date | Problems |     Solutions     |
| :------------: | :------------: | :----------: |
|Apr 05 | Given a binary array, find the maximum number of consecutive 1s in this array. | [Max Consecutive Ones](Arrays_Numbers/1_Max_Consecutive_Ones.swift)|
|Apr 05 | Given an array of integers, return indices of the two numbers such that they add up to a specific target. | [Two Sum](Arrays_Numbers/2_Two_Sum.swift)|

license: MIT


text:
---
layout: page
title: Bookshelf
permalink: /bookshelf/
current_about: false
---

# Bookshelf
*Last updated: January 2020*

*This was inspired by Patrick Collison's [bookshelf](https://patrickcollison.com/bookshelf) and Nassim Taleb's [description of Umberto Eco's library](https://books.google.com/books?id=GSBcQVd3MqYC&newbks=1&newbks_redir=0&lpg=PP1&dq=the%20black%20swan&pg=PA1#v=onepage&q&f=false) at the beginning of The Black Swan.*

I don't want this page to give an inflated impression so I need to admit this up front: I've only read a quarter these books. Maybe. That is probably generous.

This page contains most of the books on my physical bookshelf, my kindle, and my Amazon wishlist. I've moved a couple times as an adult and done a few purges, so many of the books I bought earlier in life aren't listed. I haven't included textbooks, children's books, travel books, cookbooks, or anything I found too embarassing.

I'm organizing my books broadly by subject because I hope it helps you navigate. It's also roughly how I aspire to organize my actual bookshelf, which is usually in a disordered approximation of these lists. Some of the books could live in multiple categories. This is entirely my own categorization, i.e. non-standard.

All sections are organized alphabetically by author's first name.

{% assign sections = site.data.booksections %}

{% for category in site.data.books  %}
{% assign section = sections[category.section] %}
	{{section.title}} |
{% endfor %}

{% for category in site.data.books  %}

{% assign section = sections[category.section] %}

{{section.title}}

| Title |   Author   |
| ----------- | ----------- |
{% for book in category.books %}| {{ book.title }} | {{ book.author }} |
{% endfor %}

{% endfor %}

gha_language: Ruby


text:
Kernel Global Bandwidth
============================

This example tests global memory access bandwidth of kernel. Kernel increase the bandwidth by accessing multiple DDR banks through different interfaces.

User can customize these connections to global memory by explicitly specifying the memory banks for different inputs/outputs.
Seperate bundle names need to be specified for each buffer to be placed in different bank.

```c++
#pragma HLS INTERFACE m_axi port = input offset = slave bundle = gmem0
#pragma HLS INTERFACE m_axi port = output offset = slave bundle = gmem1
```
Banks need to be specified using the `--sp` tags in the kernel linking stage along with the `m_axi` interface name and kernel name.
```
--sp apply_watermark_1.m_axi_gmem0:DDR[0] --sp apply_watermark_1.m_axi_gmem1:DDR[1]
```

Following is the log reported while running the design on U200 platform :

```
./kernel_global ./build_dir.hw.xilinx_u200_xdma_201830_2/krnl_kernel_global.xclbin
Found Platform
Platform Name: Xilinx
Found Device=xilinx_u200_xdma_201830_2
INFO: Reading ./build_dir.hw.xilinx_u200_xdma_201830_2/krnl_kernel_global.xclbin
Loading: './build_dir.hw.xilinx_u200_xdma_201830_2/krnl_kernel_global.xclbin'
Starting kernel to read/write 1024 MB bytes from/to global memory...
Kernel Duration...66662680 ns
Kernel completed read/write 1024 MB bytes from/to global memory.
Execution time = 0.066663 (sec)
Concurrent Read and Write Throughput = 30.72 (GB/sec)
TEST PASSED
```
GUI Flow :

By default this example supports 1DDR execution in GUI mode for all the XSAs. To make this example to work with multi DDR XSAs,
please follow steps mentioned below.

XSA  (2DDR):

1.Vitis Project > Properties > C/C++ Build > Settings > Vitis V++ Kernel Compiler > Miscellaneous > Other flags\
2.In "Other flags" box enter following\
   a. --max_memory_ports all\
3.Vitis Project > Properties > C/C++ Build > Settings > Vitis V++ Kernel Linker > Miscellaneous > Other flags\
   a. --sp bandwidth_1.m_axi_gmem0:DDR[0]\
   b. --sp bandwidth_1.m_axi_gmem1:DDR[1]

XSA  (3DDR):

1.Vitis Project > Properties > C/C++ Build > Settings > Vitis V++ Kernel Compiler > Miscellaneous > Other flags\
2.In "Other flags" box enter following\
   a. --max_memory_ports all\
3.Vitis Project > Properties > C/C++ Build > Settings > Vitis V++ Kernel Linker > Miscellaneous > Other flags\
   a. --sp bandwidth_1.m_axi_gmem0:DDR[0]\
   b. --sp bandwidth_1.m_axi_gmem1:DDR[1]\
   c. --sp bandwidth_1.m_axi_gmem2:DDR[2]\
4.Define NDDR_BANKS 3 in kernel "#define NDDR_BANKS 3" at the top of kernel.cl

XSA  (4DDR):

Note: The selected platform must support 4DDR.

1.Vitis Project > Properties > C/C++ Build > Settings > Vitis V++ Kernel Compiler > Miscellaneous > Other flags\
2.In "Other flags" box enter following\
   a. --max_memory_ports all\
3.Vitis Project > Properties > C/C++ Build > Settings > Vitis V++ Kernel Linker > Miscellaneous > Other flags\
   a. --sp bandwidth_1.m_axi_gmem0:DDR[0]\
   b. --sp bandwidth_1.m_axi_gmem1:DDR[1]\
   c. --sp bandwidth_1.m_axi_gmem2:DDR[2]\
   d. --sp bandwidth_1.m_axi_gmem3:DDR[3]\
4.Define NDDR_BANKS 4 in kernel "#define NDDR_BANKS 4" at the top of kernel.cl


text:
# Micro:bit

## Contents

- [通訊協定與網路服務提供商](#通訊協定與網路服務提供商)
- [檔案說明](#檔案說明)
- [開發板與感測器](#board-and-sensor)
- [Pinout Diagram](#pinout-diagram)
- [Integrated Development Environment - IDE](#integrated-development-environment)
- [App Inventor](#app-inventor)
- [Service](#service)
- [Reference](#reference)
- [Blog](#blog)
- [License](#license)

## 通訊協定與網路服務提供商
[Back](#contents)

| 通訊協定 | 網路服務提供商 |
|---|---|
| HTTP | ThingSpeak、MediaTek Cloud Sandbox (MCS)、MediaTek Cloud Sandbox Lite (MCS Lite)、Google Firebase |
| MQTT | LASS、MediaTek Cloud Sandbox (MCS)、AWS IoT、IBM Bluemix IoT Platform |
| WebSocket | WoT.City |

## 檔案說明
[Back](#contents)

| 編號 | 資料夾 |  檔案名稱 | 說明  |
|---|---|---|---|
|1| /Arduino  | /LED | 開啟 LED  |
|2| /Arduino  | /lightSensor | 取得 light Sensor 數據 |
|3| /Arduino  | /getMoisture  | 取得 MoistureSensor 數據 |
|4| /Arduino  | /Blynk_LED | 透過 Blynk 控制 LED |
|5| /Arduino  | /Blynk_LightSensor |  將 Light Sensor 數據傳送到 Blynk  |

## Board and Sensor
[Back](#contents)

* [Micro:bit](http://microbit.org/)

## Pinout Diagram
[Back](#contents)

![Imgur](http://i.imgur.com/YT8kXJ0.jpg)
![Imgur](http://i.imgur.com/tMi6rZj.jpg)

## Integrated Development Environment
[Back](#contents)

 * JavaScript Blocks Editor
   *  [Online Editor](https://makecode.microbit.org/#)
 * Python Editor
   *  [Online Editor](http://python.microbit.org/)
 * Arduino
   *  [Arduino IDE v1.8.2](https://www.arduino.cc/en/Main/Software)

## App Inventor

 * 藍芽元件
   *  [Download](http://iot.appinventor.mit.edu/assets/edu.mit.appinventor.ble.aix)

 * Micro:bit 元件
   *  [Download](http://iot.appinventor.mit.edu/assets/com.bbc.microbit.profile.aix)

## Service
[Back](#contents)

* [Blynk](http://www.blynk.cc/)

## Reference
[Back](#contents)

* [Micro:bit](http://microbit.org/)
* [Blynk](http://www.blynk.cc/)

## Blog
[Back](#contents)

* [Archer @ Learningsky.io 部落格](https://learningsky.io/author/archer/)
* [Archer @ oranwind.org 部落格](https://oranwind.org/author/archer/)

## License
[Back](#contents)

The MIT License (MIT)

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: ArcherHuang/Micro-bit

repo_name: ArcherHuang/Micro-bit


text:
# Java 9 Cookbook
This is the code repository for [Java 9 Cookbook](https://www.packtpub.com/application-development/java-9-cookbook?utm_source=github&utm_medium=repository&utm_campaign=9781786461407), published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the book from start to finish.
## About the Book
This cookbook offers a range of software development examples in simple and straightforward Java 9 code, providing step-by-step resources and time-saving methods to help you solve data problems efficiently. Starting with the installation of Java, each recipe addresses a specific problem, with a discussion that explains the solution and offers insight into how it works.
## Instructions and Navigation
All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

Codes for chapter 2,4,5,6,7,12,15 are placed in the folder "RemainingCodes" as Java package.

The code will look like the following:
```
module newfeatures{
  requires jdk.incubator.httpclient;
}
```

To run the code examples, you will need a computer with 2GB RAM at least, 10GB free disk
space, and Windows or Linux OS. The following software/libraries are required:
* JDK 9 (for all chapters)
* PostgreSQL 9.4 DB (for Chapter 6, Database Programming)
* Junit 4.12 (for Chapter 15, Testing)
* Mockito 2.7.13 (for Chapter 15, Testing)
* Maven 3.5.0 (for Chapter 3, Modular Programming)
* MySQL 5.7.19 DB (for Chapter 10, RESTful Webservices Using Spring Boot)
* Heroku CLI (for Chapter 10, RESTful Webservices Using Spring Boot)
* Docker (for Chapter 10, RESTful Webservices Using Spring Boot)

## Related Products
* [Java 9 Concurrency Cookbook - Second Edition](https://www.packtpub.com/application-development/java-9-concurrency-cookbook-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781787124417)

* [PostgreSQL Administration Cookbook, 9.5/9.6 Edition](https://www.packtpub.com/big-data-and-business-intelligence/postgresql-administration-cookbook-9596-edition?utm_source=github&utm_medium=repository&utm_campaign=9781785883187)

* [PostgreSQL 9 Administration Cookbook: LITE Edition](https://www.packtpub.com/big-data-and-business-intelligence/postgresql-9-administration-cookbook-lite-edition?utm_source=github&utm_medium=repository&utm_campaign=9781849516204)

gha_language: Java


text:
---
  title: "first-aid"
  blurb: "A new project."
  skills_needed: []
  repos:
    - "https://github.com/sfbrigade/first-aid"
  app_link: "https://github.com/sfbrigade/first-aid"
  license: "MIT"
  project_status: "proposed"
  project_lead: null
  project_members: null
  image_path: "http://i.imgur.com/2lHqtJ7.png"
  active: false
  tags: []
---
# First-Aid

### First-Aid is an application that brings the power of social payments to disaster relief. It gives users the ability to donate directly to a local charity in or around the area a disaster happened.

This application is a final project for Dev Bootcamp and includes the team members:

Brigitte Kozena
Cody Kendall
Jeremy Oltean
Matt Harris
Todd Seller

### Wireframes

Login
![login wireframe](/wireframes/Login.png)

Sign Up
![sign-up wireframe](/wireframes/Sign up.png)

Homepage
![homepage wireframe](/wireframes/Homepage.png)

Charities
![charities wireframe](/wireframes/Charities.png)

Donate Now
![donate now wireframe](/wireframes/Donate Now.png)

Stats
![stats wireframe](/wireframes/Stats.png)

Mobile News Feed
![mobile news feed wireframe](/wireframes/Mobile News Feed.png)

Mobile Charities
![mobile charities wireframe](/wireframes/Mobile Charities.png)

Your Donations Mobile
![your donations mobile wireframe](/wireframes/Your Donations Mobile.png)

Donate Mobile
![donate mobile wireframe](/wireframes/Donate Mobile.png)

gha_language: HTML

gha_license_id: MIT


text:
---
title: HP MSA2040
first-published: 2013-12-19
description: Notes on the HP MSA2040 appliance
---

Specs
-----

*   [Datasheet](https://web.archive.org/web/20140902163720/http://h18006.www1.hp.com/storage/pdfs/4AA4-6608ENW.pdf)

Reviews
-------

*   [HP MSA2040 Review by IT Pro](http://www.itpro.co.uk/storage/hp/20765/hp-msa-2040-storage-review)
*   [HP MSA2040 Review by The Register](http://www.theregister.co.uk/2013/10/09/hp_selling_new_small_san_storage/)

repository: marios-zindilis/website-sources

branch_name: refs/heads/main

repo_name: marios-zindilis/website-sources


text:
# Gallery
Is a web gallery for showing your photos in an elegant way.

![Home page image](images/home.png)
![Slider image](images/slider.png)

## Contributing
We encourage you to contribute to Memory Game. Please check out the [CONTRIBUTING.md](./CONTRIBUTING.md).

## License
Gallery is Copyright © 2020 Hossam Tarek. It is a free software and redistributed
under the terms specified in the [LICENSE](./LICENSE) file.

repository: Hossam-Tarek/gallery

repo_name: Hossam-Tarek/gallery


text:
---
layout: post
title: Pizza Dough!
date: '2016-03-29T11:13:00.001-07:00'
author: William Berry
tags:
modified_time: '2016-04-05T21:29:57.750-07:00'
thumbnail: https://i.ytimg.com/vi/PvdtUR-XTG0/0.jpg
blogger_id: tag:blogger.com,1999:blog-4707687462195457004.post-3490424615220546230
blogger_orig_url: http://www.lucidmotions.net/2016/03/pizza-dough.html
---

Since no one asked ... A recipe for Pizza Dough!

You'll need some hardware to make the process a bit easier:

Large mixing bowl
* Kitchen Scale (like [this](http://www.amazon.com/Ozeri-Professional-Digital-Kitchen-Tempered/dp/B006N0OIIG/ref=sr_1_10?s=kitchen&ie=UTF8&qid=1427176128&sr=1-10&keywords=glass+digital+kitchen+scale+1+gram))
* Bowl Scraper (like [this](http://www.amazon.com/Ateco-1303-Bowl-Scraper/dp/B000KEUKO2/ref=sr_1_1?s=home-garden&ie=UTF8&qid=1427176203&sr=1-1&keywords=bread+scraper))
* Large plastic food storage bin (like [this](http://www.amazon.com/Ultra-Seal-8-1-Food-Storage-Bowl/dp/B0042FLXKA/ref=sr_1_10?s=kitchen&ie=UTF8&qid=1427177375&sr=1-10&keywords=sterilite+ultra+seal))
* Pizza Stone (like [this](http://www.amazon.com/Old-Stone-Oven-4467-14-Inch/dp/B0000E1FDA/ref=sr_1_1?s=home-garden&ie=UTF8&qid=1427177706&sr=1-1&keywords=pizza+stone))
* Pizza Peel (like [this](http://www.amazon.com/Winco-22-Inch-Wooden-12-Inch-14-Inch/dp/B001VZ6MTQ/ref=sr_1_78?s=kitchen&ie=UTF8&qid=1427178004&sr=1-78&keywords=pizza+peel))

The hardware is not compulsory, but will make the whole process of making
an baking pizzas a more enjoyable and efficient endeavor.
600 grams King Arthur Bread Flour
250 grams King Arthur All Purpose Flour
500 grams fridge temp filtered water

Mix and sift flour together and pour the water over.  Cover the bowl with
a tea towel and let rest for ideally 2 hours ... could be as short as 20 min
or as long as 4 hours.

Fold in to your shaggy dough the salt:

18 grams Kosher salt

Feed the beasties ius simple ... in a microwave save bowl, bring the water to
130 deg. and add the oil, salt and sugar. Mix gently.

150 grams of water
2 tsp. extra virgin olive oil
10 grams sugar
Gently stir into this potent yeast concoction

2 tsp. Active Yeast (his is most of a packet of dry active yeast)

Let the yeast bloom for a few minutes.  They will start bubbling and gurgling
in drunken happiness.

Pour the yeastie-beasties over your shaggy dough and begin to combine
with your hand; the dough will be very tacky at first.  Once the dough begins
to peel away from the side of the bowl slightly, turn it out on to a clean
working surface ... I just use the counter top.  The following video shows a
good kneading technique:

<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/PvdtUR-XTG0/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/PvdtUR-XTG0?feature=player_embedded" width="320"></iframe>

Our dough will not be as dry as the one in the video, in fact we actually want
a very wet dough 80% hydration.  Once I've kneaded enough to form a tacky
mess, about 15 minutes, I'll begin dipping my hands in water as I continue to
knead for 5 more minutes, to increase the over all hydration of the dough.
I'll typically consider the dough finished when its an oozing mass that stops
spreading when it's about an inch thick at the center.

Taste the dough.  You'll be surprised that it tasks nothing like the raw
flour, water and yeast that it is.

From here I'll turn the dough into a plastic bowl and cover for bulk
fermentation on the counter for a few hours.  Once the dough shows significant
signs of strong fermentation, bubbling, gurgling, and overall looks like a
sponge, I'll turn the dough out on to a floured counter and partition into 6
lumps.

I use a stretch and fold technique along with a cupping roll to pull some
tension into the surface of the dough before dropping them into oiled
tupperware.  Place the dough balls into the refrigerator for at lease 24-48
hours to continue their rise.

Happy pizza making!


text:
GitHubReleaseNotes
====================

**This project is no longer maintained. Consider using https://github.com/GitTools/GitReleaseManager instead**

Generates release notes for a milestone in a GitHub repo based on issues associated with the milestone.

### Conventions

* All closed issues/PR's for a milestone will be included.
* Issues/PR's with a label `Type: Bug` will be included in a `Bugs` section
* Issues/PR's not labeled as `Type: Bug` will be included in a `Features/Improvements` section
* Milestones are named `{major.minor.patch}`.
* The version is picked up from the build number (GFV) and that info is used to find the milestone.
* Release notes are generated as markdown.

repository: Particular/GitHubReleaseNotes

gha_language: C#

repo_name: Particular/GitHubReleaseNotes


text:
# hosts-so-easy

*Safe, parallel API for manipulating /etc/hosts*

[![npm](https://img.shields.io/npm/v/hosts-so-easy.svg?maxAge=2592000)](https://www.npmjs.com/package/hosts-so-easy)
[![Circle CI](https://circleci.com/gh/gadicc/node-hosts-so-easy.svg?style=shield)](https://circleci.com/gh/gadicc/node-hosts-so-easy)
[![Coverage Status](https://coveralls.io/repos/github/gadicc/node-hosts-so-easy/badge.svg?branch=master)](https://coveralls.io/github/gadicc/node-hosts-so-easy?branch=master)
![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
[![Known Vulnerabilities](https://snyk.io/test/github/gadicc/hosts-so-easy/badge.svg?targetFile=package.json)](https://snyk.io/test/github/gadicc/hosts-so-easy?targetFile=package.json)
[![dependencies](https://david-dm.org/gadicc/node-hosts-so-easy.svg)](https://david-dm.org/gadicc/node-hosts-so-easy)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=plastic)](https://github.com/semantic-release/semantic-release)

Copyright (c) 2017 by Gadi Cohen.  Released under the MIT license.

Note: we support and run tests against latest Node, and Node v10 LTS (as of 2021-01-10).

## Features

  * [X] Built for safe and concurrent / parallel use.
  * [X] Add/remove funcs are (optionally) "use and forget" - no callbacks required.
  * [X] Preserves formatting (comments & whitespace choices) - see sample below.
  * [X] Changes are batched, atomic write is debounced 500ms (by default).
  * [X] Optionally keeps new entries in a separate "header" block.

## Usage

```js
import Hosts from 'hosts-so-easy';
const hosts = new Hosts();

// hosts file is written once at the end
hosts.add('<IP_ADDRESS>', 'www');
hosts.add('<IP_ADDRESS>', [ 'mongo', 'db' ]);

// this is completely safe, only one write occurs at the end.
for (let i = 2; i < 10; i++)
  hosts.add('192.168.0.'+i, 'host'+i);

// can remove individual hosts, all hosts for an IP, or a host from any IP
hosts.remove('<IP_ADDRESS>', '*');
hosts.remove('<IP_ADDRESS>', 'vhost20');
hosts.remove('<IP_ADDRESS>', [ 'mongo', 'db' ]);
hosts.remove('*', 'unwantedHost');
hosts.remove('*', [ 'unwantedHost1', 'unwantedHost2' ]);

// callback/promise after all changes synced in a single write
await hosts.updateFinish();
hosts.updateFinish().then(function() { ... }).catch(function(err) { ... });
hosts.updateFinish(callback);
hosts.on('updateFinish', callback);
hosts.once('updateFinish', callback);
```

## Options

```js
const hosts = new Hosts({

  // Write the new contents to a temporary file first and rename afterwards
  // instantly to avoid conflicts with other writers.  You'll know if you
  // need to turn this off (special filesystems, etc).  Either way, we always
  // check to avoid concurrent writes within the library.
  atomicWrites: false, // default: true

  // How long to wait after *last* add/remove before writing the file,
  // to write the file once even after performing many operations.
  // Even with a small value, we'll check to avoid concurrent writes.
  debounceTime: 500, // in ms, default: 500ms

  // Maintain a header block and insert new entries there.  See sample output
  // further down the README for an example.
  header: 'Docker hosts', // default: false

  // Linux/Mac default:  /etc/hosts
  // Windows default:    C:/Windows/System32/drivers/etc/hosts
  hostsFile: '/some/weird/location/hosts',

});
```

## API

### Methods

* `hosts.add(ip, host || [host1,host2])`

  For the given IP, add a single host or an array of hosts.

* `hosts.clearQueue()`

  If you had a change of heart, and call this in time, nothing will happen :)

* `hosts.on(event, callback)`

  `hosts.once(event, callback)`

  Run the given callback on every event occurrence, or just once when the event
  next occurs.  See EVENTS, below.

* `hosts.remove(ip || '*', host || [host1,host2] || '*')`

  For the given IP, remove the given host or all the hosts in the array.
  Alternatively, give a "host" of `*` to remove the entire line, or an
  "ip" of `*` to remove the given host(s) from any IP.

* `hosts.removeHost(host)`

  Remove all references of `host`, regardless of which IP it resolves to.
  This has the same effect as `hosts.remove('*', host)`.

* `hosts.updateFinish([callback])`

  If a callback is given, it's called at the end of the update sequence (see
  events, below).  If an error occurred, it's provided as the first argument.

  If no callback is given, a `Promise` is returned.  It resolves after a
  successful write, or rejects on failure.

### Events

* `updateStart` - fires at the beginning of update sequence.  Hosts file will
  be stat'd, read and rewritten.

* `updateFinish` - fires at the end of the above sequence.  On failure, the
  error will be provided as the first argument (file not found, permission
  denied, etc).

## Sample output (formatting preserved)

```js
const hosts = new Hosts({ header: 'optional header' });
```

```
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
<IP_ADDRESS>       localhost.localdomain   localhost
::1             localhost.localdomain   localhost

# optional header
<IP_ADDRESS> host2
<IP_ADDRESS> host3

<IP_ADDRESS>     server2
```

## TODO

  * [X] Ability to turn off atomic writes
  * [X] Maintain a header block (put hosts in same section)
  * [X] EventEmitter for writes
  * [X] Validate arguments, throw on invalid

## Wishlist

  * [ ] Callback / promise when particular host entry added.  Can't think of
        any use-case where the 'write' event would not be sufficient, but I'll
        add this if you give me a good reason.

  * [ ] Mimic preceding whitespace pattern for new entry insertion.

  * [X] Better caching for those doing A LOT of work on the file.

repository: gadicc/node-hosts-so-easy

gha_language: JavaScript

repo_name: gadicc/node-hosts-so-easy


text:
gojs-extensions
===============

Extensions for GoJS

As I write a web app that leverages the incredibly powerful canvas-based diagramming library *[GoJS](http://gojs.net/)*, here's
a few useful [extensions](http://www.gojs.net/latest/intro/extensions.html) to the platform that I've developed..

### TODO
- incorporate wheel event (as distinct from DOMMouseScroll & mousewheel) for IE(>8) compatibility

repository: herringtown/gojs-extensions

repo_name: herringtown/gojs-extensions


text:
# Self-Alignment with Instruction Backtranslation
Xian Li, Ping Yu, Chunting Zhou, Timo Schick,
Luke Zettlemoyer, Omer Levy, Jason Weston, Mike Lewis

- We present a scalable method to build a high quality instruction following language model by automatically labelling human-written text with corresponding instructions.
- Our approach, called _instruction backtranslation_, starts with a language model finetuned on a small amount of seed data, and a given web corpus.
- The seed model is used to construct training examples by generating instruction prompts for web documents (self-augmentation), and then selecting high quality examples
from among these candidates (self-curation). This data is then used to finetune a stronger model.
- Finetuning LLaMa on two iterations of our approach yields a model, _Humpback_, that outperforms all other LLaMa-based models on the Alpaca leaderboard not relying on distillation data, demonstrating highly effective self-alignment.

## Paper

- [ArXiv link to paper here](https://arxiv.org/abs/2308.06259).

## Motivation

Aligning large language models (LLMs) to perform instruction following has become a (really!) important topic!
It typically requires finetuning on [large amounts of human-annotated instructions or preferences](https://ai.meta.com/llama/), which clearly is hard to scale.
Recent methods have shown that [distilling the outputs from more powerful models](https://crfm.stanford.edu/2023/03/13/alpaca.html) also works, but the more powerful models also rely on human annotations. Some of these datasets and models that are used are proprietary and the data is inaccessible.

We develop a method where LLMs can instead leverage large amounts of _unlabelled_ data to create their own instruction tuning dataset -- without the use
of distillation.
Recent work has shown that [the quality of training data is just as important as the quantity](https://arxiv.org/abs/2305.11206), and a key part of our method is its ability to excel in both dimensions.

## Instruction Backtranslation

Our approach, named _instruction backtranslation_, is inspired by the classic [_backtranslation_](https://aclanthology.org/W11-2138/) method from machine translation, in which human-written target sentences are automatically annotated with model-generated source sentences in another language to self-generate more translation data.
We apply this idea to instruction following, with a few twists.

Our method starts with a language model finetuned on a small amount of seed (instruction, answer) data, and a given web corpus.

A __first key assumption__ is that there exists some
subset of this very large human-written text that would be suitable as gold generations for some user instructions.

A __second key assumption__ is that we can predict instructions for these candidate gold
answers that can be used as high quality example pairs to train an instruction following model.

Instruction backtranslation thus consists of two steps:
- __self-augmention__:
for each web document, it creates an instruction following training example by predicting a  prompt (instruction) that would be correctly answered by (a portion of) that document. In order to do that, the model is first fine-tuned with the seed instruction data flipped: given the _answer as input_,  predict the instruction.
This gives us a new instruction following training set to use that can be as large as the web corpus that was provided -- _potentially huge_ -- far larger than a human annotated dataset!

- __self-curation__: Unfortunately, directly training on self-augmentation data gives poor results in our experiments,
both because of the mixed quality of human written web text, and noise in the generated instructions.
To remedy this, we show that the same seed model can be used to filter
the set of newly created data by predicting their quality, resulting in a smaller but higher quality set. This is done using prompting, instructing
the trained model to rate the quality of a candidate pair on a 5-point scale, and keeping only those rated 5.

After completing the two steps, the model can then be trained on only the highest quality (instruction, answer) pairs, resulting in a better model.
It is actually then possible to iterate this process as the higher quality model is better at the self-alignment steps; in our experiments we do two iterations of self-curation and show this improves results further.

## Results

We used the base  LLaMA (1) model,  3200 examples from the Open Assistant dataset,  and
502k segments from the English portion of Clueweb corpus as the source of potential instruction answers.
After the self-curation step to retain only high-quality predictions (2 iterations), this results in around 42k new (instruction, answer pairs).
We then then fine-tune on this data and the seed data and call the resulting model _Humpback_.

### Strong data efficiency

We compare the win rate of Humpback (7B parameters) against using other training data sources, either distilled sources (dashed lines) or otherwise (solid lines),
plotting against amount of training data. We find that our self-augmentation data actually outperforms a large variety of other sources thanks
to the self-curation data quality step, as we will show later.

### Head-to-head wins against other methods

We find Humpback (65B parameters) outperforms several existing systems head to head (human evaluation).

### Alpaca leaderboard results

On the [Alpaca leaderboard](https://tatsu-lab.github.io/alpaca_eval/),  Humpback (65B parameters), outperforms all other Llama-based models -- unless they use distillation from stronger base/instruction models.

### Self-curation data quality improves results

We can also see that the higher quality curated data provides a better model than using lower quality data. This is shown by comparing the
win rate against text-davinci-003 when finetuning a 7B LLaMa model in the experiments below.
Here, there are two choices of quality selecting rating "5"  or rating "4 or higher", where the higher quality (even though it is less data) is actually better.
Both self-curation choices outperform no self-curation at all (using just raw self-augmentation).

# Conclusion

We find that instruction backtranslation is a very promising method for self-alignment as shown in our experiments.
Using this method one can successfully increase training data size almost arbitrarily by using vast amounts of web (or other) data, at the cost of some inference compute,  whilst simultaneously maintaining high quality by using the self-curation step, obtaining the best of both worlds.

Future work could scale this method further, most obviously by using more unlabeled document data, and/or starting with improved base models and more seed data.
Overall, we are excited that pushing further in this direction could provide even stronger self-aligned instruction following language models.

repository: facebookresearch/ParlAI

gha_language: Python

repo_name: facebookresearch/ParlAI


text:
# Flask Routing Basic Tutorial

## Description
	This module is a simple program to explain routing in flask

## Usage
	- Navigate to the 2_routing sub directory
	- Export the flask application environment variable on the terminal
		$ export FLASK_APP=routing.py
	- Run the flask application
		$ flask run
	- Click the link in the terminal to view the application running in the browser
	- Enter the appropriate url in the browser to see the expected results defined in the application


text:
# Tip Calculator
* **Perry Raskin**
* **Android Studio v3.0**

## App Usage
This app works on the Android OS, and it calculates the tip and total cost per person upon the input of the **check amount** and the **party size**. You can calculate the 15%, 20%, and 25% tip, and the total cost including the corresponding tip.

## App Testing
### Installation
* You'll need Android Studio https://developer.android.com/studio/index.html.
* Assuming you downloaded/cloned this repo, open an existing project and choose this folder (Assignment 4).
* You can either run the app on an Android emulator, provided by Android Studio, or you can use your own Android phone if you own one. Developer mode must be enabled for this to work.
* For an Android phone plugged in, use USB Debugging and click run.
* Otherwise, you can still click run and choose the emulator and the specs necessary.
* The app should automatically open on either the Android phone, or the emulator.

### Expected Results
* For empty text fields, along with values less than 1, an error message will appear.
* Input into the top two fields, and below you should see the tip results.

## Screenshots
![1](Screenshot_1520746991.png) ![2](Screenshot_1520747008.png)

repository: perryraskin/TipCalculatorApp

repo_name: perryraskin/TipCalculatorApp


text:
[![Build Status](https://travis-ci.org/postgrespro/tsvector2.svg?branch=master)](https://travis-ci.org/postgrespro/tsvector2)
[![PGXN version](https://badge.fury.io/pg/tsvector2.svg)](https://badge.fury.io/pg/tsvector2)
[![GitHub license](https://img.shields.io/badge/license-PostgreSQL-blue.svg)](https://raw.githubusercontent.com/postgrespro/tsvector2/master/LICENSE)

tsvector2
==========

Extended `tsvector` type for PostgreSQL 9.6+. It was implemented to provide better
compression and to remove 1MB size limitation of original tsvector type.

It could be used as transparent replacement of original tsvector and supports
all its functions, operators and index types. Functions that contain `tsvector` in their
names have been changed to `tsvector2`. Full list of these functions specified
below.

Refer to PostgreSQL [documentation](https://www.postgresql.org/docs/current/datatype-textsearch.html)
to get details about `tsvector`. They can be also applied to `tsvector2`.

`tsvector2` specific functions
------------------------------

* `to_tsvector2` (from `text`, `json`, `jsonb` types)
* `array_to_tsvector2`
* `tsvector2_to_array`
* `tsvector2_stat` (should be used instead of `ts_stat`)
* `jsonb_to_tsvector2`
* `json_to_tsvector2`
* `tsvector2_update_trigger`
* `tsvector2_update_trigger_column`

Notice that `jsonb_to_tsvector2` and `json_to_tsvector2` work different on
PostgreSQL 10 and 11. Same applies to `tsvector` functions.

Common functions that could be safely used on both types
--------------------------------------------------------

* `strip`
* `unnest`
* `length`
* `setweight`
* `ts_rank`
* `ts_rank_cd`
* `ts_delete`
* `ts_filter`

Installation
-------------

	make install PG_CONFIG=<path_to_pg_config>
	# if you need rum support, install it first:
	# psql <database> -c "create extension rum"
	psql <database> -c "create extension tsvector2"

license: PostgreSQL


text:
# Registering the provider

The Context Provider needs to be registered before it will work. Providers are
registered in `start/app.js`.

```js
const providers = [
  'adonis-context/providers/ContextProvider'
]
```


text:
# [Oracle-of-Cheese](https://www.amazon.com/Dennis-Trate-Oracle-of-Cheese/dp/B07GNLBNTP/)
## Alexa skill
www.amazon.com/Dennis-Trate-Oracle-of-Cheese/dp/B07GNLBNTP/

_Cheddar or swiss, colby or bleu;_
_The facts you need to do as you please._
_Wedges and wheels, even Whiz too;_
_Take heed to consult the oracle of cheese._

Search the oracle and find 35 facts about cheese! Compiled from highly-reliable* internet sources and edited for maximum Alexa-articulability. For more information, see https://github.com/pseudodennis/Oracle-of-Cheese.

\* Probably not that reliable.

## Credits

Fact Sources:
- https://www.buzzfeed.com/erinlarosa/facts-about-cheese-that-will-make-you-want-to-eat-it-even?utm_term=.hmKDvlQyo#.utMmAbreB
- http://mentalfloss.com/article/54578/11-things-you-might-not-know-about-cheese
- https://www.thefactsite.com/2012/09/top-twenty-cheese-facts.html
- https://www.tasteofhome.com/article/10-amazing-facts-about-cheese-you-need-to-know/

Icon Image:
- https://pixabay.com/photo-3092936/

Lambda function code based on:
- https://github.com/alexa/skill-sample-nodejs-fact/blob/en-US/lambda/custom/index.js

repository: pseudodennis/Oracle-of-Cheese

repo_name: pseudodennis/Oracle-of-Cheese


text:
## Project setup
https://github.com/navdeep-G/samplemod

## RUN
to build, simply go with:
```
make
```

to use, simply starts:
```
pip install dist/code_scanner-{version}.tar.gz
```

### Useful Commands
```
$ python -m venv env
$ source env/bin/activate

move to the util folder, install according to the requirement.txt
$ cd code_scanner
$ pip install -r requirements.txt
$ python setup.py build
$ python setup.py sdist

install
$ pip install dist/code_scanner-1.0.1.tar.gz

use
python -m code_scanner
OR
python -m code_scanner.$file

analyze
python -v -m code_scanner 2>&1 | grep '^import'

unit test
pytest --fixtures # find all fixture info
```

### Report
```
# get all lines of code
git ls-files | xargs wc -l

# code-scanner output

```

### Sample Output
``` v0.2.0

$python -m code_scanner

$pwd
can find the folder and .__scanned_result.txt

in .__scanned_result.txt

------------------------------------
------------------------------ start
Python Source Files

2020-06-12 17:22:43.459211

Source Lines (w/o Comments): 402 (251) Lines 62.0%
Total Lines (w/o Comments): 638 (383) Lines 60.0%

Non-tests Ratio (w/o Comments): 63.0% (65.0%)
------------------------------ end
------------------------------------

```
Removed _build/, _static/ and _templates/ as they can be generated using 'make'.

repository: stargrep/rmm-utils

repo_name: stargrep/rmm-utils


text:
# inventoryManager

This application will help to keep track of items that are currently on loan. It
might be relevant for sports clubs, etc. whenever there are objects on loan to
members for a certain period of time.

The whole "database" will be stored in a JSON file. On start up the information
are stored in the correct views and can be edited as necessary.

## First Steps

To execute the app, the computer at hand must have a Java 8 runtime environment
with JavaFX included. Once launched, the app will create folder
`.inventoryManager` in the user's home directory including a file named
`config.json`. This file will keep track of all recently opened data containers.
By default the last opened container will be reloaded on each start.

## Initial Setup

After openeing the app the very first time there there must be a data container
created before users and items can be added to the overviews. This is done by
clicking the database symbol (s. button bar in the upper part). The created data
container (which is a JSON file as well). The new container will be loaded at
once and its identifier is displayed in the upper right corner of the main
window.

![create_dc](readme/create_dc.png)

## Overviews

The app has two main dialogs: a user overview and an inventory overview. Both
can be opened by using the related buttons (person and tool icon) in the main
button bar. Creation and deletion of entries is managed in both views by using
the two buttons in the left of the button bar. These buttons will recognize
automatically by the currently opened view which kind of data is to be added or
deleted. If there is no data container opened these buttons are disabled.

![first_launch](readme/first_launch.png)

In the right part of both views an editor for the currently selected item is
integrated. The changes can either be applied (check mark) or rolled back (X
mark). Note that there is no separate save button, all changes are written to
the container file immediately.

## Managing Data

Once a data container has been loaded, the add/remove buttons become available.
As mentioned above both button's behavior is depending on the view currently
opened. In both dialogs all mandatory fields are validated, so the records can
be saved only, if all required fields have a proper input.

![manage](readme/manage.png)

The deletion of records requires a confirmation by the user. Once a record has
been deleted, this cannot be undone. **So take care of regular backups!**

![delete](readme/delete_record.png)

## Lending and Returning Items

There are general two ways of lending items. The first one is selecting the item
in the inventory overview, open the context menu (right click) and click *Lend
to*. This will open a dialog were the lender and the lending date must be set.
Both fields are mandatory.

The second way is triggered from the user overview. Click *Lending devices* in
the context menu. Here multiple items can be lend at once. The selection
contains only those items taht are still available.

Returning items is done via the inventory overview's context menu. When an item
is returned, a history record is created. These records make sure the lending
history of each item can be tracked. The history is accessible from the context
menu as well.

## Next MOT

Although the MOT column is not mandatory, there are a few things to explain.
When the app is started, the colors of the filled cells might change. This is
depending on the months left until the next MOT (the lower bound is always
exclusive):

* if the MOT is 12 to 6 months away, the cell appears dark green
* between 6 and 3 months it appears yellow
* between 3 and 1 month it appears orange
* at 1 month it is marked orange red
* if the MOT is due or expired, the cell is dark red

## Searching Entries

Both overviews have a global search field. Any input there is used to filter the
table entries as you type. The values to be filtered are the table columns.
Additional to that the search in the inventory overview also includes the
optional info text on the right. Note that the input is not case sensitive!


text:
---
layout: post
title: "Introduction to Content Negotiation"
date: 2016-07-11 -0800
comments: true
categories: [HTTP, Content Negotiation]
summary: "Content Negotiation, simply put, is a way for a client and/or server to determine how content is requested and received over HTTPS (or HTTP, [please be kind use HTTPS](https://www.httpvshttps.com)).  Fortunately, for developers, content negotiation has been defined by the W3C and you can find the specification on their site ([RFC2616 Section 12](https://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html)).  There are three types of content negotiation, but for the purpose of this article we'll focus on server-driven negotiation.  That is when the agent or client requests content using HTTP headers to help the server make decisions on how to format data sent back to the client.  Here are the headers that are typically used in content negotiation: Accept, Accept-Charset, Accept-Encoding, Accept-Language, etc."
---

Content Negotiation, simply put, is a way for a client and/or server to determine how content is requested and received over HTTPS (or HTTP, [please be kind use HTTPS](https://www.httpvshttps.com)).  Fortunately, for developers, content negotiation has been defined by the W3C and you can find the specification on their site ([RFC2616 Section 12](https://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html)).  There are three types of content negotiation, but for the purpose of this article we'll focus on server-driven negotiation.  That is when the agent or client requests content using HTTP headers to help the server make decisions on how to format data sent back to the client.  Here are the headers that are typically used in content negotiation: Accept, Accept-Charset, Accept-Encoding, Accept-Language, etc.

The fastest way to see content negotiation in action is to open up Chrome development tools, navigate to the network tab, and go to any website.  If you click on the requst you will notice Chrome automatically populates the Accept, Accept-Encoding, and Accept-Language with the values below.  These two headers are how Chrome negotiates with the server how it prefers to recieve content for the given request.

```
GET / HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: en-US,en;q=0.8
```

Let's break this down a bit.  The **Accept** header is used to specify the media type for data returned in the response body.  The **Accept** header states a weighted preference for the desired media types.  In this example Chrome requested HTML, then xhtml, followed by xml as it highest preference.  After that, Chrome states it will accept an image/webp followed by anything.  Chrome uses the **Accept-Encoding** header to specificy how it wants the response encoded.  Finally, it requests the en-US language as its preferences otherwise a non-localized version of English second using hte **Accept-Language** header.

The server, if using server-driven negotiation, can opt to take any of these headers into account when making a decision on how to return the content.  It is important to note the user agent or client does not control how content is returned.  It simply declares preferences with each request.  In server-driven content negotiation the server's algorithm is reponsible for making a determination (or __Best Guess__ as it worded in the specification).  Most servers will look at these HTTP headers when deciding how to format content on the response.

As developers we often need to know more about content negotiation when building HTTP(S) based services.  After consuming a few APIs and web services it becomes apparent that many web services have different implmentations and limitations with content negotiation.

## Experimenting with content negotiation and the bits

Using Postman, I generated this request to an ASP.NET Web API running locally. The request uses the Accept HTTP header requesting the server respond with XML.

```
GET /api/Person HTTP/1.1
Host: localhost:65307
Accept: application/xml
Cache-Control: no-cache
```

By default, ASP.NET responded with the xml media type.  The server made its decision based on the Accept header. ASP.NET has a more complex set of rules than this, which we will dig deeper into in a future article.

```
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/xml; charset=utf-8
Expires: -1
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-SourceFiles: =?UTF-8?B?XFxnY2MuaW50XHVzZXJzXGhvbWVcc2hhd25tXHZpc3VhbCBzdHVkaW8gMjAxNVxQcm9qZWN0c1xEZW1vXERlbW9cYXBpXFBlcnNvbg==?=
X-Powered-By: ASP.NET
Date: Sat, 09 Jul 2016 11:27:20 GMT
Content-Length: 194

<Person xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Demo.Models"><Age>30</Age><FirstName>Some</FirstName><LastName>Dewd</LastName></Person>
```

Today, many developers prefer to use JSON.  To receive JSON data over XML, simply update the request's Accept header with the media type application/json.

```
GET /api/Person HTTP/1.1
Host: localhost:65307
Accept: application/json;q=0.9,application/xml;q=0.8
Cache-Control: no-cache
```

As one can see the server responded with equivalent data. This time, instaed receiving XML the server responded with a JSON string in the response body.

```
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/10.0
Date: Sat, 09 Jul 2016 11:34:22 GMT
Content-Length: 47

{"FirstName":"Some","LastName":"Dewd","Age":30}
```

To show off more interesting behavior in ASP.NET's server-driven content negotiation we can provide a media type not supported out of the box.  Optionally, if one were to leave off the Accept HTTP header one would get the same result.  The ASP.NET content negotiation algorithm cannot provide a response requested by the client, it will fall back to its default media type formatter (for .NET this is application/json).

```
GET /api/Person HTTP/1.1
Host: localhost:65307
Accept: text/html
Cache-Control: no-cache
```

```
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/10.0
Date: Sat, 09 Jul 2016 13:16:56 GMT
Content-Length: 47

{"FirstName":"Some","LastName":"Dewd","Age":30}
```

ASP.NET is just one technology of many for building web services.  GitHub also uses server-drive content negotiation, but implments a different behavior.  For example, unlike ASP.NET WebAPI's default behavior, GitHub does not fallback to a default media type formatter if one requests an unsupported media type.  Instead, GitHub opts to respond with an error formatted in JSON.

```
GET /user/sgmeyer/repos HTTP/1.1
Host: api.github.com
Accept: application/xml
Cache-Control: no-cache
```

```
HTTP/1.1 415 Unsupported Media Type
Server: GitHub.com
Date: Sat, 09 Jul 2016 13:23:14 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 167
Status: 415 Unsupported Media Type
X-GitHub-Media-Type: unknown
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset:<PHONE_NUMBER>
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'none'
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
X-GitHub-Request-Id: 325142E0:2FFB:80ACDE9:5780FAC2

{
  "message": "Unsupported 'Accept' header: [\"application/xml\"]. Must accept 'application/json'.",
  "documentation_url": "https://developer.github.com/v3/media"
}
```

Content negotiation is a great way to improve the developer experience of an API. One can provide conveniences for customers by allowing them to determine the format of data coming back from the service.  There are many ways to implement content negotiation, but when understood it can be a power tool as a developer.


text:
# PyPReC: Python Package Repository Creator

[![DOI](https://zenodo.org/badge/501281838.svg)](https://zenodo.org/badge/latestdoi/501281838)

This package automates the process of repository creation for Python packages.

## Documentation

The documentation for pyprec can be consulted in the readthedocs page:
[pyprec.readthedocs.io](https://pyprec.readthedocs.io).

## Installation

The package can be installed with Python's pip package manager.

```bash
pip install pyprec
```

Or manually:

```bash
git clone https://github.com/marcorossi5/pyprec.git
cd pyprec
pip install .
```

The last command installs the `pyprec` program into the environment python path.

## Running the code

Package help message:

```bash
$ bash --help
usage: pyprec [-h] [-r RUNCARD] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}]

optional arguments:
  -h, --help            show this help message and exit
  -r RUNCARD, --runcard RUNCARD
                        The settings runcard file.
  -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        set logging level
```

If a runcard is specified, settings are loaded from it. Please, find a default
runcard [here](./cards/default_runcard.yaml).

If no runcard is given by the user, the interactive mode is triggered: answer
the prompted questions to proceed.

:warning: **Note:**
Both modes require that the `prefix_folder` does not contain any `src` folder
inside. This is needed to ensure a clean workspace and avoid unintentional file
deletion.


text:
# Display Container

This container includes

* A launch script to show JetBot stats on PiOLED display

#### Build

```bash
cd docker/display
./build.sh
```

#### Run

```bash
cd docker/display
./enable.sh
```

repository: NVIDIA-AI-IOT/jetbot

gha_language: Jupyter Notebook

repo_name: NVIDIA-AI-IOT/jetbot


text:
### [CVE-2022-22297](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22297)
![](https://img.shields.io/static/v1?label=Product&message=FortiRecorder&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=FortiWeb&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=6.4.0%3C%3D%206.4.1%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Version&message=6.4.0%3C%3D%206.4.3%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Information%20disclosure&color=brighgreen)

### Description

An incomplete filtering of one or more instances of special elements vulnerability [CWE-792] in the command line interpreter of FortiWeb version 6.4.0 through 6.4.1, FortiWeb version 6.3.0 through 6.3.17, FortiWeb all versions 6.2, FortiWeb all versions 6.1, FortiWeb all versions 6.0, FortiRecorder version 6.4.0 through 6.4.3, FortiRecorder all versions 6.0, FortiRecorder all versions 2.7 may allow an authenticated user to read arbitrary files via specially crafted command arguments.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/karimhabush/cyberowl

repository: trickest/cve

repo_name: trickest/cve


text:
---
id: rooks
title: rooks
sidebar_label: rooks
slug: /
---

## [Complete Documentation](https://react-hooks.org/)

[![Image from Gyazo](https://i.gyazo.com/742dc22ec370af0a96322427b6a32a9b.gif)](https://gyazo.com/742dc22ec370af0a96322427b6a32a9b)

## List of all hooks

- [useBoundingclientrectRef](https://react-hooks.org/docs/useBoundingclientrectRef) - A hook that tracks the boundingclientrect of an element. It returns a callbackRef so that the element node if changed is easily tracked.
- [useBoundingclientrect](https://react-hooks.org/docs/useBoundingclientrect) - A React Hooks package for boundingclientrect
- [useCountdown](https://react-hooks.org/docs/useCountdown) - Count down to a target timestamp and call callbacks every second (or provided peried)
- [useCounter](https://react-hooks.org/docs/useCounter) - A React Hooks package for counter
- [useDebounce](https://react-hooks.org/docs/useDebounce) - Debounce hook for react
- [useDidMount](https://react-hooks.org/docs/useDidMount) - A React hooks package for componentDidMount
- [useDidUpdate](https://react-hooks.org/docs/useDidUpdate) - componentDidUpdate hook for react
- [useDocumentEventListener](https://react-hooks.org/docs/useDocumentEventListener) - A react hook to an event listener to the document object
- [useEffectOnceWhen](https://react-hooks.org/docs/useEffectOnceWhen) - Runs a callback effect atmost one time when a condition becomes true
- [useEventListenerRef](https://react-hooks.org/docs/useEventListenerRef) - A react hook to add an event listener to a ref
- [useForkRef](https://react-hooks.org/docs/useForkRef) - A hook that can combine two refs(mutable or callbackRefs) into a single callbackRef
- [useFreshRef](https://react-hooks.org/docs/useFreshRef) - Avoid stale state in callbacks with this hook. Auto updates values using a ref.
- [useFreshTick](https://react-hooks.org/docs/useFreshTick) - Like useFreshRef but specifically for functions
- [useFullscreen](https://react-hooks.org/docs/useFullscreen) - A React Hooks package for fullscreen.
- [useInViewRef](https://react-hooks.org/docs/useInViewRef) - Simple hook that monitors element enters or leave the viewport.
- [useGeolocation](https://react-hooks.org/docs/useGeolocation) - A hook to provide the geolocation info on client side.
- [useInput](https://react-hooks.org/docs/useInput) - A React Hooks package for input
- [useIntersectionObserverRef](https://react-hooks.org/docs/useIntersectionObserverRef) - A hook to register an intersection observer listener
- [useIntervalWhen](https://react-hooks.org/docs/useIntervalWhen) - Sets an interval immediately when a condition is true
- [useInterval](https://react-hooks.org/docs/useInterval) - A react hook for using setInterval
- [useIsomorphicEffect](https://react-hooks.org/docs/useIsomorphicEffect) - Resolves to useEffect when window is not in scope and useLayout effect in the browser
- [useKeyRef](https://react-hooks.org/docs/useKeyRef) - Very similar to useKey but it returns a ref
- [useKey](https://react-hooks.org/docs/useKey) - Keyboard key handler hook for react
- [useKeys](https://react-hooks.org/docs/useKeys) - A hook which allows to setup callbacks on multiple keypresses at the same time
- [useLocalstorageState](https://react-hooks.org/docs/useLocalstorageState) - UseState but auto updates values to localStorage
- [useLocalstorage](https://react-hooks.org/docs/useLocalstorage) - Local Storage hook for React
- [useMapState](https://react-hooks.org/docs/useMapState) - A react hook to manage state in a key value pair map.
- [useMergeRefs](https://react-hooks.org/docs/useMergeRefs) - Merges any number of refs into a single ref
- [useMouse](https://react-hooks.org/docs/useMouse) - A React Hooks package for mouse
- [useMultiSelectableList](https://react-hooks.org/docs/useMultiSelectableList) - A custom hook to easily select multiple values from a list
- [useMutationObserverRef](https://react-hooks.org/docs/useMutationObserverRef) - A hook that tracks mutations of an element. It returns a callbackRef.
- [useMutationObserver](https://react-hooks.org/docs/useMutationObserver) - A React Hooks package for mutation-observer
- [useNavigatorLanguage](https://react-hooks.org/docs/useNavigatorLanguage) - A React Hooks package for navigator-language
- [useOnWindowResize](https://react-hooks.org/docs/useOnWindowResize) - A React hook for window on resize event
- [useOnWindowScroll](https://react-hooks.org/docs/useOnWindowScroll) - A React hook for window on scroll event
- [useOnline](https://react-hooks.org/docs/useOnline) - A React Hooks package for online
- [useOutsideClickRef](https://react-hooks.org/docs/useOutsideClickRef) - A hook that can track a click event outside a ref. Returns a callbackRef.
- [useOutsideClick](https://react-hooks.org/docs/useOutsideClick) - React hook for tracking clicks outside a ref
- [usePreviousDifferent](https://react-hooks.org/docs/usePreviousDifferent) - usePreviousDifferent hooks returns the last different value of a variable
- [usePreviousImmediate](https://react-hooks.org/docs/usePreviousImmediate) - usePreviousImmediate returns the previous value of a variable even if it was the same or different
- [usePrevious](https://react-hooks.org/docs/usePrevious) - Access the previous value of a variable with this React hook
- [useQueueState](https://react-hooks.org/docs/useQueueState) - A React hook that manages state in the form of a queue
- [useRaf](https://react-hooks.org/docs/useRaf) - A continuously running requestAnimationFrame hook for React
- [useSelect](https://react-hooks.org/docs/useSelect) - A React Hooks package for select
- [useSelectableList](https://react-hooks.org/docs/useSelectableList) - Easily select a single value from a list of values. very useful for radio buttons, select inputs etc.
- [useSessionstorageState](https://react-hooks.org/docs/useSessionstorageState) - useState but syncs with sessionstorage
- [useSessionstorage](https://react-hooks.org/docs/useSessionstorage) - Session storage react hook. Easily manage session storage values
- [useStackState](https://react-hooks.org/docs/useStackState) - A React hook that manages state in the form of a stack
- [useThrottle](https://react-hooks.org/docs/useThrottle) - A throttle hook for react
- [useTimeAgo](https://react-hooks.org/docs/useTimeAgo) - A React Hook to get time ago for timestamp millisecond value
- [useTimeoutWhen](https://react-hooks.org/docs/useTimeoutWhen) - Takes a callback and fires it when a condition is true
- [useTimeout](https://react-hooks.org/docs/useTimeout) - A React Hooks package for timeout
- [useToggle](https://react-hooks.org/docs/useToggle) - A React Hooks package for toggle
- [useUndoState](https://react-hooks.org/docs/useUndoState) - Drop in replacement for useState hook but with undo functionality.
- [useUpdateEffect](https://react-hooks.org/docs/useUpdateEffect) - An useEffect that does not run on first render
- [useVisibilitySensor](https://react-hooks.org/docs/useVisibilitySensor) - A React Hooks package for visibility-sensor
- [useWillUnmount](https://react-hooks.org/docs/useWillUnmount) - A React hook for componentWillUnmount lifecycle method
- [useWindowEventListener](https://react-hooks.org/docs/useWindowEventListener) - Adds an event listener to window
- [useWindowScrollPosition](https://react-hooks.org/docs/useWindowScrollPosition) - A React hook to get the scroll position of the window
- [useWindowSize](https://react-hooks.org/docs/useWindowSize) - A React Hooks package for window-size
- [useWorker](https://react-hooks.org/docs/useWorker) - A React Hooks package for worker

## About

Standalone build for all rooks. This package contains all the hooks built as part of the rooks project.

**Note:** If you only need a few hooks from the rooks package, it's prefereable to install individiual hooks from npm instead of the standalone rooks build. In other words, install `@rooks/useDidMount` instead of `rooks` if you only need the `useDidMount` functionality.

## Installation

    npm i - s rooks

Import any hook from "rooks" and start using them!

```jsx
import { useDidMount } from 'rooks';
```

## Usage

```jsx
function App() {
  useDidMount(() => {
    alert('mounted');
  });
  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
    </div>
  );
}
```

## License

MIT

## Join Bhargav's discord server

You can click on the floating discord icon at the bottom right of the screen and talk to us in our server.


text:
# Azure Data Explorer Pack
Use the Azure Data Explorer pack to collect and analyze data inside Azure Data Explorer clusters, and to manage search queries.

## What does this pack do?
- Execute a Kusto Query Language (KQL) query against the given database inside a cluster.
- List search queries that have reached a final state in the given database.
- List currently executing search queries in the given database.
- Start a best-effort attempt to cancel a specific running search query in the specified database.
- Start, complete, or rerun the authorization process.
- Rest the connectivity to Azure Data Explorer.

This pack contains an integration, which was integrated and tested with version V1 of AzureDataExplorer.

repository: demisto/content

repo_name: demisto/content


text:
---
path: "/native-browser-api"
date: "2018-06-21T15:12:33.962Z"
title: "Native browser API's"
draft: false
---

## The shift
In the past few years a shift seems to be happening from jQuery to other libraries/frameworks like React, Angular, Vue and many more. As great as these tools are they might be overkill for many smaller and maybe middle-sized projects.

## From jQuery to Native API's
jQuery has received much scorn from the most of the developers in the community in the past few years., but is it justified? If we look back on the past jQuery has been a great tool. It large support in browsers in the time when nothing was standardized. It made DOM selection and CSS selection really easy and had a convenient animation API. And some more pro's like a huge selection of plugins etc.

However nowadays browser suppliers are standardizing, their API's to some degree which we can leverage from. This made the advantage of normalizing the old browser API's obsolete.

**Examples**

Want to get your element with id?
```
	// jQuery
	$('#my-id')

	// Native API
	document.querySelector('#my-id')
```

Maybe you want to get all of the elements with a class

```
	// jQuery
	$('.my-class')

	// Native API
	document.querySelectorAll('.my-class')
```

Easy right? Okay, this might not be the hardest task so let's try another one.

**Lazy loading images**
So how about lazy loading? For the jQuery example, we will be using the plugin called *Lazy load*

```
	// jQuery

	window.addEventListener("load", function(event) {
		lazyload(); // By default will lazyload all images with the class .lazyload
	});

	// Native API - Using Intersection Observer
	const callback = (entries, observer) => {
		entries.forEach(entry => {
			if (entry.isIntersecting) {
				// An element is intersecting
				const element = entry.target;
				element.target.src = yourImageToLoadIn; // Here you add the image src you want to load in
				observer.unobserve(element); // Stops observing the element
			}
		});
	};

	// Creating an IntersectionObserver instance and passing it in a callback. Options can be added as a second parameter
	const theObserver = new IntersectionObserver(callback);

	// Start to observe all images with the class .all-images
	theObserver.observe(document.querySelectorAll('.all-images'));
```

In this example, the difference in lines of code does seem a lot. However, the advantages of using the Native API's is the because these API's are built-in the browser. jQuery has to be loaded in first excluding the plugins and then be parsed afterward, increasing the load time and data consumption. And because Js is render blocking, the user will be left with an unresponsive screen.

> Native code is faster than interpreted / just in time compiled code - Christian “Schepp” Schaefer

*jQuery is only used as an example to compare with*

## Sound great, but how about ...
Now comes the question. How is the support, does it support IE version X. Well, some of API's do but not all. The question is whether you need to support IE 6 for example. Does your audience use it? Then maybe this might not be the solution for you as of yet, but you can still use it either way. How? By implementing **Progressive enhancement** and **Feature detection**.

Progressive enhancement requires you to build up your web project in layers, starting from HTML only to CSS and enhancing it with JS. Your core functionality should be working even if JS is disabled and/or when the CSS does not work for some reason. The user can still make use of the most important features.

With feature detection, you can make use of the new API's regardless of whether a visitor's browser supports it or not. By implementing the detection you can make use of newer API's for the current browsers and have a fallback for the older browsers. And when the time comes that the API's is supported by everyone then the code will already be up to date.

## Takeaway
All the new technologies are cool and really useful while also increasing productivity. While that is so it is not always necessary for your use-case. Many libraries can already be replaced by the Native API's as of today while supporting older browsers. So why not make use of them?

#### Sources:
- Talk: Jurgen Tjerik - Progressive enhancement at HvA
- Talk: Christian “Schepp” Schaefer - Breakthrough of native browser API's at NLHTML5 x CSS Day
- The jQuery lazy load snippet:  https://appelsiini.net/projects/lazyload/fadein/

repository: kyunwang/weekly-nerd

repo_name: kyunwang/weekly-nerd


text:
---
layout: rns
title: RIF Token
---

RIF Name Service (RNS) implements the RIF Directory Protocol (RDP) which recommends the usage of the RIF Token to stake at name auctions and also paying for name maintenance rent.

To interact with RNS, it's important to understand the nature of the RIF Token.

      Token Name
      RIF

      Total Supply
      1,000,000,000 tRIF

      Contract Address
      0x2acc95758f8b5f583470ba265eb685a8f45fc9d5

      Contract Type
      ERC677

> Testnet version

## ERC677 token standard

An ERC20 token transaction between a regular/non-contract address and contract are two different transactions: You should call approve on the token contract and then call transferFrom on the other contract when you want to deposit your tokens into it.

ERC677 simplifies this requirement and allows using the same transfer function. ERC677 tokens can be sent by calling transfer function on the token contract with no difference if the receiver is a contract or a wallet address, since there is a new way to notify the receive contract of the transfer.

An ERC677 token transfer will be the same as an ERC20 transfer. On the other hand, if the receiver is a contract, then the ERC677 token contract will try to call `tokenFallback` function on receiver contract. If there is no `tokenFallback` function on receiver contract, the transaction will fail.

## RIF transfer methods

- Approve and transfer:
    ```js
    function approve(address _spender, uint256 _value) public returns (bool)
    function transfer(address _to, uint256 _value) public returns (bool)
    ```

- Transfer and call:
    ```js
    function transfer(address _to, uint256 _value, bytes data)
    ```

    **Parameters**
    - `_to: address`: Contract address.
    - `_value: uint256`: Amount of RIF tokens to send.
    - `data: bytes`: 4-byte signature of the function to be executed, followed by the function parameters to be executed with encoded as a byte array.

As explained in the [Registrar](/Architecture/Registrar) section, both **bid submission** and **rent payment** can be executed through the ERC677 transfer methods.


text:
# ALF-CMIN Input Reduction Wiki

An input list has a code coverage scope, Vuzzer use a home-made function to take the best inputs with best coverage. The idea is to implement a plugin, AFL-CMIN for another fuzzer called AFL, that handle this function very well to improve the input selection.

AFL-CMIN reduction is a good thing use because it can highly reduce the input count to test, by selecting only relevant inputs. It could make Vuzzer faster on its way of launching test.

I decided to implement this as an option, and split the reduction in two parts, standard inputs generation reduction (parent input) and child inputs reduction. Note that this reduction is only applied on inputs created from generation (inputs kept from other generation are not reduced).

![http://url/to/img.png](https://i.imgur.com/7sXiVGY.png)

## How to use ?

First you have to set the path of AFL-CMIN in the configuration file (config.py)

```python
ALFCMINEXECUTABLEPATH = '/path/to/afl-cmin/afl/afl-cmin'
```
After you can turn on the input reduction on the normal input generation
```python
ALFINPUTREDUCTION = True
```
Or you can turn on the input reduction on the child input generation
```python
ALFCHILDINPUTREDUCTION = True
```


text:
## QR code with image in VB.NET using ByteScout Barcode SDK

### Make QR code with image in VB.NET: ### Tutorial on how to do QR code with image in VB.NET

We’ve created and updating regularly our sample code library so you may quickly learn QR code with image and the step-by-step process in VB.NET. ByteScout Barcode SDK was made to help with QR code with image in VB.NET. ByteScout Barcode SDK is the robost SDK that generates high quality barcode images and pdf. Can generate all popular types of barcodes from QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix to more exotic barcode types. Fully customizable fonts, colors, print sizes. Includes special functions to ensure output quality, and tools for adding barcodes to new or existing pdf files and images.

This rich sample source code in VB.NET for ByteScout Barcode SDK includes the number of functions and options you should do calling the API to implement QR code with image. VB.NET sample code is all you need: copy and paste the code to your VB.NET application's code editor, add a reference to ByteScout Barcode SDK (if you haven't added yet) and you are ready to go! Enhanced documentation and tutorials are available along with installed ByteScout Barcode SDK if you'd like to dive deeper into the topic and the details of the API.

ByteScout Barcode SDK free trial version is available for download from our website. Free trial also includes programming tutorials along with source code samples.

## Get In Touch

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20Barcode%20SDK%20Question)

or send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20Barcode%20SDK%20Question)

## Free Trial Download

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)

## Web API (On-demand version)

[Get your free API key](https://pdf.co/documentation/api?utm_source=github-readme)

## API Documentation and References

[Explore ByteScout Barcode SDK Documentation](https://bytescout.com/documentation/index.html?utm_source=github-readme)

[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)

[Check Free Training Sessions for ByteScout%20Barcode%20SDK](https://academy.bytescout.com/)

## Video Review

[https://www.youtube.com/watch?v=REnj3A-oSPI](https://www.youtube.com/watch?v=REnj3A-oSPI)

url: https://raw.githubusercontent.com/repohoarder/ByteScout-SDK-SourceCode/32dd9367cebb66e3aa16bd803798c026d7dfeed5/BarCode SDK/VB.NET/QR Code With Image/README.md

repository: repohoarder/ByteScout-SDK-SourceCode

repo_name: repohoarder/ByteScout-SDK-SourceCode


text:
# gpro-rs

Gpro is a command-line program which displays guitar-pro files. It was made to be a linux alternative to [Songbook](https://www.linkesoft.com/songbook/).

# Features

- Display guitar-pro files
- Customizable theme
- Navigate folders and open files with a directory tree

# Installation

Currently the only way to use gpro is cloning the repo and building it with `cargo build --release` using the rust-nightly toolchain. Other install methods may be added later.


text:
# CNNs_street-address-recognition
## MLND Deep Learning Capstone Project to detect Street View House Number using tensorflow, deep learning platform

In this project, I would decode and recognize the sequences of digits from the natural images of Street View House Numbers (SVHN) through training Convolutional neural networks (CNN), which is the special case of the neural network with convolutional layers and subsampling layers.
This model could enable us to find the housing number of a specific location in a street as a format of
continuous multiple digit characters with 94.7% prediction accuracy from test data, which is shy of human recognition 97%
but could be a good starting point for us to improve to excel the capability of human vision recognition.

* In order to exute the include program, First of all ipython notebook or jupyter notebook should be installed
* This program is developed and test on GTX1080.

## Source Code
- ` capstone_preparation_project.ipynb `
- ` Capstone_digitStruct.ipynb `
- ` capston_digitStructMatToCsv.ipynb `
- ` capstone_main_preprocess_project.ipynb `
- ` capstone_main_CNN_project `

## Requirements

- Python 2.7
- [Jupyter Notebook]( http://jupyter.org/install.html)
- [TensorFlow](http://www.tensorflow.org/)
- [NumPy](http://www.numpy.org/)
- [matplotlib](http://matplotlib.org/)
- [scikit-learn](http://scikit-learn.org/stable/)
- [SciPy library](http://www.scipy.org/scipylib/index.html)
- [Six](http://pypi.python.org/pypi/six/)
- [h5py](http://pypi.python.org/pypi/h5py/)

This project files are tested and optimized 32GB intel Core7 system with GTX1080 GPU.

You will also need to have software installed to run and execute an Jupyter Notebook`

## Run

Open `Ipython Notebook` in the root folder by type  “jupyter notebook” on the shell command line(linux) or command line(windows)
Open the 5 Files and run each cell one by one in the files.

## Data

This project uses the [The Street View House Numbers (SVHN) Dataset](http://ufldl.stanford.edu/housenumbers/)
These dataset are downloaded and extracted in ` capstone_preparation_project.ipynb ` and ` capstone_main_preprocess_project.ipynb `

## Meta
Yoonsu Park - http://www.patternics.com
Distributed under the MIT license. See LICENSE for more information( https://en.wikipedia.org/wiki/MIT_License ).
https://github.com/blockchain99/street-address-image-recognition/capstoneproject_report.pdf


text:
discord-rs [![](https://meritbadge.herokuapp.com/discord)](https://crates.io/crates/discord) [![](https://img.shields.io/badge/docs-online-2020ff.svg)](https://docs.rs/discord)
==========

> This project is only maintained occasionally. If you're having problems, open
> a pull request or check the [network graph] for up-to-date forks.

[network graph]: https://github.com/SpaceManiac/discord-rs/network

**discord-rs** is a [Rust](https://www.rust-lang.org) client library for the
[Discord](https://discord.com) chat client's API.

The Discord API can be divided into three main components: the RESTful API
to which calls can be made to take actions, a websocket-based permanent
connection over which state updates are received, and the voice calling
system.

Log in to Discord with `Discord::new`, `new_cache`, or `from_bot_token` as
appropriate. The resulting value can be used to make REST API calls to post
messages and manipulate Discord state. Calling `connect()` will open a
websocket connection, through which events can be received. These two channels
are enough to write a simple chatbot which can read and respond to messages.

For more in-depth tracking of Discord state, a `State` can be seeded with
the `ReadyEvent` obtained when opening a `Connection` and kept updated with
the events received over it.

To join voice servers, call `Connection::voice` to get a `VoiceConnection`
and use `connect` to join a channel, then `play` and `stop` to control
playback. Manipulating deaf/mute state and receiving audio are also possible.

For further details, browse the [source](src/) or read
[the documentation](https://docs.rs/discord).
For examples, browse the [examples](examples/) directory.

## Installation

On Windows, discord-rs currently requires a GNU-like environment. For details,
read the [installation guide](https://github.com/SpaceManiac/discord-rs/wiki/Windows-Installation).

On all platforms, discord-rs has several system dependencies, which should be
installed as appropriate:

* `pkg-config`
* `openssl`
* `libsodium` (if using voice)
* `opus` (if using voice)
* `ffmpeg` (if using ffmpeg features)
* `youtube-dl` (if using youtube-dl features)

repository: SpaceManiac/discord-rs

gha_language: Rust

repo_name: SpaceManiac/discord-rs


text:
# tmb - Python library for TMB API

![build](https://img.shields.io/github/workflow/status/alemuro/tmb/Main) ![downloads](https://img.shields.io/pypi/dm/tmb) ![version](https://img.shields.io/pypi/v/tmb)

Library to interact with the TMB (Transports Metropolitans de Barcelona) API.

Currently it supports the following TMB services:
- iBus (get remain minutes for a given stop and line)
- Planner (Get list of itineraries to go from `from_coords` to `to_coords`)

## Generate API keys

* Go to [developer.tmb.cat](https://developer.tmb.cat/).
* Login using your personal account.
* Create a [new application](https://developer.tmb.cat/account/applications), call it as you want.
* Once created, you will see two variables: `APP_ID` and `APP_KEY`.

## Example

### iBus

Create the iBus object using the API keys generated from TMB portal.

```
from tmb import IBus

ibus = IBus(APP_ID, APP_KEY)
forecast = ibus.get_stop_forecast('1265','V19')
print(f"{forecast} mins")
```

### Planner

Create the Planner object using the API keys generated from TMB portal.

```
from tmb import Planner

planner = Planner(APP_ID, APP_KEY)
plans = planner.get_itineraries('41.3755204,2.1498870', '41.3878951,2.1308587')
print(plans)
```

## Projects Depending on `tmb`

https://github.com/home-assistant/home-assistant

repository: alemuro/tmb

repo_name: alemuro/tmb


text:
# delete\_orphan\_instance\_storage\_rule

Orphan EBS drives are usually unused.

This rule check if there are orphan EBS drives \(EBS drives which is not attached to any EC2\).

## Permissions

* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [ec2:DescribeVolumes](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVolumes.html)

## Config Parameters used

* included\_tag
* excluded\_tag


text:
# Self-Driving Car Engineer Nanodegree

## Project : Advanced Lane Finding
[![png](examples/title.png)](https://youtu.be/XIAQ2bwBH30)
[Video Link](https://youtu.be/XIAQ2bwBH30)

The goals / steps of this project are the following:
* Compute the camera calibration matrix and distortion coefficients given a set of chessboard images.
* Apply a distortion correction to raw images.
* Use color transforms, gradients, etc., to create a thresholded binary image.
* Apply a perspective transform to rectify binary image ("birds-eye view").
* Detect lane pixels and fit to find the lane boundary.
* Determine the curvature of the lane and vehicle position with respect to center.
* Warp the detected lane boundaries back onto the original image.
* Output visual display of the lane boundaries and numerical estimation of lane curvature and vehicle position.

## First of All
Please refer to this file for the file described in this document
[(./Advanced_lane_finding_final.ipynb)](./Advanced_lane_finding_final.ipynb)

-------
### Camera Calibration

#### 1. Briefly state how you computed the camera matrix and distortion coefficients. Provide an example of a distortion corrected calibration image.

I start by preparing "object points", which will be the (x, y, z) coordinates of the chessboard corners in the world. Here I am assuming the chessboard is fixed on the (x, y) plane at z=0, such that the object points are the same for each calibration image.  Thus, `objp` is just a replicated array of coordinates, and `objpoints` will be appended with a copy of it every time I successfully detect all chessboard corners in a test image.  `imgpoints` will be appended with the (x, y) pixel position of each of the corners in the image plane with each successful chessboard detection.

The detected chessboard corners

From the previous image it can be observed that the number of corners in the x axis is 9, while in the y axis is 6.
I then used the output `objpoints` and `imgpoints` to compute the camera calibration and distortion coefficients using the `cv2.calibrateCamera()` function.  I applied this distortion correction to the test image using the `cv2.undistort()` function and obtained this result:

The undistorted chessboard image

### Pipeline (single images)

#### 1. Provide an example of a distortion-corrected image.

To demonstrate this step, I will describe how I apply the distortion correction in the 4th code cell (In[4]:) of `P4.ipynb` to the test images like this one:

An original (left) and undistorted (right) image

#### 2. Describe how (and identify where in your code) you used color transforms, gradients or other methods to create a thresholded binary image.  Provide an example of a binary image result.

I used a combination of X direction gradient and S color channel thresholds to generate a binary image using a function called `CombineBinary()` . Here's an example of my output for this step:

An undistorted (left) and combined binary (right) image

#### 3. Describe how (and identify where in your code) you performed a perspective transform and provide an example of a transformed image.

I used the `cv2.warpPerspective()` for perspective transform.
This resulted in the following source and destination points:
src
([[150, 720],
  [590, 450],
  [700, 450],
  [1250, 720]])
 dst
([[200 , 720],
  [200  ,  0],
  [980 ,   0],
  [980 , 720]])

I verified that my perspective transform was working as expected by drawing the `src` and `dst` points onto a test image and its warped counterpart to verify that the lines appear parallel in the warped image.

A combined binary (left) and warped (right) image

#### 4. Describe how (and identify where in your code) you identified lane-line pixels and fit their positions with a polynomial?

To detect the pixels that correspond to the lane lines the histogram is used as as a basis. The peaks in an histogram of the binary image in birds view represent the position of the lanes, as shown in the following example:

Histogram of the number of pixels below the yellow line

The find_lanes_sliding_windows() function implements a slinding windows approach in which the histogram is used in each window to detect the lane lines. The detection of the lane lines is based on a second order polynomial by using the np.polyfit() function. T

As previously mentioned, the find_lanes_sliding_windows() function implements the lane lines detection by using an sliding window approach. However, once we have the estimation of both lane lines for a given frame, it is possible to exploit the fact that the estimation is similar between consecutive frames in a video. This enables the implementation of a more effecient lane estimation approach, which focuses of a narrow area around the lane lines detected in previous frames to avoid performing the sliding window approach for every frame from scratch. The find_lanes_previous_fit() function implements the lane line detection using previous polynomial estimations. As example of this is shown in the following image:

Furthermore, in the aroundabout search, it is in the form of an area that spreads toward the front
The reason is that the front lane moves a lot while the front lane has a small amount of movement.

improved_around_search_area image

#### 5. Describe how (and identify where in your code) you calculated the radius of curvature of the lane and the position of the vehicle with respect to center.

The left and right curvature are calculated using `ym_per_pix` = 30/720 [m/pixel].
I approximated from the polynomials of the lanes using the following formula.

Also, I multiply the offset pixel between the center of both lane lines and the center of the picture by `xm_per_pix` = 3.7/700 [m/pixel] to calculate the vehicle position. A minus value means that the vehicle is on left from the center of the road, and a plus value means that the vehicle is on right.

```ptyhon
    lane_ctr = (left_x_eval + right_x_eval)/2
    vehicle_ctr = (binary_warped.shape[1])/2
    offset = (lane_ctr - vehicle_ctr) * xm_per_pix
```

#### 6. Provide an example image of your result plotted back down onto the road such that the lane area is identified clearly.

Finally, fills the space between two fitted lines, and un-warps (warps back) the image using `M_inv`, a matrix just source points `src` and destination points `dst` are opposite from warping matrix `M`.

Original image (left) and un-warped (right) image

---

### Pipeline (video)

#### 1. Provide a link to your final video output.  Your pipeline should perform reasonably well on the entire project video (wobbly lines are ok but no catastrophic failures that would cause the car to drive off the road!).

Here's a link to my video result [(./output_videos/project_output.mp4)](./output_videos/project_output.mp4)

I devised the following three points to apply to the video.
1. Perform averaging between N = 35 frames to smooth.
```python
    N = 35 # flame number for calculate average
    if len(List_left_fit) < N or len(List_right_fit) < N :
        List_left_fit.append(left_fit)
        List_right_fit.append(right_fit)
    else:
        List_left_fit.append(left_fit)
        List_right_fit.append(right_fit)
        List_left_fit.pop(0)
        List_right_fit.pop(0)
    avg_left_fit = np.mean((List_left_fit),axis=0) *0.5 + left_fit*0.5
    avg_right_fit = np.mean((List_right_fit),axis=0) *0.5 + right_fit*0.5
```
If the around search area is incorrect, the number of detected pixels is less than 1500 and it is judged as an NG judgment, so that it switches to the slide window.
```python
 minpix = 1500
    if len(leftx) < minpix or len(rightx) < minpix :
        left_fit = avg_left_fit
        right_fit = avg_right_fit
        Easy_search = False
```

2. Add a system to switch the line search process to around search to improve processing speed and prevent erroneous line detection
```python
#Switching for searchig code
if Easy_search is False: #Use Sliding_window_searching
    left_fit, right_fit, leftx, lefty, rightx, righty, out_img = find_sliding_window(warped_binary)
  ･･･
else: #Use previous polynomials area _searching
    left_fit = List_left_fit[-1]
    right_fit = List_right_fit[-1]
    left_fit, right_fit, leftx, lefty, rightx, righty, colored_binary_img = search_around_poly(warped_binary,left_fit, right_fit)
```

3. Set the following criteria to detect the line correctly
・ Change of lane width is within ± 20%
・ Change amount of vehicle center position is 0.3m or less
・ The amount of change in curvature of the curve is less than twice each of the left and right lines
```python
#Use the previous line if the line width change rate is 0.8 times or more
if Lane_width < 0.8*pvs_avg_Lane_width or Lane_width is 0:
       left_fit = avg_left_fit
       right_fit = avg_right_fit

#Use the previous line if the offset change rate is 0.3 times or more
if abs(offset - prv_offset) > 0.3:
            left_fit = List_left_fit[-1]
            right_fit = List_right_fit[-1]

 #Use the previous line if the amount of change in curvature of the curve is
 less than twice each of the left and right lines
 differential_L = abs(L_curverad - prv_L_curverad)/abs(prv_L_curverad)
 differential_R = abs(R_curverad - prv_R_curverad)/abs(prv_R_curverad)
 #Eliminate irregular curvatures by changing the curvature of the left and right curves
 if abs(differential_L+differential_R)/(2*differential_R) >2.5 and differential_L > 1.5:
     left_fit = List_left_fit[-1]
 if abs(differential_R+differential_L)/(2*differential_L) >2.5 and differential_R > 1.5:
     right_fit = List_right_fit[-1]
```

### Discussion

#### 1. Briefly discuss any problems / issues you faced in your implementation of this project.  Where will your pipeline likely fail?  What could you do to make it more robust?

##### 1.Lanes hidden by obstacles
This program assumes that there is no vehicle in front of the vehicle. Having a vehicle (or a bus, Truck, bike) can obscure part of the lane and cause problems with detection.
One solution is to detect the vehicle (using computer vision, machine learning etc) and implement the function of subtracting the detected car position from the area for finding lane lines.

##### 2.Loss of vanishing point
Other problem will cause when the curvature of the lane lines is too sharp. The interested area (masked area) for seeking lane lines in this project is fixed, not dynamic.

To avoid this, either change the region of interest (mask region) according to the situation around the vehicle, or a human driver turns his head and looks at the direction of rotation, You can install the camera. (Everyone is just looking forward with a perfectly fixed head and can not turn sharp curves.)

By predicting the vanishing point with deep learning and combining the lane search program of this program, it is considered that measures against 1.2 above can be taken.


text:
# Build a Real-Time Chat App with Pusher and Vue.js

In this tutorial, we are going to build a real-time chat application using Vue.js powered by [ChatKit](https://pusher.com/chatkit), a service provided by [Pusher](https://pusher.com). The ChatKit service will provide us with a complete backend necessary for building a chat application on any device, leaving us to focus on building a frontend user interface that connects to the ChatKit service via [ChatKit client package](https://www.npmjs.com/package/@pusher/chatkit-client).

## Requirements

* [Node.js](http://nodejs.org/)
* [ChatKit account] as decribed in the article

## Installation Steps (if applicable)

1. Clone repo
2. Run `npm install`
3. Create a `.env.local` in the project root and fill it out as decscribed in the article.
4. Run `npm run serve`
4. Visit http://localhost:8080/ and log in with a valid user
5. Visit http://localhost:8080/ in a different browser and log in with a valid user

## License

SitePoint's code archives and code examples are licensed under the MIT license.

Copyright © 2018 SitePoint

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: preschoolkiller/Real-time-chat-app

repo_name: preschoolkiller/Real-time-chat-app