text:
# CSharpGL
CSharpGL wraps OpenGL features(VBO, shader, scene, picking, UI, text etc) and offers general demostrations and documents.
For more information please check (http://bitzhuwei.github.io/CSharpGL/)

# release notes:
## v<IP_ADDRESS>:
1. fix: static `Win32` initialization.
2. fix: IndependentBufferTarget : uint
3. `Buffer` allows for shadow copy.
4. Any struct\managed array\unmanaged array can be uploaded to server side directly.

## v<IP_ADDRESS>:
1. redefine `Buffer`: Buffer is buffer, there is no buffer pointer.
2. `BitmapFilter` supports multiple levels.
3. fix: `RendererBase.GetModelMatrix()`.

## v<IP_ADDRESS>:
1. Directly create buffer on server side(GPU).
2. `ClearBufferData` and `ClearBufferSubData`.
3. fix: cascade model matrix.
4. `OpenGL.GetDelegateFor<T>()` logs but not throw an exception when some OpenGL command is not supported on specific device.

## v<IP_ADDRESS>:
1. rename `IColorCodedPicking` to `IPickable`.
2. `Markable` struct supports timestamp when member is updated.
3. Cascade model matrix.(`IModelSpace` keeps relative model space to parent node.)
4. Quick sort algorithm of `UnmanagedArray<T>`.
5. `VertexAttributeBuffer` supports `glVertexAttribPointer`, `glVertexAttribIPointer` and `glVertexAttribLPointer`.

## v<IP_ADDRESS>:
1. DitherState\LogicOperationState\AlphaFuncState.
2. Support uniform struct.
3. Remove opengl version attribute in `GLCanvas`.
4. fix: return first `lastIndexId` object when picking a point.
5. Generic `ILayout<T>` separated from `UIRenderer`.
6. `ViewPort` supports `ILayout<ViewPort>`(tree layout). `Scene` supports multiple view ports.
7. `ViewPort` integrated in picking.
8. Use opengl window coordinate system in picking.

## v<IP_ADDRESS>:
1. `UniformVariable` need not to reset.
2. `ClipPlaneState` only works in Legacy OpenGL.
3. `UniformBlock<T>` supports uniform block in GLSL.
4. fix: Fields of `vec4` layout in the order `x, y, z, w` to match that in GLSL.
5. `glm.inverse()` and `glm.transpose()`.

## v<IP_ADDRESS>:
1. fix: glm.rotate(angle, axis) uses angle in degrees(same as glRotatef() in legacy OpenGL).
2. Tranform between matrix and (angle+axis) via Quaternion.
3. VAO with no vertex attribute buffer is allowed.
4. `ShaderStorageBuffer` 'is an' `IndependentBuffer`.
5. `CubemapImageFiller` for creating a cubemap texture.
6. `FrontFaceState`.

## v<IP_ADDRESS>:
1. More switces(DepthMask, ColorMask, StencilMask).
2. Query object supports conditional rendering.
3. fix: remove framebuffer object in ColorCodedPicking.
4. `Buffer` supports bind/unbind and abstract Target property.
5. `Renderer` always renders with its own index buffer.
6. LineStippleState and PolygonStippleState.
7. Bezier curve rendering with legacy OpenGL.
8. Color-coded picking intergrated in Scene.
9. VertexAttributeBuffer supports tessellation shaders.
10. Remove self defined cursor in scene.
11. fix: Inner pickable Renderer takes model matrix into consideration when moving vertex's positions.
12. Remove mat4 MVP in IColorCodedPicking.
13. fix: missed the condition of picking a point when rendering GL_POINTS.

## v<IP_ADDRESS>:
1. Uniform/Texture/AtomicCounter/PixelUnpack Buffer.
2. Create Texture filled with Buffer(uniform samplerBuffer in GLSL shader).
3. Rename PropertyBuffer to VertexAttributeBuffer.
4. VertexAttributeBuffer supports instanced-rendering.
5. VertexAttributeConfig decides parameters' values in glVertexAttribPointer(attributeLocation, size, type, false, 0, IntPtr.Zero);
6. fix: logic error in InnerPickableRenderer.DoInitialize().
7. Map/Unmap buffer in VertexAttributeBuffer, IndependentBuffer and OneIndexBuffer.

## v<IP_ADDRESS>:
1. IModelSpace consists of position, scale and rotation.
2. Get quaternion from model matrix.
3. Wraps framebuffer and use framebuffer in GLCanvas and Color-Coded picking.
4. Add NullImageBuilder for Texture.
5. Add IndependentBuffer(Ptr).
6. Remove useless enumerations.
7. Clean code with CodeMaid.
8. Renderer.SetUniform() throws exception when wrong type of value is fed in.
9. The ICanvas interface abstracts winform controls.
10. Add 'bool UsesZeroIndexBuffer()' in IBufferable.
11. Bind/Unbind buffer.
12. Initialize VAO inside Renderer's initializing.
13. Auto-allocate memory in UnmanagedArray.

## v<IP_ADDRESS>:
1. fix: BoundingBoxHelper.Render().
2. virtual DoUpdate() in Script instead of abstract.
3. fix: discard transparent part in glyph.
4. Scene.Update once.
5. Scene only has script component.
6. SceneRootObject as root object in scene.
7. Update+Render scene whenever property is changed.
8. Bigger font for property grid.
9. Renderer supports IModelSpace.
10. Zooming camera updates camera's position and target only.
11. Model matrix should be marked as updated at first.

## v<IP_ADDRESS>:
1. Wraps texture and sampler.
2. IModelSpace provides model matrix for rendering in MVP matrix in shader.
3. fix: Scene renders all objects recursively.
4. Remove initialize method in ScriptComponent because scripts may be executed in non-UI thread.

## v<IP_ADDRESS>:
1. fix: rename NewTexture to Texutre.
2. Sampler works.

## v<IP_ADDRESS>:
1. IModelSpace transforms a model from model's sapce to world's sapce.
2. Start/Stop scene.
3. fix: LabelRenderer supports updating text right before rendering.
4. New project for generating Renderer types.(check CSharpGL on GitHub)
5. Wrapped types(Texture, Sampler and ImageFiller) for texture's construction, initialization and destroy.

## v<IP_ADDRESS>:
1. Add default cursor(an UI element) into Scene.
2. Hide/Show system's cursor in GLCanvas.
3. fix: update UIRoot's size when scene is resized.
4. TransformComponent is no longer a field member in SceneObject.
5. IModelSpace transform a model from model's sapce to world's space.

## v<IP_ADDRESS>:
1. TextureUpdater allows for updating texture's content.
2. Better looking for Axis and UIAxis.
3. Remove useless TTF file in resource.
4. UICursor renders a cursor with texture.

## v<IP_ADDRESS>:
1. Better solution of printing FonBitmap.
2. Fix: no need to check if uniform variable exists in shader when during SetUniform().
3. Add BeforeLayout and AfterLayout event for UIRenderer.

## v<IP_ADDRESS>:
1. Mapping uniform type ivec2/3/4, uvec2/3/4, bvec2/3/4 types.
2. Generic type converter for struct types.
3. DefaultFramebuffer creates framebuffer for canvas.
4. Fix bug: UIText supports all colors.
5. Remove namespace System.
6. Simpler solution(System.Drawing.Font.MeasureString()) for displaying text. (SharpFont not needed, thus much less code.)

## v<IP_ADDRESS>:
1. Add ArcBallManipulater to rotate model.
2. All types for SharpFont are private.
3. Remove all GLU functions and constants.
4. Remove wraper functions for legacy OpenGL.
5. Single instance pattern for Win32.
6. Remove constants in Win32 that are not used.
7. Resize GLCanvas only when the control is resized.
8. Allows for refresh canditate types in FormSelectType.
9. Remove unnecessray dictionary.
10. TypeHelper helps to create instance of specified type.
11. Display a clock in GLCanvas in design mode.
12. Fix bug in LabelRenderer which allows to define size in pixel.
13. Add uniform type for Int32.
14. UniformArrayVariable will be marked as Updated whenever its item is updated.
15. Use reflection to get all uniform types and uniform array types.
16. Comment some OpenGL contants that are never used.
17. Enumeration type for glGetString.
18. PositionHelper returns a IBoundingBox of specified position array.
19. UpdatingRecord records time when a property is updated or uploaded.
20. BoundingBoxRenderer renders a bounding box.
21. IBoundingBox and ICamera supports adjusting camera's position and target.

## v<IP_ADDRESS>:
1. Remove FUint, Rect, ResizableArray etc from SharpFont.
2. Organize FontResource's code.
3. Manipulaters' BindingMouseButtons response to all possible buttons.

## v<IP_ADDRESS>:
1. Simpler Scene: remove useless UIRootRendererComponent; UIRoot rendering ui for Scene.
2. PositionHelper.Move2Center() supports vec2.
3. Retarget CSharpGL's .net version to .net3.5.
4. Fix bug in ILyaout.NonRootNodeLayout().
5. Remove SatelliteRotator.
6. Rename RenderEventArgs to RenderEventArg.
7. mat4Helper converts float array to mat4.
8. Fix bug in get delegate for OpenGL command.(Use proc.ToInt64() instead of proc.ToInt64())
9. Camera manipulaters using mouse/keyboard.
10. Better performance: reading GL_DEPTH_COMPONENT to make sure something is picked.
11. ChildList<T> represents children in ITreeNode.
12. IndexBufferEditor displays controller for update parameters for glDrawArrays() or glDrawElements().
13: Release bind element buffer in OneIndexBuffer.
14. Comment debug lines in FontResource.
15. TextModel allows for updating text property.

## v<IP_ADDRESS>:
1. 3 PolygonOffsetState types for Fill, Line and Point.
2. remove unnecessary initialization of creating PrimitiveRestartState for OneIndexRenderer.
3. Rename GLRoot/GLAxis/GLText to UIRoot/UIAxis/UIText.
4. UI types manage its uniform variables inside.
5. ILayout derived from ITreeNode<UIRenderer>.
6. UIRoot auto-layout before rendering.
7. UIRendererComponent manages UI objects in the Scene.
8. FormIListEditor supports creating instance with parameters.
9. PositionHelper.Move2Center() operates on input parameters.

## v<IP_ADDRESS>:
1. SceneObject maintains a list of script components.
2. Generic List Editor for different list types.
3. Move item up/down in generic list editor.
4. Display uniform variable's location in property grid.
5. Add ItemAdded/ItemRemoved events.
6. Explicit implement of ITreeNode<SceneObject> for SceneObject.
7. Remove the complex error-prone relative transform properties.

## v<IP_ADDRESS>:
1. Enable/Disable SceneObject controls whether it takes part in rendering and updating.
2. SceneObject's transform(position/scale/rotation) is updated according to parent/child relation then to script component.
3. Sphere supports uv mapping attribute.
4. SatelliteManipulater manipulates camera's posiiton, rotation and distance to target. Camera acts like a sateliite moving around its target when manipulated by SatelliteManipulater.
5. Rename vec2/vec3/vec4.Magnitude() -> length().
6. LabelRenderer renders a text label in 3D world space. The text can be updated in runtime.
7. Fix bug: teapot's face property buffer.
8. Fix bug: FontResource should provide seperate default instances for different render contexts.

## v<IP_ADDRESS>:
1. FormSelectType loads specified types from all loaded assemblies and cache them.
2. TransformCompoent and ScriptComponent works simiar to those in Unity.

## v<IP_ADDRESS>:
1. Scene object and components learnt from Unity.
2. UITypeEditor for Camera, Scene types.
3. OpenGLVersion Only works in design mode.
4. No need check value type for UniformValue in release mode.
5. Add Cube, Sphere and Ground as buil-in Scene-Object.
6. Update color algorithm for cube and sphere.
7. Remove unnecessary versions of GetViewMat4().
8. FirstPerspectiveManipulater allows for move camera by key event and mouse event.

## v<IP_ADDRESS>:
1. Stronger Camera class: Get directions.
2. Faster glm.lookAt().
3. CSSL integrates all build-in funcitons from GLSL shader pdf(not into CSharpGL)
4. Easier to use GLControl as root UI renderer.(Auto-bind to canvas' resize event)
5. Clean interface and implementation for FontResource.
6. Update frame buffer constants.
7. Remove unused resources(teapot.obj etc.) to reduce CSharpGL.dll's file size.
8. internal fields of mat2/mat3/mat4 for better performance.

## v<IP_ADDRESS>:
1. integrate all uniform variables and array variables inheriting from UniformVariable.

## v<IP_ADDRESS>:
1. Renderer supports setup uniform array variable.(uniform vec3 positions[10];)
2. Different kinds of uniform arrays: float[], vec2[], vec3[], vec4[], mat2[], mat3[],mat4[], samplerValue[].

## v<IP_ADDRESS>:
1. Get a Font Resource from TTF files.
2. Font Resource supports rendering text.

## v<IP_ADDRESS>:
1. GLControls allows for control-style objects.
2. A GLAxis and GLText control.
3. More OpenGL switches and uniforms.

## v<IP_ADDRESS>:
1. Only pickable Renderer check if position buffer's DataSize is 3.
2. Adjust camera's default settings.
3. OneIndexBuffer can controls the first element to be rendered.

## v<IP_ADDRESS>:
1. supports picking of point, line and basic geometry(triangle, quad, polygon) from any kind of OneIndexRenderer or ZeroIndexRenderer.
2. rename *ModernRenderer*.cs to *Renderer*.cs
3. fix bug in QuadStripRecoginzer: reorder its vertexs to form a quad.(0 1 2 3 -> 0 1 3 2)

## v<IP_ADDRESS>:
1. add model: BigDipper, Tetrahedron, Cube, Sphere, Teapot.

## v<IP_ADDRESS>:
1. Modern rendering(Shader+VBO).
2. Color-coded-picking of primitives in a VBO.
3. Highlight picked primitives.
4. Draw text using `glRasterPos()` and `CallList`.
5. `PolygonOffsetState`.
6. `ILayout` supports layout UI element in an OpenGL canvas.


text:
# Ascomyces turgidus (Sadeb.) W. Phillips, 1887 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Man. Brit. Discomyc. (London) 404 (1887)

#### Original name
Exoascus turgidus Sadeb., 1884

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Taphrinomycetes/Taphrinales/Taphrinaceae/Taphrina/Taphrina betulina/ Syn. Ascomyces turgidus/README.md

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mdoering/backbone


text:
# How to maintain the oVirt site

If you are a maintainer (contributor with commit access), you can review and merge pull requests
and assign issues to other contributors.

This section describes the typical tasks and processes to follow as a maintainer.

IMPORTANT: Because maintainers have commit access to the repository, please fork and clone
the repository and work offline in a text editor on content that you want to edit or add yourself.
All contributions must follow the [general contribution guidelines](https://github.com/oVirt/ovirt-site/blob/master/CONTRIBUTING.md).

## List of current site maintainers

### General technical content, release management

* Doron Fediuck
* Sandro Bonazzola
* Greg Sheremeta
* Nir Soffer

### Site infra and Middleman

* Marc Dequenes (Duck)
* Greg Sheremeta

### Non-technical content, community, blog posts, legal

* Brian Proffit

## Previous maintainers

* Yaniv Kaul
* Allon Mureinik (storage)
* Marcin Mirecki (networking)
* Eyal Edri (infra)
* Garrett LeSage
* Jason Brooks
* Michael Scherer

## Triaging issues and PRs

* Currently there is no single person to triage issues and PRs. This means that each maintainer needs
to turn on notifications for new issues and PRs or regularly review the lists.
* Assign issues and PRs to yourselves based on the topic or component. If you see that an issue or PR remains unassigned for more than a few days and you can determine the maintainer that can review it, you can assign it to them.

## Handling issues

Most issues that are submitted can be divided to two main categories. Transparency in discussion is critical, since the issues usually indicate a pain point or need from the community. Please keep all issue-related discussions in the issue comments, and if closing with a Won't Fix resolution make sure to indicate the reason.

### Content-related issues

These issues might involve outdated or incorrect content, requests for additional content, and so on. Generally, if contributors create a content-related issue it's better if they submit a PR instead.

However, if they cannot fix the problem themselves or if the issue indicates a bigger problem, you can initiate a discussion in the issue comments to determine the best solution for the problem.

For example, an issue for obsolete content in the oVirt storage component should be assigned to the storage maintainer, who can then determine how to fix the issue and assign the relevant resources.

### Infra-related issues

These issues might involve broken links, incorrect markdown parsing, UX improvements, and so on. Similar to content-related issues, if the fix is straightforward it can be handled by the issue submitter.

However, any complex issues or issues that might affect other Middleman-based sites should be consulted with the site infra admins.

For example, an issue for broken links that result from Middleman replacing absolute paths with relative paths might impact multiple Middleman sites and should be assigned to the site infra admins to determine a cross-site solution.

## Reviewing and merging pull requests

After you assign yourself a submitted PR, follow standard review best practices to verify integrity, accuracy, and consistency. Similar to issues, make sure to keep discussions in the PR conversation and maintain transparency for any feedback or related actions.

Follow these best practices for all PRs, including yours. Do not merge your own PRs unless it is a quick and very safe fix, and make sure to test the change before and after you process the PR.

license: MIT

repository: mathianasj/ovirt-site

gha_license_id: NOASSERTION

repo_name: mathianasj/ovirt-site


text:
---
layout: default
---

# 1996-07-20 - Re: US versions of Netscape now available

## Header Data

From: Tom Paquin<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 02020289c64aa64f6ffb9ab0c2adb778d8b6f9cd185d79898c935a0019b48e24

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-07-20 13:24:11 UTC

Raw Date: Sat, 20 Jul 1996 21:24:11 +0800

## Raw message

```
{% raw  %}From: Tom Paquin<EMAIL_ADDRESS>Date: Sat, 20 Jul 1996 21:24:11 +0800
To<EMAIL_ADDRESS>Subject: Re: US versions of Netscape now available
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Alex de Joode wrote:

> I would like to know what Netscape's position on the above mentioned
> scenario is .. (Uploading "possibly" received 128 bit binaries to
> official netscape mirrors outside the US, that is) (guess why ...)

I guess I should look again, but I *thought* our licenses explicitly
excepted use of "US-Only" software (defined in the license) from the
standard exclusions.  I think the attys lifted some of the definitions
straight from ITAR and may have quoted 22USC.  Maybe we screwed
up and got the wrong license in the beta and missed the check.
I don't know.  I'll look.  *sigh*

As far as company policy goes, it's a good bet that we won't
willingly break any laws.  Licensing export-restricted software
to a "foreign person" (includes companies, etc) without a
particular export license would probably be a mistake which would
get corrected quickly.

We have made some mistakes. Occasional known distribution
errors have occured, and in each case we do what the law
says: notify ODTC, and do whatever we can to clean up.  Nothing
big and nasty has come up and I think ODTC has been fine with us.
To my knowledge, every cleanup attempt has been met with cooperation
from all hands involved.

--
Tom Paquin            Netscape Communications Corp
about:paquin

{% endraw %}
```

## Thread

+ Return to [July 1996](/archive/1996/07)

+ Return to "[Alex de Joode <usura@replay.com>](/authors/alex_de_joode_usura_at_replay_com_)"
+ Return to "[Tom Paquin <paquin@netscape.com>](/authors/tom_paquin_paquin_at_netscape_com_)"

+ 1996-07-19 (Fri, 19 Jul 1996 23:50:11 +0800) - [Re: US versions of Netscape now available](/archive/1996/07/1e9da1fc1a404657a03dfb8db13c0a50ca5be6b91486d7ee150a636d5018cb85) - _Alex de Joode<EMAIL_ADDRESS>  + 1996-07-20 (Sat, 20 Jul 1996 21:24:11 +0800) - Re: US versions of Netscape now available - _Tom Paquin<EMAIL_ADDRESS>

gha_license_id: MIT


text:
## Resources

- [JDK Installation Instruction](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html#A1096936)

- [Netbeans 8.2 Installation Instruction](https://netbeans.org/community/releases/82/install.html)

- [Learning Swing with the NetBeans IDE
](https://docs.oracle.com/javase/tutorial/uiswing/learn/index.html) - An official tutorial by Oracle (The Guys who own Java) on how to make a simple Software to convert Fahrenheit to Celcius.

- [Learning Java Swing: Youtube](https://www.youtube.com/watch?v=2FOp_RVrAq0&list=PLZAdaq3vS0fon3IVjAEzzrmvJmA9aHY-4) - Introduction to software development using Netbeans.

- [Netbeans Tutorial: Youtube](https://www.youtube.com/watch?v=uJLmRe78SA4&list=PLZAdaq3vS0fr0JmFgCy0tHWdFVBgAUkUd)

## Clasroom Material

- [Calculator Code](Calculator.zip): Extract the zip file then open the project in Netbeans now start experimenting with it.

- [SoftaBlitz Class-1 Presentation](Softablitz-first-year-class.pdf)

gha_language: Jupyter Notebook


text:
# Change Log
All notable changes to OpenRasta will be documented in this file.
OpenRasta adheres to [Semantic Versioning](http://semver.org/).

## [2.6.0-preview.3] [Unreleased]

### Known issues
  - Previously a POST with `void Return`, returned a 200 now it returns a 204.
  - The internal container will failure under load.

### Added

### Changed

### Deprecated

### Removed

## [2.6.0-preview.2]

### Known issues
  - Previously a POST with `void Return`, returned a 200 now it returns a 204.
  - The internal container will failure under load.

### Added
 - Better late than never, we've moved the code that our friends at Just-Eat Tech
   contributed ages ago, and it now ships in an updated version as part of our
   main package. Any host compatible with OWIN (as in the specification) can
   now use OpenRasta. Ain't life awesome?
 - if you use Microsoft's Katana, aka `Microsoft.Owin`, we built a convenience
   package, `OpenRasta.Hosting.Katana`. It should also work with any host
   implementing `IAppBuilder`. There's also a convenience package for asp.net
   core, `OpenRasta.Hosting.AspNetCore`. It doesn't do much but saves you a bit
   of typing compared to wiring up the OWIN signatures.
 - We've added a `OpenRasta.Codecs.Newtonsoft.Json` package, because frankly,
   `DataContract`s are long dead.
 - Registering custom dependencies was always meant to be done in the configuration
   phase, but it was a bit on the simple side. So we made it `Func`ky and added
   factory support. You can now do `ResourceSpace.Uses.Dependency(ctx=>ctx.Singleton(()=>new MyService())`
   and a few other funky things. Container integrations have to be updated to
   support this, and we'll throw an exception if you use factories and the container
   doesn't support them.
 - You can now strongly-type Uri definitions, to get rid of those nasty strings,
   so .AtUri(r=>$"/resource/{r.Id}") just works.
 - A new package, `OpenRasta.Plugins.ReverseProxy`, allows you to, well, reverse
   proxy other resoures, even those that weren't, god forbid, using OpenRasta.
 - Using the ASP.NET Core `UseOpenRasta()` extension will now check and add `IHttpAuthenticationFeature` to the pipeline.
   The user no longer has to do this themselves as part of their pipeline.

### Changed

### Deprecated

### Removed

## [2.6.0-preview.1]
### Added
 - A new pipeline with "double tap" semantics, which makes most of the old pipeline
   look like an old picture, keen memories but visibly dated.
 - Things don't always happen when we want them too, so everything has been made
   async. This includes async contributors with a new `NotifyAsync`, async
   handlers (just return `Task` or `Task<T>`), codecs with `IMediaTypeReaderAsync`
   and `IMediaTypeWriterAsync`, and async interceptor with `IOperationInterceptorAsync`.
 - We have an all new in-the-box IoC container. While removing the container from
   OpenRasta is on the cards, it's a long path, and in the meantime we now provide
   you with a production-grade one, lock-free, fast, and just plain better. You
   can even inject `Func<>` and `IEnumerable<>` now. Thanks to our friends at Olo
   for sponsoring that work!

### Changed
 - Cool kids have moved on, so we follow. .net 4.6.1 is now a minimum, and we ship
   netstandard2.0 too. Are we cool now? 🕶
 - The AppVeyor build is now under the OpenRasta organisation. We were not
   really organised before, so we (well, @holytshirt) sorted it out, and we feel
   much cleaner.
 - `IPipeline` can now only be used in the contributor configuration pahse
   `IEnumerable`.
 - Methods on handlers returning `void` or `Task` will now return a 202 accepted
   instead of a 204 no content. If we can't know the semantics we shouldn't give
   any better guarantees. If you wish to return a 200, return an OperationResult
   instead.
 - Operations that were not ready for invocation would sometime fail. Now,
   either we respond with a 400 when we can't match the request to the response,
   or a `500` if we can't chose the correct method because the call was ambiguous.
 - I think errors should be given as much attention as non-errors, that's why we
   always content negotiate those errors, so we can exceptionally render exceptional
   exceptions using whatever codec you want to use, which is great for your APIs,
   but a bit less for your tests. You can now chose if you want that functionality
   or if you'd rather let exceptions bubble up, so your server can show their default
   error page or whatever.
 - ⌚ is relative, apparently. But `RedirectLocation` wasn't. So we allowed relative
   URIs.
 - RFC 2047 may sound like black magic, but if you need it, there's a new implementation
   that should be a tad more accurate, and not throw random exceptions on .net core
 - The `HttpListerHost` has been refactored to manage connections better, clean-up better
   and be more usable. Thanks @nmosafi!
 - With the new container having non-deterministic ordering of components, finding
   in which order to wire-up a pipeline is a bit more... Well less... Well it's non
   deterministic. So we switched the default call graph generator to the topological
   one we've had for a while. Check your pipelines. If you wish to revert to the old
   behaviour, a simple `ResourceSpace.Use.CustomDependency<IGenerateCallGraphs,WeightedCallGraphGenerator>()`
   should do the trick, although we don't recommend that.

### Deprecated
 - All members bar `Notify` on `IPipeline`. Because really, why would you ever
   want to know anything about the pipeline.
 - `IOperationHydrator` is no more. If you have your own, we'll respect that,
   but we'd rather you used our new and shiny `IRequestEntityReader`.
 - PipelineContinuation is moslty gone, it wasn't really meant to be used externally.
   We made `Abort` obsolete, you should instead throw an exception from the
   contributor, for those moments exceptional stuff happens. Even `Finished` was
   a bit of a lie. You reached the end of the line or you didn't, and that's all
   that ever really mattered. The responsible developer is very sorry and promised
   he will never lie again.

### Removed
 - We try not to remove stuff before the 3.0 jump, so if anything disappeared
   by accident, for exemple in `PipelineData`, please let us know, it's a bug.

### Fixed
 - When padding error messages in HTML for IE clients, we would send an
   incorrect Length, and no one wants that, so we made it accurate and bigger.
 - We would try and pad the result even if the response stream is not seekable,
   now we check correctly.

### Security

## [2.5.2001] - 2017-12-21
### Fixed
 - A lock-free container can result in unpredictable ordering of the components
   you get, and OpenRasta's filters were not as independent as we thought. The
   issue is fixed differently in 2.6, but here's a patch for the 2.5 release that
   fixes the issue with handler methods without attributes not being found when
   there's a uri name in the route.

## [2.5.2000] - 2017-12-12
### Changed
 - Releases can take longer than expected, look at Duke Nukem Forever. The 2.6 release
   is so full of goodness that we're spending a bit more time polishing it. In the
   meantime, thanks to the sponsorship of our friends at olo.com, we backported
   some of that goodness to the 2.5 branch.

## [2.5.1050] - 2016-12-15
### Fixed
 - When we removed the authentication support from the out of the box experience,
   we forgot that some people took dependencies on this essential step of the
   pipeline. We apologised profusely and reintroduced
    `KnownStages.IAuthentication` promptly.

## [2.5.1023] - 2016-08-24
### Changed
 - Made uri to handler method parameters mapping case-insensitive.

## [2.5.63] - 2016-03-22
### Fixed
 - Removes a resource leak in the multipart codec

### Changed
 - The error message when an operation was not ready to be executed was a bit
   terse and not very helpful. We made it more helpful.

## [2.5.59] - 2015-10-23

### Changed
 - Improved Content-Disposition header parsing
 - IHttpEntity is now disposable, and disposed properly

## [2.5.54] - 2015-08-11
### Fixed
 - Concurrency issue in SurrogateBuilderProvider

## [2.5.53] - 2015-03-18
### Added
 - The pipeline can use a new topological sort instead of a weighted sort
   with potentially better support for more complex pipelines. Can be added
   through the container with an `ICallGraphGenerator`

### Fixed
 - Query strings now get + processing correctly

## [2.5.48] - 2015-02-23
### Added
 - forms now support nullable Guids

## [2.5.46] - 2015-06-02
### Fixed
 - Object binders on parameters had been inadventantly removed when
   migrating to GitHub. They now work as expected.
 - Malformed Guids would cause 500. They now don't match.

## [2.5.42] - 2015-01-20
### Fixed
 - A malformed Accept header would cause a 500, it now ignores malformed
   values, and returns a 400 if all values are invalid.

### Added
 - OperationResult.Accepted has been added

## [2.5.34] - 2014-12-16
### Changed
 - The Codec response selection would always set the pipeline as finished,
   preventing contributors from running afterwards. The contributor was changed
   to only set the pipeline as continue.

## [2.5.31] - 2014-10-08
### Fixed
 - error HTML and CSS files were incorrectly shipped in NuGet packages

## [2.5.28] - 2014-10-08
### Fixed
 - Race condition in HttpListenerHost on Dispose

## [2.5.23] - 2014-09-03

This release has no new features or fixes.

## [2.5.21] - 2014-09-03
### Added
 - OpenRasta.Testing now contains reusable context base classes

## [2.5.13] - 2014-08-21
### Added
 - `HttpMethod` now has a `Patch`

## [2.5.7] - 2014-06-26

Previous OpenRasta versions are not included as they were on OpenWrap.

### Changed
 - OpenRasta is now on nuget

repository: openrasta/openrasta-core

gha_language: C#

repo_name: openrasta/openrasta-core


text:
Overcast-Wiki
=============

The unofficial Overcast Wiki

The repo is on code freeze as we migrate to the new wiki system

**Pull Requests**

If you would like to add to the wiki or change something, fork the repo and then create a Pull Request.
If the PR contributes to the website, I will accept the change and edit the website.

Note: Please have the latest fork of the repo before submitting the PR.

**Pull Request Guidelines**

All Pull Requests submitted *must* follow these guidelines or they will be marked invalid. Submit an issue if you cannot provide a pull request of the guideline standards.

1. The PR must contain actual code; no walls of text.
2. The PR must be a useful contribution.
  * PRs adding inaccurate information will be rejected.
3. PRs must use the latest fork of the repo.
4. Ensure you're not submitting a duplicate PR by searching before submitting.
5. These guidelines are subject to change at any time.
6. Existing PRs are not subject to any changes in guidelines provided they are not updated after the change.

repository: CoWinkKeyDinkInc/Overcast-Wiki

repo_name: CoWinkKeyDinkInc/Overcast-Wiki


text:
# R2DBC (Reactive Relational Database Connectivity) Client beyond spring-data-r2dbc

## What is it

This git looks much like the mixture of JdbcTemplate & CrudRepository of Spring-Data. Except the implementation is much straightforward, "I don't want to guess. Just show me what you need.".

I made this middle layer for my business projects because @Query is no longer the best choice for SQL mapping in reactive world, I think. On the other hand, ID makes CrudRepository too complicated, so I decoupled it.

## What Introduced

### 1. API

```java
// Returns the number of entities available.
<T> Mono<Long> count(Class<T> clazz);

// Returns whether an entity with the id exists.
<T> Mono<Boolean> existsById(Class<T> clazz, @NonNull Object id);

// Saves a given entity. Use the returned instance for further operations
// as the save operation might have changed the entity instance completely.
<T> Mono<T> save(T entity);

// Retrieves an entity by its id.
<T> Mono<T> findById(Class<T> clazz, @NonNull Object id);

// Returns all instances of the type.
<T> Flux<T> findAll(Class<T> clazz);

// Deletes the given entity.
<T> Mono<Boolean> delete(@NonNull T entity);

// Deletes the given entities.
<T> Mono<Integer> deleteAll(List<T> entities);

// Deletes the entity with the given id.
<T> Mono<Boolean> deleteById(Class<T> clazz, @NonNull Object id);

// Deletes all entities.
<T> Mono<Integer> deleteAll(Class<T> clazz);

// Performs SELECT operation with given SQL and parameters.
<T> Flux<T> select(Class<T> clazz, String sql, Object... params);

// Performs DELETE/UPDATE/...(update) operation with given SQL and parameters.
Mono<Integer> update(String sql, Object... params);

// Executes SQL with given parameters.
DatabaseClient.GenericExecuteSpec execute(String sql, Object... params);
```

### 2. Annotation

- @Table

  Maps a class to a database table.

- @Column

  Maps an attribute to a database column.

- @IdClass

  Refers to the composite primary key.

### 3. Dependency

Dependency of this git:

```xml
<dependency>
    <groupId>net.benpl</groupId>
    <artifactId>spring-r2dbc</artifactId>
    <version>1.1</version>
</dependency>
```

*Note: You need an under layer R2DBC driver as well, for example MySQL:*

```xml
<dependency>
    <groupId>dev.miku</groupId>
    <artifactId>r2dbc-mysql</artifactId>
    <version>0.8.0.RC2</version>
</dependency>
```

Existing R2DBC drivers can be found at:

- [Postgres](https://github.com/r2dbc/r2dbc-postgresql)
- [H2](https://github.com/r2dbc/r2dbc-h2)
- [Microsoft SQL Server](https://github.com/r2dbc/r2dbc-mssql)
- [MySQL](https://github.com/mirromutth/r2dbc-mysql)

## Getting Started

### 1. Spring Configuration

```java
@Configuration
@EnableTransactionManagement
public class R2dbcConfigure extends AbstractR2dbcConfiguration {
    @Bean
    @Override
    public ConnectionFactory connectionFactory() {
        MySqlConnectionConfiguration connectionConfiguration = MySqlConnectionConfiguration.builder()
                .host("localhost")
                .port(3306)
                .database("test")
                .username("username")
                .password("password")
                .build();

        return MySqlConnectionFactory.from(connectionConfiguration);

        // Connection pool r2dbc-pool can be configured here as well.
    }

    @Bean
    public R2dbcTransactionManager transactionManager(ConnectionFactory connectionFactory) {
        return new R2dbcTransactionManager(connectionFactory);
    }

    @Bean
    public R2dbc r2dbc(DatabaseClient databaseClient) {
        return R2dbc.of(databaseClient, Type.MYSQL);
    }
}
```

### 2. Table Entity

- Entity without composite primary key:

```java
@Data
@Table(value = "t_sys_user", type = "TABLE")
public class TSysUser {
    @Column(value = "id", primary = true, autoIncrement = true, precision = 11)
    private Integer id;

    @Column(value = "username", size = 100, noDefault = true)
    private String username;

    @Column(value = "password", size = 255, noDefault = true)
    private String password;

    @Column(value = "state", precision = 4)
    private Byte state;

    @Column(value = "phone", size = 20, nullable = true)
    private String phone;
}
```

- Entity with composite primary key:

```java
@Data
@Table(value = "t_sys_user_role", type = "TABLE")
@IdClass(TSysUserRoleKey.class)
public class TSysUserRole {
    @Column(value = "user_id", primary = true, precision = 11, noDefault = true)
    private Integer userId;

    @Column(value = "role_id", primary = true, precision = 11, noDefault = true)
    private Integer roleId;
}
```

- The composite primary key:

```java
@Data
public class TSysUserRoleKey {
    @Column(value = "user_id", precision = 11, noDefault = true)
    private Integer userId;

    @Column(value = "role_id", precision = 11, noDefault = true)
    private Integer roleId;
}
```

### 3. Using It

- R2dbc bean can be injected into the services.

```java
@Service
public class BusinessService {
    private final R2dbc r2dbc;

    public TestService(R2dbc r2dbc) {
        this.r2dbc = r2dbc;
    }

    @Transactional(rollbackFor = Exception.class)
    public Mono<TSysUser> func1(Integer userId) {
        return r2dbc.findById(TSysUser.class, userId);
    }

    @Transactional(rollbackFor = Exception.class)
    public Mono<TSysUser> func2(Integer userId) {
        return r2dbc.select(TSysUser.class, "SELECT * FROM t_sys_user WHERE id = ?", userId)
                .single();
    }

    // ...

}
```

- Or, services inherit R2dbc adaptor directly.

```java
@Service
public class BusinessService extends Mysql /*H2/Mssql/Postgres*/ {

    @Transactional(rollbackFor = Exception.class)
    public Mono<TSysUser> func1(Integer userId) {
        return findById(TSysUser.class, userId);
    }

    @Transactional(rollbackFor = Exception.class)
    public Mono<TSysUser> func2(Integer userId) {
        return select(TSysUser.class, "SELECT * FROM t_sys_user WHERE id = ?", userId)
                .single();
    }

    // ...
}
```

## Other Things

### 1. Table Entity

Usually, generating table entities from database by reverse engineering would be the best choice. The generated mapping will be more consistent. However, [r2dbc-spi](https://github.com/r2dbc/r2dbc-spi) doesn't provide such API. I did not see such mechanism in [r2dbc-mysql](https://github.com/mirromutth/r2dbc-mysql) as well.

So, to achieve table entities **auto-codegen** from database, you have to code it by yourself. Anyway, it is not a big deal. Not above 300 lines of code can make it.

Take [r2dbc-mysql](https://github.com/mirromutth/r2dbc-mysql) for example:

- Git clone [r2dbc-mysql](https://github.com/mirromutth/r2dbc-mysql)
- Enable relevant flags of ColumnDefinitions

  PRIMARY_PART, AUTO_INCREMENT, NO_DEFAULT

- Enable access to MySqlColumnMetadata
- Enable access to MySqlRowMetadata
- Spy on SyntheticMetadataMessage
- Your codegen

### 2. SQL Syntax

JetBrains IDEA:

File -> Settings -> Editor -> Language Injections -> + -> 7.Java Parameter -> ID: MySQL/H2/PostgreSQL/SQL -> Class Methods: net.benpl.r2dbc.R2dbc -> Check all 3 CheckBoxs -> OK -> OK.

*Certainly, you need to setup a datasource in the meantime.*

Other IDEs should have the similar setting.


text:
# http_method_emulator

Simple HTTP method emulator for form submitted data.

## Installation

1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
  http_method_emulator:
    github: imdrasil/http_method_emulator
```
2. Run `shards install`

## Usage

HTML form supports only `GET` and `POST` method. To bring other methods support you can use this shard. This shard will be useful for a web frameworks/libs that have no such functionality (like Kemal or Spider-Gazelle).

```crystal
require "http_method_emulator"

# Add handler to your middlewares
# like for Kemal

add_handler HTTPMethodEmulator::Handler::INSTANCE
```

Also require `"lib/http_method_emulator/assets/http_method_emulator.js"` in your js assets.

Now you can just create `POST` form with hidden field `_method` holding required method.

```html
<form method="POST" action="/some/path">
  <input type="hidden" name="_method" value="PATCH">
  <button type="submit">Make Request</button>
</form>
```

JS catches submit event and add query parameter based on form `_method` field (or do nothing if it isn't exist). Handler modifies `POST` request method setting value sent in query `_method` field.

### Configuration

You can specify field name to be used for holding method name. This should be done in two places - crystal and JS.

```crystal
HTTPMethodEmulator.config do |conf|
  conf.key = "http_method"
end
```

```js
// Anywhere after js being imported
window.HTTPMethodEmulator.key = "http_method"
```

## Contributing

1. Fork it (<https://github.com/imdrasil/http_method_emulator/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Contributors

- [Roman Kalnytskyi](https://github.com/imdrasil) - creator and maintainer


text:
Thank you for contributing! Please follow the guidelines below to submit your
pull request. Additional details are available in our
[Contributor Guide](https://docs.coderedcorp.com/cms/stable/contributing/index.html).

#### Description of change
Explain what you changed, and how or why it works the way it does.

#### Documentation
Should be added to the `docs/` directory. If you're not sure how to add
documentation, please provide a description here instead.

#### Tests
Unit tests should be included to test your changes. If you're not sure how to
write unit tests, please provide a description of how to test this change
manually.

repository: pppls/coderedcms

branch_name: refs/heads/dev

repo_name: pppls/coderedcms


text:
---
layout: post
title: Some commands of PSQL tool in PostgreSQL
bigimg: /img/image-header/yourself.jpeg
tags: [PostgreSQL]
---

## Table of contents
- [Given problem](#given-problem)
- []()
- []()
- [Wrapping up](#wrapping-up)

## Given problem

## Some commands in PSQL Tool

0. Authenticate to PostgreSQL

    ```bash
    psql -a -U [username] -p [port] -h [server]
    ```

1. Connect to the specific database

    ```bash
    \c [database]
    ```

2. Clear the screen

    - In Windows OS

        ```bash
        \! cls
        ```

    - In Linux OS

        ```bash
        \! clear
        ```

3. List all tables in the current database

    - Use command line of PSQL

        ```bash
        \dt

        # OR
        \d
        ```

    - Use SQL query

        ```sql
        SELECT table_name FROM information_schema;
        ```

4.

9. Exit PSQL

    ```bash
    \q
    ```

##

## Wrapping up

Refer:

[]()


text:
BFTaskPromise
=============
[![Build Status](https://travis-ci.org/hironytic/BFTaskPromise.svg?branch=master)](https://travis-ci.org/hironytic/BFTaskPromise)
[![Coverage Status](https://coveralls.io/repos/hironytic/BFTaskPromise/badge.svg?branch=master)](https://coveralls.io/r/hironytic/BFTaskPromise?branch=master)

## About

An Objective-C category for BFTask class in [Bolts-ObjC](https://github.com/BoltsFramework/Bolts-ObjC).

With this category, you can:

* chain tasks with dot-notation as JavaScript Promise-like syntax. (no more counting brackets!)
* write a catch block which will be called in error case only.
* write a finally block which won't change the result value unless the block fails.

### Example

```objc
[self countUsersAsync].continueWith(^id (BFTask *task) {
    // this block is called regardless of the success or failure
    NSNumber *count = task.result;
    if ([count intValue] <= 0) {
        return [BFTask taskWithError:[NSError errorWithDomain:@"MyDomain"
                                                         code:-1
                                                     userInfo:nil]];
    } else {
        return [self makeTotalUserStringAsync:count];
    }
}).then(^id (NSString *totalUserString) {
    // this block is skipped when the previous task is failed.
    [self showMessage:totalUserString];
    return nil;
}).catch(^id (NSError *error) {
    // this block is called in error case.
    [self showErrorMessage:error];
    return nil;
}).finally(^BFTask * (){
    [self updateList];
    return nil;
});
```

### Executors

If you want to specify the executor, use `continueOn`, `thenOn`, `catchOn` and `finallyOn`.
You can also use `continueOnMain`, `thenOnMain`, `catchOnMain` and `finallyOnMain`, they use `mainThreadExecutor`.

```objc
[User findAllAsync].catchOn([BFExecutor mainThreadExecutor], ^id (NSError *error) {
    [self showAlert:error];
});

// same as above
[User findAllAsync].catchOnMain(^id (NSError *error) {
    [self showAlert:error];
});
```

### Not a Promise

To be exact, Bolts' task is not a Promise. So this is not a Promise too.
The purpose of this project is to make task-chains much readable.

### Hate Dot-Notation?

If you don't think dot-notation is preferable but do want `catch` and/or `finally`, you can still use `catchWithExecutor:withBlock:` and `finallyWithExecutor:withBlock:`. They are normal methods.

To tell the truth, I hate dot-notation for methods basically. I want to use it for only properties. I prefer to use bracket-notation for usual methods.
But the task-chaining is a special case for me. It's unusual. I feel the task-chaining is not a nested method call, but a flow control.

## Install

### Using CocoaPods

Write the following line to your Podfile:

```
pod 'BFTaskPromise', '~> 2.0'
```
### Manually

Add `BFTask+PromiseLike.h` and `BFTask+PromiseLike.m` in `Classes` folder to your project.

## Migrating from 1.x to 2.0

The parameter of the block passed to `then`/`catch` is changed in 2.0.
A `then`-block takes a result value and a `catch`-block takes an error value.

In prior to 2.0, the block parameter of both `then` and `catch` was a `BFTask` value.
So if you have a code for 1.X like:

```objc
[foo loadAsync].then(^id (BFTask *task) {
    bar.title = (NSString *)task.result;
}
```

you must rewrite it to:

```objc
[foo loadAsync].then(^id (NSString *result) {
    bar.title = result;
}
```

## License

The MIT License.

repository: hironytic/BFTaskPromise

gha_language: Objective-C

repo_name: hironytic/BFTaskPromise


text:
# ufs

Go programming helpers for common file-system needs.

## Usage

```go
var (
	//	The permission bits used in the `EnsureDirExists`, `WriteBinaryFile` and `WriteTextFile` functions.
	ModePerm = os.ModePerm
)
```

#### func  ClearDirectory

```go
func ClearDirectory(dirPath string, keepNamePatterns ...string) (err error)
```
Removes anything in `dirPath` (but not `dirPath` itself), except items whose
`os.FileInfo.Name` matches any of the specified `keepNamePatterns`.

#### func  ClearEmptyDirectories

```go
func ClearEmptyDirectories(dirPath string) (canDelete bool, err error)
```
Removes all directories inside `dirPath`, except those that contain files or
descendent directories that contain files.

#### func  CopyAll

```go
func CopyAll(srcDirPath, dstDirPath string, skipDirs *ustr.Matcher) (err error)
```
Copies all files and directories inside `srcDirPath` to `dstDirPath`. All
sub-directories whose `os.FileInfo.Name` is matched by `skipDirs` (optional) are
skipped.

#### func  CopyFile

```go
func CopyFile(srcFilePath, dstFilePath string) (err error)
```
Performs an `io.Copy` from the specified source file to the specified
destination file.

#### func  DirExists

```go
func DirExists(dirPath string) bool
```
Returns whether a directory (not a file) exists at the specified `dirPath`.

#### func  DirsOrFilesExistIn

```go
func DirsOrFilesExistIn(dirPath string, dirOrFileNames ...string) bool
```
Returns whether all of the specified `dirOrFileNames` exist in `dirPath`.

#### func  EnsureDirExists

```go
func EnsureDirExists(dirPath string) (err error)
```
If a directory does not exist at the specified `dirPath`, attempts to create it.

#### func  ExtractZipFile

```go
func ExtractZipFile(zipFilePath, targetDirPath string, deleteZipFile bool, fileNamesPrefix string, fileNamesToExtract ...string) error
```
Extracts a ZIP archive to the local file system. zipFilePath: full file path to
the ZIP archive file. targetDirPath: directory path where un-zipped archive
contents are extracted to. deleteZipFile: deletes the ZIP archive file upon
successful extraction.

#### func  FileExists

```go
func FileExists(filePath string) (fileExists bool)
```
Returns whether a file (not a directory) exists at the specified `filePath`.

#### func  IsNewerThan

```go
func IsNewerThan(srcFilePath, dstFilePath string) (newer bool, err error)
```
Returns whether `srcFilePath` has been modified later than `dstFilePath`.

NOTE: be aware that `newer` will be returned as `true` if `err` is returned as
*not* `nil`, since that is often more convenient for many use-cases.

#### func  MatchesAny

```go
func MatchesAny(name string, patterns ...string) (matchingPattern string, err error)
```
Applies all specified `patterns` to `filepath.Match` and returns the first
successfully matching such pattern.

#### func  ReadBinaryFile

```go
func ReadBinaryFile(filePath string, panicOnError bool) []byte
```
Reads and returns the binary contents of a file with non-idiomatic error
handling, mostly for one-off `package main`s.

#### func  ReadTextFile

```go
func ReadTextFile(filePath string, panicOnError bool, defaultValue string) string
```
Reads and returns the contents of a text file with non-idiomatic error handling,
mostly for one-off `package main`s.

#### func  SaveToFile

```go
func SaveToFile(src io.Reader, dstFilePath string) (err error)
```
Performs an `io.Copy` from the specified `io.Reader` to the specified local
file.

#### func  WalkAllDirs

```go
func WalkAllDirs(dirPath string, visitor WalkerVisitor) []error
```
Calls `visitor` for `dirPath` and all descendent directories (but not files).

#### func  WalkAllFiles

```go
func WalkAllFiles(dirPath string, visitor WalkerVisitor) []error
```
Calls `visitor` for all files (but not directories) directly or indirectly
descendent to `dirPath`.

#### func  WalkDirsIn

```go
func WalkDirsIn(dirPath string, visitor WalkerVisitor) []error
```
Calls `visitor` for all directories (but not files) in `dirPath`, but not their
sub-directories and not `dirPath` itself.

#### func  WalkFilesIn

```go
func WalkFilesIn(dirPath string, visitor WalkerVisitor) []error
```
Calls `visitor` for all files (but not directories) directly inside `dirPath`,
but not for any inside sub-directories.

#### func  WriteBinaryFile

```go
func WriteBinaryFile(filePath string, contents []byte) error
```
A short-hand for `ioutil.WriteFile` using `ModePerm`. Also ensures the target
file's directory exists.

#### func  WriteTextFile

```go
func WriteTextFile(filePath, contents string) error
```
A short-hand for `ioutil.WriteFile`, using `ModePerm`. Also ensures the target
file's directory exists.

#### type DirWalker

```go
type DirWalker struct {
	//	`Walk` returns a slice of all `error`s encountered but keeps walking as indicated by
	//	`DirVisitor` and/or `FileVisitor` --- to abort walking upon the first `error`, set this to `true`.
	BreakOnError bool

	//	After invoking `DirVisitor` on the specified directory (if `VisitSelf`), by default
	//	its files get visited first before visiting its sub-directories.
	//	If `VisitDirsFirst` is `true`, then files get visited last, after
	//	having visited all sub-directories.
	VisitDirsFirst bool

	//	If `false`, only the items in the specified directory get visited
	//	(and the directory itself if `VisitSelf`), but no items inside its sub-directories.
	VisitSubDirs bool

	//	Defaults to `true` if initialized via `NewDirWalker`.
	VisitSelf bool

	//	Called for every directory being visited during a `Walk`.
	DirVisitor WalkerVisitor

	//	Called for every file being visited during a `Walk`.
	FileVisitor WalkerVisitor
}
```

Provides recursive directory walking with a variety of options.

#### func  NewDirWalker

```go
func NewDirWalker(deep bool, dirVisitor, fileVisitor WalkerVisitor) (me *DirWalker)
```
Initializes and returns a new `DirWalker` with the specified (optional)
`WalkerVisitor`s. `deep` sets `VisitSubDirs`.

#### func (*DirWalker) Walk

```go
func (me *DirWalker) Walk(dirPath string) (errs []error)
```
Initiates a walk starting at the specified `dirPath`.

#### type WalkerVisitor

```go
type WalkerVisitor func(fullPath string) (keepWalking bool)
```

Used for `DirWalker.DirVisitor` and `DirWalker.FileVisitor`. Always return
`keepWalking` as true unless you want to immediately terminate a `Walk` early.

#### type Watcher

```go
type Watcher struct {
}
```

A convenient wrapper around `go-forks/fsnotify.Watcher`.

**NOTE**: `godocdown` picked `watcher-sandboxed.go` shim instead of
`watcher-default.go`: Refer to *actual* docs on `Watcher`.

#### func  NewWatcher

```go
func NewWatcher() (me *Watcher, err error)
```
Always returns a new `Watcher`, even if `err` is not `nil` (in which case,
however, `me.Watcher` might be `nil`).

#### func (*Watcher) Close

```go
func (me *Watcher) Close() (err error)
```
Closes the underlying `me.Watcher`.

#### func (*Watcher) Go

```go
func (me *Watcher) Go()
```
Starts watching. A loop designed to be called in a new go-routine, as in `go
myWatcher.Go`. This function returns when `me.Close()` is called.

#### func (*Watcher) WatchIn

```go
func (me *Watcher) WatchIn(dirPath string, namePattern ustr.Pattern, runHandlerNow bool, handler WatcherHandler) (errs []error)
```
Watches dirs/files (whose `filepath.Base` names match the specified
`namePattern`) inside the specified `dirPath` for change event notifications.

`handler` is invoked whenever a change event is observed, providing the full
path.

`runHandlerNow` allows immediate one-off invokation of `handler`. This will
`DirWalker.Walk` the `dirPath`.

An empty `namePattern` is equivalent to `*`.

#### type WatcherHandler

```go
type WatcherHandler func(path string)
```

Handles a file-system notification originating in a `Watcher`.

repository: ComplianceAsCode/docker

gha_language: Go

repo_name: ComplianceAsCode/docker


text:
# find-replace-stream

*Keyword(s):* response-provider, response-manipulation, streaming, find, replace<br>

*[Since](https://learn.akamai.com/en-us/webhelp/edgeworkers/edgeworkers-user-guide/GUID-14077BCA-0D9F-422C-8273-2F3E37339D5B.html):* 1.0

This example demonstrates how an EdgeWorker can be used to modify an HTTP response stream by performing a find & replace operation on the response. The example will search for a specific text, and replace it with another, across the entire response body. It receives an optional parameter to specify how many times a replement must be performed. If not specified, the replacement will take place as many times as possible.

**DISCLAIMER: This EdgeWorker code is intended to be used on text streams, so its execution must be scoped appropriately in Property Manager, by deciding to apply the EdgeWorker on a specific match (extension, path, etc) that yields a text-based response body.**

The current example extracts from two Property Manager variables in order to know what to find and replace with. This can be modified to hardcoded text or different variables depending on the use case. Also, a third variable is available (called howManyReplacements) and defines how many times the searched text should be replacedThe main.js file shows the following:

````
const tosearchfor =  request.getVariable('PMUSER_EWSEARCH');
const newtext =  request.getVariable('PMUSER_EWNEWTEXT');
````

Can be modified to:
````
const tosearchfor =  'A String to Search For';
const newtext =  'A String to Replace With';
````

## Similar Uses

This example could be modified to support adding of various types of script to other sections of the html. Add subrequest functionality to dynamically add content to the page.

## More details on EdgeWorkers
- [Akamai EdgeWorkers](https://developer.akamai.com/akamai-edgeworkers-overview)
- [Akamai EdgeWorkers Examples](https://github.com/akamai/edgeworkers-examples)
- [Akamai CLI for EdgeWorkers](https://developer.akamai.com/legacy/cli/packages/edgeworkers.html)

repository: akamai/edgeworkers-examples

gha_language: JavaScript

repo_name: akamai/edgeworkers-examples


text:
## spring-boot-jmh-microbechmark-performance

Purpose : Benchmark spring boot service layer methods by using jhm Java Microbenchmark Harness.

Result : Get detailed performance information about execution time of a spring service component method.

Steps to follow for creating jmh Java Microbenchmark Harness inside a spring boot junit test method.

1- Add jmh artifacts into your pom.xml file.

2- Create a new benchmark class for your service layer spring component inside test directory.

3- Add target spring service component and spring context into benchmark class.

4- Initialize spring context and get target service component.

5- Refer to your benchmark class from JUnit test method.

4- Run Junit method with @Test annotation to start benchmarking.

### Local run steps

1- To execute jmh run the following maven command :

NOT : Execute maven command from where the pom.xml is located in the project directory.

$ mvn clean install

Result "com.company.customerinfo.benchmark.impl.CustomerOrderServiceBenchMark.saveCustomerWithOrdersBenchMark":

       4097.767 ±(99.9%) 25662.331 us/op [Average]

       (min, avg, max) = (2805.100, 4097.767, 5595.800), stdev = 1406.639

       CI (99.9%): [≈ 0, 29760.098] (assumes normal distribution)

Run complete. Total time: 00:00:12

REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on

why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial

experiments, perform baseline and negative tests that provide experimental control, make sure

the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts.

Do not assume the numbers tell you what you want them to tell.

Benchmark CustomerOrderServiceBenchMark.saveCustomerWithOrdersBenchMark

Mode avgt

Cnt 3

Score 4097.767

Error ± 25662.331

Units us/op

Benchmark result is saved to target/jmh-result-04-26-2021-05-04-06.json

![Java Microbenchmark Harness](doc/jmh_result.png)

### Tech Stack
Java 11

H2 Database Engine

spring boot

spring boot starter data jpa

spring boot starter web

spring boot starter test

hibernate

logback

maven

jmh-Java Microbenchmark Harness

springfox-swagger-ui

datasource-proxy

Docker

### Docker build run steps
NOT : Execute docker commands from where the DockerFile is located.

$ docker system prune

$ docker build . --tag demo

$ docker run -p 8080:8080 -e "SPRING_PROFILES_ACTIVE=dev" demo:latest

## API OPERATIONS
### Save store with products successfully to database

Method : HTTP.POST

URL : http://localhost:8080/customer-info/store/save

Request :

curl --location --request POST 'http://localhost:8080/customer-info/store/save' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "jeans_store",
  "products": [
    {
      "name": "prod1"
    },
    {
      "name": "prod2"
    },
    {
      "name": "prod3"
    }
  ]
}'

Response :

HTTP response code 200

{
    "id": 1,
    "name": "jeans_store",
    "products": [
        {
            "id": 1,
            "name": "prod3"
        },
        {
            "id": 2,
            "name": "prod1"
        },
        {
            "id": 3,
            "name": "prod2"
        }
    ]
}

### List Store saved to database

Method : HTTP.GET

URL : http://localhost:8080/customer-info/store/list

Request :

curl --location --request GET 'http://localhost:8080/customer-info/store/list'

Response :

HTTP response code 200

[
    {
        "id": 1,
        "name": "jeans_store",
        "products": [
            {
                "id": 1,
                "name": "prod3"
            },
            {
                "id": 2,
                "name": "prod1"
            },
            {
                "id": 3,
                "name": "prod2"
            }
        ]
    }
]

branch_name: refs/heads/main


text:
Legal disclaimer
---

**Usage of korail for attacking targets without prior mutual consent is illegal**. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program. Only use for educational purposes.

<br/>

Korail2
=======

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

Korail (www.letskorail.com) wrapper for Python.

This project was inspired from [korail](https://github.com/devxoul/korail) of [devxoul](https://github.com/devxoul).

Documentation
-------------

The documentation is available at [here](http://carpedm20.github.io/korail2/)

Installing
----------

To install korail2, simply:

    $ pip install korail2

Or, you can use:

    $ easy_install korail2

Or, you can also install manually:

    $ git clone git://github.com/carpedm20/korail2.git
    $ cd korail2
    $ python setup.py install

Using
-----

### 1. Login ###

First, you need to create a Korail object.

```python
>>> from korail2 import *
>>> korail = Korail("12345678", YOUR_PASSWORD) # with membership number
>>> korail =<EMAIL_ADDRESS>YOUR_PASSWORD) # with email
>>> korail = Korail("010-9964-xxxx", YOUR_PASSWORD) # with phone number
```

If you do not want login automatically,

```python
>>> korail = Korail("12345678", YOUR_PASSWORD, auto_login=False)
>>> korail.login()
True
```

When you want change ID using existing object,

```python
>>> korail.login(ANOTHER_ID, ANOTHER_PASSWORD)
True
```

### 2. Search train ###

You can search train schedules `search_train` and `search_train_allday` methods.

- `search_train` returns 10 results max. Faster than `search_train_allday`.
- `search_train_allday` returns all results after the time.
- `search_train_allday` uses `search_train` repeatedly.

`search_train` and `search_train_allday` methods take these arguments:

- dep : A departure station in Korean  ex) '서울'
- arr : A arrival station in Korean  ex) '부산'
- date : (optional) A departure date in `yyyyMMdd` format
- time : (optional) A departure time in `hhmmss` format
- train_type: (optional) A type of train. You can use constants of TrainType class here.
    default value is TrainType.ALL.
    - 00: TrainType.KTX - KTX
    - 01: TrainType.SAEMAEUL - 새마을호
    - 02: TrainType.MUGUNGHWA - 무궁화호
    - 03: TrainType.TONGGEUN - 통근열차
    - 04: TrainType.NURIRO - 누리로
    - 05: TrainType.ALL - 전체
    - 06: TrainType.AIRPORT - 공항직통
    - 07: TrainType.KTX_SANCHEON - KTX-산천
    - 08: TrainType.ITX_SAEMAEUL - ITX-새마을
    - 09: TrainType.ITX_CHEONGCHUN - ITX-청춘
- (optional) passengers=None : List of Passenger Objects. None means 1 AdultPassenger.
- (optional) include_no_seats=False : When True, a result includes trains which has no seats.

Below is a sample usage of `search_train`:

```python
>>> dep = '서울'
>>> arr = '동대구'
>>> date = '20140815'
>>> time = '144000'
>>> trains = korail.search_train(dep, arr, date, time)
[[KTX] 8월 3일, 서울~부산(11:00~13:42) 특실,일반실 예약가능,
 [ITX-새마을] 8월 3일, 서울~부산(11:04~16:00) 일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(12:00~14:43) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(12:30~15:13) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(12:40~15:45) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(12:55~15:26) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(13:00~15:37) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(13:10~15:58) 특실,일반실 예약가능]
```

When you want to see sold-out trains.

```python
>>> trains = korail.search_train(dep, arr, date, time, include_no_seats=True)
[[KTX] 8월 3일, 서울~부산(11:00~13:42) 특실,일반실 예약가능,
 [ITX-새마을] 8월 3일, 서울~부산(11:04~16:00) 일반실 예약가능,
 [무궁화호] 8월 3일, 서울~부산(11:08~16:54) 입석 역발매중,
 [ITX-새마을] 8월 3일, 서울~부산(11:50~16:50) 입석 역발매중,
 [KTX] 8월 3일, 서울~부산(12:00~14:43) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(12:30~15:13) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(12:40~15:45) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(12:55~15:26) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(13:00~15:37) 특실,일반실 예약가능,
 [KTX] 8월 3일, 서울~부산(13:10~15:58) 특실,일반실 예약가능]
```

#### 2-1. About `passengers` argument

`passengers` is a list(or tuple) of Passeger Objects.
By this, you can search for multiple passengers.
There are 3 types of Passengers now, AdultPassenger, ChildPassenger and SeniorPassenger.

```python
# for 1 adult, 1 child
>>> psgrs = [AdultPassenger(), ChildPassenger()]

# for 2 adults, 1 child
>>> psgrs = [AdultPassenger(2), ChildPassenger(1)]
# ditto. They are being added each other by same group.
>>> psgrs = [AdultPassenger(), AdultPassenger(), ChildPassenger()]

# for 2 adults, 1 child, 1 senior
>>> psgrs = [AdultPassenger(2), ChildPassenger(), SeniorPassenger()]

# for 1 adult, It supports negative count or zero count.
# But it uses passengers which the sum is greater than zero.
>>> psgrs = [AdultPassenger(2), AdultPassenger(-1)]
>>> psgrs = [AdultPassenger(), SeniorPassenger(0)]

# Nothing
>>> psgrs = [AdultPassenger(0), SeniorPassenger(0)]

# then search or reserve train
>>> trains = korail.search_train(dep, arr, date, time, passengers=psgrs)
...
>>> korail.reserve(trains[0], psgrs)
...
```

### 3. Make a reservation ####

You can get your tickets with `tickets` method.

```python
>>> trains = korail.search_train(dep, arr, date, time)
>>> seat = korail.reserve(trains[0])
>>> seat
[KTX] 8월 23일, 서울~동대구(15:30~17:19) 42500원(1석), 구입기한 8월 18일 14:05
```

Multiple.

```python
>>> trains = korail.search_train(dep, arr, date, time)
>>> seat = korail.reserve(trains[0], passengers=psgrs)
>>> seat
[KTX] 8월 23일, 서울~동대구(15:30~17:19) 42500원(3석), 구입기한 8월 18일 14:05
```

When tickets are not enough much for passengers, it raises SoldOutError.

If you want to select priority of seat grade, general or special,
There are 4 options in ReserveOption class.

- GENERAL_FIRST : Economic than Comfortable.
- GENERAL_ONLY  : Reserve only general seats. You are poorman ;-)
- SPECIAL_FIRST : Comfortable than Economic.
- SPECIAL_ONLY  : Richman.

```python
>>> korail.reserve(trains[0], psgrs, ReserveOption.GENERAL_ONLY)
```

### 4. Show reservations ####

You can get your tickes with `tickets` method.

```python
>>> reservations = korail.reservations()
>>> reservations
[[KTX] 8월 23일, 서울~동대구(14:55~16:45) 42500원(1석), 구입기한 8월 18일 14:03,
 [무궁화호] 8월 23일, 서울~동대구(15:03~18:48) 21100원(1석), 구입기한 8월 18일 14:03,
 [KTX] 8월 23일, 서울~동대구(15:30~17:19) 42500원(1석), 구입기한 8월 18일 14:05]
```

### 5. Cancel reservation ###

You can also cancel your reservation using Reservation Object from reservations() call.

```python
>>> korail.cancel(reservations[0])
```

### 6. Get tickets already paid ###

You can see your ticket list with `tickets` method.
You can get the list of paid tickes with `tickets` method.

```python
>>> korail = Korail("12345678", YOUR_PASSWORD, want_feedback=True)
>>> tickets = korail.tickets()
정상발매처리,정상발권처리  # You can see these feedbacks when `want_feedback` is True.
>>> print tickets
[[KTX] 8월 10일, 동대구~울산(09:26~09:54) => 5호 4A, 13900원]
```

Todo
----

1. Implement payment API

License
-------

Source codes are distributed under BSD license.

Author
------

Taehoon Kim / [@carpedm20](http://carpedm20.github.io/about/)

Hanson Kim / [@sng2c](https://github.com/sng2c)

gha_language: Python


text:
<!--
title: 'AWS Simple HTTP Endpoint example in Java'
description: 'This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you fetch it, it will reply with the current time.'
layout: Doc
framework: v1
platform: AWS
language: Java
priority: 10
authorLink: 'https://github.com/DoWhileGeek'
authorName: 'Joeseph Rodrigues'
authorAvatar: 'https://avatars3.githubusercontent.com/u/1767769?v=4&s=140'
-->
# Simple HTTP Endpoint Example

This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you fetch it, it will reply with the current time.

[Jackson](https://github.com/FasterXML/jackson) is used to serialize objects to JSON.

## Use Cases

- Wrapping an existing internal or external endpoint/service

## Build

It is required to build prior to deploying. You can build the deployment artifact using Gradle or Maven.

### Gradle

In order to build using Gradle simply run

```bash
gradle wrapper # to build the gradle wrapper jar
./gradlew build # to build the application jar
```

The expected result should be similar to:

```bash
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
:compileJava
:processResources
:classes
:jar
:assemble
:buildZip
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build

BUILD SUCCESSFUL

Total time: 8.195 secs
```

### Maven

In order to build using Maven simply run

```bash
mvn package
```

Note: you can install Maven with

1. [sdkman](http://sdkman.io/) using `sdk install maven` (yes, use as default)
2. `sudo apt-get install mvn`
3. `brew install maven`

If you use Maven to build, then in `serverless.yml` you have to replace

```yaml
package:
  artifact: build/distributions/aws-java-simple-http-endpoint.zip
```
with
```yaml
package:
  artifact: target/aws-java-simple-http-endpoint.jar
```
before deploying.

## Deploy

After having built the deployment artifact using Gradle or Maven as described above you can deploy by simply running

```bash
serverless deploy
```

The expected result should be similar to:

```bash
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
.....
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading service .zip file to S3...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............................
Serverless: Stack update finished...
Service Information
service: aws-java-simple-http-endpoint
stage: dev
region: us-east-1
api keys:
  None
endpoints:
  GET - https://XXXXXXX.execute-api.us-east-1.amazonaws.com/time
functions:
  aws-java-simple-http-endpoint-dev-currentTime: arn:aws:lambda:us-east-1:XXXXXXX:function:aws-java-simple-http-endpoint-dev-currentTime

```

## Usage

You can now invoke the Lambda function directly and even see the resulting log via

```bash
serverless invoke --function currentTime --log
```

The expected result should be similar to:

```bash
{
    "statusCode": 200,
    "body": "{\"message\":\"Hello, the current time is Wed Jan 04 23:44:37 UTC 2017\"}",
    "headers": {
        "X-Powered-By": "AWS Lambda & Serverless",
        "Content-Type": "application/json"
    },
    "isBase64Encoded": false
}
--------------------------------------------------------------------
START RequestId: XXXXXXX Version: $LATEST
2004 23:44:37 <XXXXXXX> INFO  com.serverless.Handler:18 - received: {}
END RequestId: XXXXXXX
REPORT RequestId: XXXXXXX	Duration: 0.51 ms	Billed Duration: 100 ms 	Memory Size: 1024 MB	Max Memory Used: 53 MB
```

Finally you can send an HTTP request directly to the endpoint using a tool like curl

```bash
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/time
```

The expected result should be similar to:

```bash
{"message": "Hello, the current time is Wed Jan 04 23:44:37 UTC 2017"}%
```

## Scaling

By default, AWS Lambda limits the total concurrent executions across all functions within a given region to 1000. The default limit is a safety limit that protects you from costs due to potential runaway or recursive functions during initial development and testing. To increase this limit above the default, follow the steps in [To request a limit increase for concurrent executions](http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html#increase-concurrent-executions-limit).

repository: serverless/examples

repo_name: serverless/examples


text:
# Document Downloader

As a university student, I get most of the studying stuff through the Internet. Most professors give me a URL where I can download all the required files to work (mostly, PDF theory files).

I did this simple script to massively download files from a webpage which has all the links in it.

## Requirements

This script runs on Python 2.7 (I'm working on a Python 3 version), so if you have Python installed on your computer, it should work! I've tested heavily on a Mac and Linux (Ubuntu), but if you have a Windows machine, you shouldn't have any problem. If you don't have Python installed, please refer [here](https://www.python.org/downloads/).

You need [Beautiful Soup 4](http://www.crummy.com/software/BeautifulSoup/) to run it. The other packages we are using are bundled by default with any Python instalation.

If you don't use a package manager for Python (though it's not required), I highly recommend [PIP](https://pip.pypa.io/en/latest/quickstart.html) (and [VirtualEnv](https://virtualenv.pypa.io/en/latest/)). Then, installing BS4 it's really easy:

`pip install beautifulsoup4`

## How it works

* Make sure you have installed and enabled (if you are using a Virtualenv) the packages listed on the requirements. ([How to create and activate a Virtualenv?](http://docs.python-guide.org/en/latest/dev/virtualenvs/))
* Open your terminal (or cmd on Windows) and navigate to the directory where you cloned the repository (typically using `cd`).
* Run the script using `python document-downloader.py`. The following arguments apply:
	* **Outpath** *(-o, --outpath)*: Where you wanna output the files. If not specified, it will output by default on `out/`.
	* **URL** *(-u, --url)*: URL where you want to download the files from. If not specified, it will be propmted during the script execution.
	* **Filetype** *(-f, --filetype)*: The type of file you want to download. If not specified, it will be propmted during the script execution.

**NOTE: Optional data on those parameters such as 'http://' for URLS, final slash for outpath or dot for filetype will be added automatically if not specified.**

### Examples:

`python document-downloader.py -o test -u http://www.cs.upc.edu/~pro1/index.php?id=material-docent -f pdf`

`python document-downloader-py -u www.cs.upc.edu/~pro1/index.php?id=material-docent -f .txt`

repository: pauarge/Document-Downloader

repo_name: pauarge/Document-Downloader


text:
# Setup Visual Studio Code for Angular

## Why i created this guide?

i was researching the net about a simliar guide. There were some guys who also switched from WebStorm to Visual Studio Code but i missed some things. Maybe there are more people out there with same problems. I am a developer since 10 years and hope that this document will maybe help someone.

## Is smooth Angular developing possible with VS Code?

✅✅✅✅ Yes, definitly it is!

FYI: I switched from WebStorm to Visual Studio Code. The target was that i can work as smooth as with WebStorm or even better. The decission for switching was based on the lightweight of vs code and the whole ecosystem (And yeah, its free 😇). I guess there is an extension for everything you need. If not, develop your own.

I worked a lot with big Angular projects. From my current point of view you can use vs code as your number one IDEA for Angular. WebStorm is looking stronger at the moment but if you take a deeper look vs code is maybe the winner for you.

But there is one point you may don't like. In WebStorm you have much buttons, fancy windows and so on compared to vs code you'll use more shortcuts or type in the actions you are looking for.

## Extensions for Angular

Yes, everything in vs code is based on extenions. But why not? I like the idea behind. Deliver a blank software and extend it based on your needs. So, here we go!

### Must haves

✅ Angular Language Service
↪ Some AI features for angular.

~~✅ angular2-inline
↪ If you use inline template you have to install this extentsion cause vs code does not support inline templates.
.~~
Update: 2020-02-25 .
This feature is now included by Angular Language Service - Awesome

~~✅ Auto Import
↪ When the Project will be bigger, the auto import from vs code is not as good as you think. VS Code will insert wrong paths 👀. So i recommend you to disable the vs code one and install this extension. I had no problems until now. Maybe microsoft will fix this (2019-08-20).~~

Update 2019-11-12 .
Theres already a fix. In my case i need relative Import Parts. You can easly activate that. Just open the Settings and search for "typescript.preferences.importModuleSpecifier". Set this value to "relative". Thats it, extension no more needded!

✅ GitLens
↪ Switching branches? annoate files? other nice git features? use this extension.

✅ IntelliJ IDEA Keybindings
↪ Yeah, i mentioned that i came frome WebStorm so...

✅ Move TS
↪ Already renamend a folder which is containing tousends of files which are used in other files imports? This extensions is really great if you need an auto update of the imports when you rename a folder/file.

✅ Prettier
↪ Basic

✅ TSLint
↪ Basic

### Optional for Angular

✅ VSCode Great Icons
↪ nice icons i like

✅ Theme you Like 😝
↪ if you find a good one tell me

✅ Emoji
↪ yes, emoji's are awesome. As you can see in this document. I created the emojis with this extension.

✅ ng-refactor
↪ maybe you want to swtich from inline templates to external? Or backwards? No Problem this extension will do this for you.

## Other hints

### Git Merge Conflicts

I came from WebStorm and the git merge dialog is really smooth. But you can have a similar functionality in vs code, just try it out. This guy knows it good:
https://www.youtube.com/watch?v=kBIMGOxqqnk

### Often needed shortcuts

As you can see i use mac. I don't know the shortcuts for windows / unix. But i think its no problem to find them out. Note that i have installed **IntelliJ Keybindings**.

Search Everywhere ⏩ `CMD + SHIFT + F`
Find File ⏩ `CMD + SHIFT + O` (IntelliJ Keybindings 😇)
All other Actions you need ⏩ `CMD + SHIT + P`


text:
# Atom Electric Imp Tools

`atom-imp-tools` is a package for the [Atom IDE](https://atom.io/) to enable seamless integration between Atom and [Electric Imp's](https://electricimp.com/) Cloud Services.  These tools use the [Electric Imp Build API](https://electricimp.com/docs/buildapi/).

This project was inspired by (and is in fact a shameless fork of) [Spark Dev](https://github.com/spark/spark-dev) - a professional, open source, hackable IDE, designed for use with Particle devices.

# Project Status
The project is currently in its infancy and is therefore highly unstable.  Very few spark features have been migrated to become Electric Imp features...

[![Build Status](https://travis-ci.org/deldrid1/atom-imp-tools.svg?branch=master)](https://travis-ci.org/deldrid1/atom-imp-tools)

## Installing
You will first need Atom installed, then simply search for and install the following packages:
Install following packages:

* [tool-bar](https://atom.io/packages/tool-bar)
* [atom-imp-tools](https://atom.io/packages/atom-imp-tools)

## Usage
Coming Soon...  For now see https://docs.particle.io/guide/tools-and-features/dev/

repository: paulchabotca/atom-imp-tools

repo_name: paulchabotca/atom-imp-tools


text:
# Introduction

Caution: This page may contain information that is specific to the legacy
version of the driver framework (DFv1).

At the highest level, a device driver's job is to provide a uniform interface to
a particular device, while hiding details specific to the device's implementation.

Two different ethernet drivers, for example, both allow a client to send packets
out an interface, using the exact same C language function.
Each driver is responsible for managing its own hardware in a way that makes the
client interfaces identical, even though the hardware is different.

Note that the interfaces that are provided by the driver may be "intermediate" —
that is, they might not necessarily represent the "final" device in the chain.

Consider a PCI-based ethernet device.
First, a base PCI driver is required that understands how to talk to the PCI bus itself.
This driver doesn't know anything about ethernet, but it does know
how to deal with the specific PCI chipset present on the machine.

It enumerates the devices on that bus, collects information
from the various registers on each device, and provides functions that allow
its clients (such as the PCI-based ethernet driver) to perform PCI operations
like allocating an interrupt or a DMA channel.

Thus, this base PCI driver provides services to the ethernet driver, allowing
the ethernet driver to manage its associated hardware.

At the same time, other devices (such as a video card) could also use the base PCI
driver in a similar manner to manage their hardware.

## The Fuchsia model

In order to provide maximum flexibility, drivers in the Fuchsia world are allowed
to bind to matching "parent" devices, and publish "children" of their own.
This hierarchy extends as required: one driver might publish a child, only to have
another driver consider that child their parent, with the second driver publishing
its own children, and so on.

In order to understand how this works, let's follow the PCI-based ethernet example.

The system starts by providing a special "PCI root" parent.
Effectively, it's saying "I know that there's a PCI bus on this system, when you
find it, bind it *here*."

Drivers are evaluated by the system (a directory is searched), and drivers that
match are automatically bound.

In this case, a driver that binds to a "PCI root" parent is found, and bound.

This is the base PCI driver.
Its job is to configure the PCI bus, and enumerate the peripherals on the bus.

The PCI bus has specific conventions for how peripherals are identified:
a combination of a Vendor ID (**VID**) and Device ID (**DID**) uniquely identifies
all possible PCI devices.
During enumeration, these values are read from the peripheral, and new parent
nodes are published containing the detected VID and DID (and a host of other
information).

Every time a new device is published, the same process as described above (for
the initial PCI root device publication) repeats;
that is, drivers are evaluated by the system, searching for drivers that match
up with the new parents' characteristics.

Whereas with the PCI root device we were searching for a driver that matched
a certain kind of functionality (called a "protocol," we'll see this shortly), in
this case, however, we're searching for drivers that match a different
protocol, namely one that satisfies the requirements of "is a PCI device and
has a given VID and DID."

If a suitable driver is found (one that matches the required protocol, VID and
DID), it's bound to the parent.

As part of binding, we initialize the driver — this involves such operations
as setting up the card for operation, bringing up the interface(s), and
publishing a child or children of this device.
In the case of the PCI ethernet driver, it publishes the "ethernet" interface,
which conforms to yet another protocol, called the "ethernet implementation" protocol.
This protocol represents a common protocol that's close to the functions that
clients use (but is one step removed; we'll come back to this).

repository: gnoliyil/fuchsia

repo_name: gnoliyil/fuchsia


text:
# stdgist

Pipe terminal output to a Gist.

## Installation

```
$ go get github.com/sjkaliski/stdgist
```

## Usage

```
$ cat file.txt | stdgist
https://gist.github.com/anonymous/some-hash
```

repository: sjkaliski/stdgist

repo_name: sjkaliski/stdgist


text:
# Google Assistant with Face Recognition Trigger Support

## Description:

We forked the open-source assistant-sdk-python project and extended it to enable users to trigger face recognition of the DIY Mirror using voice command.

## Implementation:

* "pushtotalk.py" is modified to support face recognition trigger
* "pi_face_recognition.py" performs OpenCV face recognition and returns the recognized user
* "my_recog_run.sh" runs "pi_face_recognition.py"
* "my_import.sh" activates the virtual environment and prepares for OpenCV operations

## Execution:

```sh
cd google-assistant-sdk/googlesamples/assistant/grpc
. my_import.sh
python pushtotalk.py
```

## Usage:

Before interaction with Google Assistant, press "enter" key in the command line window. Then speak "Talk to DIY Mirror" and "Face Recognition" in turn to trigger the Python script for face recognition.

## References:
Concerning the usage of OpenCV-based face recognition library in "pi_face_recognition.py", we referred to the tutorial on the following website:

- Raspberry Pi Face Recognition: https://www.pyimagesearch.com/2018/06/25/raspberry-pi-face-recognition/


text:
[![GitPitch](https://gitpitch.com/assets/badge.svg)](https://gitpitch.com/dzhoshkun/cpp-py-example/master?grs=github&t=black)

# Summary

Example project that shows hybrid programming with C++ and Python.
It also shows how to wrap C++ datatypes as NumPy arrays, so as to enable use of SciPy routines.

# Requirements

* Cmake version 3.2 or newer
* C++11 compatible compiler
* Boost.Python version 1.63
* Python 3
* NumPy and SciPy
* Tested on an Ubuntu 16.04 LTS.

See towards the end of this file for instructions how to install these.

# Usage

### Building the libraries

1. `git clone git@github.com:dzhoshkun/cpp-py-example.git`
1. `cd cpp-py-example/ex && export PYTHONPATH="$(pwd):$PYTHONPATH" && cd ../..`
1. `mkdir cpp-py-example-build && cd cpp-py-example-build`
1. `cmake ../cpp-py-example/src`
1. `make -j`
1. `export PYTHONPATH="$(pwd):$PYTHONPATH"`

### Running the examples

Most of the `*.py` files in the `ex` sub-folder contain main functions.
Some of these use the image file located in the `res` sub-folder.
So please change to this folder before running any example.
You can then run any example by calling the file directly, e.g. `../ex/gil.py`.

### Running the benchmarks

The `mgrad.py` file in the `ex` folder is intended for benchmarking.
You can benchmark the pure Python function in this file using e.g.:
```
python3 -m timeit "from mgrad import grad; import numpy as np; arr = np.zeros((128, 128, 3), dtype='uint8'); grad(arr)"
```
To benchmark its C++ implementation, replace `mgrad` with `pymycpp`, i.e:
```
python3 -m timeit "from pymycpp import grad; import numpy as np; arr = np.zeros((128, 128, 3), dtype='uint8'); grad(arr)"
```

# Installing the requirements

### Cmake

* **Ubuntu:** `apt install cmake`
* **Mac OS X:** `brew install cmake` (i.e. using [Homebrew](https://brew.sh))

### Boost.Python 1.63

* **Ubuntu**
   1. Install Python 3 development libs (see below).
   1. `wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.bz2`
   1. `tar xvfj boost_1_63_0.tar.bz2`
   1. `cd boost_1_63_0`
   1. `./bootstrap.sh --with-python=$(which python3)`
   1. `./b2 -j 7`
   1. `./b2 -j 7 install`
* **Mac OS X**
   1. Install Python 3 and SciPy (see below)
   1. `brew install boost-python --with-python3`
   1. You might need to set your `BOOST_ROOT`, e.g. `export BOOST_ROOT=/usr/local/Cellar/boost/1.63.0/include`

### Python 3

* **Ubuntu:** `apt install python3-dev`
* **Mac OS X:** `brew install python3`

### NumPy and SciPy

* **Ubuntu**
   1. `apt install python3-numpy`
   1. `apt install python3-scipy`
* **Mac OS X:** `brew install scipy --with-python3`

repository: wyli/cpp-py-example

repo_name: wyli/cpp-py-example


text:
---
layout: base
title:  'Statistics of Voice in UD_Akuntsu-TuDeT'
udver: '2'
---

## Treebank Statistics: UD_Akuntsu-TuDeT: Features: `Voice`

This feature is universal.
It occurs with 1 different values: `Cau`.

2 tokens (0%) have a non-empty value of `Voice`.
1 types (0%) occur at least once with a non-empty value of `Voice`.
1 lemmas (0%) occur at least once with a non-empty value of `Voice`.
The feature is used with 1 part-of-speech tags: <tt>VERB</tt> (2; 0% instances).

### `VERB`

2 <tt>VERB</tt> tokens (1% of all `VERB` tokens) have a non-empty value of `Voice`.

The most frequent other feature values with which `VERB` and `Voice` co-occurred: <tt>Person</tt><tt>=EMPTY</tt> (2; 100%), <tt>Trans</tt><tt>=EMPTY</tt> (2; 100%), <tt>Tv</tt><tt>=Yes</tt> (2; 100%).

`VERB` tokens may have the following values of `Voice`:

* `Cau` (2; 100% of non-empty `Voice`): mõatʃoa
* `EMPTY` (286): ata, koa, tʃopa, teita, at, ka, put, tʃe, õkwa, aj

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

gha_language: HTML

repo_name: UniversalDependencies/docs


text:
---
name: Dreadclaw
type: Special
speed: n/a
armour: n/a
cc: n/a
ff: n/a
special_rules:
  - planetfall
  - transport
notes:
  |
    May transport one formation of infantry units (except Chaos Space Marine Bikes) and Chaos Dreadnoughts. The Dreadclaw does not scatter 2d6cm after being placed within 15cm of the drop zone co-ordinates recorded at the start of the game (see [Planetfall](/tournament-pack/#planetfall)). Any troops carried in the Dreadclaw must disembark within 5cm of the Dreadclaw or within 5cm of another unit from the same formation that has already landed, so long as all units are placed within 15cm of the Dreadclaw. Dreadclaw models should be removed from the board once the formation they transport has disembarked.
---

license: ISC

gha_license_id: ISC


text:
---
layout: base
title:  'Statistics of VerbType in UD_Naija-NSC'
udver: '2'
---

## Treebank Statistics: UD_Naija-NSC: Features: `VerbType`

This feature is language-specific.
It occurs with 1 different values: `Cop`.

972 tokens (1%) have a non-empty value of `VerbType`.
10 types (0%) occur at least once with a non-empty value of `VerbType`.
4 lemmas (0%) occur at least once with a non-empty value of `VerbType`.
The feature is used with 2 part-of-speech tags: <tt>VERB</tt> (912; 1% instances), <tt>AUX</tt> (60; 0% instances).

### `VERB`

912 <tt>VERB</tt> tokens (5% of all `VERB` tokens) have a non-empty value of `VerbType`.

`VERB` tokens may have the following values of `VerbType`:

* `Cop` (912; 100% of non-empty `VerbType`): dey, was, am, becoming, is

### `AUX`

60 <tt>AUX</tt> tokens (0% of all `AUX` tokens) have a non-empty value of `VerbType`.

The most frequent other feature values with which `AUX` and `VerbType` co-occurred: <tt>PartType</tt><tt>=EMPTY</tt> (60; 100%), <tt>Polarity</tt><tt>=EMPTY</tt> (60; 100%), <tt>Aspect</tt><tt>=EMPTY</tt> (59; 98%), <tt>Mood</tt><tt>=Ind</tt> (56; 93%).

`AUX` tokens may have the following values of `VerbType`:

* `Cop` (60; 100% of non-empty `VerbType`): is, are, am, dey, was, it's, na, 'm, were

## Relations with Agreement in `VerbType`

The 10 most frequent relations where parent and child node agree in `VerbType`:
<tt>VERB --[<tt>appos</tt>]--> VERB</tt> (2; 100%).


text:
# UNDER DEVELOPMENT
This repository is originaly fork from [happio/cordova-plugin-couchbase-lite](https://github.com/happieio/cordova-plugin-couchbase-lite) which provides a standard cordova API used for couchbase-mobile version 1.4.1 (also, with small modification, it can be used for couchbase-mobile version 1.5).

With release of couchbase-lite mobile version 2.0, several native classes are updated ([more information](https://developer.couchbase.com/documentation/mobile/current/whatsnew.html)) (It also can be safe to say it is almost rewritten of previous version). New query system, indexing, full-text search, on-device replicas and eventing capabilities are the new features implemented in the latest version.

Integrating with [ionic 3](https://ionicframework.com/), now you can use [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview).

It is not fully implementations of couchbase-lite funcionalities. There are more to come. (needles to say, use it at your own risk ;) )

Contributor: [Ricky](https://github.com/rickymediaengine), [Flo](https://github.com/flolovebit)

## Installation
First add the plugin to your project by

    cordova add plugin https://github.com/makbari/cordova-plugin-couchbase-lite-2.0.git

Add RxJs inside Index.html Version 5.5.2(download the file and add it inside your asset folder).

<script src="assets/rx.js"></script>

## Example

I try to compose a simple todo application with [ionic 3](https://ionicframework.com/), and place it in this repo.

# Existing API Overview
## initDb
```
Params: [dbId:string]
Returns: Promise -> string
```

## get
Get a document from the database
```
Params: [dbId:string, docId:string]
Returns: Promise -> Doc
```

## putDoc
```
Params: [doc, isLocal: boolean = false]
Returns: Promise -> string
```

## allDocs
Returns all documents in the database in array batches.
```
Params: [dbId:string]
Returns: Observable -> [docs...]
```

## sync
Starts continuous push and pull replication against a database
```
Params: [dbId:string, syncUrl:string, user:string, pass:string]
Returns: Promise -> boolean
```

## upsert
Create or update a document. always makes itself the winning revision.
```
Params: [dbId:string, docId:string, jsonString:string, isLocal:string ("local" || "normal")]
Returns: Promise -> string
```

 ## changesDatabase
Starts a never ending (until reset is called) stream of database changes
```
Params: [dbId:string]
Returns: Observable -> {docId:string, is_delete:bool, seq_num:number}
```

## changesReplication
Starts a never ending (until reset is called) stream of replication changes
```
Params: [dbId:string]
Returns: Observable -> 'string status'
```

## stopReplication
Stops all replications.
```
Params: []
Returns: Promise -> boolean
```

### lastSequence
Gets the current sequence number of the given database
```
Params: [dbId:string]
Returns: Promise -> number
```

# Coming Soon APIs

## info
Gets the doc count of a local database
```
Params: [dbId:string]
Returns: Promise -> number

```

## compact
Runs database compaction
```
Params: [dbId:string]
Returns: Promise -> string
```

## reset
Removes all the database instances from the native array, cancels all change listeners
on databases and replications.

```
Params: []
Returns: Promise -> boolean
```

## getDocRev
Gets the current revision of a document
```
Params: [dbId:string, docId:string]
Returns: Promise -> string
```

## putAttachment
Adds an attachment to a document. the directory path of the file is relative to the
files folder on android or the root of the app sandbox on ios.
```
Params: [dbId:string, docId:string, fileName:string, attachmentName:string, mimeType:string, dirPath:string ]
Returns: Promise -> number
```

# Contributing
Your Help in developing plugin wrapper (ionic) for the andriod and implementing other functionalities is much appreciated.

# [happio/cordova-plugin-couchbase-lite](https://github.com/happieio/cordova-plugin-couchbase-lite)
Couchbase Lite Cordova plugin that provides a standard cordova interface instead of relying on the
 built in REST Server or another HTTP API layer. The native implementations run on their own
 background thread(iOS)/threads(android) so operations will never block the UI.
 This repo is intentionally not forked from the main
[couchbase-lite-phonegap](https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin)
repo. A seperate issue tracker is needed to track issues and progress with the cordova interface
 code. This repo does not intend to provide improvements ahead of the main
 repository for the native code. This code will be manually updated as it is
 released from couchbase.

 The native API was developed partially out of performance concerns with the REST server and
 also in preparation for Couchbase Lite 2.

This project depends on
[RxJS 5.x](https://medialize.github.io/URI.js/), [lodash](https://lodash.com/docs) and an
[A+ compliant Promise library](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md)
  to be globally available in the implementing project.