Skip to content
Where is the entry ...
Clear all

Where is the entry point to the 2023 theme?

1 Posts
1 Users
Illustrious Member
Joined: 4 months ago
Posts: 57424
Topic starter  

My understanding was in previous themes, there should be an index.php in the theme folder which is the entry point for the theme. It's not present in the 2023 theme. So where do I start looking?


Unreplied Posts

Proving my function is optimized in a particular regime


Consider the optimization problem:
max_{x geq 0} (1-x)fleft(gleft(xright)right)

where $f'(x)< 0, f(1) = 0, f(0) = 1$, and $f$ is differentiable. In addition, $g$ has the form:

1 & text{if } x < frac{c}{h_{max}}\
h^{-1}(c/x) & text{if } x in [frac{c}{h_{max}},frac{c}{h_{min}} ]\
0 & text{if } x > frac{c}{h_{min}}

where $h^{-1}$ is the inverse function of some function $h$ such that $h(x) > 0$, $h'(x)>0$ and $h$ is differentiable. Assume also that $g$ is continuous.

Now if $c > {h_{max}}$, the function is zero or negative over the entire domain, so the solution is characterized.

I am interested in the case where $c$ is small. It seems to be that for “small” $c$, the solution should be $x = c/h_{min}$.

A condition for this to be true is
frac{1 – frac{c}{h_{min}}}{1 – x} > f(g(x));; forall x < frac{c}{h_{min}}

I wonder if I can say for any fixed, $f, g, h$ under these assumptions then there exists some value $k$ such that $forall c<k$, $x^* = c/h_{min}$.


Unable to access an instanced health system


I am having an issue with a health system I am making for my game. I have been at it for 3 days now and have not made much progress. For reference, I am following this tutorial by code monkey: Code Monkey Health Tutorial. The goal is to have two buttons, one for healing and one to damage the player, and a Text Mesh Pro UI Text to show the health of the player, just for testing purposes. Unlike the tutorial, the buttons and text are just on a canvas, not attached to the player, as I am setting it up as a form of a HUD system. also, forgive the formatting, during troubleshooting, I was more focused on trying to fix my issue and my code became a bit of a mess. Sorry for that.

I have three scripts

    using UnityEngine;

    public class HealthSystem
        private int _health;
        private int _healthMax;

        public HealthSystem(int healthMax)
            this._healthMax = healthMax;
            _health = healthMax;
            Debug.Log("healthSystem Created");
        public int GetHealth()
            return _health;
        public void Damage(int damageAmount)
            _health -= damageAmount;
            if (_health < 0) _health = 0;
        public void Heal(int healAmount)
            _health += healAmount;
            if (_health > _healthMax) _health = _healthMax;

    using UnityEngine;

    public class GameHandler : MonoBehaviour
        private HealthButtons _healthButtons;

        private void Start()
            HealthSystem _healthSystem = new HealthSystem(100);
            Debug.Log("Health = "+_healthSystem.GetHealth());
using UnityEngine;
using TMPro;

    public class HealthButtons : MonoBehaviour
        private TextMeshProUGUI numberText;
        private static HealthSystem _healthSystem;
        private int intToStringHealth;

        public void DamageButton()
        public void HealButton()
        public void Setup(HealthSystem healthSystem)
            if (healthSystem == null) Debug.Log("healthSystem");
            _healthSystem = healthSystem;
            Debug.Log("Setup is running");
        private void Update()
            intToStringHealth = _healthSystem.GetHealth();
            numberText.text = intToStringHealth.ToString();

my issue currently is Im trying to create an instance of HealthSystem in GameHandler, which I am successful in, then pass the information to HealthButtons using _healthButtons.Setup(). This is where I become unsuccessful as I am getting a NullReferenceException error.

from my efforts of troubleshooting currently, I have determined I am not calling the instance correctly, but I do not want to use code monkey’s libraries. I have tried making all classes monoclasses and attaching them to game objects and using SerializeFields for all my variables, which does work, but I am not sure that is best practice as I do know linking everything up in the inspector can be a chore if something goes wrong.

This tells me the solution should be fairly simple, I am just not able to articulate the question into google to get the correct answer. It may be a bit overkill just to test a function, but I would like to understand what I am doing wrong and get better. Thank you very much for your help.


Deriving the log likelihood of the observed data


enter image description here

Hi, I am deriving the log likelihood of the observed data in part a. However, I am not sure if I am deriving it the right way.

Below is my solution:

Yi ~ N(mu, sigma^2) = f(Yi = xi) = ∅ (xi; mu, sigma^2) (for ri =1)

Yi ~ N(mu, sigma^2) = f(Yi = xi) = Φ (xi; mu, sigma^2) (for ri =0)

Then I multiply these two terms

f(xi,ri) = ∅ (xi; mu, sigma^2)^ri*Φ (xi; mu, sigma^2)^1-ri

and then I form the likelihood equation:

L(mu,sigma^2|x,r) = n i=1 prod ∅ (xi; mu, sigma^2)^ri*Φ (xi; mu, sigma^2)^1-ri

Is this the correct way to derive the equation in part a?
I have also attached the picture of the question.


How would you authenticate requests for player specific data in a server authoritative game?


I am creating a server authoritative game that uses a public game service API to manage player specific data in the game. The client will authenticate with the auth server, get a token, then use that token to access player specific data in the API. This works well if the API calls to the game services occur on the game client. However, in a server authoritative model, the game server itself would need to make those calls on behalf of the client. My current idea is to replicate the access token to the server and then have the server figure out which token to use when it is requesting data for a specific client. I was curious if this is the best way to do this or is there another approach I should be considering?


TypeError: ‘NoneType’ object is not iterable using Zonal Statistics

I’m trying do looping zonal statistics to many polygons in a folder, and rasters in aonther folder. Each polygon from a specific folder need to get the mean values from a many rasters from another folders, like slope, standard deviation, etc. But when I run this code the error is:

Traceback (most recent call last):
File “D:/”, line 10, in
for shp in shapefiles:
TypeError: ‘NoneType’ object is not iterable

What this means?
My code:

import arcpy
import os

arcpy.env.workspace = r'D:pontos_modelagembuffers'
arcpy.env.workspace = r'D:slopes'
arcpy.env.overwriteOutput = True
output = "D:tractebelpontos_modelagembufferdbf"
rasters = arcpy.ListRasters()
shapefiles = arcpy.ListFeatureClasses()  
for shp in shapefiles:
    for rst in rasters:  
        table_out = output + "\" + shp + "_Zonal_Est"  ,'FID',rst, table_out,"MEAN") 

Which is the real Euler’s Rotation theorem?


There are two quite different, but useful, theorems related to 3D rotation that are referred to as “Euler’s Rotation Theorem“.

The first definition is given as a quotation in the book by Kuipers

  • Any two independent orthonormal coordinate frames can be related by a sequence of rotations (not more than three) about coordinate axes, where no two successive rotations may be about the same axis.

There is a similar, but more pithy definition, from Wolfram MathWorld

  • An arbitrary rotation may be described by only three parameters.

This is related to the three-angle representation of an arbitrary rotation by Euler, roll-pitch-yaw, Tati-Bryan angles etc.

The second definition is from Wikipedia

  • When a sphere is moved around its centre it is always possible to find a diameter whose direction in the displaced position is the same as in the initial position. (Also given in latin)

This related to the angle-axis representation of an arbitrary rotation. This version of the Rotation Theorem is found in many other places as well, including here on Math Overflow.

Both definitions are related to rotation, and the second at least has a reference to Euler 1776. The first is related to Euler axes and Euler angles, seems like the sort of thing Euler might have figured out, but Kuipers does not provide a reference.

Euler was notorious for not publishing much. Somebody, post Euler, has declared these theorems as Euler’s Rotation Theorem. Which one is it? Is there a more nuanced way to refer to them?


Using Overpass to find intersections with 3 or more links

I’m trying to find all the intersections (nodes) with 3 or more links (ways) in an area as an indicator for walkability. Complete beginner to the Overpass API and this has me pretty stumped. OSM clearly shows which ways are part of a node, suggesting that this should be very doable. Can’t be much more specific as I don’t even know where to start, so thanks in advance for any help!