Blog

  • WinCryptSSHAgent

    WinCrypt SSH Agent

    CI

    Introduction

    A SSH Agent based-on Windows CryptoAPI.

    This project allows other programs to access SSH keys stored in your Windows Certificate Store for authentication.

    Benefit by Windows Certificate Management, this project natively supports the use of windows user certificates or smart cards, e.g., Yubikey PIV, for authentication.

    Overview

    Overview

    Feature

    • Work with smart cards natively without installing any driver in Windows (PIV only)
    • Support for OpenSSH certificates (so you can use your smart card with an additional OpenSSH certificate)
    • Good compatibility

    Compatibility

    There are many different OpenSSH agent implementations in Windows. This project implements five popular protocols in Windows:

    • Cygwin UNIX Socket
    • Windows UNIX Socket (Windows 10 1803 or later)
    • Named pipe
    • Pageant SSH Agent Protocol
    • XShell Xagent Protocol

    With the support of these protocols, this project is compatible with most SSH clients in Windows. For example:

    • Git for Windows
    • Windows Subsystem for Linux
    • Windows OpenSSH
    • Putty
    • Jetbrains
    • SecureCRT
    • XShell
    • Cygwin
    • MINGW

    Installing

    Install with Chocolatey

    choco install wincrypt-sshagent
    

    Manually Install

    Stable versions can be obtained from the release page.

    Additionally, you may make an shortcut of this application to the startup folder.

    Usage

    Basic Usage

    1. Start WinCryptSSHAgent
    2. Right-click the icon on your taskbar
    3. You can get necessary information by selecting your interesting item in the menu

    Note: Some SSH clients using Pageant Protocol, e.g., Putty, XShell and Jetbrains, needn’t any setting in system wide, thus you can’t see Pageant in the menu.

    Check Yubikey with WSL tutorial to start using Yubikey with SSH on WSL.

    Work with Xshell

    1. Install and run WinCryptSSHAgent
    2. Open the Properties dialog box of your session.
    3. From Category, select ‘SSH’, Select ‘Use Xagent (SSH agent)’ for passphrase handling.
    4. From Category, select ‘Authentication’ and select ‘Public Key’ as the authentication method.

    OpenSSH Certificates

    OpenSSH supports authentication using SSH certificates. Certificates contain a public key, identity information and are signed with a standard SSH key.

    Unlike TLS using X.509, OpenSSH uses a special certificate format, thus we can’t convert your X.509 certificate into OpenSSH format.

    To deal with OpenSSH Certificates, this project introduces a public key override mechanism.

    If you want to work with OpenSSH certificates, you should put your OpenSSH Certificates in your user profile folder, rename them to <Your Certificate Common Name>-cert.pub or <Your Certificate Serial Number>-cert.pub.

    Debug log

    1. Run setx WCSA_DEBUG 1
    2. Reboot to take effect
    3. Reproduce your problem
    4. The debug log is located in %USERPROFILE%\WCSA_DEBUG.log

    Contribute

    Please use issues for everything

    • For a small change, just send a PR.
    • For bigger changes open an issue for discussion before sending a PR.
    • You can also contribute by:
      • Reporting issues
      • Suggesting new features or enhancements
      • Improve/fix documentation
    Visit original content creator repository
  • SF_Crime_Data_Analysis_Pipeline

    SF Crime Data Analysis| Modern Data Engineering GCP Project

    Introduction

    The goal of this project is to create a data pipeline using Google Cloud Platform (GCP) services to process and analyze the San Francisco Crime dataset. Additionally, I aim to build an interactive dashboard using Looker Studio that provides insights into crime patterns, incident distribution, and police response in San Francisco.

    Architecture:

    Data Pipeline using GCP:

    1. Data Extraction: The first step in the data pipeline is to extract the dataset from the source. I used GCP’s data ingestion tools or services like Cloud Storage to store the dataset securely.
    2. Data Transformation: Data cleaning and transformation are crucial to prepare the dataset for analysis. I utilized GCP’s data processing tools such as Google Compute Engine to clean, transform, and structure the data.
    3. Data Storage: Processed data will be stored in a GCP data storage solution, such as BigQuery making it easily accessible for analysis.
    4. Data Analysis: GCP offers a range of tools for data analysis, including BigQuery for SQL-based analysis and Cloud Dataprep for visual data exploration. I will leverage BigQuery tools to gain insights from the dataset.
    5. Dashboard Creation: Looker Studio, a data exploration and visualization platform is used to design an interactive and user-friendly dashboard. Looker allows for creating customized dashboards that enable users to explore crime data visually.

    Data Model:

    Data Explanation:

    The San Francisco Crime dataset, available at this link: https://data.sfgov.org/Public-Safety/Police-Department-Incident-Reports-2018-to-Present/wg3w-h783

    Which contains a wide range of information related to reported incidents in the city. This dataset is a valuable resource for law enforcement agencies, policymakers, and researchers to understand and address crime-related challenges effectively.

    To use the dataset from my github data folder, the user will have to run a command from the “Splitting_dataset.ipynb” file to join and recreate the original dataset which is in parts in the “Dataset” folder.

    The weather data, available at this link: https://power.larc.nasa.gov/data-access-viewer/

    The employment data for California, available at this link: https://data.edd.ca.gov/Labor-Force-and-Unemployment-Rates/Local-Area-Unemployment-Statistics-LAUS-/e6gw-gvii

    Data Pipeline(Mage-AI Interface)

    Dashboard Features:

    This is the link for the looker studio dashboard: https://lookerstudio.google.com/u/0/reporting/120a626e-d27e-479f-9bc6-ee105948ec47/page/p_14tcasr09c?s=sOCm1WkqR6w

    The Looker Studio dashboard includes various features:

    • Crime Trends: Visualizations of crime trends over time, including daily, weekly, and monthly patterns.

    • Incident Distribution: Maps and charts showing the geographical distribution of reported incidents across neighborhoods and police districts.

    • Incident Categories: Charts depicting the distribution of incidents by category and subcategory.

    • Resolution Analysis: Insights into how incidents were resolved or closed.

    • Hotspot Identification: Identification of crime hotspots based on incident density and location.

    Dashboard User Interface

    Advantages:

    Creating a data pipeline and Looker Studio dashboard for the San Francisco Crime dataset offers several benefits:

    1. Crime Analysis: Law enforcement agencies can use the dashboard to identify crime patterns, allocate resources effectively, and devise strategies to reduce crime.
    2. Policy Insights: Policymakers and city officials can make data-driven decisions to improve public safety and allocate resources efficiently.
    3. Research Opportunities: Researchers and analysts can use the dataset and dashboard to conduct studies and gain insights into crime-related topics.
    4. Transparency: Providing access to crime data through an interactive dashboard enhances transparency and engages the community in understanding crime dynamics.

    Overall, this project aims to leverage the power of GCP and Looker Studio to turn raw crime data into actionable insights, benefiting both the city of San Francisco and its residents.

    Please let me know what you think about this project. Thank you for reading!

    Happy Coding!!!

    Visit original content creator repository
  • Android-App

    Entire News (Android News App)

    N|Solid

    An app, that will show current and recent news from all over the world. A nice, clean, simple and interactive user interface that is easy to use. Will show user live news feed from various and trusted news sources (free API available at https://newsapi.org).

    Features including –

    • Multiple news sources in one app (i.e. BBC, CNN, ABCNews, USA Today, Times)
    • The ability to save and read news offline
    • The ability to read news that the user saved for reading offline.
    • Notify the user on a fixed interval for checking the news
    • The ability to share a news article with friends and family on social network

    Future plan (improvements) –

    • The ability to login and sync saved news articles across multiple devices
    • Search for news articles

    Main goal: Design an app with current responsive user interface (with interactive animations), so that everyone can use it without the need to learn new stuff. As soon as the user opens the app, it will collect and display the user with fresh and trending news.

    Requirements –

    • Language
      • Java / Kotlin & XML
      • Python
      • MongoDB Syntax
      • JavaScript
      • Node.js
    • IDE
      • Android Studio (version 3+ & Java JDK 8+)
      • PyCharm (with Python 3+)
      • WebStorm
      • Notepad++
    • Server
      • Amazon AWS Elastic Compute Cloud (EC2)
      • Ubuntu 16.10

    Libraries Used

    Free Libries used in this project:

    • Retrofit – A type-safe HTTP client for Android and Java
    • Glide – Glide is a fast and efficient image loading library for Android focused on smooth scrolling.
    • Calligraphy – Custom fonts in Android.
    • Joda Time – Joda-Time provides a quality replacement for the Java date and time classes.
    • Android About Page – Create an awesome About Page for your Android App in 2 minutes
    • […] – Description

    Database Model

    Field Name Data Type Length Example Data
    _id hash 64 507f1f77bcf86cd799439011
    title string 1024 Maria Expected to…
    date string 32 2017-09-16T10:09:22Z
    source string 1024 http://www.bbc.com/news/uk-41292528
    cover string 1024 https://ichef.bbci.co.uk/images/ic/1024×576/p05g9f0r.jpg
    article string Tropical Storm Maria will threaten portions…
    summary string Tropical Storm Maria is…
    slug string 1024 maria-expected-to…
    saves number 654
    views number 4532
    published boolean true
    deleted boolean false
    hidden boolean false
    keywords boolean 32 [ String ]
    tags boolean 32 [ String ]

    License

    2018 FSU License

    Made with love from Fresno, CA 💗

    Visit original content creator repository

  • Beginner-friendly-DNN

    Introductory to DNN

    A neural network written in Python to solve XOR problem.

    Architecture

    The dimensions of this neural network can be changed dynamically. For XOR problem it is sufficient to have 2 neurons in the input layer, 10 neurons in the hidden layer, and 2 neurons in the output layer (classes ‘0’ and ‘1’). Dimensions are adjusted by this line of code:

    # two input neurons, one hidden layer with 10 neurons, last layer with 2 output neurons
    NN_dimensions = [2, 10, 2]
    
    # a - number of inputs, Ln - number of neurons in hidden layers
    NN_dimensions = [a, L1, L2, ..., Ln]
    

    In this code example, the number of iterations is fixed, and the learning rate is fixed as well. This project was made with one purpose: delving into the essence of neural networks, that is, math.

    Notations used in formulas for gradient calculation:

    Weight notation, where (n) – layer index, i – neuron index, j – weight index:

    $$W_{ij}^{(n)}$$

    Bias value, where (n) – layer index, i – neuron index:

    $$b_{i}^{(n)}$$

    The weighted sum value z of a neuron, where (n) – layer index, i – neuron index:

    $$z_{i}^{(n)}$$

    The activation value a of a neuron, where (n) – layer index, i – neuron index:

    $$a_{i}^{(n)}$$

    The predicted output for class i, where i is the index of neuron in the last (output) layer:

    $$\hat{y_i} = a_i^{(lastLayer)}$$

    The expected output for class i, where i is the index of neuron in the last (output) layer:

    $$y_i$$

    The cost function of the whole neural network:

    $$C$$

    Calculations

    The learning process is, in simple words, many repetitions of “moving” forward and calculating activation values, then going backward and adjusting weights and biases based on that. For the forward propagation, we use functions of weighted sum, activation and square error. For backpropagation we have to find derivatives of square error with respect to activation, then derivative of activation with respect to weighted sum, and lastly derivative of weighted sum with respect to weight.

    Sum, activation, and cost functions for forward propagation

    As mentioned before, it is necessary to calculate the sum values z for every neuron in every hidden layer. We use the formula as follows (M – number of neurons in the previous layer):

    $$z_{i}^{(n)} = b_{i}^{(n)} + \sum_{k=1}^{M}(W_{ik}^{(n)}*a_k^{(n-1)})$$

    The activation function of every neuron in this neural network is sigmoid. It is calculated as follows:

    $$a_i^{(n)} = \frac{1}{1 + e^{(-z_i^{(n)})}}$$

    The cost function used here is slightly different from MSE (Mean Square Error). Instead of taking the mean of all square errors, we take 1/2. This is done in order for the derivative to be a bit simpler. MSE (or C) is calculated as follows:

    $$C = \frac{1}{2}*\sum_{k=1}^M(y_i – \hat{y_i})^2$$

    Derivatives and gradient – backpropagation

    Graphical visualization of applying the chain rule in the output layer

    In order to calculate the gradient for each weight we have to calculate the partial derivative of cost with respect to that weight. I find it easier to think of this process as “finding the path that leads from cost to that weight“.

    If we sketch our neural network, we get a generalized graph:

    First things first, we want to adjust the weights for the output (last) layer (remember, we are starting from “the end”). It means that we are looking for:

    $$grad = \frac{\partial{C}}{\partial{W_{ij}}^{(n)}}$$

    Suppose we are looking for the gradient for the first weight of the first neuron. In the sketch, that weight is marked with a bold red line:

    I myself use an intuitive way for finding the derivative: follow the path from the cost function to that weight you are looking for (bold blue lines):

    It is clear that we have to “traverse” through cost-y_hat, then y_hat-sum, and lastly sum-weight. That’s the same as saying: find the partial derivative of cost with respect to y_hat, then find the partial derivative of y_hat with respect to sum, and finally the partial derivative of sum with respect to weight.

    Mathematical approach and applying the chain rule for the output layer

    So, if we are calculating gradients for the last layer n, by following the chain rule, we get the following equation:

    $$\frac{\partial{C}}{\partial{W_{ij}^{(n)}}} = \frac{\partial{C}}{\partial{\hat{y_i}^{(n)}}} * \frac{\partial{\hat{y_i}^{(n)}}}{\partial{{z_{i}^{(n)}}}} * \frac{\partial{z_{i}^{(n)}}}{\partial{{W_{(ij)}^{(n)}}}}$$

    In order to solve it, let’s first find each derivative:

    $$\frac{\partial{C}}{\partial{\hat{y_i}^{(n)}}} = y_i – \hat{y_i}$$ $$\frac{\partial{\hat{y_i}^{(n)}}}{\partial{{z_{i}^{(n)}}}} = \hat{y_i} * (1 – \hat{y_i})$$ $$\frac{\partial{z_{i}^{(n)}}}{\partial{{W_{(ij)}^{(n)}}}} = a_j^{(n-1)}$$

    Putting it all back together, we get the full gradient:

    $$grad = \frac{\partial{C}}{\partial{W_{ij}^{(n)}}} = (y_i – \hat{y_i}) * \hat{y_i} * (1 – \hat{y_i}) * a_j^{(n-1)}$$

    If we want to adjust the bias, then the partial derivative of sum with respect to bias is 1; we get:

    $$grad = \frac{\partial{C}}{\partial{b_{i}^{(n)}}} = (y_i – \hat{y_i}) * (\hat{y_i} * (1 – \hat{y_i}))$$

    That’s it! Having found the gradient for each weight in the output layer, we can use it to adjust the weights:

    $$W_{ij}^{(n)} := W_{ij}^{(n)} – grad * learningRate$$

    Graphical visualization of the chain rule for hidden layers

    Now the harder part is calculating the gradient for hidden layers. Luckily, there is a pattern for calculating the derivatives, as some of them repeat themselves in different layers’ equations. To acknowledge that pattern, we must not calculate the derivative of cost with respect to weight, but find the partial derivative of cost with respect to sum (this way we will be able to save that derivative value and use it later).

    Let’s once again mark the sum of a hidden layer with the color red:

    Now let’s find all paths from cost to that sum:

    It is clear that there’s more than one path, but that’s quite easy to account for – the calculation is done by adding all partial derivatives that we get “traversing each path”!

    Mathematical approach and applying chain rule for hidden layers

    There’s one unresolved question: why take the derivatives of cost with respect to sum and not with respect to weight? As we will soon find out, there is a pattern: derivatives repeat themselves, hence calculating and saving derivatives as we move from the outer layer (BACK propagation) to ‘front’ enables us to reuse the values (note: remember what I said about “traversing all paths” and adding them up? That’s where the summation sign comes from; M – number of neurons in the next (n+1) layer):

    $$\frac{\partial{C}}{\partial{{z_i^{(n)}}}} = \sum_{k=1}^{M}\frac{\partial{C}}{\partial{a_k^{(n+1)}}} * \frac{\partial{a_k^{(n + 1)}}}{\partial{z_k^{(n+1)}}} * \frac{\partial{z_k^{(n+1)}}}{\partial{{a_i^{(n)}}}} * \frac{\partial{a_i^{(n)}}}{\partial{{z_{i}^{(n)}}}}$$

    Note how the last derivative is constant in terms of k (that value is the same for every member in the summation), so we can put it before the summation sign. Also note, that we have two partial derivatives that can be rewritten as one:

    $$\frac{\partial{C}}{\partial{a_k^{(n+1)}}} * \frac{\partial{a_k^{(n + 1)}}}{\partial{z_k^{(n+1)}}} = \frac{\partial{C}}{\partial{z_k^{(n+1)}}}$$

    We get:

    $$\frac{\partial{C}}{\partial{{z_i^{(n)}}}} = \frac{\partial{a_i^{(n)}}}{\partial{{z_{i}^{(n)}}}} * \sum_{k=1}^{M}\frac{\partial{C}}{\partial{z_k^{(n+1)}}} * \frac{\partial{z_k^{(n+1)}}}{\partial{{a_i^{(n)}}}}$$

    Calculate derivatives that we can find:

    $$\frac{\partial{a_i^{(n)}}}{\partial{{z_{i}^{(n)}}}} = a_i^{(n)} * (1 – a_i^{(n)})\quad\quad and \quad\quad\frac{\partial{z_k^{(n+1)}}}{\partial{{a_i^{(n)}}}} = W_{ki}^{(n+1)}$$

    Plug the values back into the equation:

    $$\frac{\partial{C}}{\partial{{z_i^{(n)}}}} = a_i^{(n)} * (1 – a_i^{(n)}) * \sum_{k=1}^{M}\frac{\partial{C}}{\partial{z_k^{(n+1)}}} * W_{ki}^{(n+1)}$$

    Notice how for the cost derivative with respect to sum in layer n we have to use the cost derivative with respect to sum in layer (n+1). That’s the most important part of making the code work – saving the derivatives.

    Gradient descent, general expressions, and round-up

    Now we know everything we need to know to use the gradient descent algorithm. Let’s sum up really quickly and get to coding!

    General expressions for finding derivatives

    As the most important part of the program is saving partial derivatives of cost with respect to each layer’s sum, let’s write it in a nice and concise way.

    Derivative for the last layer:

    $$\frac{\partial{C}}{\partial{{z_{i}^{(lastLayer)}}}} = (y_i – \hat{y_i}) * \hat{y_i} * (1 – \hat{y_i})$$

    The general expression for any hidden layer:

    $$\frac{\partial{C}}{\partial{{z_i^{(n)}}}} = a_i^{(n)} * (1 – a_i^{(n)}) * \sum_{k=1}^{M}\frac{\partial{C}}{\partial{z_k^{(n+1)}}} * W_{ki}^{(n+1)}$$

    General expressions for finding gradients

    Once we have calculated all derivatives, we can adjust the weights by calculating the full gradient and subtracting it from that weight. Here we have two general formulas. First one for adjusting any weight:

    $$grad = \frac{\partial{C}}{\partial{W_{ij}^{(n)}}} = \frac{\partial{C}}{\partial{z_{i}^{(n)}}} * \frac{\partial{z_{i}^{(n)}}}{\partial{W_{ij}^{(n)}}} = \frac{\partial{C}}{\partial{{z_{i}^{(n)}}}} * a_j^{(n-1)}$$

    And a second one for adjusting the bias value (optionally: add a0 = 1 to your activations array and use the previous formula):

    $$grad = \frac{\partial{C}}{\partial{b_i^{(n)}}} = \frac{\partial{C}}{\partial{z_{i}^{(n)}}} * 1 = \frac{\partial{C}}{\partial{z_{i}^{(n)}}}$$

    Finally, we get a really neat and clean weight (accordingly bias) adjustment equation:

    $$W_{ij}^{(n)} := W_{ij}^{(n)} – grad * learningRate$$
    Visit original content creator repository
  • error-tailor


    Making sure your tailor-made error solution is seamless!

    MIT commitizen PRs styled with prettier All Contributors ngneat spectator

    The Error Tailor offers seamless handling of form errors, saving you the trouble of repeating the error boilerplate. It’s fully customizable, so you can control when, where, and how each form field’s errors are displayed. Sit back, relax, and let the Error Tailor do all the work!

    Buy Me A Coffee

    Getting Started

    Run npm install @ngneat/error-tailor and add the imports to your application:

    import { provideErrorTailorConfig } from '@ngneat/error-tailor';
    
    bootstrapApplication(AppComponent, {
      providers: [
        provideErrorTailorConfig({
          errors: {
            useValue: {
              required: 'This field is required',
              minlength: ({ requiredLength, actualLength }) => 
                          `Expect ${requiredLength} but got ${actualLength}`,
              invalidAddress: error => `Address isn't valid`
            }
          }
        })
      ]
    })

    The errors config property takes a partial Provider, that should provide a HashMap<string | (err:any) => string> that is an object with keys corresponding to the errors name that you want to handle, and values that can be a simple string, or function that return a string used as error message to be shown. This function runs inside the directive injector context.

    Now the only thing you need to add is the errorTailor directive to your form:

    <form [formGroup]="form" errorTailor>
      <div class="form-group">
        <input class="form-control" formControlName="name" placeholder="Name" />
      </div>
    
      <section formGroupName="address">
        <div class="form-group">
          <input class="form-control" formControlName="city" placeholder="City" />
        </div>
    
        <div class="form-group">
          <input class="form-control" formControlName="country" placeholder="Country" />
        </div>
      </section>
    
      <div class="form-group">
        <select formControlName="animal" class="form-control">
          <option *ngFor="let option of options; index as index" [ngValue]="option">
            {{ option.label }}
          </option>
        </select>
      </div>
    
      <button class="btn btn-success">Submit</button>
    </form>
    import { errorTailorImports } from '@ngneat/error-tailor';
    
    @Component({
      selector: 'app-root',
      standalone: true,
      imports: [errorTailorImports, ReactiveFormsModule]
    })
    export class AppComponent {
      private builder = inject(FormBuilder);
      form: FormGroup;
    
      ngOnInit() {
        this.form = this.builder.group({
          name: ['', [Validators.required, Validators.minLength(3)]],
          terms: [false, Validators.requiredTrue],
          animal: [null, Validators.required],
          address: this.builder.group(
            {
              city: ['', Validators.required],
              country: ['']
            },
            { validator: addressValidator }
          )
        });
      }
    }

    The directive will show all errors for a form field automatically in two instances – on the field element blur and on form submit.

    Inputs

    • controlErrorsClass – A custom classes that’ll be added to the control error component and override custom classes from global config, a component that is added after the form field when an error needs to be displayed:
    <input class="form-control" formControlName="city" 
           placeholder="City" controlErrorsClass="my-class other-class" />
           
    • controlCustomClass – A custom classes that’ll be added to the control if control has error.
    <input class="form-control" formControlName="city" 
           placeholder="City" controlCustomClass="my-custom-class other-custom-class" />
           
    • controlErrorsTpl – A custom error template to be used instead of the control error component’s default view:
    <form errorTailor>
      <ng-template let-error let-text="text" #tpl> {{ error | json }} {{ text }} </ng-template>
    
      <div class="form-group">
        <input class="form-control" ngModel required name="name" [controlErrorsTpl]="tpl" />
      </div>
    
      <button class="btn btn-success">Submit</button>
    </form>
    • controlErrorAnchor – A custom anchor element for the control error component. The default anchor is the form field element:
    <div class="form-check form-group">
      <input type="checkbox" formControlName="terms" id="check" [controlErrorAnchor]="anchor" />
      <label class="form-check-label" for="check">
        I agree to the terms and conditions
      </label>
      <ng-template controlErrorAnchor #anchor="controlErrorAnchor"></ng-template>
    </div>

    The custom anchor can also be added as a directive, in which case it’ll act as the anchor for any nested form fields:

    <div class="form-check form-group" controlErrorAnchor>
      <input type="checkbox" formControlName="terms" id="check" />
      <label class="form-check-label" for="check">
        I agree to the terms and conditions
      </label>
    </div>
    • controlErrors – Additional errors to use for the form field, that aren’t specified in the config:
    <input class="form-control" formControlName="country" placeholder="Country"
           [controlErrors]="extraErrors" />
    • controlErrorsIgnore – A custom attribute on a form field element to skip instantiating of a control error component on it.

    One typical case when to use it is radio buttons in the same radio group where it’s enough to show only one error message and not all of them for each separate radio button.

    <div class="form-group">
      Communication language: &nbsp;
      <input type="radio" name="languages" formControlName="languages" 
             value="en" id="en"    [controlErrorAnchor]="anchorRadio" />
      <label class="form-radio-label" for="en">English</label>
      <input type="radio" name="languages" formControlName="languages" 
             value="de" id="de" controlErrorsIgnore />
      <label class="form-radio-label" for="de">German</label>
      <input type="radio" name="languages" formControlName="languages" 
             value="cs" id="cs" controlErrorsIgnore />
      <label class="form-radio-label" for="cs">Czech</label>
    
      <ng-template controlErrorAnchor #anchorRadio="controlErrorAnchor"></ng-template>
    </div>
    • controlErrorsOnAsync – To modify the error display behavior to not show errors from async validators, set the following input:
    <input [controlErrorsOnAsync]="false" formControlName="name" />
    • controlErrorsOnBlur – To modify the error display behavior to not show errors on blur, set the following input:
    <input [controlErrorsOnBlur]="false" formControlName="name" />
    • To modify the error display behavior and show the errors on submission alone, we can disable both controlErrorsOnBlur and controlErrorsOnAsync:
    <input [controlErrorsOnBlur]="false" [controlErrorsOnAsync]="false" formControlName="name" />
    • controlErrorsOnChange – To modify the error display behavior to show/hide the errors on every change, set the following input:
    <input [controlErrorsOnChange]="true" formControlName="name" />

    Methods

    • showError() – Programmatic access to show a control error component (without a blur or a submit event). A validation error should still exist on that element. The key is the published exportAs reference of errorTailor to a directive instance of ControlErrorsDirective and calling its public method showError().

    Syntax as @ViewChild('gdprErrorTailor', { static: true }) gdprErrorTailor: ControlErrorsDirective; is used to get the reference and later call this.gdprErrorTailor.showError().

    • hideError() – Programmatic access to hide an already shown control error component with the same logic as showError(), so for example: this.gdprErrorTailor.hideError().
    <input type="checkbox" formControlName="gdpr" #gdprErrorTailor="errorTailor" />

    CSS Styling

    The library adds a form-submitted to the submitted form. You can use it to style your inputs:

    .form-submitted input.ng-invalid,
    .form-submitted select.ng-invalid {
      border-color: #dc3545;
    }

    Config

    • blurPredicate – Elements that should listen the focusout event. The default predicate is:
    {
      blurPredicate(element) {
        return element.tagName === 'INPUT' || element.tagName === 'SELECT';
      }
    }
    • controlClassOnly – Optional. If true, the error component won’t be created and only the error class will be added to the control. Default is false.

    • controlErrorsClass – Optional. A custom classes that’ll be added to the control error component. Can be override if you set attribute controlErrorsClass on control

    • controlCustomClass – Optional. A custom classes that’ll be added to the control if control has error. Can be override if you set attribute controlCustomClass on control

    • controlErrorComponent – Optional. Allows changing the default component that is used to render the errors. This component should implement the ControlErrorComponent interface. If you only need to replace the error component’s template, you may derive it from the default component, DefaultControlErrorComponent, and provide the requisite HTML template.

      A common example is when using Ionic forms where each form field is wrapped in an ion-item and errors are best displayed as a sibling ion-item of the field. Example below shows how this can be done using a custom control error component.

      For example:

      // Custom error component that will replace the standard DefaultControlErrorComponent.
      @Component({
        standalone: true,
        imports: [errorTailorImports],
        template: `
        <ion-item lines="none" class="ion-text-wrap" [class.hide-control]="hideError">
          <ion-label color="danger" class="ion-no-margin ion-text-wrap" stacked>
            {{ errorText }}
          </ion-label>
        </ion-item>
        `
      })
      export class IonicControlErrorComponent extends DefaultControlErrorComponent {
      }
    
    bootstrapApplication(AppComponent, {
      providers: [
        provideErrorTailorConfig({
          errors: {
            useValue: {
              required: 'This field is required'
            }
          },
          controlErrorComponent: IonicControlErrorComponent
        })
      ]
    })
    • controlErrorComponentAnchorFn – Optional. A hook function that allows the error component’s HTML element to be repositioned in the DOM. By default error components are inserted at the bottom of the field with error. If your UI layout dictates a different positioning scheme, you may use this hook.

      Since this error element can be placed anywhere in the DOM, it also has to be removed when the error component is destroyed. To provide for this, this function should return a callback that will then be invoked when the error component is destroyed. You may use this to remove the error HTML element that you inserted into the DOM yourself.

      Example below shows how the Ionic specific error component is repositioned in the DOM to suit Ionic’s form layout. hostElem is the HTML element for the form control and errorElem is the HTML element for the error component.

      anchorIonicErrorComponent(hostElement: Element, errorElement: Element) {
        hostElement.parentElement.insertAdjacentElement('afterend', errorElement);
        return () => {
          let errorNode = hostElement.parentElement.querySelector('custom-control-error');
          if (errorNode) {
            errorNode.remove();
          }
        };
      }
    
    bootstrapApplication(AppComponent, {
      providers: [
        provideErrorTailorConfig({
          errors: {
            useValue: {
              required: 'This field is required'
            }
          },
          controlErrorComponent: IonicControlErrorComponent,
          controlErrorComponentAnchorFn: anchorIonicErrorComponent
        })
      ]
    })
    • controlErrorsOn – Optional. An object that allows the default behavior for showing the errors to be overridden. (each individual property in the object is optional, so it’s possible to override only 1 setting)
    {
      controlErrorsOn: {
        async: true,  // (default: true)
        blur: true,   // (default: true)
        change: true, // (default: false)
      }
    }

    Recipes

    I18n Example

    Here’s how to support i18n:

    import { TranslocoService } from '@ngneat/transloco';
    
    bootstrapApplication(AppComponent, {
      providers: [
        provideErrorTailorConfig({
          errors: {
            useFactory(service: TranslocoService) {
              return {
                required: error => service.translate('errors.required')
              };
            },
            deps: [TranslocoService]
          }
        })
      ]
    })

    Control Error Style

    Here’s a default style you can use for the error component:

    .control-error {
      width: 100%;
      margin-top: 0.25rem;
      font-size: 12px;
      color: #dc3545;
    }
    Visit original content creator repository
  • PageController

    PageController

    Build-Status CocoaPods Carthage compatible license

    PageController is infinite paging controller, scrolling through contents and title bar scrolls with a delay. Then it provide user interaction to smoothly and effortlessly moving. It is for iOS written in Swift.

    sample

    Requirements

    PageController Xcode Swift
    0.7.x + 9.4 4.1
    0.6.x 9.2 4.0
    0.5.x 8.2 3.0
    0.4.x 8.0 2.2
    0.3.x 7.0+ 2.0
    0.2.0 6.4 1.2

    Features

    • To inherit from DCScrollView
    • Use UIViewController, not UIView like UITabBarController
    • Support AutoLayout about MenuCell
    • Handling to change current view controller with Delegate.
    • Scrolling smoothly and effortlessly
    • Keep to smoothly in scrolling contents

    Installation

    CocoaPods

    pod 'PageController'

    Carthage

    To integrate PageController into your Xcode project using Carthage, specify it in your Cartfile:

    github "hirohisa/PageController" ~> 0.7.1
    

    Usage

    viewControllers

    Type is [UIViewController], and element must have title.

    import PageController
    
    class CustomViewController: PageController {
    
        override func viewDidLoad() {
            super.viewDidLoad()
    
            viewControllers = createViewControllers()
        }
    
        func createViewControllers() -> [UIViewController] {
            let names = [
                "favorites",
                "recents",
                "contacts",
                "history",
                "more",
            ]
    
            return names.map { name -> UIViewController in
                let viewController = ContentViewController()
                viewController.title = name
                return viewController
            }
        }
    }

    MenuBar

    Enable to change backgroundColor, frame. If you change MenuBarCell.height, then override frameForMenuBar and set height.

    /// backgroudColor
    menuBar.backgroundColor = UIColor.whiteColor().colorWithAlphaComponent(0.9)
    /// skip to auto-select after scrolling
    menuBar.isAutoSelectDidEndUserInteractionEnabled = false
    
    /// frame, override this function
    override var frameForMenuBar: CGRect {
        let frame = super.frameForMenuBar
    
        return CGRect(x: frame.minX, y: frame.minY, width: frame.width, height: 60)
    }

    MenuBarCell

    Enable to use Custom Cell supported MenuBarCellable protocol:

    public protocol MenuBarCellable {
        var index: Int { get set }
        func setTitle(_ title: String)
        func setHighlighted(_ highlighted: Bool)
        func prepareForReuse()
    }
    
    public func register(_ cellClass: MenuBarCellable) {
        guard let cellClass = cellClass as? UIView.Type else { fatalError() }
        self.cellClass = cellClass
    }
    
    public func register(_ nib: UINib) {
        self.nib = nib
    }

    MenuBarCellable

    public protocol MenuBarCellable {
    
        // it's used by PageController
        var index: Int { get set }
    
        // it is used to set to Label.text, caused by deprecating MenuCell over 0.7
        func setTitle(_ title: String)
    
        // it's instead of `updateData` over 0.7,
        func setHighlighted(_ highlighted: Bool)
    
        // Called by the menu bar on creating the instance.
        func prepareForUse()
    
    }

    License

    PageController is available under the MIT license.

    Visit original content creator repository
  • visual-ts-game-engine

    Project: Visual TS

    Current Version 1.0.0 2025 BETA

    Status:

    • From 1.0.0 new networking driver based on kurento media server.
    • From 0.7.0 Migrate to webpack5 version [If you have some trouble try to deleting node_modules/ and install again]

    2d canvas game engine based on Matter.js 2D physics engine for the web supported with kurento/OVServer and visual GUI tool 2d map creator/python3.

    I use my own concept: take lib only for the great benefits. It means that i import only stuff that i can’t make in proper way in proper time, all other coming from head. For example Physics was imported in role of npm package for typescript matter.js/ts variant and i keep dependency healthy.

    Old networking point [If you dont want kurento in backend and you wanna your own server code] It is nice if you wanna try. This works on 5$ VPS (node.js). https://github.com/zlatnaspirala/visual-ts-game-engine/tree/POINT_WITH_OWN_SERVER_OLD

    In networking aspect i use full-duplex connection under web-rtc protocol. Pretty nice working combination of physics and realtime-multiplayer connetions. HTMLRequest used only for loading html parts in run time (on request) and accounts{wip} because i want clear single page application with all PWA features inside. Also video chat is integrated based on OV server/kurento. You can start recording canvas gameplay with implemented record-canvas.

    For npm users

    Take a look project examples on: https://github.com/zlatnaspirala/visual-ts-examples

    It is nice starter project. Fixed all deps to make npm i visual-ts usable.

    API Documentation

    For github users

    git clone --recurse-submodules https://github.com/zlatnaspirala/visual-ts-game-engine After this command you can run GUI Python map creator tool.

    Whats good in this project:

    • visual-ts correspondent with RocketCraftingServer/mongoDB in context of session accounts.
    • Fast full-duplex connections based on webRTC [middleware/node.js] based on kurento OV server.
    • Multiplatform/Realtime Multiplayer features + Video chat comes with visual-ts.
    • No need for forums just follow stackoverflow.com and wc3.
    • Easy stage/production switch
    • Fast rebuild – Build single endpoint, Rebuild all
    • Luanch/Attacher debugger options implemented [for visual code]
    • Lib is not to much inself closed. Every intervention or used feature is exposed in high level in that way you can make very fast implementation of your own logic what ever will be.
    • You are not forced to use typescript you can always downgrade to javascript this comes with typescript inself.
    • Example multiplayer
    • Migrated to webpack5

    Simple there is nothing between you and making the app.

    • Written in typescript current version 4.2.4.
    • Package tool used webpack 5.5.0.
    • Text editor used and recommended: Last version of Visual Studio Code [1.95.x]. Luanch debugger configuration comes with this project (for server part). Or run server on Javascript Debug Terminal.
    • Physics engine based on Matter.js - Matter.ts (npm project).
    • Mobile controls / Tested on android Based on touch area bounds LEFT , UP, RIGHT (for platformer based gameplay, for now).

    Logo

    Landscape logo

    visualTS

    VisualTsGameEngine GUI tool 2d Map Creator made in python:

    visualTS

    Much more easyest way to make yor gameplay table sets is creator-2dmap python script. After installation of all needed modules vie pip3 for python3, you need to run:

    @Note If you use git clone --recurse-submodules https://github.com/zlatnaspirala/visual-ts-game-engine

    Then run creator@dmap with npm run creator

      // Windows
      python.exe tool.py
      // Macos - linux
      python3 ./tool.py

    Possible bug on oldies linux os mint. Bug related with tkinter lib.

    You need to change self.absolutePacksPath from defaults.py config file. Put example platformer pack folder path: src\examples\platformer\scripts\packs but path must be absolute, my personal path is (For windows users : use double \ for escape ):

    This is example for windows users:

    E:\\web_server\\xampp\htdocs\\PRIVATE_SERVER\\visual-ts\\project\\visual-ts\\src\\examples\\platformer\\scripts\\packs\\"

    Creator 2d map This is separated and added like git submodules.

    • This is freeware / opensource. There is no any limitation in this project. You can use video stream as gamePlay objects , multiplayer feature is also free.
    • Please don’t use fake email address to test public maximumroulette.com platformer example. Project even in dev stage is totally production approach. You can’t pass registration with fake email. Just clone, install and run in local (client & server). You need to install and run also MongoDB on your system. Change flag in databased confimed to the true value to skip registration confirmation process.

    Client part

    To make all dependency works in build proccess we need some plugins.

      npm install

    Command (current: single player solution build):

      npm run dev
      // or
      npm run dev-all

    Output for (npm run dev):

    ├── build/  (This is auto generated)
    |   ├── externals/
    |   ├── imgs/
    |   ├── styles/
    |   ├── templates/
    |   ├── app.html
    |   ├── manifest.web
    |   ├── offline.html
    |   ├── visualjs2.js
    |   ├── worker.js
    
    

    Navigate in browser /build/app.html to see client app in action

    New way of building multi entries.

    Command is npm run dev-all . This is test for multi instancing webpack capabilities. Webpack in this case use webpack.multicompile.config.js. Thanks for common object definition:

    This is best place to manage status of your build action. Just comment or uncomment specific webpack object in this place =>

    webpack.multicompile.config.js

    module.exports = [
      webPackModuleMultiPlayerSolution,
      webPackModuleSingleSimpleSolution,
      webPackModuleMultiChatBasketBall,
      webPackModuleTutorialsDemo1,
      // webPackModuleTutorialsDemo2  DISABLE HERE WHOLE SUB BUILD
    ];

    Point of Multi entries is to make independent healthy builds end point for our application. Current export’s for 3 solutions looks like (runs webpack.multicompile.config.js) :

    Command:

      npm run dev-all

    Output (npm run dev-all):

    ├── build/  (This is auto generated)
    |   ├── multiplayer/
    |   ├── singleplaye/
    |   ├── demo1/
    |   ├── demo2/
    |   ├── sprite-animation/
    |   ├── basket-ball-chat/ [WIP]
    
    

    -Client part is browser web application. No reloading or redirecting. This is single page application. I use html request only for loading local/staged html (like register, login etc.). Networking is based on webSocket full-duplex communication only. This is good cross for old fasion native programmers not for web server REST oriented skills. No mix in communication usage. You must be conform with classic socket connection methodology and your own idea about connections. webRTC can be used for many proporsion.

    Already implemented:

    • video chat webRTC (SIP) chat and data communication. based on multiRTC3 for all modern browser’s and hybryd implementation (android, ios etc.) (UDP/TCP). Running on socket.
    • Bonus connections options – Coordinator another brodcaster. Parallel multiRTC connections. Coordinator is disabled by default but can be used in same way just like broadcaster.
    • Simple facebook api script (addson).

    -Class ‘Connector’ (native webSocket) used for user session staff.

    • For main account session staff like login, register etc.

    Client config

    If you want web app without any networking then setup:

    appUseNetwork: boolean = false;

    You want to use communication for multiplayer but you don’t want to use server database account sessions. The setup this on false in main client config class. appUseAccountsSystem: boolean = false;

    • Networking is disabled or enabled depens on current dev status.

    Find configuration for client part at ./src/lib/client-config.ts

    Please read About Client Configuration

    Start dependency system from app.ts

    • First game template is Platformer. This is high level programming in this software. Class Platformer run with . Class Starter is base class for my canvas part (matter.js/ts). It is injected to the Platformer to make full operated work.
    • gamesList args for ioc constructor is for now just simbolic for now. (WIP)
    • In ioc you can make strong class dependency relations. Use it for your own structural changes. If you want to make light version for build than use ioc to remove everything you don’t need in build.

    ioc.ts files located at: src\controllers. In ioc file i import choosen classes and create instance or bind. Ioc also save (singleton) instance’s and we never make same class instance again (this is the role). We just call game.ioc.get.NAME_OF_INSTANCE. Object .get is key access object not array. Best practice is to use only one ioc. In that way you will get clear build without big shared in most time unnecessary data. If you application is big project.Than best way is still use one ioc.ts for per web page. In that way i use refresh or redirect moment to load optimised script bundle for current page.

    Main dependency file

    • Current version:
    /**
     * Import global css
     */
    require("./style/animations.css");
    require("./style/styles.css");
    
    import AppIcon from "./app-icon";
    import GamePlay from "./examples/platformer/scripts/game-play";
    import Ioc from "./controllers/ioc";
    
    /**
     * plarformerGameInfo
     * This is strong connection.
     * html-components are on the same level with app.ts
     * Put any parameters here.
     */
    const plarformerGameInfo = {
      name: "Platformer",
      title: "Start Platformer game play",
    };
    
    const gamesList: any[] = [plarformerGameInfo];
    
    const master = new Ioc(gamesList);
    const appIcon: AppIcon = new AppIcon(master.get.Browser);
    master.singlton(GamePlay, master.get.Starter);
    console.log("Platformer: ", master.get.GamePlay);
    
    master.get.GamePlay.attachAppEvents();
    
    /**
     * Make it global for fast access in console testing.
     * (window as any).platformer = master.get.GamePlay;
     */
    (window as any).master = master;
    (window as any).platformer = master.get.GamePlay;

    Recording your game

    Setup in client-config.ts:

      public recordCanvasOption: any = {
        injectCanvas: () => document.getElementsByTagName("canvas")[0],
        frameRequestRate: 30,
        videoDuration: 20,
        outputFilename: "record-gameplay.mp4",
        mineType: "video/mp4",
        resolutions: '800x600'
      }

    You can use this call:

    platformer.starter.ioc.get.RecordGamePlay.recordCanvas.run();

    About runup gameplay

    @Note Somethimes i override autoStartGamePlay!

    In client-config :

    Disabled at the moment for single-player solution. javascript

      private autoStartGamePlay: boolean = false;
    

    If you setup ‘autoStartGamePlay’ to false you need to run gamePlay with :

    javascript

      master.get.GamePlay.load()
    

    Note : Only singleton object instance from master start with upcase letters.

    Project structure

    • build/ is autogenerated. Don’t edit or add content in this folder.
    • src/ is main client part (Browser web application). Main file : app.ts
    • src/libs/ is common and smart pack of classes, interfaces etc. easy access.
    • server/ folder is fully indipendent server size. I use one git repo but consider ‘/server’ represent standalone application. There’s server package.json independently from client part also config is not the common. I just like it like that.
    ├── package.json
    ├── package-lock.json
    ├── webpack.config.js
    ├── tsconfig.json
    ├── tslint.json
    ├── launch.json
    ├── workplace.code-workspace
    ├── LICENCE
    logo.png
    LICENSE
    ├── build/  (This is auto generated)
    |   ├── externals/
    |   ├── templates/
    |   ├── imgs/
    |   ├── styles/
    |   |   └── favicon.ico
    |   ├── visualjs2.js
    |   ├── app.html
    ├── src/
    |   ├── style/
    |   |   ├── styles.css
    |   ├── controllers/
    |   |   ├── ioc.ts
    |   |   ├── ioc-single-player.ts
    |   ├── libs/
    |   |   ├── class/
    |   |   |   ├── networking/
    |   |   |   |   ├── rtc-multi-connection/
    |   |   |   |   |   ├── FileBufferReader.js
    |   |   |   |   |   ├── RTCMultiConnection2.js
    |   |   |   |   |   ├── RTCMultiConnection3.js
    |   |   |   |   |   ├── linkify.js
    |   |   |   |   |   ├── getHTMLMediaElement.js
    |   |   |   |   |   ├── socket.io.js
    |   |   |   |   ├── broadcaster.ts
    |   |   |   |   ├── coordinator.ts
    |   |   |   |   ├── connector.ts
    |   |   |   |   ├── network.ts
    |   |   |   ├── visual-methods/
    |   |   |   |   ├── sprite-animation.ts
    |   |   |   |   ├── text.ts
    |   |   |   |   ├── texture.ts
    |   |   |   ├── bot-behavior.ts
    |   |   |   ├── browser.ts
    |   |   |   ├── math.ts
    |   |   |   ├── position.ts
    |   |   |   ├── resources.ts
    |   |   |   ├── sound.ts
    |   |   |   ├── system.ts
    |   |   |   ├── view-port.ts
    |   |   |   ├── visual-render.ts
    |   |   ├── interface/
    |   |   |   ├── controls.ts
    |   |   |   ├── drawI.ts
    |   |   |   ├── global.ts
    |   |   |   ├── visual-components.ts
    |   |   |   ├── networking.ts
    |   |   ├── multiplatform/
    |   |   |   ├── mobile/
    |   |   |   |   ├── player-controls.ts
    |   |   |   ├── global-event.ts
    |   |   ├── types/
    |   |   |   ├── global.ts
    |   |   ├── client-config.ts
    |   |   ├── ioc.ts
    |   |   ├── starter.ts
    |   ├── icon/ ...
    |   ├── examples/
    |   |   ├── platformer/
    |   |   ├── platformer-single-player/
    |   |   ├── basket-ball-chat/
    |   |   ├── tutorials/      (Most simple example of usage)
    |   |   |   ├── add-camera-stream-to-gameplay/
    |   |   |   ├── add-element/
    |   ├── html-components/
    |   |   ├── register.html
    |   |   ├── login.html
    |   |   ├── games-list.html
    |   |   ├── user-profile.html
    |   |   ├── store.html
    |   |   ├── broadcaster.html
    |   ├── index.html
    |   ├── app-icon.ts
    |   └── app.ts
    |   └── manifest.web
    └── server/
    |   ├── package.json
    |   ├── package-lock.json
    |   ├── server-config.js
    |   ├── database/
    |   |   ├── database.js
    |   |   ├── common/
    |   |   ├── email/
    |   |   |   ├── templates/
    |   |   |   |   ├── confirmation.html.js
    |   |   |   ├── nocommit.js (no commited for now)
    |   |   └── data/ (ignored - db system folder)
    |   ├── rtc/
    |   |   ├── server.ts
    |   |   ├── connector.ts
    |   |   ├── self-cert/
    
    

    About Dev Prodc regime

    Enum: dev, prod, mongodb.net or mongodb.net-dev

    Explanation for: this.serverMode = “mongodb.net-dev”; If you wanna use mongod.net database but you wanna use it from localhost. Multiplayer (with videochat or realtime net) still use https. For single player variant you can use http.

    Audios

    Audios are not loaded by defoult if you use it in IOC controller. You create audio instance from code. You can mute it all.

    Add new sound

    • Open webpack and add line: [After this you need to restart webpack.]
    new CopyWebpackPlugin([
      ...
      // Audios
      {from: "./src/examples/platformer-single-player/audios/player/dead.mp3", to: "audios/newAudio1.mp3"}
      {from: "./src/examples/platformer-single-player/audios/player/dead.mp3", to: "audios/newAudio2.mp3"}
    ], { debug: 'warn' })
    
    • Find nice place for creating instance:
    myInstance.starter.ioc.get.Sound.createAudio(
      "./audios/newAudio1.mp3",
      "newAudio1"
    );
    myInstance.starter.ioc.get.Sound.createAudio(
      "./audios/newAudio2.mp3",
      "newAudio2"
    );
    • Find place where you wanna run play:
    root.starter.ioc.get.Sound.playById("jump");

    General networking config:

    About generating localhost certs

    Read more about cert serverMode dev od prod use https protocol to make full works on both regime (If you using multiplayer example). You need to install cert (mmc.exe) (for User or local Mashine), also in browser:

    GUI Tools

    To get GUI tools first download python3 for your OS. creator2dmap is python3 canvas oriented application.

      cd tools
      git submodule init
      git submodule update
      // or
      git clone --recurse-submodules https://github.com/zlatnaspirala/visual-ts-game-engine
    
      // update
      git fetch
      git merge

    In this way you will get project: https://github.com/zlatnaspirala/creator-2dmap intro tools/creator2dmap/ folder.

    Start application with:

      python.exe tool.py (win)
      ./python3 tool.py (macos)
    

    Documentation:

    Follow link for API: [WIP] Application documentation

    Possible to install from (It’s good for instancing new clear base project):

      npm i --save visual-ts
    

    Take a look this repo (it is example for approach npm i visual-ts) https://github.com/zlatnaspirala/visual-ts-module

    If you wanna generate doc you will need manual remove comment from plugin section in webpack.config.js. Restart ‘npm run dev’

    If you wanna insert some new html page just define it intro webpack.config.js:

    plugins : [
            new HtmlWebpackPlugin({
                filename: '/templates/myGameLobby.html',
                template: 'src/html-components/myGameLobby.html'
            }),
    ...
    • See register and login example.

    Code format :

      npm run fix
      npm run tslint

    or use :

      tslint -c tslint.json 'src/**/*.ts' --fix
      tslint -c tslint.json 'src/**/*.ts'

    Abour visual tools

    Based on python3 tk tech.It is standalone git project imported like git submodule.

    https://github.com/zlatnaspirala/creator-2dmap

    Important – About tools setup

    After setup run python app from cli with command:

      npm run creator

    Creator 2d map


    Public stage server / Tutorial demos

    ACTUALLY SERVER IS RUNNING – You need to register.

    Basic examples – How to create instance of engine. With minimum elements and features.

    Platformer example without networking, without account session

    Multiplayer – Without Account session

    Multiplayer/webCam inside gamePlay – With Account session


    Licence && Credits

    Visual Typescript Game engine is under:

    MIT License generaly

    except ./src/lib. Folder lib is under:

    GNU LESSER GENERAL PUBLIC LICENSE Version 3

    External licence in this project:

    – Networking based on:
    Kurento OpenVidu server [openvidu-browser-2.20.0] https://openvidu.io/

    – Base physics beased on :
    Matter.js https://github.com/liabru/matter-js

    Sprites downloaded from (freebies/no licence sites):

    In Dreams by Scott Buckley | www.scottbuckley.com.au Music promoted by https://www.chosic.com/free-music/all/ Attribution 4.0 International (CC BY 4.0) https://creativecommons.org/licenses/by/4.0/

    Todo list for 2025

    I’am still far a away from project objective :

    • Create examples demos in minimum 20 game play variants (table games, actions , platformers , basic demo trow the api doc etc.).

    Platformer

    Donate my work

    Please join this project and make collaboration

    Visit original content creator repository
  • BandejApp


    Release License
    Status

    AboutDocumentationDevelopmentTechnologiesLayoutAuthorsCertificationsLicense
    Português (BR)English


    💻 About the Project

    BandejApp is a management system for university restaurants designed to reduce food waste by providing more efficient management. The application allows users to pre-register their meals, confirm attendance, evaluate service quality, and submit improvement suggestions. Administrators have access to detailed data on the number of people who registered and confirmed their attendance, enabling better planning of the food quantities to be prepared and redistributed among the university restaurant’s units. Additionally, administrators can publish announcements and view user suggestions and reviews.

    This project was conceived by Letícia de Oliveira Gago and, under the guidance of Flávio Luiz Seixas, several meetings were conducted to develop a technological solution to reduce food waste in university restaurants, ultimately leading to the creation of BandejApp. After the application was fully operational, a usability test was conducted using the SUS (System Usability Scale), which yielded satisfactory results. (more details).

    The project was presented to the Superintendency of Information Technology at the Fluminense Federal University for incorporation into the university restaurant’s official application. Currently, this integration is in the implementation phase.

    Project available at: https://bandejapp.infinityfreeapp.com.

    📋 Documentation

    🧑🏻‍💻 Development

    🛠 Technologies

    Website (PHP + Laravel)

    For more details on the project’s configurations, refer to composer.json.

    Database

    Hosting

    Services and Add-ons

    Utilities

    🎨 Layout

    The application layout is available on Figma:

    Authentication Screens (Mobile)


    Login

    Sign up

    User Screens (Mobile)


    Monthly planning (register meals)

    Dashboard (upcoming meals)

    Meal review

    Improvement suggestions

    Informative notices

    Menu (user)

    Admin Screens (Mobile)


    Dashboard (menus not defined)

    Table of registered and confirmed users

    Menu definition

    Menu editing

    Dashboard (menu set)

    Menu viewing

    Notice publishing

    Improvement suggestions

    Menu (admin)

    ✒ Authors

    Lucas Pimenta
    Lucas Pimenta
    Letícia Gago
    Letícia Gago
    Flávio Seixas
    Flávio Seixas

    📜 Certifications

    This software is protected by copyright, according to the following certifications issued by INPI:

    📝 License

    This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).

    Visit original content creator repository
  • peer-base

    peer-base

    Build real-time collaborative DApps on top of IPFS

    Build Status Greenkeeper badge made by Protocol Labs

    Documentation

    Install

    $ npm install peer-base

    Import

    const PeerBase = require('peer-base')

    API

    API docs

    Run example app

    Clone this repo.

    $ cd peer-base
    $ cd examples/react-app
    $ npm install

    In a different window, on the same dir, start the rendezvous server:

    $ npm run start:rv

    In a different window, on the same dir, run the app server:

    $ npm start

    Open http://localhost:3000 and test the app.

    Tests

    Clone this repo and run:

    $ npm install
    $ npm test
    

    Testing a deployed pinner

    If you want to make sure your deployed pinner is working correctly, there is a utility-test that you can run with npm run test:post-deploy that will ensure your deployed pinner works correctly.

    First you need to export environment variables to ensure the assertion values are correct for your environment, then you can run the test. Example:

    export PEER_BASE_APP_NAME=peer-pad/2
    export PEER_BASE_SWARM_ADDRESS=/dns4/localhost/tcp/9090/ws/p2p-websocket-star
    export PEER_BASE_PINNER_ID=Qmb9WDZUnUzEmZwkbMMGi4cV65F1sqcQa49dfZy9baRBJo
    npm run test:post-deploy
    

    Infrastructure

    The infrastructure for peer-base and related applications is managed via https://github.com/peer-base/peer-base/

    Debug

    You can activate the debugging logs by manipulating the DEBUG environment variable. Example:

    $ DEBUG=peer-star:* npm test

    For file-specific DEBUG values, see the source code and look for usages of the debug package.

    Lead Maintainer

    Jim Pick

    Contribute

    Peer-base and the IPFS implementation in JavaScript is a work in progress. As such, there’s a few things you can do right now to help out:

    • Check out existing issues. This would be especially useful for modules in active development. Some knowledge of IPFS may be required, as well as the infrastructure behind it – for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
    • Perform code reviews. More eyes will help (a) speed the project along, (b) ensure quality, and (c) reduce possible future bugs.
    • Add tests. There can never be enough tests.

    Want to hack on peer-base?

    License

    MIT

    Visit original content creator repository
  • todomvc

    Getting Started with Create React App

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    yarn start

    Runs the app in the development mode.
    Open http://localhost:3000 to view it in the browser.

    The page will reload if you make edits.
    You will also see any lint errors in the console.

    yarn test:unit

    Launches the test runner in the interactive watch mode.
    See the section about running tests for more information.

    yarn build

    Builds the app for production to the build folder.
    It correctly bundles React in production mode and optimizes the build for the best performance.

    The build is minified and the filenames include the hashes.
    Your app is ready to be deployed!

    See the section about deployment for more information.

    yarn eject

    Note: this is a one-way operation. Once you eject, you can’t go back!

    If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

    Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

    You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

    Learn More

    You can learn more in the Create React App documentation.

    To learn React, check out the React documentation.

    Visit original content creator repository