Mike  Kozey

Mike Kozey

1657732260

ENV_manager: Manage Your Application's Environment with Env_manager

Usually in an application it is necessary to have at hand a system to manage global variables (or environment variables) to propagate inside the application. env_manager does just that, it manages your environment variables in a smart way.

How it works

Your environment variables are stored in a folder called envdir, this folder will contain all of your environment variable files and you can divide them up as you see fit.

Below is an example of a project folder that uses env_manager.

your_project
├───android
│└───...
├───assets
│└───...
├───build
│└───...
│
├───envdir
│├───application.yaml
│├───another_env_file.yaml
│└───example_env_folder
│    └───example_env_file_inside_folder.yaml
│
├───ios
│└───...
├───lib
│└───...
├───test
│└───...
├───.flutter-plugins
├───.flutter-plugins-dependencies
├───.gitattributes
├───.gitignore
├───.metadata
├───.packages
├───analysis_options.yml
├───your_project.iml
├───pubspec.lock
├───pubspec.yaml
└───README.md

Setup the package in your application

Add the package in the dependecies section of your pubspec.yaml file.

env_manager: ^0.1.2

and execute the flutter pub get to fetch the package from pub.dev.

After the fetch, execute the flutter pub run env_manager:make to create the envdir in your project root directory, inside this folder your can create all your environment files (even with different folders).

IMPORTANT: All environment files must use the following format

production:
    example_A_variable: "My A variable in production"
    example_B_variable: "My B variable in prodution"
    ...

development:
    example_A_variable: "My A variable in development"
    example_B_variable: "My B variable in development"

All variables must be the same for production and development sections.

After this, you need to add the environment files in the assets section inside the pubspec.yaml file.

...
flutter:
    assets:
        - assets/myexampleimage.png
        - assets/anotherexampleimage.jpg
        ...

        #Env Files
        - envdir/application.yaml
        - envdir/example_folder/new_env_file.yaml
        ...
...

Add the code in your application

In your main class, add the following snippt before the runApp method

...
void main() async {
    WidgetsFlutterBinding.ensureInitialized();

    await env.locateAndLoad([
        env.EnvironmentFileLoader("myEnvName", await rootBundle.loadString("envdir/application.yaml")),
        env.EnvironmentFileLoader("myEnvName2", await rootBundle.loadString("envdir/example_folder/new_env_file.yaml")),
        ..other files to load..
    ]);

    ...
}
...

You can also setup the environment to reply with production variables or with development variables using

env.useProductionEnvironment(true | false);

IMPORTANT: By default is set to false

or you can call directly the environment using the get method (By default will take the useProductionEnvironment value)

env.get("myEnvName")["variable_name"]
env.get("myEnvName", withProduction: true | false)["variable_name"]

Installing

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add env_manager

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

dependencies:
  env_manager: ^0.1.2

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:env_manager/env_manager.dart';

example/main.dart

import 'package:flutter/material.dart';
import 'package:env_manager/env_manager.dart' as env;
import 'package:flutter/services.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await env.locateAndLoad([
    env.EnvironmentFileLoader(
        "myEnvName", await rootBundle.loadString("envdir/application.yaml")),
  ]);

  //Optional
  env.useProductionEnvironment(true);

  runApp(MaterialApp(
    title: env.get("myEnvName")["application_name"],
    home: const MyApplication(),
  ));
}

class MyApplication extends StatefulWidget {
  const MyApplication({Key? key}) : super(key: key);

  @override
  _MyApplicationState createState() => _MyApplicationState();
}

class _MyApplicationState extends State<MyApplication> {
  @override
  void initState() {
    super.initState();

    env.useProductionEnvironment(true);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        alignment: Alignment.center,
        child: Text(env.get("myEnvName")["my_env_variable"]),
      ),
    );
  }
}

Author: Giannuzzoexe
Source Code: https://github.com/giannuzzoexe/env_manager 
License: BSD-3-Clause license

#flutter #dart #managed #env 

ENV_manager: Manage Your Application's Environment with Env_manager
Aisu  Joesph

Aisu Joesph

1651284000

Tools And Libraries To Glue C/C++ APIs To High-level Languages

CppSharp is a tool and set of libraries which facilitates the usage of native C/C++ code with the .NET ecosystem.

It consumes C/C++ header and library files and generates the necessary glue code to surface the native API as a managed API. Such an API can be used to consume an existing native library in your managed code or add managed scripting support to a native codebase.

The supported target languages at present are C# and C++/CLI.

It can also be used as a library to parse native code into a syntax tree with a rich declaration and type information model.

Releases/Build Status

NuGet PackagesContinuous Integration
NuGetGitHub-actions
  1. Libraries
  2. Documentation
  3. Community
  4. Support
  5. Users

Libraries

AST

Mirrors the Clang's C/C++ AST and type system classes in C# APIs.

Check out Clang's AST introduction docs for more details about its architecture.

  • C++ declarations
  • C++ statements / expressions
  • C++ types
  • Class object layout
  • Declaration visitors
  • Type visitors

Parser

Provides APIs for parsing of C/C++ source code into a syntax tree.

  • Parsing of C/C++ source code
  • Parsing of libraries archives symbols
  • Parsing of shared libraries symbols
  • Based on the very accurate Clang C++ parser.

Generator

Generates the glue binding code from a syntax tree of the native code.

  • Multiple backends: C++/CLI and C# (P/Invoke)
  • Multiple ABIs: Itanium, MS, ARM, iOS
  • Multiple platforms: Windows, OS X and Linux
  • Multiple runtimes: .NET and Mono
  • C++ virtual methods overriding from managed code
  • C++ multiple inheritance by translating to C# interfaces
  • C++ std::string
  • C++ default parameter values
  • C/C++ semantic comments (Doxygen) to C# comments
  • Extensible bindings semantics via user passes and type mapping

Documentation

Please see the following resources for more information:

Getting Started

User's Manual

Developer's Manual

Community

Feel free to open up issues on Github for any problems you find.

You can also join us at our #managed-interop Gitter discussion channel.

Support

For building wrappers and priority support please write to cppsharp@protonmail.com. Alternatively, you may post bounties at https://www.bountysource.com/.

Users

CppSharp is used by the following projects:

QtSharp

MonoGame

LLDBSharp

Xamarin

FFMPEG.net

FFmpeg bindings

Tizen bindings

libgd bindings

ChakraSharp

FFmpeg.AutoGen

GLFW3.NET

Please feel free to send us a pull request adding your own projects to the list above.


Author: mono
Source Code: https://github.com/mono/CppSharp
License: MIT License

#cpluplus #c 

Tools And Libraries To Glue C/C++ APIs To High-level Languages

Tools And Libraries To Glue C/C++ APIs To High-level Languages

CppSharp is a tool and set of libraries which facilitates the usage of native C/C++ code with the .NET ecosystem.

It consumes C/C++ header and library files and generates the necessary glue code to surface the native API as a managed API. Such an API can be used to consume an existing native library in your managed code or add managed scripting support to a native codebase.

The supported target languages at present are C# and C++/CLI.

It can also be used as a library to parse native code into a syntax tree with a rich declaration and type information model.

Releases/Build Status

NuGet PackagesContinuous Integration
NuGetGitHub-actions
  1. Libraries
  2. Documentation
  3. Community
  4. Support
  5. Users

Libraries

AST

Mirrors the Clang's C/C++ AST and type system classes in C# APIs.

Check out Clang's AST introduction docs for more details about its architecture.

  • C++ declarations
  • C++ statements / expressions
  • C++ types
  • Class object layout
  • Declaration visitors
  • Type visitors

Parser

Provides APIs for parsing of C/C++ source code into a syntax tree.

  • Parsing of C/C++ source code
  • Parsing of libraries archives symbols
  • Parsing of shared libraries symbols
  • Based on the very accurate Clang C++ parser.

Generator

Generates the glue binding code from a syntax tree of the native code.

  • Multiple backends: C++/CLI and C# (P/Invoke)
  • Multiple ABIs: Itanium, MS, ARM, iOS
  • Multiple platforms: Windows, OS X and Linux
  • Multiple runtimes: .NET and Mono
  • C++ virtual methods overriding from managed code
  • C++ multiple inheritance by translating to C# interfaces
  • C++ std::string
  • C++ default parameter values
  • C/C++ semantic comments (Doxygen) to C# comments
  • Extensible bindings semantics via user passes and type mapping

Documentation

Please see the following resources for more information:

Getting Started

User's Manual

Developer's Manual

Community

Feel free to open up issues on Github for any problems you find.

You can also join us at our #managed-interop Gitter discussion channel.

Support

For building wrappers and priority support please write to cppsharp@protonmail.com. Alternatively, you may post bounties at https://www.bountysource.com/.

Users

CppSharp is used by the following projects:

QtSharp

MonoGame

LLDBSharp

Xamarin

FFMPEG.net

FFmpeg bindings

Tizen bindings

libgd bindings

ChakraSharp

FFmpeg.AutoGen

GLFW3.NET

Please feel free to send us a pull request adding your own projects to the list above.


Author: mono
Source Code: https://github.com/mono/CppSharp
License: MIT License

#cpluplus #c 

Tools And Libraries To Glue C/C++ APIs To High-level Languages

CppSharp: Tools & Libraries To Glue C/C++ APIs To High-level Languages

CppSharp is a tool and set of libraries which facilitates the usage of native C/C++ code with the .NET ecosystem.

It consumes C/C++ header and library files and generates the necessary glue code to surface the native API as a managed API. Such an API can be used to consume an existing native library in your managed code or add managed scripting support to a native codebase.

The supported target languages at present are C# and C++/CLI.

It can also be used as a library to parse native code into a syntax tree with a rich declaration and type information model.

Releases/Build Status

NuGet PackagesContinuous Integration
NuGetGitHub-actions

Libraries

AST

Mirrors the Clang's C/C++ AST and type system classes in C# APIs.

Check out Clang's AST introduction docs for more details about its architecture.

  • C++ declarations
  • C++ statements / expressions
  • C++ types
  • Class object layout
  • Declaration visitors
  • Type visitors

Parser

Provides APIs for parsing of C/C++ source code into a syntax tree.

  • Parsing of C/C++ source code
  • Parsing of libraries archives symbols
  • Parsing of shared libraries symbols
  • Based on the very accurate Clang C++ parser.

Generator

Generates the glue binding code from a syntax tree of the native code.

  • Multiple backends: C++/CLI and C# (P/Invoke)
  • Multiple ABIs: Itanium, MS, ARM, iOS
  • Multiple platforms: Windows, OS X and Linux
  • Multiple runtimes: .NET and Mono
  • C++ virtual methods overriding from managed code
  • C++ multiple inheritance by translating to C# interfaces
  • C++ std::string
  • C++ default parameter values
  • C/C++ semantic comments (Doxygen) to C# comments
  • Extensible bindings semantics via user passes and type mapping

Documentation

Please see the following resources for more information:

Getting Started

User's Manual

Developer's Manual

Community

Feel free to open up issues on Github for any problems you find.

You can also join us at our #managed-interop Gitter discussion channel.

Users

CppSharp is used by the following projects:

QtSharp

MonoGame

LLDBSharp

Xamarin

FFMPEG.net

FFmpeg bindings

Tizen bindings

libgd bindings

ChakraSharp

FFmpeg.AutoGen

GLFW3.NET

Please feel free to send us a pull request adding your own projects to the list above.

Download Details:
Author: mono
Source Code: https://github.com/mono/CppSharp
License: MIT License

#dotnet  #aspdotnet  #csharp #c #apis 

CppSharp: Tools & Libraries To Glue C/C++ APIs To High-level Languages

jessica Ervin

1606142306

Cloudways Black Friday 2020 Offer

This BLACK FRIDAY, Cloudways is offering 40% off for 4 months on all managed cloud hosting plans. Just use the coupon code while signing up, and enjoy hassle free hosting.

Offered Deal: 40% OFF for 4 months
Coupon Code: BFCM2020
Deal Duration: 23rd November to 2nd December

Deal Link: Cloudways BFCM 2020 Offer - 40% OFF for 4 Month

#cloudways #hosting #cloud #managed #wordpress

Cloudways Black Friday 2020 Offer
Rusty  Bernier

Rusty Bernier

1593310680

GAVRO — Managed Big-Data Schema Evolution

Wouldn’t it be great to build a data ingestion architecture that was resilient to change? More specifically, resilient to schema evolution.

#schema #avro #big-data #gavro #managed

GAVRO — Managed Big-Data Schema Evolution