Issue with QR code ...

Clear all

# Issue with QR code Layout item plug-in

1 Posts
1 Users
0 Likes
0 Views
Illustrious Member
Joined: 4 months ago
Posts: 57425
Topic starter

I need through a QR code give an https adress, with parameters, like 'https://MyWebSite/Mywebpage?Myparam=1234'
The objective is to open a specific page of MyWebsite, and pass the parameter MyParam for further use in the page (ie prefill specific fields depending of the value passed.
I do not find the correct way of setting up this string, knowing that :
"https://MyWebSite/Mywebpage" is a constant, as well as "?Myparam=" and 1234 is the content of an attribute field in the shapefile.
The problems start with the char ? that does not seem to be accepted/recognised.
I tested with the concat function, or with double pipes, but without success, the concat does not seem to be executed and is litterally part of the QR code generated.
Any idea to have it work?
I also posted this question on github/qrbarcodeitem-plugin

## Let \$F\$ be a field; what does \$(F)\$ mean?

Let $$L,K,L_1,L_2$$ be fields where $$L/K$$ is a field extension and $$K leq L_1,L_2 leq L$$ be intermediate fields.
We define $$L_1L_2$$ to be the subfield of $$L$$ generated by $$L_1 cup L_2$$

Show the following:
$$L_1L_2=L_1(L_2)=L_2(L_1)$$

My thoughts:
I am a little bit confused what the expression $$L_1(L_2)$$ means. I have not seen $$()$$ being defined for fields, nor what the multiplication of fields is.
The thing that comes to mind is:
Let R be a ring. For $$S subset R$$

$$(S):=bigcap {A: A$$ is an Ideal of $$R$$ with $$S subseteq A}$$

In this case does $$L_1L_2$$ mean the multiplication of ideals which would be $$L_1L_2:={a_1b_1+…+a_nb_n:a in L_1, b in L_2}$$

Is the meaning of the notation the same for fields as for rings?

## 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:

$$g(x)= begin{cases} 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}} end{cases}$$
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, $$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());
_healthButtons.Setup(_healthSystem);
}
}
}
``````
``````using UnityEngine;
using TMPro;

public class HealthButtons : MonoBehaviour
{
[SerializeField]
private TextMeshProUGUI numberText;
private static HealthSystem _healthSystem;
private int intToStringHealth;

public void DamageButton()
{
_healthSystem.Damage(10);
Debug.Log(_healthSystem.GetHealth());
}
public void HealButton()
{
_healthSystem.Heal(10);
Debug.Log(_healthSystem.GetHealth());
}
public void Setup(HealthSystem healthSystem)
{
if (healthSystem == null) Debug.Log("healthSystem");
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

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:/ZONAL1.py”, 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"
arcpy.gp.ZonalStatisticsAsTable_sa(shp,'FID',rst, table_out,"MEAN")
``````

## Solve \$1= (x^2+y^2)^{1/2} +((x-1)^2+y^2)^{1/2}.\$

Solve $$1= (x^2+y^2)^{1/2} +((x-1)^2+y^2)^{1/2}$$
for real numbers $$x,y$$. A accept a curve if it is possible or a picture. It may be a cusp.

## QGIS – after restarting project WFS Layer only displays after opening attribute table and changing zoom

When i close my project and restart, some WFS Layers are behaving strange. They only display the data after loading/opening attribute table and changing zoom. I’ve tried refreshing with F5 but it is not helping. Any ideas?

## 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!

Share: