modularization – What design pattern we call for a kind of general purpose template based editor supporting many development framework

I am halfway through developing a general purpose editing tools which once finished can be used to develop any application project as well as making a simple document file. I call it a general purpose rapid templating and editing system. As for now it is a cloud service. Have no yet any plan to convert it into a native application.

How does it works?

There is a middleware system where middle user may use to build a template that specifically supports a type of project or a document format. For example, they can build a template represent an application development project, a design project, a website framework, a content management system, or even a document format like HTML, PDF, office document, and etc. I’m also provide support for a programming language of my own to be included for more complex functionalities. A template can also be built derived and extended from a base template.

On the other end, end user who actually need the system may use it to create whatever kind of stuff they want as long as required template is there, already developed by middle user. For example let say they need to create an e-book in EPUB file format, the system will serve as an alternative EPUB editor specifically for files structuring or editing. They only need to choose a template, following the rules set for the template, provide all required details into a form, attach chapters HTMLs and image files, and put them all together into a project directory before submit it. System will compile it and generate an EPUB file. The same process goes to other projects or files.

It’s like modularizing a project development into two parts, templating and creating a project, allowing users to not doing much repeating programming task or no programming at all, as well as avoiding users from complex files structuring and installation. If you’ve learned about a Turing complete notation technique called Backus-Naur form which is used to build any programming language, yes I’ve made it capable of doing that too.

It is quite a useful tool at least for me. That makes me wonder. I was looking everywhere for something similar to what I am building in hope it was already exists so no need for me to reinvent it. But so far I’ve found nothing similar perhaps because I don’t know what terms to use to search for it. So actually I just want to know whether I’m building something new, or something already exists and wasting time reinvent it. What terms we use to search for it? What’s it called?. Any examples?. If no one ever built it before, then why is that?

c# – Platform independent text based game architecture and framework

I know the possible answers might be subjective to personal preference or professional experience, but being a business software developer I have no knowledge of “game architecture”, so I’d like some ideas or resources that would take me to the right path.

What I want to accomplish

To have a platform independent game that can be run in any modern device (laptop, tablet, smartphone). Being familiarized with Microsoft technologies Xamarin looked like a great start, but the minus point is that I do not own a Macintosh machine to be able to compile and deploy iOS code.

What I need to know

For a very simple management game (see it as a sports manager game), what are hobby game developers going for nowadays, in terms of architecture and technologies?

Basic requirements

  • Network: Internet connection not needed during gameplay. Only to download the initial database + images. Azure resources would be used.
  • 2D only: there will be only “menus” to navigate in. Some drag and drop. Very few keyboard inputs.
  • Language: C# preferred, so I don’t need to learn a new language.
  • Loose coupling: I would like to be able to write the game logic, database and UI all independent of each other, just in case some ideas change in the future.

c# – Loop Improvement based on string key comparison

I have this function which is fire by an event, this function is almost called by 52 times, and inside the function there is loop which loop consists of 1-7 iteration for each function call. I want to improve it, please see my current improvement in the comments:

  protected override void MsgReceived(MessageFormat msgRecevied)
    {
        if (kafkaMachinePartData != null)
        {
            //Remove whitespaces from keys for accurate comparsion
            string receviedKey = StringOperation.ReplaceWhitespace(msgRecevied.key, "");//Remove whitespaces from received key

            for (int i = 0; i < kafkaMachinePartData.KafkaMachinePartDataKeys.Length; i++)
            {
                ClsKafkaMachinePartData kafkaMachinePartDataKeys = kafkaMachinePartData.KafkaMachinePartDataKeys(i);
        //unimprove version
                //string objKey = StringOperation.ReplaceWhitespace(kafkaMachinePartData.KafkaMachinePartDataKeys(i).dataKey, "");
        //Improve version
                string objKey = StringOperation.ReplaceWhitespace(kafkaMachinePartDataKeys.dataKey, "");
                if (objKey == receviedKey)//compare object keys with recevied keys
                {
                   //Unimporve version
                   //kafkaMachinePartData.KafkaMachinePartDataKeys(i).uiLabelDataValue = msgRecevied.value;
                   // kafkaMachinePartData.KafkaMachinePartDataKeys(i).uiLableSourceTime = msgRecevied.sourceTime;
                   //imporve version
                    kafkaMachinePartDataKeys.uiLabelDataValue = msgRecevied.value;
                    kafkaMachinePartDataKeys.uiLableSourceTime = msgRecevied.sourceTime;
                    break;//break the loop for improvement
                }
            }
        }
    }

Is there anyway available to improve this?

USA based business valid Linkdin email list for $1

HI friends,i will provide USA targeted valid business email list,Linkdin leads …
why me….
1.i will provide 100% valid list
2.Targated list
3.Also from linkdin leads
4.After sels support

by: kaoser
Created: —
Category: Email & Newsletters
Viewed: 202


.

unity – Heightmap based Tilemap (like found in OpenTTD or SimCity 2000/3000)

I have a little pet project I have been working on the past few weeks. I am trying to create procedurally generated isometric maps with elevation. Like in OpenTTD or the classic SimCity games). I realize that OpenTTD is open-source but I am not very fluent in C++ and need to code this project in Unity (C#)

Example of OpenTTD World Generation

I have thought of different ways of going about it and done some research but don’t know where to start. I thought about using marching cubes to generate a grid of points and then figure out the tile based on the four points.

Any suggestions/pointers?

unity – How can I sample objects color based on position and apply to an object in a shader?

I think what I want to achieve is similar to how grass can get the terrain color so it looks more blended, though this is not what I will be doing.

My texture is a palette of colors:

I have created a basic example in Unity. The cube represents an object that could be placed (and moved again later). The plane with the colors uv mapped would act as the ground (this will become a more complex mesh).enter image description here

How can I sample the color and apply it to the object placed?

Edit:

If the object is over more than one color, then ideally I would like to blend those colors instead of having a hard transition.

google sheets – How to change the sum of different currencies based on a drop-down value (currency)

I’m trying to achieve that when you select ‘USD’ from the dropdown e.g. it automatically calculate the two tickers with different currency into the currency you select. What I would like was that the columns with ‘total’ would show me the right formatting. So right now it’s only numbers but I would like the formatting to be ‘$10,150.54’ if the currency was set to USD in the dropdown and ‘10,150.54 kr.’ if DKK is selected.

https://docs.google.com/spreadsheets/d/1VLv4zvoSWIS8ldDAqoyX4uk2OtQzcoZBx6L3FTebg68/edit?usp=sharing

I have tried something like this: https://docs.google.com/spreadsheets/d/1qxPR0WkRow3lZxp-IODwP0oifOXFdu90xAbktF-TlQ4/edit#gid=1369942674

It doesn’t do exactly what I wanted but it’s close. Although, when I do something like this: =VLOOKUP(A3,J6:K10,2,0)&G10 I get an odd result of: kr. 10150.5403080106. Would I be able to change the formatting so it would be something like kr. 10.150,54?

Thanks!

Matching Specific Ad Based On Various Filters

Hi, I need a little help with someting I’d like to implement, but not sure how to do it.

I’m running eBay like classifieds site. There are a lot of filters on my site e.g. you can filter ads by price, by category, by city, by condition…
Let’s say we have this use case:

  • User is able to filter ads on my site using filters
  • Once he does it he can save those filters and subscribe to get push notification when someone submits an ad that matches those filters
  • I save those filters in my database for that user

For this example let’s say my site has around 100k active subscriptions.

The first step is obviously to attack a place in a code where ad is being saved to the database. I’m having a problem with how to know if that specific ad matches those filters.

I would need to go through 100k subscriptions and their filters to know which filter matches the ad that has been posted. It doesn’t sound too good for me, it could be 1M filters or more.

Can someone help me with that or at least point me to the right direction.

This is basic version.

Filters:
SEMrush

  1. country, county, city
  2. min price, max price
  3. condition (new,old…)
  4. ads with/without picture

User A subscribed to set of filters:

  1. England, London
  2. Min price: 200 €
  3. X
  4. X

User B subscribed to set of filters:

  1. England
  2. Max Price: 500€
  3. New
  4. X

User C subscribed to set of filters:

  1. Germany
  2. Min price: 200 €
  3. X
  4. With pictures

User X submitted ad with following data:
City: London
Price: 300 €
Condition: New

In this case User A and User B need to get push notification because ad matches their filters.

 

entities – Change entity reference field widget based on condition?

I am using Drupal 8. In user registration form, i am using entity reference field to a profile. I wanted to display inline entity reference form widget or entity select widget based on role.

For this, I an trying to use hook__field_widget_form_alter(). But have not succeeded. Is there any way to solve this problem?
Thanks.

is it possible to add an oauth2 based user authentication provider to sharepoint server

I should start by saying this is the first time i’m dealing with sharepoint user auth. One of my customer requires users from different identity providers to be able authenticate their users to sharepoint sites within the organization.

Currently we are using the standart AD LDAP auth method but I’m looking for a way to add another auth provider. The information i have is as follows:

They have an oauth2 based identitiy provider system in-house developed software. And they told me they have ldap as authentication provider. I also recieved a postman json file for oauth2 protocol they used. But that doesn’t mean much to me at this point.

Please let me know if the above information is enough. If not i’ll ask for more information that you might require to provide a solution.

edit: the said ldap integration was for ad user to authenticate through custom oauth2 based identity provider. At first i thought it would work between oauth2 and sharepoint but that isnt the case.

edit2: would it be possible to create asp.net forms auth page that talks with oauth2 protocols given in json file below? And add that fba to sharepoint auth provider list?

{
    "info": {
        "_postman_id": "7035aaf2-e7c6-40d9-890d-e9f80b5b01dc",
        "name": "OAUTH2Protokol",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": (
        {
            "name": "GetAuthentication",
            "event": (
                {
                    "listen": "test",
                    "script": {
                        "id": "b6bbbcfe-9521-47ce-9c5f-fa221103559f",
                        "exec": (
                            "var data = JSON.parse(responseBody);",
                            "",
                            "pm.test("Access Token recieved", function(){",
                            "",
                            "    responseBody.has('access_token')",
                            "",
                            "});",
                            "",
                            "pm.environment.set("token", "Bearer "+ data("access_token"));"
                        ),
                        "type": "text/javascript"
                    }
                }
            ),
            "request": {
                "auth": {
                    "type": "basic",
                    "basic": (
                        {
                            "key": "password",
                            "value": "web_secret",
                            "type": "string"
                        },
                        {
                            "key": "username",
                            "value": "web_app",
                            "type": "string"
                        }
                    )
                },
                "method": "POST",
                "header": (
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application/x-www-form-urlencoded",
                        "type": "text"
                    }
                ),
                "body": {
                    "mode": "urlencoded",
                    "urlencoded": (
                        {
                            "key": "username",
                            "value": "**TCKN**",
                            "type": "text"
                        },
                        {
                            "key": "grant_type",
                            "value": "password",
                            "type": "text"
                        },
                        {
                            "key": "password",
                            "value": "**PASSWORD**",
                            "type": "text"
                        },
                        {
                            "key": "scope",
                            "value": "scopenamehere",
                            "type": "text"
                        }
                    ),
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                },
                "url": {
                    "raw": "https://subdomain.domain.gov.tr/oauth/token",
                    "protocol": "https",
                    "host": (
                        "subdomain",
                        "domain",
                        "gov",
                        "tr"
                    ),
                    "path": (
                        "oauth",
                        "token"
                    )
                }
            },
            "response": ()
        },
        {
            "name": "GetAuthenticationLDAP",
            "event": (
                {
                    "listen": "test",
                    "script": {
                        "id": "b6bbbcfe-9521-47ce-9c5f-fa221103559f",
                        "exec": (
                            "var data = JSON.parse(responseBody);",
                            "",
                            "pm.test("Access Token recieved", function(){",
                            "",
                            "    responseBody.has('access_token')",
                            "",
                            "});",
                            "",
                            "pm.environment.set("token", "Bearer "+ data("access_token"));"
                        ),
                        "type": "text/javascript"
                    }
                }
            ),
            "request": {
                "auth": {
                    "type": "basic",
                    "basic": (
                        {
                            "key": "password",
                            "value": "web_secret",
                            "type": "string"
                        },
                        {
                            "key": "username",
                            "value": "web_app",
                            "type": "string"
                        }
                    )
                },
                "method": "POST",
                "header": (
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "type": "text",
                        "value": "application/x-www-form-urlencoded"
                    }
                ),
                "body": {
                    "mode": "urlencoded",
                    "urlencoded": (
                        {
                            "key": "username",
                            "value": "**EMAIL-company**",
                            "type": "text"
                        },
                        {
                            "key": "grant_type",
                            "value": "password",
                            "type": "text"
                        },
                        {
                            "key": "password",
                            "value": "**EMAIL-PASSWORD**",
                            "type": "text"
                        },
                        {
                            "key": "scope",
                            "value": "scopename",
                            "type": "text"
                        }
                    ),
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                },
                "url": {
                    "raw": "https://subdomain.domain.gov.tr/oauth/token",
                    "protocol": "https",
                    "host": (
                        "subdomain",
                        "domain",
                        "gov",
                        "tr"
                    ),
                    "path": (
                        "oauth",
                        "token"
                    )
                }
            },
            "response": ()
        }
    ),
    "protocolProfileBehavior": {}
}