text:
---
layout: talk
title: Fast, Simple, Fully Typed JavaScript from the Future
date: 2022-08-17T16:50:00.000Z
conference: Decoupled Days
description: >-
  In this talk I will take you through what ReScript is, how its type and module systems work and its great integration with React and GraphQL.
slides: /talks/2022-08-17 - Decoupled Days - ReScript.pdf
recording: >-

notes:
 -
  _Notes start on next slide_
 -
  I am Alexander Varwijk. I’m Lead Front-End engineer at Open Social and currently responsible for the rebuild of our web front-end from a coupled Drupal front-end to a decoupled React front-end. At Open Social I’ve previously worked on building our Real-Time chat feature and I currently assist our back-end developers with the adoption of GraphQL.

  I started programming about 20 years ago and have been programming professionally for over ten years now.
 -
  Imagine a world where your front-end applications could run without worrying about type related bugs. Never get a critical issue submitted for a broken application caused by “cannot call method on undefined”. Never experience showing an invoice with a total of the dreaded NaN (not a number).

  Focus only on making sure that your business logic is correct and that your users have an awesome experience.

  That sounds great doesn’t it?
 - >-
  You may be thinking: “that’s exactly what TypeScript is giving me and my team!” and I’d be very happy for you! Or maybe you’re still thinking “Who needs types in their code? Vanilla JavaScript works just fine!” in which case I hope to nudge you towards a different vision.

  Whatever your stance may be, TypeScript has taken the JavaScript world by storm and convinced many developers that they can no longer live without types.

  TypeScript defines itself as “JavaScript with syntax for types”. The goal of the TypeScript team is ambitious in that they try to type the entirety of JavaScript. However, this can be tough to do at scale because JavaScript was never build with strong types in mind.
 -
  What if instead we could take a different path? Rather than trying to retrofit a type system to JavaScript, we take a robust and well developed type system and use it to generate human readable JavaScript.
 -
  I would like to introduce to you ReScript. Rather than trying to type all of JavaScript, ReScript approaches the problem from the other direction. It took the OCaml type system and build a compiler on top of it that produces human readable JavaScript. The result is a compiler that’s fast and great at type inference. This allows us to write type safe code with minimal type annotations.
 -
  Some names may jump out to you. Facebook wrote messenger in an early version of ReScript.

  Maybe you can spot Tiny. The team behind the TinyMCE editor used ReScript for their Real-Time collaboration.

  You may notice Open Social’s logo is not there yet, that’s because I haven’t submitted our logo yet, but we’ve been running ReScript in production for about a year now and recommitted to building our brand new decoupled front-end in ReScript too.
 -
  Open Social chose for ReScript because we found that it encouraged thinking about data. It made it more difficult to make mistakes. Compiles very quickly, usually in the order of milliseconds. Has great type inference which means you usually only write the type when you declare it. It has great GraphQL support
 -
  Let’s get ReScript installed in our project. ReScript and everything you need are available from npm so you can just install it with your favourite JavaScript package manager.
 -
  Since ReScript is a compiler that will take ReScript code and turn it into JavaScript we want to update our package.json so that we can easily build our project with NPM.
 -
  Alright lets write our first bit of ReScript code. We’ll start with the infamous “Hello World”. There’s already enough to unpack here.

  Comments work as you’re used to. I’ve added the path to the top of the file for clarity, though you normally wouldn’t do that. Take note of the file extension for ReScript files, we’re using .res here.

  To actually get access to our log function we must reach into the Js and Console module. The Js module ships with ReScript and provides access to functions in the JavaScript standard library. Log is our actual function call and we pass it a single string argument.
 -
  Our code is ready so let’s build!

  Okay looks like we forgot something. We’ll have to add a configuration file to tell the ReScript compiler about our project. It’s called bsconfig.json for historical reasons.
 -
  Let’s take a look at the contents of this configuration file.

  At the top is the name of our project for ReScript, you’ll usually want to mirror the name you have in your package.json file.

  Below that we define where ReScript should actually look for and compile ReScript files. In this case we tell it to compile all files in our `src` folder and any of its subdirectories. Other options we have here would be to specify a single file or a directory without subdirectories. Additionally we can mark files as being specifically for development. Files in those directories will not be available for use in other parts of our application or for external applications if we’re working on a library.

  Next up we configure how we want JavaScript modules to be imported and where we want code to be generated. We choose to use es6 modules, though ReScript also supports output in commons using require and module exports. We also tell ReScript to create our JavaScript output next to our ReScript output. This generally works best for use with most JavaScript tools. When this is set to false JavaScript would be output to `lib/js` instead.

  Finally we determine the file extension for our JavaScript output. The recommended default is `.bs.js` which allows you to easily distinguish between ReScript output and manually created JavaScript files. There’s some others you can choose from too for interoperability with JavaScript tools. The bs prefix here is again a historic artefact.
 -
  Let’s try that build again!

  Success, lets look at the output
 -
  I’ve added the filename at the top for easy reference but everything from the second line on is produced by the ReScript compiler. There’s a warning at the top of the file because your edits will get overwritten when you make changes to the ReScript code and recompile.

  As you can see the console.log that we expected is there and we didn’t define any functions or declare any variables so there’s nothing to export.

  This produced a file that you could run in Node.js or sent to the browser and run there.
 -
  Of course JavaScript applications that just print Hello World to the console aren’t very useful so let’s look at something more complex.

  ReScript has first class support for React but doesn’t ship it by default so we must install it before we can use it.
 -
  We’ll have to give a few new instructions to the ReScript compiler, let’s look at the updated configuration file.

  The first thing we’ve added is support for JSX in our syntax. Next we’ve also told the ReScript compiler to use the dependency we just installed. The package contains code that tells the ReScript compiler how to create JavaScript code that uses React’s functions.

  The naming of these two fields, one named “reason” and the other with a “bs-“ prefix are historical artefacts.
 -
  With React added to our project we can create a more complex example and show off some of ReScript’s features.

  If we added the Bootstrap CSS and bundled this up with Vite we would see our buttons rendered.

  This may already look a bit complex. All of this happens in a single file. Lets divide this up into three parts and take a closer look at those. On the left we define a Button component that has two variants, using Bootstrap classes. On the right we use this component and show it off in both variants.
 -
  The first thing we see is a type definition. We give the type an explicit value, in this case that’s a Variant with two possible values, one is “Primary” for our primary button and the other is “Link” to make our button look like a link.

  Next we create a new module. Modules in ReScript are ways to types, values and functions. Though we haven’t used it yet, each file in ReScript is itself a module. So our Button module is actually inside of another module that we’re ignoring for this presentation.

  Finally inside of our Button module we have a single function. In ReScript all functions are anonymous by default so to keep them around we must assign them to a variable which we do in this case with `let make`. React Components in ReScript always consist of a module with a function named `make` that’s annotated with the<EMAIL_ADDRESS>attribute. The module itself may contain other things, though we had no need for that here.

  Let’s take a closer look at the function.
 -
  The<EMAIL_ADDRESS>attribute at the top actually tells the compiler to slightly transform our function. Contrary to React components in JavaScript we don’t take a single “props” argument but instead get each prop as a named argument to our function. The attribute will ensure that the compiled JavaScript has a shape that React knows how to work with.

  Next we have our function declaration. Our Button component will take two properties which we define as named arguments on our function. One of the properties is optional and has a default value.

  Inside of our function the first thing we do is determine what Bootstrap classes we need to add for our variant. We do this by creating a switch statement over our variant property and assigning the result to a className variable.

  Finally we return some JSX where we render a button with the chosen classNames. Two things to note here. First is that we don’t need a return statement, ReScript functions always return the last value in the function. Second we use punning to pass along the className property. Punning allows us to omit the property name if we already have a variable with the correct name.
 -
  Because the React 18 bindings are still under review but we want to use that sweet new createRoot so we can start using Suspense features for the next code we write we’ll have to write a some bindings. Bindings are how we tell the ReScript compiler how to bind ReScript code to external JavaScript code. They will probably be the most difficult thing you encounter when learning ReScript. They require you to understand the binding syntax and its different attributes, understand the type system, understand the code you’re binding to and make decisions about how to deal with some of JavaScripts quirks. So lets look at how we do this.

  First we define a new type. This type doesn’t have a concrete implementation so it’s an opaque type. We’ll see one binding that creates it and another than uses it. We don’t expect ReScript to otherwise interact with the contents of this type.

  Next we have three bindings we’ll zoom in on the first one and then discuss the differences with the second two.
 -
  Bindings always start with the `external` keyword, this tells the compiler what kind of declaration we’re making here.

  Next up we specify the name that we want to use in ReScript. We could use anything here but we’ll stick to the same name as in JavaScript to make using this binding predictable.

  The next part separated by a colon is the type definition. `createRoot` is a function that takes a `Dom.element` as only argument and returns our opaque `reactRoot` type. `Dom.element` is a type that’s provided by the ReScript standard library. While it doesn’t provide any functions out of the box to work with the DOM (since what’s useful may depend on your use-case), it does provide a set of shared types so that libraries that fill in this functionality can easily interoperate.

  Finally after our type definition this time separated by an equals sign we specify the external name of what we’re binding to in JavaScript. In this case that’s React’s `createRoot`.

  We’re not quite done here because this function doesn’t live in the global namespace. Instead it comes from the `react-dom/client` module. To make this clear to the compiler we add an attribute.

  This would generate the following code when we actually use our binding.
 -
  I’ve added the basic structure at the top as a cheat sheet. So lets look at the differences between createRoot and the other two bindings.

  For the render binding we can highlight two differences. We’re using the `send` attribute instead of `module` and our type signature is a function that takes two arguments and returns the `unit` type, or no data. If you’re familiar with the `render` method  when called on a created root you may know it only takes one argument. That’s what the `send` attribute does here. It will compile to calling the `render` function on the first argument to the bound function.

  For our third binding we can again highlight two differences. The attributes have changed, we have two this time, as well as the type. This time we set the type to be `Dom.element` rather than a function, this indicates to ReScript that it should be used as a value and can’t be called as function. Similarly when generating code we want the JavaScript to treat `body` as a simple value so we add the `@val` attribute. Again `body` is not a global but actually a property of the `document` global so we add a `scope` attribute to indicate this.

  That concludes a breakdown of our bindings, lets move to the fun stuff of actually using the JavaScript we just made available.
 -
  We start out by using the `body` value and passing this to our `createRoot` function. We do this with the pipe-first operator. The result of this is then passed as first argument to the render function. Our binding makes sure that we’re actually calling `render` on the result of our `createRoot` invocation.

  If you’re not familiar with pipe operators then it would be the same as writing `render` which takes as first argument the result of `createRoot` called with `body`.

  We also provide a second argument to `render` which is our JSX that renders a `div` with two buttons. As you can see the `variant` property is optional and the `children` property is filled in the usual way of providing children in JSX. One thing of note is that since our button expects its children to be of the `React.element` type but our `Continue` and `cancel` strings are strings, we must convert them with the `React.string` function. This is a function that won’t actually be output in JavaScript but does tell the compiler it can safely convert from one type to another.
 -
  Lets once more look at our full example.

  Take note of how few types we have to specify and how much the ReScript compiler does for us using type inference. We have two new types we define and the only place where we explicitly annotate types is for our bindings; the boundary between ReScript and JavaScript.

  Additionally to use the React or the Dom types we don’t need any imports. All defined modules are always available for use. This requires a bit of discipline in naming your modules but makes refactoring or reorganising code a breeze.
 -
  I’ve changed the formatting slightly so that it fits on the slide but aside from whitespace changes this is what you’d end up with.

  On the left we define our button component. You can see it’s prefixed with the name of the file I used. On the right we actually create a React root on our React import and render our small application to it.

  The observant among you may notice that we’re also exporting a `Button` object with a `make` function which corresponds to the module we made for our Button component. This is because all code in a module is public by default. We can change this by creating an interface file, this uses the `.resi` extension rather than the `.res` extension. Interface files allow specifying what should be made visible and what their types are. In this case our file is only for execution and shouldn’t provide anything to other modules so an empty interface file is enough. Let’s recompile after adding that.
 -
  That’s better, removed our unneeded Button object and removed our export.

  Besides telling the compiler what should and should not be exported in JavaScript land and what is and isn’t available on the ReScript side, these interface files also help ReScript determine what code to rebuild. If we now change anything in this file ReScript will know it can not impact any other code in our project and only rebuilds our current file.
 -
  So with some basic and more advanced ReScript explained down the happy path. Let’s take a look at some of the things that the ReScript compiler can help us with when we try to modify our code in the future.
 -
  The first thing we do is try to add an option type to our `buttonType` type. As you can see the compiler gives us a warning to tell us we’ve forgotten to use a value.

  In my own code I always want to make sure we handle all cases because not doing so could cause bugs, so lets modify our configuration to promote this warning to an error. We can see the warning at the top.
 -
  That’s better.

  This has some fun side-effects for two variants that the compiler provides.
 -
  The first provided variant is the Option type. It has two possible values, either `Some` holding a value of a type depending on the use-case or `None` to indicate missing data. ReScript actually does not have `null` or `undefined` but by using the `Option` type we can still model similar behaviour.

  Similarly if we have an operation that can fail with an error instead of simply not returning any data, we have the result type. The result type has two possible values, either `Ok` with the desired value or `Error` with some type of error.

  By promoting unhandled switch cases to be an error as we did we can ensure we never forget to handle a case of missing values or errors and prevent a whole swath of unwanted views showing up to for our users.
 -
  Similarly we could try to handle a non-existent case which would cause either dead code or indicate we’ve forgotten to update a type or made a typo.

  ReScript will quickly let us know that something’s not right and force us to correct the error.
 -
  Similarly if we forget to create our root we’ll get a type error to tell us that we’re missing our special `reactRoot` type that we can only create in one way.
 -
  The final example I could come up with of how the type system helps us is that our button must have children. Because we did not make the children property optional the component can not be used without children.

  ReScript will quickly tell us that there’s a type mismatch. The way this is presented may feel a bit weird at first, but will accustom quickly. Additionally work is underway to make these kinds of errors clearer.
 -
  These are some of the ways in which ReScript helps you avoid mistakes.
 -
  I want to highlight some of the things the community is working on.

  ReScript's next major version should include async/await syntactic sugar. In the current versio of ReScript we still have to work with raw promises. I personally don't find this problematic because the pipe-first operator makes it easy to avoid indentation hell. In addition the community is working on a new implementation of JSX in ReScript. This shouldn't change anything visible in your day-to-day code but it will make types somewhat simpler for advanced use-cases and give us the ability to support prop-spread, which is currently not supported.

  Outside of the language and compiler I'm very excited about [ReScript Relay Router](https://www.npmjs.com/package/rescript-relay-router). This is a project started by [Gabriel Nordeborn](https://github.com/zth/) and combines the great experience of ReScript Relay with React Router and Vite to provide a framework that allows us to do server side rendering with client side continuation. Along with things like a flat waterfall for assets and automated pre-fetching of data and code for the next page.
 -
  If you're interested in getting started with ReScript you can find more on [https://rescript-lang.org](https://rescript-lang.org). Join the community and get help with things you run into in the [Discuss Community](https://forum.rescript-lang.org/) and find more of my talks or connect with my on [my website](https://www.alexandervarwijk.com/).
 -
  Imagine a world where your front-end applications could run without worrying about type related bugs. Never get a critical issue submitted for a broken application caused by “cannot call method on undefined”. Never experience showing an invoice with a total of the dreaded NaN (not a number).

  Focus only on making sure that your business logic is correct and that your users have an awesome experience.

  You don't have to imagine, just use ReScript.

---
ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript. It comes with a lightning fast compiler toolchain that scales to any codebase size.

In this talk I will take you through what ReScript is, how its type and module systems work and its great integration with React and GraphQL.

No prior experience is required but I hope to show you an alternative to TypeScript that can be used to create applications of any size.

The code that was used in this presentation with commits corresponding to steps taken in the slides can be [found on GitHub](https://github.com/Kingdutch/rescript-introduction-presentation).

Unfortunately this talk was not recorded.

gha_language: CSS


text:
---
layout: default
---

# 1993-11-30 - Re: Statistics of Low-Order Bits in Images

## Header Data

From: Timothy Newsham<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Timothy C. May)

Message Hash: bc1fbd7862437d8de1bcf56b4ba71b4421f0e7e218b29b2befbe6a4ef6c47cb9

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1993-11-30 22:42:17 UTC

Raw Date: Tue, 30 Nov 93 14:42:17 PST

## Raw message

```
{% raw  %}From: Timothy Newsham<EMAIL_ADDRESS>Date: Tue, 30 Nov 93 14:42:17 PST
To<EMAIL_ADDRESS>(Timothy C. May)
Subject: Re: Statistics of Low-Order Bits in Images
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>
> Jim Choate writes:
>
> > Some other factors one needs to consider when analyzing images are:
> >
> > * The lsb is going to be random if the image comes from any kind of a/d
> >   process. This is because all convertors have a error of +/- 1 bit.
>
> Nope. Not true. Some ADCs digitize with _more_ than the final
> resolution and then do rounding or noise-shaping. And ADCs even at the
> LSB can still have structure caused by other things, such as the image
> itself (a binary image with thresholding will have the "LSB" certainly
> not random noise! Q.E.D., by induction.)
>
> This can give the LSBs in the final product (image, DAT, CD) nonrandom
> noise characteristics. This is what we're talking about.

Sounds like the simple solution is for people everywhere to replace
the low order bits of all of their pictures with good random noise. Image
quality shouldnt suffer drastically and if the random data is replaced
with output from a good cryptosystem then it would be indistinguishable.
So are any people here influential with the authors of any popular
imaging software?

{% endraw %}
```

## Thread

+ Return to [November 1993](/archive/1993/11)
+ Return to [December 1993](/archive/1993/12)

+ Return to "[Anthony Garcia <agarcia@sugar.NeoSoft.COM>](/authors/anthony_garcia_agarcia_at_sugar_neosoft_com_)"
+ Return to<EMAIL_ADDRESS>(Eric Hughes)](/authors/hughes_at_ah_com_eric_hughes_)"
+ Return to "[Jim choate <ravage@wixer.bga.com>](/authors/jim_choate_ravage_at_wixer_bga_com_)"
+ Return to<EMAIL_ADDRESS>(Paul Robichaux)](/authors/paul_at_poboy_b17c_ingr_com_paul_robichaux_)"
+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_netcom_com_timothy_c_may_)"
+ Return to "[Timothy Newsham <newsham@wiliki.eng.hawaii.edu>](/authors/timothy_newsham_newsham_at_wiliki_eng_hawaii_edu_)"

+ 1993-11-30 (Tue, 30 Nov 93 11:17:42 PST) - [Statistics of Low-Order Bits in Images](/archive/1993/11/1d1c25bd2742b4dcc89e485cfa0508842aca9af714b2a4b988704f37e086db18) -<EMAIL_ADDRESS>(Timothy C. May)_
  + 1993-11-30 (Tue, 30 Nov 93 12:07:43 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/11/257fb1d4e3192943c5660ddb96a9145ad58276ece5fa28c5a9a3d1f3ecb5caff) - _Jim choate<EMAIL_ADDRESS>    + 1993-11-30 (Tue, 30 Nov 93 12:37:49 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/11/1907aefb3df919e1e4f4fb26b3e015fc5ecd942f0dd3379349cf244d5d4aece5) -<EMAIL_ADDRESS>(Timothy C. May)_
      + 1993-11-30 (Tue, 30 Nov 93 14:42:17 PST) - Re: Statistics of Low-Order Bits in Images - _Timothy Newsham<EMAIL_ADDRESS>        + 1993-11-30 (Tue, 30 Nov 93 15:32:51 PST) - [Statistics of Low-Order Bits in Images](/archive/1993/11/972a9a5a01f4c6234edc591cfa42b6c71f81111277a8b7384b3f72969f39144d) -<EMAIL_ADDRESS>(Eric Hughes)_
    + 1993-11-30 (Tue, 30 Nov 93 12:42:21 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/11/51e859f4221822e3aa95ee4704a2a515d159d593a260961e875bf1b589bb3299) -<EMAIL_ADDRESS>(Paul Robichaux)_
      + 1993-12-08 (Wed, 8 Dec 93 10:00:42 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/12/9e78d1cc4bd9e6bf4e387792cdf3b2100cab2d4e43cf1c9221c8b874d0774440) - _Anthony Garcia<EMAIL_ADDRESS>

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
---
title: inventory_holdings_types
---
## Source:

Module: mod-inventory-storage

Interface: /holdings-types

## Attributes:

| Property Name              | Property Type   | Property Description                                                                               |
|:---------------------------|:----------------|:---------------------------------------------------------------------------------------------------|
| id                         | string          | unique ID of the holdings type; a UUID                                                             |
| name                       | string          | name of the holdings type                                                                          |
| source                     | string          | label indicating where the holdings type entry originates from, i.e. 'folio' or 'local'            |
| metadata                   | object          | Metadata about creation and changes to records, provided by the server (client should not provide) |
| metadata/createdDate       | string          | Date and time when the record was created                                                          |
| metadata/createdByUserId   | string          | ID of the user who created the record (when available)                                             |
| metadata/createdByUsername | string          | Username of the user who created the record (when available)                                       |
| metadata/updatedDate       | string          | Date and time when the record was last updated                                                     |
| metadata/updatedByUserId   | string          | ID of the user who last updated the record (when available)                                        |
| metadata/updatedByUsername | string          | Username of the user who last updated the record (when available)                                  |

repository: amzoss/schema-parser

branch_name: refs/heads/main

repo_name: amzoss/schema-parser


text:
# Introduction

SVG-edit has several options that can be overridden either by adding URL
parameters or by setting the options in JavaScript (since v2.5).

Options may be divided into "config" (which is not meant to be customized
via UI by the user) and "preferences" (which are meant to be customized
by UI).

See the API definition of
[Config]{@link module:SVGEditor.Config}
for the allowable values, defaults, and uses of config.

See the API definition of [Preferences]{@link module:SVGEditor.Prefs}
for their information.

A few among these options related to paths are disallowed via URL though
they can still be set by `svgEditor.setConfig()` (since v2.7).

These are covered in the sections below.

One may preload a file. See "Preloading a file" below.

One may also configure stylesheets expected by the default HTML
(`svgedit-custom.css` (v3.0+) or `custom.css` (v2.8))).

One may also add stylesheets programmatically (since v3.0).
See "Customizing stylesheets" below.

## How to set the options

### Setting options programmatically

Options of either type can be set using `svgEditor.setConfig(options)`,
where `options` is an object literal of keys and values. This must be
run before the actual page or DOM is loaded, otherwise it will have no
effect.

Note that one may create a `svgedit-config-iife.js` file within the project
root directory as of v3.0 (or for v2.8, within `editor/config.js`) and
add such configuration directives to it without needing to modify the
repository editor code

```js
svgEditor.setConfig({
  dimensions: [ 320, 240 ],
  canvas_expansion: 5,
  initFill: {
    color: '0000FF'
  }
})
```

This will set the default width/height of the image, the size of the outside
canvas, and the default "fill" color.

#### Overwrite configuration

For programmatic config setting, one may optionally pass (another)
object to `.setConfig()` as the second argument to further adjust
configuration behavior.

If an `overwrite` boolean is set to `false` on this additional object,
it will, as occurs with all URL type configurations, prevent the current
configuration from overwriting any explicitly set previous configurations.
The default is `true` except for URLs which always are `false`.

If an `allowInitialUserOverride` boolean is set to `true`, this will allow
subsequent configuration overwriting via URL (e.g., if you want the
user to have the option to override certain of your (`svgedit-config-iife.js`)
`.setConfig()` directives via URL while still providing them with
your own default value, you should add this property).

### Setting options via URL

The same options from the "Setting options programmatically" section can be
set in the URL as follows:

```
.../svg-editor.html?dimensions=300,240&canvas_expansion=5&initFill[color]=0000FF
```

## Priority of programmatically-set config vs. URL config

If options are set both using `.setConfig()` as well as in the URL, the
`.setConfig()` value will be used (as of v2.7). (The reverse was true in
  previous versions but was changed for security reasons.)

See section "Overwrite configuration" above on changing this behavior.

## Note to developers of SVGEdit on preferences vs. configuration

Those items marked as preferences are intended to be configuration items
which can also be set via the UI (and specifically via Editor Options
except where mentioned). Config and preferences should therefore not
share the same name.

There are, however, some items set in the UI which are currently
stored as config, whereas a few "preferences" are not meant to be set
by the user. A future version may adjust these types.

## Preloading a file

It is possible to start the editor with preloaded SVG file, using either
of the following approahces.

### Preload a file (Programmatically)

One should bear in mind that if one wishes to immediately set a
particular string regardless of previous saves by the user, especially when
from the config file (`svgedit-config-iife.js` in v3.0 or `editor/config.js`
in v2.8) which runs early, one should first set the config option
`noStorageOnLoad` to `true` or otherwise any
previous local storage that is found will overwrite your own string.
Bear in mind that if this option is set, the user will be prevented thereby
from saving their own text locally.

If you wish to store a one-time default and let the user subsequently save
locally, you do not need to set `noStorageOnLoad` as storage will only be
set if storage is found.

```js
// Serialized string:
svgEditor.loadFromString('<svg xmlns="...">...</svg>')

// Data URI:
svgEditor.loadFromDataURI('data:image/svg+xml;base64,...')

// Local URL:
svgEditor.loadFromURL('images/logo.svg')
```

### Preload a file (by URL)

As a URL parameter, one can pre-load an SVG file in the following manner:

```js
// Data URI
location.href += '?source=' + encodeURIComponent('data:image/svg+xml;utf8,' + svgText)

// Data URI (base 64):
location.href += '?source=' + encodeURIComponent('data:image/svg+xml;base64,' + svgTextAsBase64) // data%3Aimage%2Fsvg%2Bxml%3Bbase64%2C ...

// Local URL:
location.href += '?url=' + encodeURIComponent('images/logo.svg') // images%2Flogo.svg
```

**Note:** There is currently a bug that prevents data URIs ending with
equals (=) characters from being parsed. Removing these characters seem
to allow the import to work as expected.
<!-- Todo: Is this still occurring? -->

## Customizing stylesheets

As of version 3.0, stylesheets can be indicated dynamically (and
asynchronously loaded though applied serially) via
`svgEditor.setConfig({stylesheets: [...]})`.

To add your own stylesheets along with the default stylesheets, ensure
`"@default"` is present in the array along with your own. For example:

```js
svgEditor.setConfig({ stylesheets: [ '@default', 'myStylesheet.css' ] })
```

(In version 2.8, the CSS file `editor/custom.css` was included by default,
whether the file existed or not. With version 3.0, the move was made to
be fully modular and let plugins add their default stylesheets to
`$.loadingStylesheets` which SVGEdit would load dynamically, so that HTML
would not need to indicate such style-information in a non-modular fashion.)

repository: SVG-Edit/svgedit

gha_language: JavaScript

repo_name: SVG-Edit/svgedit


text:
# MobX Todos

A simple todo list built using React and MobX. Based on LearnCode's [MobX video tutorial](https://www.youtube.com/watch?v=_q50BXqkAfI).

###Getting Started###
Install dependencies, then start Webpack dev server:

```
	> npm install
	> npm start
```

Then go to <http://localhost:3000>.

repository: codymarcus/MobX-Todos

repo_name: codymarcus/MobX-Todos


text:
# omnipay-optomany-checkout

**Redirect gateway driver for Optomany's Checkout hosted service**

Omnipay implementation of Optomany's Checkout hosted gateway.

See [Optomany's Checkout documentation](https://developer.dnapayments.com/docs/payment-page/) for more details.

Also [Checkout PHP SDK Integration Guide](https://developer.dnapayments.com/docs/ecommerce/checkout/integration-guide/php) for php integration

## Installation

This driver is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```json
{
  "require": {
    "digitickets/omnipay-optomany-checkout": "^1.0"
  }
}
```

And run composer to update your dependencies:

    $ curl -s http://getcomposer.org/installer | php
    $ php composer.phar update

## What's Included

This driver allows you to redirect the user to an Optomany Checkout page, after passing in customer details from your own forms and a redirect URL. Once the user has paid they will be redirected back to your redirect page. You can then await the webhook that confirms the payment.

It also supports refunds of partial and full amounts. The documentation says only one refund can be made against the transaction ID, but in testing multiple partial refunds seem to go through fine.

It requires use of 3DSecure v2.

## What's Not Included

This driver does not support subscriptions (repeat payments).

## Basic Usage

For general Omnipay usage instructions, please see the main [Omnipay](https://github.com/omnipay/omnipay)
repository.

### Required Parameters

You must pass the following parameters into the driver when calling `purchase()`, `refund()` or `acceptNotification()`:

```
clientId: Given to you when signing up with Optomany
clientSecret: Given to you when signing up with Optomany
terminal: Given to you when signing up with Optomany
```

## Support

If you are having general issues with Omnipay, we suggest posting on
[Stack Overflow](http://stackoverflow.com/). Be sure to add the
[omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you believe you have found a bug in this driver, please report it using the [GitHub issue tracker](https://github.com/digitickets/omnipay-optomany-checkout/issues), or better yet, fork the library and submit a pull request.

repository: digitickets/omnipay-optomany-checkout

gha_language: PHP

repo_name: digitickets/omnipay-optomany-checkout


text:
# Stuff :movie_camera:
Stuff is a **fake store** microservices-based demo application that illustrates the use of [CF Container Networking](https://github.com/cloudfoundry-incubator/netman-release).

The app uses [Amalgam8](http://amalagam8.io) for [sidecar](https://www.amalgam8.io/docs/sidecar) and Service Discovery / Routing [control plane](https://www.amalgam8.io/docs/control-plane).

This project is the store front app that uses the following microservices:
- [Products](http://github.com/markstgodard/stuff-products)
- [Reviews](http://github.com/markstgodard/stuff-reviews)

![alt text](https://raw.githubusercontent.com/markstgodard/stuff/master/shop.png "Shop Stuff")

About this demo app:
- has a single external route for store front app
- all other microservices communication and policy enforcement will be on the internal overlay [CF Container Network](https://github.com/cloudfoundry-incubator/netman-release)
- CF apps are deployed as [Docker](https://docker.com) containers and leverage a [sidecar](https://www.amalgam8.io/docs/sidecar) inside the container that handles service discovery, health checks and routing requests to other microservices
- amalgam8 control plane (service registry / controller) is not deployed with auth enabled, please see [a8 docs](https://www.amalgam8.io/docs/sidecar/sidecar-configuration-options) for more info.

## Prerequisites
- [CF](https://github.com/cloudfoundry/cf-release) deployment
- [Diego](https://github.com/cloudfoundry/diego-release) deployment
  - [Docker support](https://github.com/cloudfoundry/diego-design-notes/blob/master/docker-support.md) enabled
  - [Netman support](https://github.com/cloudfoundry-incubator/netman-release) enabled
- [cf cli](http://docs.cloudfoundry.org/cf-cli)
  - [netman network policy ](https://github.com/cloudfoundry-incubator/netman-release/releases) cf cli plugin installed
- [jq](https://stedolan.github.io/jq/)

## Configuration
The scripts in this example uses this [config file](./scripts/cf.cfg) to configure CF domains, app names, etc.
If you wish to use the scripts to deploy the demo apps, please change the values to match your target environment.
The defaults assume [bosh-lite](https://github.com/cloudfoundry/bosh-lite) and that you already are targeting a org and space.

## Deployment

### Deploy Amalgam8 Controller and Registry
```sh
./scripts/deploy-a8.sh
```

You should now see the amalgam8 controller and registry apps running:
```sh
$ cf apps
Getting apps in org demo / space demo as admin...
OK

name               requested state   instances   memory   disk   urls
stuff-controller   started           1/1         256M     1G     stuff-controller.bosh-lite.com
stuff-registry     started           1/1         256M     1G     stuff-registry.bosh-lite.com
```

### Deploy Store app

Run this script:
```sh
./scripts/deploy.sh
```

To deploy the [Products](https://github.com/markstgodard/stuff-products) and [Reviews](https://github.com/markstgodard/stuff-reviews) app, please checkout those projects and run the same `./scripts/deploy.sh` script.

### Check Apps
After deploying you should see the controller, registry and store apps with routes. The products and review apps will not have external routes.
```sh
$ cf apps
Getting apps in org demo / space demo as mark...
OK

name               requested state   instances   memory   disk   urls
stuff-controller   started           1/1         256M     1G     stuff-controller.bosh-lite.com
stuff-registry     started           1/1         256M     1G     stuff-registry.bosh-lite.com
stuff              started           1/1         256M     1G     stuff.bosh-lite.com
stuff-products     started           1/1         256M     1G
stuff-reviews      started           1/1         256M     1G
```

### Check Network Policy
The above scripts/commands will create the appropriate network policy to ensure that only appropriate apps can talk to each other.
```sh
$ cf access-list
Listing policies as admin...
OK

Source          Destination     Protocol        Port
stuff           stuff-products  tcp             8080
stuff-products  stuff-reviews   tcp             8080
```

### Try it
Go to store app, for example: [http://stuff.bosh-lite.com](http://stuff.bosh-lite.com)

## Now what?
For more information on CF Container Networking:
- [CF Container Networking release](https://gitcom.com/cloudfoundry-incubator/netman-release)
- Chat with us at the `#container-networking` channel on [CloudFoundry Slack](http://slack.cloudfoundry.org/)

## Disclaimer
`Don't try and actually buy stuff.`

repository: markstgodard/stuff

repo_name: markstgodard/stuff


text:
# estree-walker

Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn).

## Installation

```bash
npm i estree-walker
```

## Usage

```js
var walk = require( 'estree-walker' ).walk;
var acorn = require( 'acorn' );

ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn

walk( ast, {
  enter: function ( node, parent, prop, index ) {
    // some code happens
  },
  leave: function ( node, parent, prop, index ) {
  	// some code happens
  }
});
```

Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called.

Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one.

Call `this.remove()` in either `enter` or `leave` to remove the current node.

## Why not use estraverse?

The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys.

estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.)

None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful.

## License

MIT

repository: ChromeDevTools/devtools-frontend

gha_language: TypeScript

repo_name: ChromeDevTools/devtools-frontend


text:
# Contributing to SuperHelper

Firstly, let me take this opportunity to thank you for deciding to contribute to this wonderful project, whether it is:

- Reporting a bug

- Discussing the current state of the code

- Submitting a fix

- Proposing new features

- Becoming a maintainer

## Platform

I use GitHub to host this open-source project, so any contributions should and will be made there!

## Workflow

Unless you are a maintainer, please follow the [GitHub Flow] to make sure that all changes to
the codebase go smoothly.

Here is a quick overview:

1. Fork the repo and create your branch from `main`.

2. If you've added code that should be tested, add tests.

3. If you've changed APIs, update the documentation.

4. Make sure your code lints.

5. Issue that pull request!

## Technical details

### Coding style

PEP8 should be the standard coding style for this project. However, it is not required to follow this standard to the
teeth; some exception can be made, such as:

* Line length: The limit is now 120 characters.

* Naming: Mostly PEP8 for internal functionalities, i.e. used only in a single module.

### Program flow

All core functionalities are defined in `SuperHelper.Core`. When the user executes a command, this happens:

1. Control goes to the `main_entry()` function, defined in `SuperHelper.Core.core_cli`.

    - Application configuration is loaded. (`load_app_config()` in `SuperHelper.Core.Helper.Config`)

    - Core utilities, i.e. tools that are not attached to any modules, are loaded. (`load_cli_utils()`
      in `SuperHelper.Core.core_utils`)

    - All installed modules are loaded. (`load_installed_modules()` in `SuperHelper.Core.Loader`)

2. Control goes to whatever module the user has indicated.

    - Module loads its own configuration. (`load_module_config()` in `SuperHelper.Core.Helper.Config`)

    - Module fulfills its functionalities.

    - Module finishes up its post-functionalities cleanup, i.e. saving its own configuration, etc.

    - Module calls `sys.exit()` to return control to Core CLI.

3. Control goes back to Core CLI (`main_entry()`)

    - Core saves the entire application configuration.

    - Core re-raises `SystemExit` to end the program.

### Adding new modules to SuperHelper

External modules are now moved to a different repositories! Please follow the contribution guidelines as stated there.

### Improving / Fixing existing modules in SuperHelper

Since most modules will be created by people other than myself, please open an [issue][Issues]
first to consult the creator. In the event of urgent bugs (including security vulnerabilities),
please [email<EMAIL_ADDRESS>
### Improving / Fixing Core CLI

Core CLI is the cornerstone of this entire program, hence all fixes and improvements are welcomed, either by opening an
[issue][Issues], or sending a pull request!

Please note that the Core API can be added but not removed (for backward compatibility)!

## Any contributions you make will be under the MIT Software Licence
In short, when you submit code changes, your submissions are understood to be under the same [MIT License].
Feel free to contact the maintainers if that's a concern.

## License
By contributing, you agree that your contributions will be licensed under its [MIT License].

[Github Flow]: https://guides.github.com/introduction/flow/index.html
[MIT License]: https://github.com/GreaterGoodCorp/SuperHelper/blob/main/LICENSE
[Issues]: https://github.com/GreaterGoodCorp/SuperHelper/issues
[EMAIL]<EMAIL_ADDRESS>

repository: GreaterGoodCorp/SuperHelper

gha_language: Python

repo_name: GreaterGoodCorp/SuperHelper


text:
# User Management

You can manage user with APIs user. Uiza have 2 levels of user

``Admin``
- This account will have the highest priority, can have permission to create & manage users.

``User``
- This account level is under Admin level. It only manages APIs that relates to this account.

repository: hoangviet/uiza-docs-api

repo_name: hoangviet/uiza-docs-api


text:
---
title: "PSL-FLM Impossibility Result"
date: 2022-07-01
tags:
- seed
---

[[thoughts/Byzantine Broadcast|Byzantine Broadcast]] is impossible in the synchronous [[thoughts/system model|system model]] if you have too many byzantine nodes (for $f \geq \frac n 3$).

Vague intuition for the result, imagine 3 nodes A (Byzantine), B (honest), and C (Byzantine)
1. Node A is the sender
2. A could tell B + C conflicting things
3. B + C can compare histories but C can try to frame A
4. B can't distinguish which of A or C are responsible for conflict

This result **breaks down** in the presence of [[thoughts/Public-key Infrastructure|PKI]] (you can't forge signatures from other nodes!!)
- Thus, with PKI we get [[thoughts/Byzantine Broadcast|BB]] for all $f$
- Without PKI, we get [[thoughts/Byzantine Broadcast|BB]] only if $f < \frac n 3$

branch_name: refs/heads/hugo

filename: PSL-FLM Impossibility Result.md

gha_language: SCSS


text:
# Defer Execution

Taks `ProperptyChain` proejct as example

A property file need to open file and parse each line from it as a property

## straightforward

Do open file and parse in property constructor

## decouple source loader

Open file in source loader and pass to type of property

ex: get source file from http and pass io.reader to property contructor

Cons:

- The source loader can't close io.reader when source loader finish the function scope, because it has to pass to property contructor. Potential memory leak.
- If read file as []byte, memory is required ahead

## decouple and defer source loader

Called `Visitor Pattern` or `Double Dispatch`

Create a source loader function and pass it to property constructor

When constructor read from the io.reader(inside function), in the end of function, it also close the file.
It also defers the file opening when property constructor needs it

Pros:

- No memory ahead
- No potential file opening leak

Patterns:

- factory factory to generate property handler
- strategy patten in each handler
- visitor pattern to load file

## Enhance defer feature

Let file close do in async backgroup

Pros: Performance tuning
Cons: Too complex

repository: BizShuk/NoteForTech

repo_name: BizShuk/NoteForTech


text:
## Functional Programming in  Dotty

### 必备条件

Dotty还没有正式发布，所以，先这样安装dotty
```shell
git clone https://github.com/lampepfl/dotty.git
cd dotty
sbt publishLocal
```

### Usage

This is a normal sbt project, you can compile code with `sbt compile` and run it
with `sbt run`, `sbt console` will start a Dotty REPL.

If compiling this example project fails, you probably have a global sbt plugin
that does not work with dotty, try to disable all plugins in
`~/.sbt/0.13/plugins` and `~/.sbt/0.13`.

### Using Dotty in your own project

1. [Use sbt 0.13.11 (other versions are not supported)](https://github.com/smarter/dotty-example-project/blob/master/project/build.properties).
2. Configure your build like explained in [build.sbt](https://github.com/smarter/dotty-example-project/blob/master/build.sbt#L7-L8)

### Discuss

Feel free to come chat with us on the
[Dotty gitter](http://gitter.im/lampepfl/dotty)!

repository: linqing/fpindotty

repo_name: linqing/fpindotty


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

title = "Projects"
subtitle = ""

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

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

[[item]]
  organization = "MICL, NTU"
  organization_url = ""
  title = "Enforcing geometry constraint on depth estimation and plane detection"
  url = ""
  certificate_url = ""
  date_start = "2019-07-01"
  date_end = ""
  description = "The project mainly focuses on enforcing some geometry constraints to enhance the performance of depth estimation and plane detection."

[[item]]
  organization = "JH Center, SJTU"
  organization_url = ""
  title = "Quantifying interpretability of neural network"
  url = ""
  certificate_url = ""
  date_start = "2019-02-01"
  date_end = "2019-07-01"
  description = "The project mainly proposes some metric on quantifying interpretability of CNNs."

[[item]]
  organization = "iCAT, SJTU"
  organization_url = ""
  title = "Refinement on SqueezeNet for boat detection"
  url = ""
  certificate_url = ""
  date_start = "2018-07-01"
  date_end = "2018-11-21"
  description = "The projects mainly focus on some refinement and pruning on the architecture of SqueezeNet to better detect the boats especially at night."

+++


text:
# SQL Server Regex

![SQL Regex Logo](/images/sql-regex-logo.png)

SQL-Server-Regex gives you the power to run regular expressions inside SQL Server queries. It works by using SQL CLR functions to call the C# [System.Text.RegularExpressions](https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.aspx) library.

# Examples

### Match

The [RegexMatch()](/examples/match.md) scalar function lets you call a regular expression against a string, and returns the first result if there is a match.

![Match SSMS example](/images/match-1.png)

### Matches

The [RegexMatches()](/examples/matches.md) table-valued function lets you call a regular expression against a string, and returns all matches.

![Matches SSMS example](/images/matches-1.png)

### Group Match

The [RegexGroupMatch()](/examples/group-match.md) scalar function lets you call a regular expression with *named groups* against a string, and returns the group name you specify.

![ You can also match parts of a string and re-arrange them using references.

![Replace SSMS example](/images/replace-1.png)

### Split

The [RegexSplit()](/examples/split.md) table-valued function lets pass a regular expression against a string to split it into pieces, and returns the pieces.

![Split SSMS example](/images/split-1.png)

# Installation

You can install sql-server-regex on most versions of SQL Server. This works the same for virtual machines or cloud VMs.

* [SQL Server 2016](/install/sql-2016.md)
* [SQL Server 2014](/install/sql-2014.md)
* [SQL Server 2012](/install/sql-2012.md)
* [SQL Server 2008 and 2008 R2](/install/sql-2008.md)
* [SQL Server 2005](/install/sql-2005.md)

You can also install sql-server-regex onto [AWS RDS](/install/aws-rds.md).

# Testing

This work has been tested, both for functionality and performance.

* [Unit Testing](/test/unit-tests.md)
* [Performance Testing](/test/perf-tests.md)

# Resources

* [CLR Table-Valued Functions](https://msdn.microsoft.com/en-us/library/ms131103.aspx)
* [Introduction to SQL Server Table-Valued Functions](https://www.mssqltips.com/sqlservertip/2582/introduction-to-sql-server-clr-table-valued-functions/)

repository: jzzheng/sql-server-regex

repo_name: jzzheng/sql-server-regex


text:
---
title: God's Attributes Make Prayer Possible
date: 2019-09-11
description: "What makes Christian prayer different from prayer in other religions. There are a number of differences, but the essential one is the God to whom Christians are praying. The character and nature of the God of the Bible makes prayer possible!"
tags:
    - Thought
    - Prayer
    - Attributes of God
---

Many definitions of prayer boil down to something like: "Talking to God". I love this definition. The focus and emphasis, however, is often placed on the "talking" (i.e. our action in prayer). Certainly, this is important, but we must also recognize that it is the God to whom we are praying that separates our prayers from the prayers of Muslims, Hindus, and Mormons. People of many religions pray. What fundamentally differentiates Christian prayer from prayer in other religions is the character and nature of the God of the Bible. The God of the Bible, because of His attributes, is the God that makes prayer possible. Prayers to other ‘gods’ must differ as the character and nature of the 'god(s)' changes.

# Closing Prayer

Triune God, we praise You for Your character and attributes. We praise You for Your compassion (1 Peter 5:7) and sovereignty over the entire universe (Matthew 6:9-13). Thank You for hearing our prayers!

Our Father who is in heaven,
Hallowed be Your name.
Your kingdom come.
Your will be done,
On earth as it is in heaven.
Give us this day our daily bread.
And forgive us our debts, as we also have forgiven our debtors.
And do not lead us into temptation, but deliver us from evil.

gha_language: HTML


text:
# GDAN

Code for the paper  ["Generative Dual Adversarial Network for Generalized Zero-shot Learning"](https://arxiv.org/abs/1811.04857)

Dataset is available [here](<https://www.mpi-inf.mpg.de/departments/computer-vision-and-multimodal-computing/research/zero-shot-learning/zero-shot-learning-the-good-the-bad-and-the-ugly/>), please download and extract it under ./data and make sure the "data_root" variable in config yaml file is correct.

### Dependencies

- Python 3.6, PyTroch 0.4
- sklearn, scipy, numpy, tqdm

### Steps to run the program

1. Modify config files as needed.

2. Pretrain CVAE, and checkpoints are stored in the directory specified by  "vae_dir" in config file:

   ```bash
   python pretrain_gdan.py --config configs/cub.yml
   ```

3. Choose which CVAE checkpoint you want to use to initialize the GDAN model and modify the "vae_ckpt" variable in the yaml file. Then we can train GDAN by running:

   ```bash
   python train_gdan.py --config configs/cub.yml
   ```

4. Use validation data to  decide which saved checkpoint of GDAN (directory specified by "ckpt_dir" in config yaml file) to be used for testing and run evaluation:

   ```bash
   python valtest_gdan.py --config configs/cub.yml
   ```

Bibtex:

```
@InProceedings{Huang_2019_CVPR,
author = {Huang, He and Wang, Changhu and Yu, Philip S. and Wang, Chang-Dong},
title = {Generative Dual Adversarial Network for Generalized Zero-Shot Learning},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}
```


text:
---
layout: default
---

# 1996-10-17 - Re: Your editorial in the 10/14 PCWeek

## Header Data

From: jim bell<EMAIL_ADDRESS>To: "Timothy C. May"<EMAIL_ADDRESS>Message Hash: 18ab4d0a19e55500b1d4fd8962f3309c526614918c81d090c44c2616146dbaf9

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-10-17 03:13:46 UTC

Raw Date: Wed, 16 Oct 1996 20:13:46 -0700 (PDT)

## Raw message

```
{% raw  %}From: jim bell<EMAIL_ADDRESS>Date: Wed, 16 Oct 1996 20:13:46 -0700 (PDT)
To: "Timothy C. May"<EMAIL_ADDRESS>Subject: Re: Your editorial in the 10/14 PCWeek
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 03:37 PM 10/16/96 -0800, Timothy C. May wrote:
>>A) This is not a change in the law. There is no law regarding export of
>>encryption software.
>>Congress has never passed any such law. These are State Department
>>regulations, and presidential decrees. These regulations, which have the
>>force of law to you and me, were never debated or voted upon by our
>>elected representatives. They can be changed tomorrow the same way. In
>>fact, they can be changed and the public need not even be notified.
>
>Actually, as Greg Broiles pointed out in an article (on the Cypherpunks
>list) several weeks ago, Congress deliberately chooses to delegate much
>regulatory authority to other agencies. There just is not enough time or
>expertise for them to pass specific laws covering the number and size of
>trashcans in the national parks, the type of equipment to be used on Navy
>ships, and so on. The State Department--and soon to be transferred to
>Commerce--has the regulatory authority to decide which exports are covered
>by the International Trafficking in Arms Regulations, the ITARs. These
>rules effectively have the full force of law, as many tens of thousands of
>laws not specifically passed by Congress have.

I think this is more than a little misleading.  While I don't recall the
specific note from Greg Broiles you mention, as I recall from other sources
so-called "government regulations" were not considered binding on ordinary
citizens before the 1930's.  The examples you gave ("number and size of
trashcans in the national parks [public property], and type of equipment to
be used on Navy ships...") are both issues of controlling the activities
government employees and departments, not ordinary citizens!

It's hard for me to imagine how anyone could consider this distinction
sufficiently ignorable as to provide examples as if they were
interchangeable.  It seems pretty obvious that governments should be able to
control their own employees and departments, at least while they're on the
job, in the same way that essentially every other employer does.  Yet, it is
equally obvious that ordinary citizens aren't in the same position as
government employees, and there is no reason to assume that the former are
to be bound by rules which had applied only to the latter.  For just one
example, government employees can resign; citizens cannot.

It will be claimed that citizens do have to obey the rules:  Yes, but
they're called "laws," they are passed by legislators who are voted in or
out of office by the citizens. (And laws apply to government employees too,
or at least they should...)   Laws are also publicly debated before they are
passed, generally.   On the whole, I would say that there is an excellent
reason for this healthy distinction between "laws" and "regulations."

You stated that it would be difficult for Congress to debate a large number
of rules, and you cited "national parks" and the Navy as examples. It
wouldn't be easy for Congress to handle this.   My answer is, yes,
delegation of these matters is reasonable precisely because they are NOT
binding on ordinary citizens.   And further, I'd point out that assuming you
have respect for freedom, you have every reason to fear allowing things with
the force of laws to be passed as "easily" as regulations.

Some people who say they are REAL LAWYERS (TM) will probably claim, as if on
schedule, that I am re-writing the law.  No, I am well aware that the SC may
have, at some point, have disagreed.  Rather, I think we should treat the
Supreme Court, on this issue as well as many others, as we would a
schizophrenic person that we happen to meet on a city street:  We don't
think his mumbling is making any sense, but we are well aware of the danger
of provoking him so we hold our tongues while in his earshot.  Nevertheless,
we don't for a minute adopt the opinion that anything we've heard is somehow
more worthy of belief, simply because we felt uncomfortable about expressing
our opposition for a moment, which is analogous to the SC being able to
temporarily enforce its opinion.

I certainly sympathize with the REAL LAWYERS (TM).  They are, in effect,
chained 24 hours per day (so to speak) to that schizophrenic, and can never
get away, so they've decided to make a virtue (and, in fact, a business) out
of a necessity by adjusting their beliefs to correspond, continuously, to
the ravings of that madman.   Naturally, they pride themselves on being able
to slowly, gently, carefuly change the opinions of that madman, and they
succeed occasionally at this task.

>(It is true that the ITARs may well end up being overturned by the courts,
>as the Bernstein and Junger cases proceed, but this could happen to laws
>passed by Congress, and does.)
>Also--and I am not an expert on this--some of the basis of the ITARs is
>closely related to the "Munitions Act," which was, I am almost certain, an
>actual Act of Congress, some decades back.

OTOH, one of the big complaints we have against ITAR is that it seems to be
constantly re-interpreted.  While I certainly won't claim that this is never
true of Congress-made laws, it tends to be more difficult to pass a law, and
once passed, to sneak a new interpretation in.  Somehow, I don't  think that
it would have been possible to stretch a "Munitions Act" into a rule which
would prohibit the export of a a Web-browser like Netscape that happens to
have a hole in it for crypto.

>
>Certainly Congress knows full well what the ITARs are about, and could
>change them if it thought the State Department or Commerce Department were
>overstepping their bounds. (As it may do, some day. Not this term,
>obviously. "Pro-Code" got tabled, so Congress effectively spoke.)
>
>(Understand that I am not arguing in favor of the ITARs, nor their
>application to crypto, just taking issue with Marshall's opening point that
>the ITARs are not real laws. I mostly believed they were real laws before,
>but Greg Broiles' analysis several weeks ago cinched it for me.)

How did I miss that miraculous revelation?   B^)

Jim Bell
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [October 1996](/archive/1996/10)

+ Return to "[jim bell <jimbell@pacifier.com>](/authors/jim_bell_jimbell_at_pacifier_com_)"
+ Return to "[Marshall Clow <mclow@owl.csusm.edu>](/authors/marshall_clow_mclow_at_owl_csusm_edu_)"
+ Return to "["Michael Froomkin - U.Miami School of Law" <froomkin@law.miami.edu>](/authors/michael_froomkin__u_miami_school_of_law_froomkin_at_law_miami_edu_)"
+ Return to "[peng-chiew low <pclow@pc.jaring.my>](/authors/pengchiew_low_pclow_at_pc_jaring_my_)"

+ 1996-10-17 (Wed, 16 Oct 1996 20:13:46 -0700 (PDT)) - Re: Your editorial in the 10/14 PCWeek - _jim bell<EMAIL_ADDRESS>  + 1996-10-17 (Wed, 16 Oct 1996 21:40:22 -0700 (PDT)) - [Re: Your editorial in the 10/14 PCWeek](/archive/1996/10/29b67aac3aeaefb9f9443afe99074d21b6f779cade625997a52780bc54e5229b) - _Marshall Clow<EMAIL_ADDRESS>    + 1996-10-17 (Thu, 17 Oct 1996 08:53:49 -0700 (PDT)) - [Re: Your editorial in the 10/14 PCWeek](/archive/1996/10/4bb94c06057c35faa2c643b164b4afaa43dc76be492edeaf645a8b89fe49f547) - _"Michael Froomkin - U.Miami School of Law"<EMAIL_ADDRESS>      + 1996-10-18 (Fri, 18 Oct 1996 09:31:50 -0700 (PDT)) - [RSA 1024bit Key for Export](/archive/1996/10/5e93ca72bf37cd57f97f927f418547d3f9b1430c30b1d01d19d123349ab2279b) - _peng-chiew low<EMAIL_ADDRESS>


text:
- add config flag __TODO__ [main_pipeline.py](main_pipeline.py)
- Add workers to config __TODO__ [main_pipeline.py](main_pipeline.py)
- added cache for same request __TODO__ [backend.py](backend.py)
- also removes all tweets with user_id __IDEA__ [backend.py](backend.py)
- clean_up_job(start) remove folders older than start task __TODO__ [main_pipeline.py](main_pipeline.py)
- Configuration.task_execution_interval __TODO__ [main_pipeline.py](main_pipeline.py)
- create bin directory for chromedriver __TODO__ [chromedriver-noxfile.py](chromedriver-noxfile.py)
- Does the daemon need these credentials? __NOTE__ [docker-compose.yml](docker-compose.yml)
- Dump for tests. __TODO__ [lazy_ticker/schemas/instrument.py](lazy_ticker/schemas/instrument.py)
- heavy refactoring needed __TODO__ [main_pipeline.py](main_pipeline.py)
- In the future it should delete all name.json from data folder. __TODO__ [backend.py](backend.py)
- LUIGI_WORKERS_PER_CPU config __TODO__ [main_pipeline.py](main_pipeline.py)
- May add the ability to query by amount using amount kwarg. __IDEA__ [lazy_ticker/schemas/timeperiod.py](lazy_ticker/schemas/timeperiod.py)
- May need to raise an error here. __NOTE__ [lazy_ticker/database.py](lazy_ticker/database.py)
- maybe add a global backoff sleep time variable which gets increase __IDEA__ [lazy_ticker/twitter_scraper.py](lazy_ticker/twitter_scraper.py)
- notification of scraping unsuccesful. __TODO__ [main_pipeline.py](main_pipeline.py)
- Optional? __NOTE__ [lazy_ticker/schemas/twitter.py](lazy_ticker/schemas/twitter.py)
- restor users from old data flag __IDEA__ [playpen.py](playpen.py)
- Restore users from last states. __NOTE__ [playpen.py](playpen.py)
- Rewrite Profile for better error handling. __TODO__ [lazy_ticker/twitter_scraper.py](lazy_ticker/twitter_scraper.py)
- rewrite the original get_tweets function to add the feature. __IDEA__ [lazy_ticker/twitter_scraper.py](lazy_ticker/twitter_scraper.py)
- split inverted from normal __TODO__ [lazy_ticker/schemas/instrument.py](lazy_ticker/schemas/instrument.py)
- Useful for cleanup. cleanup folders older than 24 hours utc time. __NOTE__ [playpen.py](playpen.py)
- ValueError: Oops! Either "dgnsrekt" does not exist or is private. __BUG__ [lazy_ticker/twitter_scraper.py](lazy_ticker/twitter_scraper.py)


text:
# GYA2018 ![](https://img.shields.io/github/last-commit/Sventastical/GYA2018.svg) ![](https://img.shields.io/github/repo-size/Sventastical/GYA2018.svg)

GYA2018, a fairly simple one page game of battleships. Created as my "gymnasiearbete" which is a year long project during the last year of high school in Sweden. Written in HTML, CSS (Sass) and JS (including jQuery) might incorperate a bit of php and either a text file or a mysql database to make a game history.

## Getting started
### Prerequisities
#### Sass
1. Goto dart-sass github release page [(Link)](https://github.com/sass/dart-sass/releases/)
2. Download latest release matching your operating system
3. Goto this page explaining how to add files to system path and follow the instructions [(Link)](https://katiek2.github.io/path-doc/)

##### Usage
On windows either use the compile.bat to generate a main.css files based off main.scss or the method for the other platforms.

On other platforms use this code in a commandline terminal located in the same folder as main.scss

```
sass main.scss main.css
```

### Installing
1. Clone the repository
2. Make changes
3. Create main.css using Sass if you modify the Sass files
4. ???
5. Profit

## Todo
- (optional) Remote game history

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details


text:
# OCluster - getId()

Retrieves the Cluster ID.

## Getting Cluster ID's

When you retrieve a record from OrientDB, it displays a Record ID that is composed of two numbers.  The first number is the Cluster ID, a numeric value that identifies the Cluster within the database.  Using this method, you can retrieve the Cluster ID to use in your application.

### Syntax

```
int OCluster().getId()
```

#### Return Value

This method returns an `int` instance.  The value represents the Cluster ID.

repository: orientechnologies/orientdb-docs

repo_name: orientechnologies/orientdb-docs


text:
# Java Type System #

## How do parameterized types fit into the Java type system? ##

Instantiations of generic types have certain super-subtype relationship among each other
and have a type relationship to their respective raw type.  These type relationships are
relevant for method invocation, assignment and casts.

### Relevance of type relationships and type converstion rules in practice. ###

The type system of a programming language determines which types are convertible to which other types.
These **conversion rules** have an impact on various areas of a programming language.

One area where conversion rules and type relationships play role is **casts** and **instanceof expressions**.
Other area is **assignment compatibility** and **method invocation**, where
argument and return value passing relies on convertibility of the involved types.

The type conversion rules determine which casts are accepted and which ones are rejected.
For example, the types `String` and `Integer` have no relationship and for this reason
the compiler rejects the attempt of a cast from `String` to `Integer`, or vice versa.
In contrast, the types `Number` and `Integer` have a super-subtype relationship;
Integer is a subtype of Number and Number is a supertype of Integer .
Thanks to this relationship, the compiler accepts the cast from `Number` to `Integer` , or vice versa.
The cast from `Integer` to `Number` is not even necessary, because the conversion
from a subtype to a supertype is considered an implicit type conversion,
which need not be expressed explicitly in terms of a cast;
this conversion is automatically performed by the compiler whenever necessary.
The same rules apply to **instanceof expressions**.

The conversion rules define which types are assignment compatible.
Using the examples from above, we see that a `String` cannot be assigned to an `Integer` variable, or vice versa,
due to the lack of a type relationship.
In contrast, an `Integer` can be assigned to a `Number` variable, but not vice versa.
A side effect of the super-subtype relationship is that
we can assign a subtype object to a supertype variable, without an explicit cast anywhere.
This is the so-called **widening reference conversion**;
it is an implicit conversion that the compiler performs automatically whenever it is needed.
The converse, namely assignment of a supertype object to a subtype variable, is not permitted.
This is because the so-called **narrowing reference conversion** is not an implicit conversion.
It can only be triggered by an explicit cast.

The rules for assignment compatibility also define which objects can be passed to which method.
An argument can be passed to a method if its type is assignment compatible to the declared type of the method parameter.
For instance, we cannot pass an `Integer` to a method that asks for `String`,
but we can pass an `Integer` to a method that asks for a `Number`.
The same rules apply to the return value of a method.

### Super-subtype relationships of parameterized types. ###

In order to understand how objects of parameterized types can be used in
assignments,
method invocations, and
casts,
we need an understanding of the relationship that parameterized types have
among each other and with non-parameterized types.
And we need to know the related conversion rules.

We already mentioned **super-subtype relationships** and the related **narrowing and widening reference conversions** .
They exist since Java was invented, that is, among non-generic types.
The super-subtype relationship has been extended to include parameterized types.
In the Java 5.0 type system super-subtype relationships and the related
narrowing/widening reference conversions exist among parameterized types, too.

We will explain the details in separate FAQ entries.
Here are some initial examples to get a first impression of the impact that
type relationships and conversion rules have on method invocation.

Consider a method whose declared parameter type is a wildcard parameterized type.
A wildcard parameterized type acts as supertype of all members of the type family
that the wildcard type denotes.

Example (of widening reference conversion from concrete instantiation to wildcard instantiation):

```java
void printAll( LinkedList<? extends Number> c) { ... }
LinkedList<Long> l = new LinkedList<Long>();
...
printAll(l);  // widening reference conversion
```

We can pass a `List<Long>` as an argument to the printAll method that asks for a `LinkedList<? extends Number>`.
This is permitted thanks to the super-subtype relationship between a wildcard instantiation and a concrete instantiation.
`LinkedList<Long>` is a member of the type family denoted by `LinkedList<? extends Number>` , and as such a
`LinkedList<Long>` is a subtype of `LinkedList<? extends Number>`.
The compiler automatically performs a widening conversion from subtype to supertype and thus allows that a
`LinkedList<Long>` be supplied as argument to the printAll method that asks for a `LinkedList<? extends Number>`.

Note that this super-subtype relationship between a wildcard instantiation and a member of the type family
that the wildcard denotes is different from inheritance. Inheritance implies a super-subtype relationship as well,
but it is a special case of the more general super-subtype relationship that involves wildcard instantiations.

We know inheritance relationships from non-generic Java.
It is the relationship between a superclass and its derived subclasses, or
a super-interface and its sub-interfaces, or
the relationship between an interface and its implementing classes.

Equivalent inheritance relationships exists among instantiations of different generic types.
The prerequisite is that the instantiations must have the same type arguments.
Note that this situation differs from the super-subtype relationship mentioned above,
where we discussed the relationship between **wildcard instantiations** and
**concrete instantiations** of the same generic type, whereas we now talk of
the relationship between instantiations of different generic types with identical type arguments.

Example (of widening reference conversion from one concrete parameterized type to another concrete parameterized type):

```java
void printAll( Collection<Long> c) { ... }
LinkedList<Long> l = new LinkedList<Long>();
...
printAll(l);  // widening reference conversion
```

The raw types Collection and LinkedList have a super-subtype relationship; Collection is a supertype of LinkedList .  This super-subtype relationship among the raw types is extended to the parameterized types, provided the type arguments are identical: Collection<Long> is a supertype of LinkedList<Long> , Collection<String> is a supertype of LinkedList<String> , and so on.

It is common that programmers believe that the super-subtype relationship among type arguments
would  extend into the respective parameterized type.
This is not true.
Concrete instantiations of the same generic type for different type arguments have no type relationship.
For instance, Number is a supertype of Integer , but `List<Number>` is not a supertype of `List<Integer>`.
A type relationship among different instantiations of the same generic type exists only among
wildcard instantiations and concrete instantiations, but never among concrete instantiations.

Example (of illegal attempt to convert between different concrete instantiations of the same generic type):

```java
void printAll( LinkedList<Number> c) { ... }
LinkedList<Long> l = new LinkedList<Long>();
...
printAll(l);  // error; no conversion
```

Due to the lack of a type relationship between `LinkedList<Number>` and `LinkedList<Long>`
the compiler cannot convert the `LinkedList<Long>` to a `LinkedList<Number>` and the
method call is rejected with an error message.

## Unchecked conversion of parameterized types. ##

With the advent of parameterized types a novel category of type relationship was added to the Java type system:
the relationship between a **parameterized type** and the corresponding **raw type**.
The conversion from a parameterized type to the corresponding raw type is a **widening reference conversion**
like the conversion from a subtype to the supertype.
It is an implicit conversion.  An example of such a conversion is the conversion from a parameterized type such as `List<String>` or `List<? extends Number>` to the raw type List .
The counterpart, namely the conversion from the raw type to an instantiation of the respective generic type,
is the so-called  **unchecked conversion**. It is an automatic conversion, too, but
the compiler reports an "unchecked conversion" warning.
Details are explained in separate FAQ entries.
Here are some initial examples to get a first impression of usefulness of unchecked conversions.
They are mainly permitted for compatibility between generic and non-generic source code.

Below is an example of a method whose declared parameter type is a raw type.
The method might be a pre-Java-5.0 method that was defined before generic and
parameterized types had been available in Java.
For this reason it declares List as the argument type.
Now, in Java 5.0, List is a raw type.

Example (of a widening reference conversion from parameterized type to raw type):

```java
void printAll( List c) { ... }
List<String> l = new LinkedList<String>();
...
printAll(l);  // widening reference conversion
```

Source code such as the one above is an example of a fairly common situation,
where non-generic legacy code meets generic Java 5.0 code.
The printAll method is an example of legacy code that was developed before Java 5.0 and uses raw types.
If more recently developed parts of the program use instantiations of the generic type `List`,
then we end up passing an instantiation such as `List<String>` to the printAll method that declared the raw type List as its parameter type.  Thanks to the type relationship between the raw type and the parameterized type, the method call is permitted. It involves an automatic widening reference conversion from the parameterized type to the raw type.
Below is an example of the conversion in the opposite direction.  We consider a method has a declared parameter type that is a parameterized type.  We pass a raw type argument to the method and rely on an unchecked conversion to make it work.

Example (of an unchecked conversion from raw type to parameterized type):

```java
void printAll( List<Long> c) { ... }
List l = new LinkedList();
...
printAll(l);  // unchecked conversion
```

Like the previous example, this kind of code is common in situation where generic and non-generic code are mixed.

The subsequent FAQ entries discuss details of the various type relationships and conversions among raw types,
concrete parameterized types, bounded and unbounded wildcard parameterized types.

repository: esfand/printit

repo_name: esfand/printit


text:
Reveals an interactive popout menu on hover/focus.

- Use `left: 100%` to move the popout menu to the right of the parent.
- Use `visibility: hidden` to hide the popout menu initially, allowing for transitions to be applied (unlike `display: none`).
- Use the `:hover`, `:focus` and `:focus-within` pseudo-class selectors to apply `visibility: visible` to the popout menu, displaying it when the parent element is hovered/focused.

```html
<div class="reference" tabindex="0">
  <div class="popout-menu">Popout menu</div>
</div>
```

```css
.reference {
  position: relative;
  background: tomato;
  width: 100px;
  height: 80px;
}

.popout-menu {
  position: absolute;
  visibility: hidden;
  left: 100%;
  background: #9C27B0;
  color: white;
  padding: 16px;
}

.reference:hover > .popout-menu,
.reference:focus > .popout-menu,
.reference:focus-within > .popout-menu {
  visibility: visible;
}
```

repository: will-gibson/css-js-injections

repo_name: will-gibson/css-js-injections


text:
# bleBulbDriver

BLE (Bluetooth LE) bulb controller such as SATECHI BLE LED Bulb.

# How to use?

```
./bleBulbDriver.rb
Usage: listDevices|on|off|allOn|allOff|toggle|toggle|allToggle
bleBulbDriver Copyright 2016 hidenorly
    -b, --target=                    Set target device's mac address
    -t, --type=                      Set device type (default:SATECHILED)
```

```
$ sudo ./bleBulbDriver.rb listdevices
D0:5F:B8:XX:XX:XX SATECHILED-0
```

```
$ sudo ./bleBulbDriver.rb allon
$ sudo ./bleBulbDriver.rb alloff
```

```
$ ./bleBulbDriver.rb on -b D0:5F:B8:XX:XX:XX
$ ./bleBulbDriver.rb off -b D0:5F:B8:XX:XX:XX
```

```
$ ./bleBulbDriver.rb -b D0:5F:B8:XX:XX:XX toggle
$ ./bleBulbDriver.rb alltoggle
```

repository: hidenorly/bleBulbDriver

repo_name: hidenorly/bleBulbDriver


text:
# outline-aws-address-renew

This project is a SAM app with a web interface to renew the ip address of a EC2 instance and
retrieve outline related information.

[AWS Serverless Application Repository](https://aws.amazon.com/serverless/serverlessrepo/)

## parameters

* ActiveEC2InstanceId: the instance id of the EC2 instance to update the IP address
* EIPIdleEC2InstanceId: the instance id of the EC2 instance to hold the Elastic IP when update completes
* EIPAllocId: the allocation id of the Elastic IP
* OutlineServerPath: the path to visit outline server
* OutlineServerPort: the port to visit outline server

## deploy

This project should be packaged to s3 bucket `outline-aws-address-renew-app`, and the stack
name should be `outline-aws-address-renew`, however any s3 bucket and stack name could be
used.

* before deploying, first make sure all npm modules are installed
* run `sam package --template-file template.yaml --s3-bucket outline-aws-address-renew-app --output-template-file template.deploy.yaml`
* run `sam deploy --template-file template.deploy.yaml --stack-name outline-aws-address-renew --capabilities CAPABILITY_IAM`

## API endpoints

### POST `/renew-address`

No parameters are required.

If the status code of the response is 201, the address renew process is initiated. Otherwise,
the status code should be 202, which means the EC2 instance is in the progress of renew its
IP address, so no further action will be taken.

### GET `/outline-server`

### Response
```
{
    updating: boolean;
    accessKey?: string;
    ip?: string;
}
```

When the updating is true, the outline server is updating the ip address. Therefore, all
the information cannot be provided.


text:
# rusty-s3

[![crates.io](https://img.shields.io/crates/v/rusty-s3.svg)](https://crates.io/crates/rusty-s3)
[![Documentation](https://docs.rs/rusty-s3/badge.svg)](https://docs.rs/rusty-s3)
[![dependency status](https://deps.rs/crate/rusty-s3/0.1.2/status.svg)](https://deps.rs/crate/rusty-s3/0.1.2)
[![Rustc Version 1.52.1+](https://img.shields.io/badge/rustc-1.52.1+-lightgray.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
[![CI](https://github.com/paolobarbolini/rusty-s3/workflows/CI/badge.svg)](https://github.com/paolobarbolini/rusty-s3/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/paolobarbolini/rusty-s3/branch/main/graph/badge.svg?token=K0YPC21N8D)](https://codecov.io/gh/paolobarbolini/rusty-s3)

Simple pure Rust AWS S3 Client following a Sans-IO approach, with a modern
and rusty take onto s3's APIs.

Request signing and response parsing capabilities are provided for the
most common S3 actions, using AWS Signature Version 4.

Minio compatibility tested on every commit by GitHub Actions.

## Examples

```rust
use std::env;
use std::time::Duration;
use rusty_s3::{Bucket, Credentials, S3Action};

// setting up a bucket
let endpoint = "https://s3-eu-west-1.amazonaws.com".parse().expect("endpoint is a valid Url");
let path_style = true;
let name = String::from("rusty-s3");
let region = String::from("eu-west-1");
let bucket = Bucket::new(endpoint, path_style, name, region).expect("Url has a valid scheme and host");

// setting up the credentials
let key = env::var("AWS_ACCESS_KEY_ID").expect("AWS_ACCESS_KEY_ID is set and a valid String");
let secret = env::var("AWS_SECRET_ACCESS_KEY").expect("AWS_ACCESS_KEY_ID is set and a valid String");
let credentials = Credentials::new(key, secret);

// signing a request
let presigned_url_duration = Duration::from_secs(60 * 60);
let action = bucket.get_object(Some(&credentials), "duck.jpg");
println!("GET {}", action.sign(presigned_url_duration));
```

More examples can be found in the examples directory on GitHub.

## Supported S3 actions

* Bucket level methods
    * [`CreateBucket`][createbucket]
    * [`DeleteBucket`][deletebucket]
* Basic methods
    * [`HeadObject`][headobject]
    * [`GetObject`][getobject]
    * [`PutObject`][putobject]
    * [`DeleteObject`][deleteobject]
    * [`DeleteObjects`][deleteobjects]
    * [`ListObjectsV2`][listobjectsv2]
* Multipart upload
    * [`CreateMultipartUpload`][completemultipart]
    * [`UploadPart`][uploadpart]
    * [`ListParts`][listparts]
    * [`CompleteMultipartUpload`][completemultipart]
    * [`AbortMultipartUpload`][abortmultipart]

[abortmultipart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
[completemultipart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
[listparts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
[createbucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
[deletebucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html
[createmultipart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
[deleteobject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
[deleteobjects]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html
[getobject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
[headobject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
[listobjectsv2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
[putobject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
[uploadpart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart


text:
### 0.7

* Conduit 3.0
* API cleanup
* Dune 2.0/ocamlformat

### 0.6

* Switch to dune
* Major API cleanup
    - Removed `respond_` prefix from response functions
    - Reorganized package layout
    - Removed `status_code` type

### 0.5

* Update to latest Lwt
* Added configuration file for server

### 0.4

* Update to latest cohttp

### 0.1

* Use topkg
* Regex routing
* Form parsing

license: ISC

repository: zshipko/yurt

gha_language: OCaml

gha_license_id: ISC

repo_name: zshipko/yurt


text:
### Example notebooks

These notebooks demonstrate various use cases.
For a fast orientation, use `univariate_example.ipynb`, but see the other examples for handling multivariate-output data.

#### `univariate_example.ipynb`
A simple synthetic-data example where the response variable is univariate.
Demonstrates setting up the model, doing MCMC, and doing predictions.

#### `multivariate_example.ipynb`
A synthetic-data example where the response variable is multivariate.

#### `multivariate_example_with_prediction.ipynb`
A synthetic-data example where the response variable is multivariate.
Predictions of various kinds are done after MCMC.

#### Ball_Drop
A more involved synthetic-data example that uses physics equations to generate data
that might be observed from dropping balls off of a tower.

#### Al_5083
A real data example using features extracted from velocimetry curves in a flyer plate impact
experiment involving aluminum. (Notebook not well explained yet)


text:
---
name: List repositories with GitHub Actions cache usage for an organization
example: octokit.rest.actions.getActionsCacheUsageByRepoForOrg({ org })
route: GET /orgs/{org}/actions/cache/usage-by-repository
scope: actions
type: API method
---

# List repositories with GitHub Actions cache usage for an organization

Lists repositories and their GitHub Actions cache usage for an organization.
The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint.

```js
octokit.rest.actions.getActionsCacheUsageByRepoForOrg({
  org,
});
```

## Parameters

      name
      required
      description

org	yes

The organization name. The name is not case sensitive.

per_page	no

The number of results per page (max 100).

page	no

Page number of the results to fetch.

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization).


text:
---
layout: post
title: "Marco Arment on Apple’s battery design choices"
date: 2015-04-17 19:36:29 +0200
comments: true
categories:
- Digital Life
- Apple
external-url: http://www.marco.org/2015/04/17/battery-outliers
---

Marco Arment plays “[What if?](http://what-if.xkcd.com)” with Apple’s device lineup. What if Apple made some different design choices to create alternate versions of some of its products with actual all-day battery life?

> Design is about making difficult decisions and trade-offs. Longer battery lives would make some of the products thicker and heavier, and not everyone would accept that trade-off. But today, everyone who wants an Apple product needs to accept the opposite: thinness and lightness that some of us didn’t need, at the expense of battery life that many of us could’ve really used.

He does have a point. I’d buy some of the devices he cites as examples in a heartbeat.

repository: analogsenses/source

extension: markdown

repo_name: analogsenses/source


text:
---
layout: page
title: Research
permalink: /research/
tags: research
---
My current research work is in the area of Cyber Physical Systems. I am part of [DIGIT center](https://digit.au.dk/) at Aarhus University. [HUBCAP](https://www.hubcap.eu/) and [DIGITbrain](https://digitbrain.eu/) are the two H2020 European Union projects that I participate in.

During 2018-20, I worked in the area of storage compression in distributed Internet of Things (IoT) applications.

My doctoral research is in the broad area of _Network Science._ My work is focused on structural transformations of multidimentional (multiplex) networks. In simple terms, I am interested in mathematical transformations of graphs with multiple edges between vertices. This research has applications in the domains of virtual networks, multi-modal transportation systems, and online social networks.

Interested readers can go through the following published material related to my doctoral thesis.
* [A conceptual summary of the thesis](https://www.dropbox.com/s/09161wst1mgcoek/cell_model.pdf?dl=1)
* [official synopsys](https://www.dropbox.com/s/yhnse2q0s2w7vfr/synopsis.pdf?dl=1) and [thesis defense presentation](https://www.dropbox.com/s/lmppk1legd5yj4h/thesis_pres.pdf?dl=1)
* [complete doctorate thesis](https://www.dropbox.com/s/nzaaey4010ixlev/thesis.pdf?dl=1)

Research results of the prior and ongoing work are available on [Publications]({{ site.baseurl }}/publications) page.

Previously, I worked with students in the areas of network measurements, transport networks and social networks. Details of these student projects are available on [Projects]({{ site.baseurl }}/research/projects) page. Code for most of these projects is hosted on [GitHub](https://github.com/prasadtalasila).


text:
# Iridium
Iridium is a code intelligence plugin for Atom that uses [esprima](http://esprima.org) (?) for code analysis. It supports ES6 and JSX syntax.

## Installation
Install the plugin in Atom (PLACEHOLDER)

## Configuration
TBC

## Features
TBC

## Release History
TBC

repository: alnorris/Iridium

repo_name: alnorris/Iridium


text:
# Sample apps: Redis Pub/Sub

Example how to use Redis for Pub/Sub. Credits to https://medium.com/@ridwanfajar/using-redis-pub-sub-with-node-js-its-quite-easy-c9c8b4dae79f

## Deploy Redis pod

```
$ podman play kube --network=sampleapps redis-pod.yaml
```

To test Redis deployment, execute the following command and make sure the output is `PONG`:
```
$ podman exec -it redis-pod-redis01 redis-cli -a abcde12345 ping
```

## Deploy publisher and producer services

```
$ podman build -t extra2000/redis-pubsub/pubsub .
$ podman play kube --network=sampleapps subscriber-pod.yaml
$ podman play kube --network=sampleapps publisher-pod.yaml
```

See logs:
```
$ podman logs subscriber-pod-subscriber
```

## To clean up

```
$ podman pod rm --force publisher-pod subscriber-pod redis-pod
```


text:
fncmp
=====

`fncmp` provides function composition in JavaScript.

This lets you write very expressive code, combining simple functions into more complex ones.

For example, instead of writing:

``` javascript
array.map(doStuff).map(moreStuff).map(yetMore);
```

or the more performant, but uglier:

``` javascript
array.map(function(item) {
    item = doStuff(item);
    item = moreStuff(item);
    item = yetMore(item);
    return item;
});
```

Just use function composition:

``` javascript
var compose = require("fncmp");
array.map(compose(yetMore, moreStuff, doStuff));
// Notice how functions are composed from right to left.
```

License
-------

MIT

repository: tobie/fncmp

repo_name: tobie/fncmp


text:
# Training Agents using Upside-Down Reinforcement Learning
This is a Pytorch based implementation of the Upside Down Reinforcement Learning (UDRL) work from Jürgen Schmidhuber's research group. They presented this at an RL workshop at NeurIPS 2019.

> Paper on arXiv - https://arxiv.org/pdf/1912.02877.pdf

> **Summarized Abstract**
>
> Traditional Reinforcement Learning (RL) algorithms either predict rewards with value functions or maximize them using policy search. We study an alternative: Upside-Down Reinforcement Learning (Upside-Down RL or UDRL), that solves RL problems primarily using supervised learning techniques. Here we present the first concrete implementation of UDRL and demonstrate its feasibility on certain episodic learning problems. Experimental results show that its performance can be surprisingly competitive with, and even exceed that of traditional baseline algorithms developed over decades of research.

## Experiments
In this repo, I've tried to solve the *Sparse Lunar Lander* task using the UDRL algorithm from the paper. You can jump right in using the `experiments.ipynb` jupyter notebook. Since *Sparse Lunar Lander* isn't a ready-made environment on OpenAI Gym, I manually mask out the rewards and convert *LunarLander-v2* into a sparse one.

### Dependencies
```
pytorch
numpy
gym[box2d]
tqdm
comet_ml
```

### Sparse Lunar Lander Results
![Sparse Lunar Lander](./plots/sparse_lunar_lander.png)

### Blog Post
You can read more about this experiment at the accompanying blog post - https://towardsdatascience.com/is-upside-down-reinforcement-learning-imitation-learning-4a9d346f9f98


text:
# GemPath

[![Build Status](https://travis-ci.org/JuanitoFatas/gem_path.svg?branch=master)](https://travis-ci.org/JuanitoFatas/gem_path)

Find where a gem is located.

## Installation

Add this line to your application's Gemfile then run `bundle`:

```ruby
gem "gem_path"
```

Or install it yourself as:

```
$ gem install gem_path
```

## Usage

```ruby
GemPath.find("rails")
# => path/to/rails/gem/in/your/system
```

## License, Contributor's Guidelines

- MIT license
- [Moya Contributors Guidelines][moya] which TLDR: means we give out push access easily and often.

[mit]: https://opensource.org/licenses/MIT
[moya]: https://github.com/Moya/contributors

gha_language: Ruby


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

### Description

This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of Foxit Reader before 9.1 and PhantomPDF before 9.1. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the processing of specially crafted pdf files with embedded u3d images. Crafted data in the PDF file can trigger an out-of-bounds write on a buffer. An attacker can leverage this vulnerability to execute code under the context of the current process.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/0xCyberY/CVE-T4PDF
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

repo_name: trickest/cve