Rupert  Beatty

Rupert Beatty

1666206840

DevUtils-app: All-in-one toolbox for Developers. Native MacOS App

DevUtils.app

Developer Utilities for macOS

Format/Validate JSON, encode/decode Base64, convert timestamps, debug JWT… with just one click! Native macOS app and works offline.

A friendly note ❤️

DevUtils is a paid "source-available" app. That means I'm selling the pre-built version of the app. It takes time and effort to develop, distribute, maintain, and provide supports. If you like the app, please consider buying here (one-time purchase). That would help me a lot! Thank you very much! 🙏

Source code

This source code is a delayed version of DevUtils.

Development environment:

  • Swift 5.1+
  • Xcode 11.1+
  • Swift Package Manager
  • Carthage

Build Instructions

Clone repository.

Bootstrap carthage, this will install the required dependencies for the app:

carthage bootstrap --platform macOS

Update signing Team to be your Personal or organizational Team in Xcode. This is needed to build the app locally. If you have problems with code signing, please also check these articles to see if it helps:

Run the app in Xcode.

Contributing

Please see CONTRIBUTING.md

Contact

Download Details:

Author: DevUtilsApp
Source Code: https://github.com/DevUtilsApp/DevUtils-app 
License: View license

#swift #dev #utils #macos 

DevUtils-app: All-in-one toolbox for Developers. Native MacOS App

StringUtils.jl: String Utilities for Julia

StringUtils

The StringUtils package in a work-in-progress, where I am placing various improvements on the String functionality in Julia language.

Currently, it adds a Swift style string macro, u"...", which uses the Swift syntax for interpolation, i.e. \(expression). This means that you never have to worry about strings with the $ character in them, which is rather frequent in some applications. Also, Unicode sequences are represented as in Swift, i.e. as \u{hexdigits}, where there can be from 1 to 6 hex digits. This syntax eliminates having to worry about always outputting 4 or 8 hex digits, to prevent problems with 0-9,A-F,a-f characters immediately following. Finally, I have added four ways of representing characters in the literal string, \:emojiname:, \<latexname>, \&htmlname; and \N{UnicodeName}. This makes life a lot easier when you want to keep the text of a program in ASCII, and also to be able to write programs using those characters that might not even display correctly in their editor.

This now has some initial formatting capability, based on Tom Breloff's wonderful PR #10 to the JuliaIO/Formatting.jl package (by Dahua Lin and other contributors).

\%(arguments) is interpolated as a call to fmt(arguments). This is especially useful when defaults have been set for the type of the first argument.

fmt_default!{T}(::Type{T}, syms::Symbol...; kwargs...) sets the defaults for a particular type. fmt_default!(syms::Symbol...; kwargs...) sets the defaults for all types. Symbols that can currently be used are: :ljust or :left, :rjust or :right, :commas, :zpad or :zeropad, and :ipre or :prefix. reset!{T}(::Type{T}) resets the defaults for a particular type. defaultSpec(x) will return the defaults for the type of x, and defaultSpec{T}(::Type{T}) will return the defaults for the given type.

This also adds support for \%ccc(arguments), where ccc is one or more characters of a single C style format specification, which is interpolated as a call to cfmt("ccc", arguments).

I'm also experimenting with adding Python style syntax (as much as possible), as u"{pythonformat}"

Download Details:

Author: ScottPJones
Source Code: https://github.com/ScottPJones/StringUtils.jl 
License: View license

#julia #string #utils 

StringUtils.jl: String Utilities for Julia

MessageUtils.jl: Channels(), Tspaces(), Kvspaces() and More

MessageUtils

A collection of utilities for messaging

Channels

Channels are like RemoteRefs, execpt that they are modelled as a queue and hence can hold more than one message.

channel(pid=myid(); T=Any, sz=1000) constructs a channel on process pid, holds objects of type T with a maximum number of entries sz.

The channel constructor returns an object reference of type SyncObjRef{RemoteChannel} which can be passed around safely across processes.

isready(c), fetch(c), take!(c) and put!(c, v) have the same behaviour as the RemoteRef equivalents.

fetch and take! block if there are no elements.

put! blocks if the channel already has sz elements present.

fetch, take! and put! all accept an optional keyword argument timeout which specifies the maximum number of seconds to block. If the request cannot be fulfilled within the requested time a MUtilTimeOutEx exception is thrown.

TSpaces

TSpaces are tuple spaces. They store tuples, the first element of each tuple is a key to the tuple.

The tuples are stored as a queue and duplicates are allowed.

tspace(pid=myid(); sz=1000) constructs a new tuple space and returns a SyncObjRef{RemoteTSpace}

put!(ts, v::Tuple) adds a tuple v into the space ts.

isready(ts,k), fetch(ts, k) and take!(ts, k) all require the key k to be specified when used on a tuple space ts. It is matched against the first element of the tuples in the space.

If k is a Regex object, it is matched against all tuples where the firest element is a String

fetch, take! and put! all accept an optional keyword argument timeout which specifies the maximum number of seconds to block. If the request cannot be fulfilled within the requested time a MUtilTimeOutEx exception is thrown.

KVSpaces

This is a key-value store.

kvspace(pid=myid(); sz=1000) constructs a new key-value space and returns a SyncObjRef{RemoteKVSpace}. Duplicates are not allowed. A put! with an existing key overwrites the existing value

put!(kvs, k, v) adds key k and value v into the space kvs.

isready(kvs,k), fetch(kvs, k) and take!(kvs, k) all require the key k to be specified when used on a kv space kvs.

fetch, take! and put! all accept an optional keyword argument timeout which specifies the maximum number of seconds to block. If the request cannot be fulfilled within the requested time a MUtilTimeOutEx exception is thrown.

ctasks - Tasks with Channels

ctasks are named tasks with channels. The channels are used for messaging with the task.

ctask(f::Function; pid=myid(), name="") returns a CTask object that can be passed around processors.

f is the function lanuched on processor pid. The ctask runs till function f terminates. If name is specified, the task is addressable by name. The name-ctask mapping is stored in a KV Space on pid 1.

Every ctask has two channels associated with it. One for incoming messages and one for outbound messages.

The following functions can be used to send/recv messages from these channels.

put!(msg::Tuple) appends a message to a tasks outbound channel

put!(ct::CTask, msg::Tuple) appends a message to task ct's inbound channel

put!(ctname::String, msg::Tuple) appends a message to task addressed by ctname's inbound channel

take!() pops a message from the current tasks inbound channel

take!(ct::CTask) pops a message from task ct's outbound channel

take!(ctname::String) pops a message from the task addressed by ctname's outbound channel

The pipelining operator |> can be used to send a message to a task. For example:

(:test_msg, "Hello") |> ct will add the tuple (:test_msg, "Hello") to ct's inbound channel

put!, take! both accept an optional keyword argument timeout which specifies the maximum number of seconds to block. If the request cannot be fulfilled within the requested time a MUtilTimeOutEx exception is thrown.

Note: The Julia 0.3 compatible version has send/recv in place of put!/take. This has been renamed in 0.4 for consistency.

Download Details:

Author: JuliaParallel
Source Code: https://github.com/JuliaParallel/MessageUtils.jl 
License: View license

#julia #message #utils 

MessageUtils.jl: Channels(), Tspaces(), Kvspaces() and More

SymbolicUtils.jl: Expression Rewriting and Simplification

SymbolicUtils.jl 

SymbolicUtils.jl provides various utilities for symbolic computing. SymbolicUtils.jl is what one would use to build a Computer Algebra System (CAS). If you're looking for a complete CAS, similar to SymPy or Mathematica, see Symbolics.jl. If you want to build a crazy CAS for your weird Octonian algebras, you've come to the right place.

Symbols in SymbolicUtils carry type information. Operations on them propagate this information. A rule-based rewriting language can be used to find subexpressions that satisfy arbitrary conditions and apply arbitrary transformations on the matches. The library also contains a set of useful simplification rules for expressions of numeric symbols and numbers. These can be remixed and extended for special purposes.

If you are a Julia package develper in need of a rule rewriting system for your own types, have a look at the interfacing guide.

Go to the manual

SymbolicUtils.jl is on the general registry and can be added the usual way:

pkg> add SymbolicUtils

or

julia> using Pkg; Pkg.add("SymbolicUtils")

"I don't want to read your manual, just show me some cool code"

julia> using SymbolicUtils

julia> SymbolicUtils.show_simplified[] = true

julia> @syms x::Real y::Real z::Complex f(::Number)::Real
(x, y, z, f(::Number)::Real)

julia> 2x^2 - y + x^2
(3 * (x ^ 2)) + (-1 * y)

julia> f(sin(x)^2 + cos(x)^2) + z
f(1) + z

julia> r = @rule sinh(im * ~x) => sin(~x)
sinh(im * ~x) => sin(~x)

julia> r(sinh(im * y))
sin(y)

julia> simplify(cos(y)^2 + sinh(im*y)^2, RuleSet([r]))
1

Citations

  • The pattern matcher is an adaption of the one by Gerald Jay Sussman (as seen in 6.945 at MIT), his use of symbolic programming in the book SICM inspired this package.
  • Rewrite.jl and Simplify.jl by Harrison Grodin also inspired this package.

Documentation

Download Details:

Author: JuliaSymbolics
Source Code: https://github.com/JuliaSymbolics/SymbolicUtils.jl 
License: View license

#julia #symbol #utils 

SymbolicUtils.jl: Expression Rewriting and Simplification

PkgUtils.jl: Tools for analyzing Julia Packages

PkgUtils.jl

This package contains tools for analyzing Julia packages.

For now, it provides tools to build a highly simplified package search engine that can be queried as a service:

Example

Build a simplified search engine service:

using PkgUtils
PkgUtils.runservice()

Run a search website:

cd .julia/PkgUtils
julia scripts/server.jl
open site/index.html

Download Details:

Author: johnmyleswhite
Source Code: https://github.com/johnmyleswhite/PkgUtils.jl 

#julia #utils #tool 

PkgUtils.jl: Tools for analyzing Julia Packages
Rocio  O'Keefe

Rocio O'Keefe

1660754940

SnippetCoderUtils: A Utility Package Built with Flutter SDK

snippetcoder_utils

SnippetCoderUtils is a Utility package built with Flutter SDK to make Flutter development easier and more enjoyable than ever.

Features

  • FormHelper Utility to create custom UI TextBox, DropDown, Buttons.
  • DataTable Utility with Generic Collection, Sorting, Edit, Delete & Custom Action Button
  • ProgressHUD (Heads Up Display)
  • Hex Color Converter.
  • Multiple Image Picker with Add and Remove image.

Install

Add this to your pubspec.yaml file:

dependencies:
  snippetcoder_utils: ^1.0.12

Usage

FormHelper

This utility will be used to create custom UI TextBox, DropDown, Buttons.

FormHelper - inputFieldWidget

 FormHelper.inputFieldWidget(
    context,
    "host",
    "Host URL",
    (onValidateVal) {
    if (onValidateVal.isEmpty) {
        return 'Host URL can\'t be empty.';
    }

    return null;
    },
    (onSavedVal) => {
        this.loginModel.host = onSavedVal,
    },
    initialValue: this.loginModel.host,
    obscureText: false,
    borderFocusColor: Theme.of(context).primaryColor,
    prefixIconColor: Theme.of(context).primaryColor,
    borderColor: Theme.of(context).primaryColor,
),

FormHelper.submitButton(
    "Login",
    () {
    
    },
    btnColor: Theme.of(context).primaryColor,
    borderColor: Theme.of(context).primaryColor,
    txtColor: Colors.black,
),

FormHelper - inputFieldWidgetWithLabel

FormHelper.inputFieldWidgetWithLabel(
    context,    
    "name",
    "Category Name",
    "",
    (onValidateVal) {
    if (onValidateVal.isEmpty) {
        return 'Category Name can\'t be empty.';
    }

    return null;
    },
    (onSavedVal) => {
        this.categoryModel.name = onSavedVal,
    },
    initialValue: this.categoryModel.name,
    obscureText: false,
    borderFocusColor: Theme.of(context).primaryColor,
    prefixIconColor: Theme.of(context).primaryColor,
    borderColor: Theme.of(context).primaryColor,
    borderRadius: 10,
    paddingLeft: 0,
    paddingRight: 0,
    showPrefixIcon: true,
    prefixIcon: Icon(Icons.web),
    onChange: (val) {},
),
FormHelper.inputFieldWidgetWithLabel(
    context,   
    "description",
    "Category Description",
    "",
    (onValidateVal) {
    return null;
    },
    (onSavedVal) => {
        this.categoryModel.description = onSavedVal,
    },
    initialValue: this.categoryModel.description,
    obscureText: false,
    borderFocusColor: Theme.of(context).primaryColor,
    prefixIconColor: Theme.of(context).primaryColor,
    borderColor: Theme.of(context).primaryColor,
    borderRadius: 10,
    paddingLeft: 0,
    paddingRight: 0,
    showPrefixIcon: true,
    prefixIcon: Icon(Icons.web),
    isMultiline: true,
    onChange: (val) {},
),

Constructors Parameters

ParameterTypeOptionalDescription
contextBuildContextNOPass the current build context.
keyNameStringNOKey for the textbox, should be unique for every textbox.
labelNameStringNOLabelName will be used if using inputFieldWidgetWithLabel method to show label with TextBox.
hintTextStringNOUsed to show placeholder in textbox
onValidateFunction(String)NOFired on textbox Validation
onSavedFunction(String)NOFires on form Saved.
onChangeFunction(String)YESFires when textbox value changed.
initialValueStringYESUsed for showing initial value in textbox.
obscureTextboolYESUsed for showing or hiding text. Default value = false
fontSizedoubleYESUsed for TextFormField font size. Default value = 18
hintFontSizedoubleYESUsed for TextFormField hint font size. Default value = 15
paddingLeftdoubleYESUsed for TextFormField Container padding left. Default value = 20
paddingRightdoubleYESUsed for TextFormField Container padding right. Default value = 20
paddingTopdoubleYESUsed for TextFormField Container padding top. Default value = 0
paddingBottomdoubleYESUsed for TextFormField Container padding bottom. Default value = 0
suffixIconWidgetYESUsed for TextFormField SuffixIcon Widget
borderRadiusdoubleYESUsed for TextFormField Border Radius. Default value = 30
borderColorColorYESUsed for TextFormField Border Color. Default value = Colors.redAccent
borderFocusColorColorYESUsed for TextFormField Border Focus Color. Default value = Colors.redAccent
showPrefixIconboolYESUsed for Show/Hide Prefix Icon. Default value = Colors.true
prefixIconIconYESUsed to show Prefix Icon
prefixIconColorColorYESUsed for PrefixIcon Color. Default value = Colors.redAccent
prefixIconPaddingLeftdoubleYESUsed for PrefixIcon Padding Left. Default value = 30
prefixIconPaddingRightdoubleYESUsed for PrefixIcon Padding Right. Default value = 10
prefixIconPaddingTopdoubleYESUsed for PrefixIcon Padding Top. Default value = 0
prefixIconPaddingBottomdoubleYESUsed for PrefixIcon Padding Bottom. Default value = 0
isMultilineboolYESUsed for making TextFormField Multiline. Default value = false
textColorColorYESUsed for TextFormField Text Color. Default value = Colors.black
hintColorColorYESUsed for TextFormField Hint Color. Default value = Colors.black
validationColorColorYESUsed for TextFormField Validations Color. Default value = Colors.redAccent
borderWidthdoubleYESUsed for Border Width. Default value = 2
focusedBorderWidthdoubleYESUsed for Focus Border Width. Default value = 2
enabledBorderWidthdoubleYESUsed for Enabled Border Width. Default value = 1
contentPaddingdoubleYESUsed for Content Padding. Default value = 6
multilineRowsdoubleYESUsed for Multiline Texbox no. of Rows. Default value = 4
isNumericdoubleYESUsed for Numeric Texbox for showing numeric keyboard. Default value = false
backgroundColorColorYESUsed for Texbox background color. Default value = Colors.transparent

FormHelper - dropDownWidget

 List<dynamic> productTypesList = [];
 this.productTypesList.add({"id": "simple", "name": "Simple"});
 this.productTypesList.add({"id": "variable", "name": "Variable"});

 FormHelper.dropDownWidget(
    context,
    "Select Product Type",
    "",
    this.productTypesList,
    (onChangedVal) {
        this.requestModel.productType = onChangedVal! ?? "";
    },
    (onValidateVal) {
        if (onValidateVal == null) {
            return 'Please Select Product Type';
        }

        return null;
    },
    borderFocusColor: Theme.of(context).primaryColor,
    borderColor: Theme.of(context).primaryColor,
    borderRadius: 10,
),

FormHelper - dropDownWidgetWithLabel

 List<dynamic> productTypesList = [];
 this.productTypesList.add({"val": "1", "label": "Simple"});
 this.productTypesList.add({"val": "2", "label": "Variable"});

 FormHelper.dropDownWidgetWithLabel(
    context,
    "Product Type"
    "Select Product Type",
    "",
    this.productTypesList,
    (onChangedVal) {
        this.requestModel.productType = onChangedVal! ?? "";
    },
    (onValidateVal) {
        if (onValidateVal == null) {
            return 'Please Select Product Type';
        }

        return null;
    },
    borderFocusColor: Theme.of(context).primaryColor,
    borderColor: Theme.of(context).primaryColor,
    borderRadius: 10,
    optionValue: "val",
    optionLabel: "label"
),

Constructors Parameters

ParameterTypeOptionalDescription
contextBuildContextNOPass the current build context.
labelNameStringNOLabelName will be used if using dropDownWidgetWithLabel method to show label with Dropdown.
hintTextStringNOUsed to show Hint Text in Dropdown
valueDynamicNOUsed for showing initial value in Dropdown.
lstDataList<dynamic>NODropdown list Data
onChangedFunction(String)YESFires when dropdown value changed.
onValidateFunction(String)NOFired on dropdown Validation
hintFontSizedoubleYESUsed for DropdownField hint font size. Default value = 15
borderColorColorYESUsed for DropdownField Border Color. Default value = Colors.redAccent
borderRadiusdoubleYESUsed for DropdownField Border Radius. Default value = 30
borderFocusColorColorYESUsed for DropdownField Border Focus Color. Default value = Colors.redAccent
paddingLeftdoubleYESUsed for DropdownField Container padding left. Default value = 20
paddingRightdoubleYESUsed for DropdownField Container padding right. Default value = 20
paddingTopdoubleYESUsed for DropdownField Container padding top. Default value = 0
paddingBottomdoubleYESUsed for DropdownField Container padding bottom. Default value = 0
optionValueStringYESUsed for DropdownField Option Value Column Mapping from Data Collection. Default value = id
optionLabelStringYESUsed for DropdownField Option Label Column Mapping from Data Collection. Default value = name
contentPaddingdoubleYESUsed for Content Padding. Default value = 6
validationColorColorYESUsed for TextFormField Validations Color. Default value = Colors.redAccent
textColorColorYESUsed for TextFormField Text Color. Default value = Colors.black
hintColorColorYESUsed for TextFormField Hint Color. Default value = Colors.black
borderWidthdoubleYESUsed for Border Width. Default value = 2
focusedBorderWidthdoubleYESUsed for Focus Border Width. Default value = 2
enabledBorderWidthdoubleYESUsed for Enabled Border Width. Default value = 1
suffixIconWidgetYESUsed for TextFormField SuffixIcon Widget
prefixIconIconYESUsed to show Prefix Icon
showPrefixIconboolYESUsed for Show/Hide Prefix Icon. Default value = Colors.true
prefixIconColorColorYESUsed for PrefixIcon Color. Default value = Colors.redAccent
prefixIconPaddingLeftdoubleYESUsed for PrefixIcon Padding Left. Default value = 30
prefixIconPaddingRightdoubleYESUsed for PrefixIcon Padding Right. Default value = 10
prefixIconPaddingTopdoubleYESUsed for PrefixIcon Padding Top. Default value = 0
prefixIconPaddingBottomdoubleYESUsed for PrefixIcon Padding Bottom. Default value = 0

ListUtils

This utility will be used to create DataTable list with Generic Collection, Sorting, Edit, Delete & Custom Action Button

 return ListUtils.buildDataTable<CategoryModel>(
    context,
    ["Name", "Description", ""],
    ["name", "description", ""],
    sortAscending,
    sortColumnIndex,
    model.categoriesList,
    (CategoryModel onEditVal) {
        print(onEditVal.name);
    },
    (CategoryModel onRemoveVal) {
        print(onRemoveVal.id);
    },
    onSort: (columnIndex, columnName, ascending) {
        print(columnName);
        print(ascending);
    },
    headingRowColor: Theme.of(context).primaryColor,
    actionWidget: Icon(
       Icons.add,
       color: Colors.red,
    ),
    onActionTap: (CategoryModel model) {
        print(model.id);
    },
);

Constructors Parameters

ParameterTypeOptionalDescription
contextBuildContextNOPass the current build context.
columnsList<String>NOPass the column name in string array.
fieldsList<String>NOPass the field name in string array.
sortAscendingboolNOIf sorting in ascending order pass true else false.
sortColumnIndexnumberNOColumn index of sorting based on.
listOfDatadynamicNODataSource for the DataTable list.
onEditTapFunction(dyanmic)NOFires when an edit is tapped and model will be return.
onDeleteTapFunction(dyanmic)NOFires when an delete is tapped and model will be return.
onSortFunction(String, String, String)YESFires when an column is click for sorting and it will return columnIndex, columnName, ascending.
headingRowHeightnumberYESUsed for header row height. Default value = 45
headingRowColorColorYESUsed for header row color. Default value = Colors.redAccent
columnTextFontSizedoubleYESUsed for column Text font size. Default value = 15
columnTextBoldboolYESUsed for column Text bold. Default value = true
columnSpacingboolYESUsed for column spacing. Default value = 30
actionWidgetWidgetYESUsed for adding custom action button just like edit and delete icon.
onActionTapFunction(dyanmic)YESFires when an custom action button is tapped and model will be return.
actionEditWidgetboolYESUsed for making any custom Edit Widget
actionDeleteWidgetboolYESUsed for making any custom Delete Widget

ProgressHUD (Heads Up Display)

It's helpful to give the user an indication that content is being loaded while the app sends a network request to get new data.

When we start any network call we will set isApiCallProcess = true, when the network call completed we will set back isApiCallProcess = false

bool isApiCallProcess = false;
return Scaffold(
    appBar: _buildAppBar(),
    body: ProgressHUD(
        child: pageUI(),
        inAsyncCall: isApiCallProcess,
        opacity: 0.3,
    ),
);

Constructors Parameters

ParameterTypeDescription
childWidgetAssign the widget need to show.
inAsyncCallboolVariable used to show or hide loader.
opacitydoubleUsed for transparency of background.

HexColor

This will be used to convert any HEX color to Flutter Color.

color: HexColor("#FC4136"),

Constructors Parameters

ParameterTypeDescription
hexColorStringHexCode for conversion.

MultiImagePicker

This widget will be used to show multi select images using Camera or Gallery.

To get updated images collection, you can use the onImageChanged parameter.

List<Object> images = [];

MultiImagePicker(
    totalImages: 6,
    imageSource: ImagePickSource.camera,
    initialValue: this.productModel.images.map((e) => e.src).toList(), //for showing images from collection
    onImageChanged: (images) {
        this.images = images;
    },
),

Constructors Parameters

ParameterTypeDescription
totalImagesnumberSet the total number of images to be show.
imageSourceImagePickSourceChange the Image Source. Can be either  ImagePickSource.camera or ImagePickSource.gallery.
initialValueList<String>Used for showing default images.
onImageChangedFunction(List<Object>)Fires when an image is added or deleted.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add snippet_coder_utils

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  snippet_coder_utils: ^1.0.12

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:snippet_coder_utils/FormHelper.dart';
import 'package:snippet_coder_utils/ProgressHUD.dart';
import 'package:snippet_coder_utils/hex_color.dart';
import 'package:snippet_coder_utils/list_helper.dart';
import 'package:snippet_coder_utils/multi_images_utils.dart';

Donate

If you like my work, you can support me buying a cup of ☕

Copyright & License

Code and documentation Copyright 2021 SnippetCoder. Code released under the Apache License. Docs released under Creative Commons.

Original article source at: https://pub.dev/packages/snippet_coder_utils 

#flutter #dart #coder #utils 

SnippetCoderUtils: A Utility Package Built with Flutter SDK
Royce  Reinger

Royce Reinger

1658538120

Unicode_utils: Unicode Algorithms for Ruby 1.9

Unicode Utils - Unicode algorithms for Ruby 1.9

UnicodeUtils implements Unicode algorithms for case conversion, normalization, text segmentation and more in pure Ruby code.

Installation

Install with RubyGems:

gem install unicode_utils

Or get the source from Github: github.com/lang/unicode_utils and follow the instructions in INSTALL.txt.

UnicodeUtils works with Ruby 1.9.1 or later.

Synopsis

require "unicode_utils/upcase"

UnicodeUtils.upcase("weiß") => "WEISS"

UnicodeUtils.upcase("i", :tr) => "İ"

Start with the UnicodeUtils module in the API documentation for complete documentation.

Links

Online documentation

unicode-utils.rubyforge.org

Source code

github.com/lang/unicode_utils

Rubyforge project

rubyforge.org/projects/unicode-utils

Home of the Unicode Consortium

unicode.org

Who?

UnicodeUtils is written by Stefan Lang. You can contact me at langstefan AT gmx.at. Contributions welcome!

Author: lang
Source Code: https://github.com/lang/unicode_utils 
License: BSD-2-Clause license

#ruby #unicode #utils 

Unicode_utils: Unicode Algorithms for Ruby 1.9
Hermann  Frami

Hermann Frami

1657129200

Serverless Plugin Utils

serverless-plugin-utils 

A collection of serverless framework utilities

Installation

npm install -D serverless-plugin-utils 
# or 
yarn add -D serverless-plugin-utils

Usage

Add the serverless-plugin-utils entry to the plugins section of your serverless file.

plugins:
 - serverless-plugin-utils

Utility Usage

FunctionDescription
fn::lowerConverts a string to its lowercase representation
fn::upperConverts a string to its uppercase representation
fn::ternaryPerforms equality check and returns a defined result
fn::joinJoins a collection of values with a given delimiter
fn::splitSplits a string value on a given delimiter
fn::switchPerforms switch-statement lookups
fn::capitalizedConverts a string to its Titlecase representation

Caveats

All operations are done after yaml has been processed. This mean certain operations cannot be done in-line.

Example:

something:
  fn::join:
    delimiter: '-'
    values:
      - one
      - two

injected: ${opt:stage}${self:custom.something}

// Serverless Error ---------------------------------------
// Trying to populate non string value into a string for variable ${self:custom.something}. Please make sure the value of the property is a string.

To work around this fully use the utils option. The above can be reworked as the following.

injected:
  fn::join:
    delimiter: '-'
    values:
      - ${opt:stage}one
      - two

Author: icarus-sullivan
Source Code: https://github.com/icarus-sullivan/serverless-plugin-utils 
License: 

#serverless #plugin #utils 

Serverless Plugin Utils

Cakephp-utils: Utils Plugin for Cake 3.x

Utils Plugin for Cake 3.x

The Utils plugin offers you many components and behaviors to make developing easier. This plugin is required by the [Cak

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require cakemanager/cakephp-utils:dev-master

Configuration

You will need to add the following line to your application's bootstrap.php file:

Plugin::load('Utils');

Usage

Components

  • Authorizer - Component to work easily with authorization in your application-controllers.
  • GlobalAuth - Enables global access to user-data.
  • Menu - Adds menu-items in sections to pass to your view.
  • Search - Creates filters for your queries so you are able to filter on your list with a generated form.

Behaviors

  • Metas - Behavior to add meta-data to your current model.
  • Stateable - Generates multiple states (like concept, deleted, active) and with save-method and finders.
  • Uploadable - Great behavior to upload files automatically.
  • WhoDidIt - Saves the user who created the row, and modified the row.
  • IsOwnedBy - Checks if your entity is owned by the given (logged in) user.

Support

Gitter - Chat Tool for GitHub to talk about issues and new features.

GitHub - When there's something wrong, please open a new issue!

CakePHP Utils Plugin Docs - Documentation about the Utils Plugin.

Contributing

If you have a good idea for a new feature, feel free to pull or open a new issue. Pull requests are always more than welcome!

Author: Cakemanager
Source Code: https://github.com/cakemanager/cakephp-utils 
License: MIT license

#php #cakephp #utils 

Cakephp-utils: Utils Plugin for Cake 3.x