Physics’s system – Game Development Stack Exchange

Thanks for contributing an answer to Game Development Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

development – SystemUpdate() inside my remote event receive will raise “Access denied. You do not have permission to perform this action or access this resource.”

I have the following code inside my remote event receiver (which run on item added):-

 using (ClientContext context = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
            {
              currentItem("OrderAssignToApprover2") = new FieldUserValue() { LookupId = spUser.Id };
              currentItem.SystemUpdate();

now if a non-admin user add an item then the remote event receiver will raise this error on the SystemUpdate():-

Access denied. You do not have permission to perform this action or access this resource.

but if admin user add an item then the remote event receiver will works fine OR if i change the remote event reicever to run using App Permsion, as follow:-

using (ClientContext context = Helpers.GetAppOnlyContext(properties.ItemEventProperties.WebUrl))
            {
              currentItem("OrderAssignToApprover2") = new FieldUserValue() { LookupId = spUser.Id };
              currentItem.SystemUpdate();

so can i assume that the SystemUpdate (unlike Update) require the user to have full control on the site?If this is the case then is there a way to allow non-admin users to execute SystemUpdate?
Thanks

web development – IIS – Limit usage of each web application

I have two web applications hosted locally on my IIS. One is responsible for the core functionality of my website, and the other is responsible for executing background tasks (database tasks, API calls etc..using Hangfire) . It seems that when a heavy background task is being executed, my main application seems to slow down when executing SQL tasks, Ajax requests, or making any other API calls.

How can I set the usage limit of each application?

For example

Main application: 70%

Background Tasks: 30%

Also I’m planning to host my applications on Azure soon, so is there anything else that I should look for to prevent this from happening on production environment?

Thanks!

plugin development – How to find where an object first instantiatiation

Problem is solved.

I have built a theme options class so i can build as many option pages as i want, an i implement a singleton design pattern to fetch options only once, and i have WPML plugin installed so i am trying to make options multilingual using the available hook wpml_multilingual_options and every thing seems to be saved and also displayed correctly on frontend but unfortunately in the admin it keeps showing the none translated options, so i am guessing that the singleton object is called somehow before the init hook where the wpml_multilingual_options is hooked to. But i can’t find where exactly that singleton object is. can i track an object of the same singleton to find out the path of where the first instantiation occurs.

bitcoincore development – Where is the block reward system coded in Bitcoin core?

I’m taking a look at Bitcoin core and am looking for where the TX is effectively “generated” and send out to an address. I’ve found the nSubsidy block reward, but I’m currently looking for where the transaction is sent out and recorded on the blockchain. If I don’t understand something right, please correct me, otherwise, if you have an answer please tell me!

Escaping crashes my output – WordPress Development Stack Exchange

When I add wordpress escaping code like esc_attr_e to below variable, it writes text instead of html code to my browser:

   <?php echo esc_attr_e( $redux_demo('editor-text-header-left'), 'hekim' ); ?>

when I remove the escaping code, the variable gives html code.

now, it gives the below text:

<a href="#"><i class="fa fa-medkit text-thm2"></i> Help | </a><a href="#">Forum | </a><a href="#">Skype | </a><a href="#">Mon - Sat 9.00 - 19.00</a>

How can I escape it correctly?

plugin development – Woocommerce blocking custom role to access admin_bar/admin_access

Developed a plugin which will add_role() called backend_user during plugin activation. In the plugin I had designed a controller which enables access to certain pages of ‘my custom plugin menu’ for backend_user. So whenever the user(role:backend_user) logins in via wp-admin they can see admin bar and access the ‘My custom plugin’ menus, this user is set to level_0 => true, read => true and nothing else.

Now the issuse is with the WooCommerce user controls, by default WooCommerce disable access to custom roles and in this case backend_user. So used the WooCommerce documentation and for the time gap added following filter in functions.php which works as expected, but I need a approach to make this filter coded inside the plugin and make it work during plugin activation. Any help would be grateful.

Filter used in functions.php:

if (current_user_can( 'backend_user' )) 
{
add_filter( 'woocommerce_prevent_admin_access', '__return_false' );
add_filter( 'woocommerce_disable_admin_bar', '__return_false' );
}

My custom plugins Activate.php:

<?php
/**
 * @package  My custom Plugin
 */
namespace IncBase;

class Activate
{
    public static function activate() 
    {

        flush_rewrite_rules();

        $default = array();

        if (! get_option( 'my_plugin' )) {
            update_option('my_plugin', $default );
        }


// Add Bakend role
            $result =
            add_role ( 'backend_user', __( 'My Plugin user', 'testsite' ),
                array(
                    'read' => true,
                    'level_0'=> true,
                    )
            );  

    }
}

web development – How do I organize my REST API codes along with the codes for generating the website?

Using github as an example, www.github.com is the website people visit and api.github.com is the REST api server programs will visit. But they probably share some codebase and in my case they share a lot.

We actually developed the rest server first for our mobile apps then we decided to develop a website because we had though there were quite some codes can be reused. But now codes are not clean at all and I am trying to refactor them.

The similarity between them and the problems I need to fix include:

First, the logic to access the database is basically the same. After get the data, the REST codes will just return them as JSON while the “website code” (without a better word to describe them) will feed the data to the template which then generates the html pages.

Second, the router logics share in common a lot.

Third, I need to make the deployment easy. We use nginx to direct REST request to the rest server and website request (again, without a better word) to the website server, which is different from the rest server(2 standalone servers).

So how do I organize the source codes to be DRY & be easy deployment ?

Selling – Website Development

[​IMG]

We are a strong creative team of web-developers from Europe. We handle the Website development from the initial information gathering and planning phases, through to site launch.
SEMrush

The main principles of our work are:
1. Quality. Our highly skilled professionals work hard to create for you the solution, that will work properly.
2. Client-Oriented Approach. We always take into account the client`s needs and provide the transparency of the development process. We also realize the importance of communication with you during the project.
3. Just-in-time delivery. We respect deadlines and value your time.
4. Responsibility. We have never given up on the work we got to. If we accept the task we will complete it and make sure that it works.
5. Honesty. We neither over-promise nor under-deliver. We analyze the project tasks and our skill-set. After that, we make a fair estimation and plan the workflow. We don`t waste your time and money on needless work.
What do we do?

We provide access to a talent pool of Python, JS, QA, UX/UI experts from Eastern Europe. We can help you hire dedicated developers or Agile teams.

Technologies we use:
* Python / Django / Flask
* Java / Spring
* Node.js / Koa / Express
* PHP / Lavarel / Yii2

* HTML / Handlebars / Haml
* CSS / Sass / Less / Stylus
* JS / React / JQuery / Vue

Let’s chirp!