PHP MySQL insert if not exist and update if exist

i have the following code:

$sql = "SELECT * FROM zeiterfassung WHERE 
                    username='$benutzer' AND 
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    $sql1= "UPDATE zeiterfassung set dienstbegin = ".$dienstbegin.", dienstschluss=".$dienstschluss." WHERE username = " . $benutzer." AND datum = ".$date;
    $update = $conn->query($sql1);
    echo "Upgedatet";
} else {
   $sql2 = "INSERT INTO zeiterfassung (username, datum, dienstbegin, dienstschluss)
VALUES ('".$benutzer."', '".$date.  "', '".$dienstbegin."', '".$dienstschluss.    "')";
    $insert = $conn->query($sql2); 
    echo "Eingetrage";

The “Insert” works. The “Update” dont…
can someone find a solutions? wish you a fresh weekend;)

pr.probability – Does there exist a scale invariant random packing of circles in the plane?

I want to construct a scale invariant random packing of the plane with circles.

Here is a way to construct a rotationally invariant, but not scale invariant random packing of the plane with circles:
Suppose I have a Poisson point process in the plane (with say intensity 1 and time parametrised). After some fixed timestep $t_0$ I temporarily stop the PPP. Then start to grow a circle from each point (with the same speed for all circles) until the circle touches another circle then stop. This is also called the random Poisson lilypond model.
Now, we continue the Poisson point process and for every point arriving we grow a circle around the point until it touches one of the other circles.
Continuing this we get a random packing of the plane with circles. The packing must be rotationally invariant since it was construct rotationally invariant. However, it is quite clear that it is not scale-invariant.

Is there a way to construct a random circle-packing which is also scale invariant?

Ideas: Maybe one can change this construction slightly. For example one could do it on the hyperbolic plane, in the disc and do inversion, on the sphere and do stereographic projection or something along those lines.

Further motivation is provided by the interfaces in the Ising model which have a scaling limit which is even conformally invariant. But the interfaces have a structure which is very difficult to think about so I was wondering whether one could find some of these properties just with circles.
Here is an example of how such a circle packing could look. From arXiv:cond-mat/0203252v2

surveillance – What types of modern phone tapping exist today?

What are the different ways / technologies used today (2020) to tap phones today?
Are the technologies out there so terrible that the people being tapped know about it or is that a product of using old tech and not minding if people know that they’re being surveilled?

Specifically, I was listening to the link below and was amazed that the (alleged) victim of phone tapping was saying about his phone being tapped in 2020, “If I’m making a phone call that is supposed to be a confidential phone call, if I begin to talk about names of people.. my phone begins to click immediately and sometimes you’d hear people speaking in the background.” This takes place in Uganda

real analysis – if $lim _{xrightarrow infty}{f'(x)}=0$ then does $lim_{x rightarrow infty}{f(x)}$ exist in the broad sense

Let $f$ be a differentiable a function in $mathbb{R}$, and let $lim _{xrightarrow infty}{f'(x)}=0$

Does $lim_{x rightarrow infty}{f(x)}$ exist in the broad sense?

I’m really lost here. This exercise is from a section on MVT, and intuitively it seems to be correct, but I can’t seem to find a lead. If someone could just give me a hint that would be great.

So far my best shot has been using Heine’s definition of the limit, but no dice.

9 – The “Array” plugin does not exist after saving the order type form in Commerce

After saving any order type, the following error shows:

DrupalComponentPluginExceptionPluginNotFoundException: The "Array" plugin does not exist. Valid plugin IDs for Drupalstate_machineWorkflowManager are: invoice_default, order_default, order_default_validation, order_fulfillment, order_fulfillment_validation, payment_default, payment_manual, shipment_default in DrupalCorePluginDefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Any ideas?

swift – How do I check if the same item exist in plist and SpriteKit?

I am trying to make a RPG game in IOS, with a similar dialogue system in Baldurs Gate. I have created two arrays in a plist file. Like this:

Plist file

As you can see I have two arrays: PlayerMessage; a list (it will be) of multiple choices that the player can touch and NPCMessages; the text that is displayed when the PlayerMessage is touched

I am at the stage where I can touch on the NPC and see a black box with text from array (PlayerMessage). However I do not know how to tell Swift, if a player touches the string of the Item in PlayerMessage and if same item exist in NPC Message display the string of that item.

Here is the code that I have used:

    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
    for touch in (touches) {
        = "NPC"
        let Location = touch.location(in: self)
                    var CorrectedLocation = CGPoint()
                    CorrectedLocation.x = Location.x - LocalCamera.position.x
                    CorrectedLocation.y = Location.y - LocalCamera.position.y

        let node = self.atPoint(CorrectedLocation)
        var Message: SKLabelNode!
        Message = SKLabelNode(fontNamed: "Trebuchet MS")

        if ( == "NPC") {
            let NPCMessageer = SKSpriteNode (color:, size: CGSize(width:1000, height:1000))
            NPCMessageer.zPosition = 99
            NPCMessageer.position = CGPoint(x:-500, y:-200)
          Message.fontSize = 50
            Message.color = UIColor.white;            Message.position = CGPoint(x:-500, y:-100)
            Message.zPosition = 100

            for PlayerMessage in NPC.PlayerMessage {
             Message.text = PlayerMessage as?String}
            let label = self.atPoint(CorrectedLocation)
            if == "Message"
             if NPC.PlayerMessage == NPC.NPCMessage
                Message.text = NPC.NPCMessage as?String

complex analysis – Does there exist a holomorphic function $f$ such that $f(0) = 0$ and $|f(z)| > 1$ for $z = (x,y)$ and $|x|,|y| > 1$?

The exercise says:

Does there exist a holomorphic function $f$ such that $f(0) = 0$ and
$|f(z)| > 1$ for $z = x+iy$ with $|x|,|y| > 1$?

I tried to construct such a function but couldn’t find a way. I suppose no such function exists and I think there is some basic theorem which would contradict the existence of such a function but I couldn’t find anything in my notes. Any ideas on how to start?

2013 – Unable to reference a column by its Internal name. Column does not exist. It may have been deleted by another user

Today I created a new site column named “Business Category” inside my issue tracking list on SharePoint 2013 server. The column type is a dropdown list. Now the internal name for the column is “Business_x0020_Category”, as shown on the URL where the encoded name is “Business%5Fx0020%5FCategory” :-
enter image description here

Now I try running this command to update the value of this column to all the items inside the list:-

$web = get-spweb "http://****/***/**/"
$list2 = $web.lists("Tracking")
foreach ($i in $list2.items)
$a = $i("ID");

$sourceItem = $list2.items.GetItemById($a);

$sourceItem("Business_x0020_Category") = "User Delivery";



but I got this error inside the PowerShell command:-

Column 'Business_x0020_Category' does not exist. It may have been deleted by
another user.
At line:5 char:1
+ $sourceItem("Business_x0020_Category") = "User Delivery";
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) (), ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException

so can anyone advise on this, please ?

and when I run the following command

$web = Get-SPWeb  $web = get-spweb "http://****/***/**/"
$list = $web.lists("Tracking")
$list.fields | select InternalName, StaticName | sort StaticName | ft -AutoSize

the column Business_x0020_Category is listed in the list:

PS C:Windowssystem32> $list.fields | select InternalName, StaticName | sort StaticName | ft -AutoSize

InternalName                     StaticName
------------                     ----------
_CopySource                      _CopySource
_EditMenuTableEnd                _EditMenuTableEnd
_EditMenuTableStart              _EditMenuTableStart
_EditMenuTableStart2             _EditMenuTableStart2
_HasCopyDestinations             _HasCopyDestinations
_IsCurrentVersion                _IsCurrentVersion
_Level                           _Level
_ModerationComments              _ModerationComments
_ModerationStatus                _ModerationStatus
_UIVersion                       _UIVersion
_UIVersionString                 _UIVersionString
AppAuthor                        AppAuthor
AppEditor                        AppEditor
AssignedTo                       AssignedTo
AssignID                         AssignID
Attachments                      Attachments
Author                           Author
BaseName                         BaseName
Business_x0020_Category          Business_x0020_Category
Business_x0020_Development_x0020 Business_x0020_Development_x0020_Tracking_x...
businessfunctionsInitials        businessfunctionsInitials
Category                         Category
Comment                          Comment

so can anyone advise what is going on?

database – Need help for creating nodes but only if they not exist

I have Company data in external database. The first column of the data contains the id of different companys.
I will create nodes for every company but only if they do not exist identified by the id in the first column.

// Get Data from external DATABASE
  $result_wirdfit = db_query('SELECT * FROM wirdfit.wirdfit_data');
  $result_drupal = db_query('SELECT * From drupal.field_data_field_id');
  $wirdfit_id = array();
  $drupal_id = array();

 foreach ($result_wirdfit as $row) {
  $wirdfit_id= $row->id;

  $node = (object) array();
  $node->language = LANGUAGE_NONE;
  $node->type = 'page';
  $node->title = $row->id;
  node_object_prepare($node);  //Set some default values

   foreach ($result_drupal as $row1) {
   $drupal_id = $row1->field_id_value;
if ($wirdfit_id != $drupal_id){
  $node->is_new =TRUE;

There is a failure in the loop i think i missed some conditions and donĀ“t get it. It creates a node that is already available.


ct.category theory – Does the notion of a Poisson monad exist?

Starting with a monoidal category with duals $C$, one may consider the category $End(C)$ of endofunctors of $C$. A Hopf monad on $C$ is a bimonad on $C$ with (a generalised notion of the) antipode. Under suitable assumptions for the Hopf monad, this Hopf monad applied on the unit object of the category $C$ is a Hopf algebra in the centre of $C$.

The question is if the notion of Poisson monad in $End(C)$ has been defined somewhere? In the case that such a notion exists, does it return a Poisson algebra object in the category?