piranha | High performance scripting and specification language

 by   ange-yaghi C++ Version: v0.0.11a License: MIT

kandi X-RAY | piranha Summary

kandi X-RAY | piranha Summary

piranha is a C++ library typically used in Programming Style applications. piranha has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Piranha is an open-source scripting framework currently under development. It is a reusable framework which allows developers to quickly write scripting interfaces to native C++ libraries. Piranha is currently used as an SDL (scene description language) for the MantaRay ray-tracer. For syntax highlighting in Visual Studio Code check out the Piranha Visual Studio Code Extension. To get started, check out the introductory handbook: Piranha Handbook. Example Piranha compiler implementation: Hello World Piranha Compiler.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              piranha has a low active ecosystem.
              It has 193 star(s) with 17 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 10 open issues and 24 have been closed. On average issues are closed in 11 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of piranha is v0.0.11a

            kandi-Quality Quality

              piranha has no bugs reported.

            kandi-Security Security

              piranha has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              piranha is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              piranha releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of piranha
            Get all kandi verified functions for this library.

            piranha Key Features

            No Key Features are available at this moment for piranha.

            piranha Examples and Code Snippets

            No Code Snippets are available at this moment for piranha.

            Community Discussions

            QUESTION

            Unable to access services from DI on delegate in startup Configure?
            Asked 2021-Jan-08 at 15:28

            I am trying to add some items to the piranha sitemap using the delegate method OnGenerateSitemaps.

            In this method I am calling to a service that gets data from entity framework context and then caches it. Whenever I try to use this service in the delegate-method I get a error that the dbContext has already been disposed.

            System.AggregateException: 'One or more errors occurred. (Cannot access a disposed context instance. A common cause of this error is disposing a context instance that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling 'Dispose' on the context instance, or wrapping it in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.

            I've tried making the service sync instead of async, I've tried awaiting the result and running the task sync, none of which works.

            Any ideas on how to use my service in this delegate in Configure on startup?

            ...

            ANSWER

            Answered 2021-Jan-08 at 15:28

            We're (the Piranha team) planning on redesigning the hook system in version 10 (has to be a major version as it will break backwards compatibility) to provide DI functionality in all hooks. However in the meantime the following should fix your issues.

            Source https://stackoverflow.com/questions/65608298

            QUESTION

            Piranha CMS - Custom block won't save
            Asked 2020-Nov-30 at 18:28

            Very new to Piranha and Vue, but not to .Net Core. Trying to get my arms around how to create custom blocks. I've created a new block, attempting to marry the HtmlBlock and ImageBlock:

            ...

            ANSWER

            Answered 2020-Nov-30 at 18:28

            Just in case this helps someone. Turns out I did a poor job merging the two blocks together. Chalk this one up to inexperience with both Piranha and Vue.js. I was mixing the code from the docs with the code in the repo. Don't do that - the docs are understandably still a bit behind. I'm not throwing stones at the developers, I really dig what they've created and will continue to put forth the effort to use it proficiently.

            Below is what I came up with for the Vue component. There are probably still a few tweaks to be made to separate the Image-Block and Html-Block code better, but it now works, saves, and does not throw errors in the console.

            Source https://stackoverflow.com/questions/64976918

            QUESTION

            Inject IOptionsSnapshot in Block constructor
            Asked 2020-Oct-15 at 14:21

            I created a new custom Block and wanted to inject an IOptionsSnapshot to read my appsettings.json values. The problem is that I get an error saying there is no parameterless constructor for my custom block.

            Is there a way to somehow do this injection or is this a limitation in Piranha and custom blocks.

            ...

            ANSWER

            Answered 2020-Oct-15 at 14:21

            At the moment neither Fields or Blocks supports parameter injection into the constructor, however Fields have two initialization methods that both supports parameter injection, Init() and InitManager(). Given how models are constructed the easiest solution would probably be to add the corresponding init methods to Blocks as well.

            Feel free to open an issue/feature request at the GitHub repo https://github.com/PiranhaCMS/piranha.core and we can take the discussion from there!

            Best regards

            Håkan

            Source https://stackoverflow.com/questions/64373347

            QUESTION

            Deserializing Media field fails in Piranha CMS
            Asked 2020-May-21 at 17:50

            Modifying Piranha for 'headless' scenario: I separated the api into its own REST API, and the MVC into its own UI that calls the REST API. Mostly it works well, but now an obstacle. My REST API serializes the result from the Piranha api, and my MVC web deserializes it into a Piranha StandardPage type. This works for all fields except Media, which is always null. Using newtonsoft.Json.

            The Media property is defined in Piranha.Extend.Fields.MediaFieldBase with internal set, which explains why I can't deserialize into it. So I added a [JsonProperty] attribute to the Media property. Once I did this, then the Media field was correctly deserialized by the MVC, and images appeared.

            But then I found this broke something else: in the manager, when I try to save a page with a Hero image, the Save buttons spins, stops as though it succeeded, but the toast never appears saying success. I set Debug logging for Microsoft.AspNetCore.Mvc.Infrastructure, and see there's a model state error when this happens:

            ...

            ANSWER

            Answered 2020-May-21 at 14:00

            I posted this on the Piranha CMS github and one of its authors, Hakan Edling, answered in just a few hours:

            "The root issue is that when a new item is selected in the manager in the media picker, the media model that is assigned contains a formatted string size "xxx kb". When ASP.NET tries to deserialize this into a long it fails. So changing the following line in the .vue components for the media-based fields:

            Source https://stackoverflow.com/questions/61922839

            QUESTION

            Piranha CMS MVC tag problem with displaying blocks
            Asked 2020-May-14 at 06:36

            So I have been learning Piranha CMS for .Net Core 3.1.

            Having read the docs and studied the template I have hit a bit of wall in getting the information from within Blocks to display on the page correctly.

            In the Razor Blog Template on the Page.cs the developer has used the below code to display the Blocks that the page has on screen

            ...

            ANSWER

            Answered 2020-May-14 at 06:36

            I've answered in the Gitter chat, but I'll answer here as well if someone else has the same question.

            Display templates & Editor templates

            The templating system is a built in feature of ASP.NET Core and assumes you have the following folders present in you project.

            MVC

            Source https://stackoverflow.com/questions/61785997

            QUESTION

            Twilio runtime function gives invalid Access token on iOS quickstart
            Asked 2020-May-13 at 10:16

            I am using twilio runtime function to generate access token successfully on browser. Below is the attached screenshot.

            But when I run that url on iOS quickstart project, it gives me invalid access token error when I am connecting room. Kindly help. Below is the url I use in my project.

            ...

            ANSWER

            Answered 2020-May-13 at 10:16

            It seems like the identity is missing from your video token, you should have:

            Source https://stackoverflow.com/questions/61764799

            QUESTION

            .net core user-identity for both website and cms authentication
            Asked 2020-Apr-29 at 21:32

            What is the best practice for supporting user account registration and sign-in for website (customer) users and also supporting a cms user accounts / admin logins using separate user identity service for both site and cms in the same project?

            In order to evaluate how this scenario might work i have have built a test mvc .net core 3.1 website project that utilizes Piranha CMS which in turn uses the user identity service to manage authentication for access to the cms admin panel, couple this with the mvc site also supporting user identity for individual accounts for website customer/users to register/ sign-in.

            The following is an example of the startup class ConfigureServices method to illustrate setup of both a cms and website using the user identity service, this currently errors on startup with a message - System.InvalidOperationException: 'Scheme already exists: Identity.Application'

            ...

            ANSWER

            Answered 2020-Apr-29 at 21:32

            The user management is totally abstracted in Piranha, so you could actually authenticate the CMS users any way you want. The Identity package that is included in the templates are included as a boilerplate as most users what a single security setup based on ASP.NET Identity. The only thing the manager cares about when signing in is:

            1. That it finds a registered service implementing Piranha.ISecurity (https://github.com/PiranhaCMS/piranha.core/blob/master/core/Piranha/ISecurity.cs)
            2. That the users gets the adequate claims needed after signing in (https://piranhacms.org/docs/architecture/authentication)
            Configuring Identity

            The code provided in the templates just sets up the standard Identity settings, but you can override everything to do what you're like. The method UseIdentityWithSeed can actually take two more parameters for configuring both IdentityOptions and CookieOptions to work in any way. Take a look at this page for reference:

            https://piranhacms.org/docs/architecture/authentication/identity

            User accounts in Piranha

            If you're only looking to adding end-user accounts somewhere this can be done in Piranha CMS by setting up new roles in the admin and adding the application policies you want. You can read about this here:

            https://piranhacms.org/docs/tutorials/securing-pages

            More guidance on multiple authentication schemes

            I have never actually deployed a site with this setup, but as always I know someone has :) This issue on GitHub talks about just this, and the setup was successful. As I can't give specific guidance on this scenario, maybe reaching out to the user in this thread can give you what you need!

            https://github.com/PiranhaCMS/piranha.core/issues/627

            While not being an answer, I hope this will give your what you need to find the answers.

            Best regards

            Source https://stackoverflow.com/questions/61486742

            QUESTION

            Piranha cms automatically add pages in page type builder
            Asked 2020-Apr-10 at 05:14

            I'm using Piranha cms in one of my projects.

            I'm looking for a solution to automatically add all my page types to page Type Builder.

            At this moment my startup Configure method look like this:

            ...

            ANSWER

            Answered 2020-Apr-10 at 05:14

            Yes! If you have an up-to-date version of Piranha you can now do the following.

            Source https://stackoverflow.com/questions/61099660

            QUESTION

            How to authenticate calls to Piranha.WebApi?
            Asked 2020-Apr-08 at 06:46

            I'm tasked to provide the excellent Piranha CMS through an API that other UI projects will consume. Piranha docs say it's designed to run "headless" for this purpose, but not many details on how.

            I've got the Piranha.WebApi project running, and it serves JSON content of pages as I expect. Currently, it works only when I access it from a browser, because any call to the WebApi prompts for credentials. Once I sign in, the WebApi calls succeed and I can make multiple calls from the same browser.

            Now I need to know how other UI code projects can authenticate when calling the WebApi so they can get results.

            I've reviewed the links I could find; no good hints yet:

            Any suggestions will be very helpful!

            ...

            ANSWER

            Answered 2020-Apr-08 at 06:46

            The package Piranha.WebApi uses claims to verify the caller, but how these claims actually get assigned to the user is up to you. The default security implementation Piranha.AspNetCore.Identity by default configures cookie-based security, but if you're only using your application in a headless manner another security setup could probably be beneficial.

            More information on how to configure the Identity module can be found here:

            https://piranhacms.org/docs/architecture/authentication/identity

            Another option is to just provide your own Api instead of using the Piranha.WebApi package. If you take a look at the code for the Api-package here you can see that there's absolutely no logic in these endpoints, they just call the registered Piranha.IApi object.

            https://github.com/PiranhaCMS/piranha.core/blob/master/core/Piranha.WebApi/PageApiController.cs#L45

            Best regards

            Håkan

            Source https://stackoverflow.com/questions/61090564

            QUESTION

            How can I form all possible combinations from n lists
            Asked 2020-Feb-07 at 20:17

            This question is difficult to word in the title, so an example is required:

            I have 3 lists:

            ...

            ANSWER

            Answered 2019-Nov-21 at 16:12

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install piranha

            Only a few steps are required to begin developing on MantaRay:. You should then see a console window open and a sample Piranha program run.
            Install Python 3
            Clone the Piranha repository
            Open project/piranha.sln in Microsoft Visual Studio
            Right click on piranha_reference_compiler and select 'Set as StartUp Project'
            Run the application

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ange-yaghi/piranha.git

          • CLI

            gh repo clone ange-yaghi/piranha

          • sshUrl

            git@github.com:ange-yaghi/piranha.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular C++ Libraries

            tensorflow

            by tensorflow

            electron

            by electron

            terminal

            by microsoft

            bitcoin

            by bitcoin

            opencv

            by opencv

            Try Top Libraries by ange-yaghi

            engine-sim

            by ange-yaghiC++

            delta-studio

            by ange-yaghiC++

            direct-to-video

            by ange-yaghiC++

            scs-2d-demo

            by ange-yaghiC++