lag – problem of delay in the creation of blocks (Godot)

We develop a game at Godot and get stuck when we try to split the map into pieces. Namely, the scene is a forest, where the spawn positions of trees were generated by the sound: as the trees are too numerous to be loaded, we created a Chunk knot, which only includes the trees that it contains, and which is instantiated and uninstalled depending on the player. position. Although this does not seem to be enough: whenever a new block needs to be instantiated, we get a lag spike. How can we improve that?
This is the script attached to Chunk:

extends Node2D

var noise

func _ready():
    randomize()
    self.name=str(global_position)
    noise=get_node("/root/global").noise
    LoadTrees()

func LoadTrees():
    var x=-38
    while x<39:
        var y=-14
        while y<15:
            if noise.get_noise_2d(global_position.x+float(10*x),global_position.y+float(12*y))>0.07:
                InstanceTree(Vector2(10*x+rng.randi_range(-3,3),12*y+rng.randi_range(-3,3)),self)
            y+=1
        x+=1

func _on_Exit_body_exited(body):
    if body.name=="Player":
        call_deferred("free")


func _on_AreaLeft_body_entered(body):
    if body.name=="Player":
        var NewChunkPos=global_position-2*Vector2(380,0)
        get_parent().InstanceChunk(NewChunkPos)

func _on_AreaRight_body_entered(body):
    if body.name=="Player":
        var NewChunkPos=global_position+2*Vector2(380,0)
        get_parent().InstanceChunk(NewChunkPos)

func _on_AreaDown_body_entered(body):
    if body.name=="Player":
        var NewChunkPos=global_position+2*Vector2(0,170)
        get_parent().InstanceChunk(NewChunkPos)

func _on_AreaUp_body_entered(body):
    if body.name=="Player":
        var NewChunkPos=global_position-2*Vector2(0,170)
        get_parent().InstanceChunk(NewChunkPos)

The functions that the script calls from its parent's script are as follows:

func InstanceTree(pos,Parent):
    var tree=Tree.instance()
    tree.position=pos
    tree.name=str(global_position)+"_tree_"+str(pos)
    Parent.call_deferred("add_child",tree)

func InstanceChunk(NewChunkPos):
    if not self.has_node(str(NewChunkPos)):
        var NewChunk=Chunk.instance()
        NewChunk.global_position=NewChunkPos
        NewChunk.name=str(NewChunkPos)
        call_deferred("add_child",NewChunk)

MySQL Data Lag in a local application

I have a problem that I do not see to find a solution.

We have a small server application that ping a GPS server every ten seconds and writes values ​​to two tables. d & # 39; First GPSLiveSecondly GPSLog. The server application reports the latest data update for each table.

The client application reads GPSLive draw a GPS map of vehicles. The customer checks the timestamp of the GPSLive table and compares it at the current time and warns the user that the data may not be current.

At the time 18:12:22 the server has updated both lines at 18:11:59. However, the client shows that the data is 16 minutes old.

the GPSLive The table has a single line and is overwritten with each update. This happens regularly and will then catch up. The system only works on our local network and has at most a handful of users. When I look GPSLive via a workbench, I can see that the timestamp has not been updated.

Is there anything I can do to solve this problem?

parsers – Analysis of a lag LALR – reduce conflict

I've created an extremely simple byacc grammar (ok, it's not so simple, but I've purposely simplified myself to become a minimal and complete verifiable example):

%token NEWLINE SPECIFIER
%token EQUALS STRING VAR

%start st

%%

st: toplevel;

toplevel:
| toplevel VAR EQUALS STRING NEWLINE
| toplevel list NEWLINE
;

list:
  maybe_specifier VAR
| list maybe_specifier VAR
;

maybe_specifier:
| SPECIFIER
;

However, he warns against a downsizing conflict. If I withdraw maybe_specifier of the grammar entirely (so that the variables can not be prefixed by a specifier in a list), the conflict disappears. Likewise, if I completely remove the grammar variable assignment, the conflict also disappears.

My questions are:

  • Where does this downsizing conflict come from? Is this an artifact of LALR? Or would it be there even with an LR (1) parser generator?
  • Does this change reduce conflict? Or does he still do the right thing anyway using shift instead of reducing?
  • Is there a way to change the grammar to accept the same language without offset conflict, other than by prefix VAR online assignment by maybe_specifier and then checking if the SPECIFIER was there in a semantic action, and failing if the SPECIFIER was present?

My current approach is to modify the attribution rule to initially accept a SPECIFIER in the form of maybe_specifier but end with an error of analysis if the SPECIFIER was here. I wonder if there is a cleaner approach that would allow me to do the same without adding semantic action.

mojave – Side scan with three viewfinders between late applications, sweeping up for mission control, then side scanning produces no lag

I experience a lag of about 1 to 3 seconds only when I slide sideways with 3 fingers between applications / desktops.

However, if I first slide with 3 fingers to activate the mission control, everything is fine and I can seamlessly slide between the desktops.

I noticed that if I pass 3 fingers on the trackpad, I will eventually be able to change my desktop. At this point, if I keep the motion running, I can switch between different offices.

All suggestions are welcome – I have changed my color profile and reset my nvram, as have suggested other mojave threads.

sql – Problem with IF-THEN block and LAG – does not correctly sort all lines

good afternoon
I am having a problem creating code with multiple IF THEN blocks and also with the LAG function using the SAS Enterprise Guide tool.

The purpose of the code is to classify deposits that occur as "journaled deposits", "own account deposits" or "non-journaled deposits".

Sorting is done in the DETAIL column.

When the value of the KEY column is equal to the previous value of the KEY column and we have a repository after a connection (DES_TRANS column), the repository is in the account itself.

When the values ​​in the KEY column differ and we have a repository after a connection, but after a long time, we define it as an "untraced repository".
When the weather is small, it is defined as & # 39; & # 39; connected & # 39;.

The problem occurs when we want to sort a deposit that took place after a deposit. To sort the result, we need the previous result in the DETAIL column, in which case only the next first row is being sorted (rows 287 and 288 must be assigned the unregistered deposit ranking).

![Insérerladescriptiondel&#39;imageici[inseriradescriçãodaimagemaqui[insérerladescriptiondel'imageici[inseriradescriçãodaimagemaqui

From there, I was able to solve this problem using RETAIN, as in the code below:

DETAIL FORMAT $ CHAR50 .;

RETAIN THE DETAIL;



IF DES_TRANS in & # 39; Depot & # 39; DETAIL THEN = & # 39 ;; END;



IF (DES_TRANS = & # 39; ET) & lag (DES_TRANS) = & # 39; AND & 39; AND KEY = lag (KEY)) DETAIL THEN = & # 39; Own account & # 39 ;; END;



IF (DES_TRANS = & # 39; ET) AND lag (DES_TRANS) = & # 39; CONNECT & # 39; AND KEY NOT lag (KEY) & TIME <=200) THEN DO DETALHE = 'Depósito Logado';END;

IF (DES_TRANS = 'Depósito' AND lag(DES_TRANS) = 'Login' AND CHAVE ne lag(CHAVE) AND TEMPO >= 200) DETAIL THEN = & # 39; Unregistered Deposit & # 39 ;; END;


IF (DES_TRANS = & # 39; & # 39; AND lag (DES_TRANS) = & # 39; AND lag (DETAIL) = & quot; Unregistered Deposit & quot;) DETAIL THEN = & # 39; Unregistered deposit & # 39 ;; END;





IF (DES_TRANS = & # 39;) AND lag (DES_TRANS) = & # 39; AND lag (DETAIL) = & # 39; Deposit in his own account & KEY = lag (KEY )) DETAIL THEN = "Own Deposit"; END;

IF (DES_TRANS = & # 39;) AND lag (DES_TRANS) = & # 39; AND lag (DETAIL) = & # 39; Deposit in own account & # 39; and key NE lag (key ) AND TIME <=200) THEN DO DETALHE = 'Depósito Logado';END;

IF (DES_TRANS = 'Depósito' AND lag(DES_TRANS) = 'Depósito' AND lag(DETALHE) = 'Depósito na Própria Conta' AND CHAVE ne lag(CHAVE) AND TEMPO >= 200) DETAIL THEN = & # 39; Unregistered Deposit & # 39 ;; END;



IF (DES_TRANS = & # 39;) AND lag (DES_TRANS) = & # 39; AND lag (DETAIL) = & # 39; RECORDED DEPT & # 39; AND TIME <=200) THEN DO DETALHE = 'Depósito Logado';END;

IF (DES_TRANS = 'Depósito' AND lag(DES_TRANS) = 'Depósito' AND lag(DETALHE) = 'Depósito Logado' AND TEMPO >= 200) DETAIL THEN = & # 39; Unregistered Deposit & # 39 ;; END;



RUN;

Nevertheless, the problem persists and the code does not work as it should …
In line 490, for example, the marking must be "unregistered deposit" according to the logic of the SI, but it ignores the sentence and ranks otherwise.

insert the description of the image here

php – Warning: Illegal chain lag & # 39; totalfuncionarios & # 39;

I have created a view in the database to display the total number of rows in a table. It always returns the same error, "Warning: illegal string offset" totalfuncionarios ". I will show you the code soon.

panel.php




    

select.php

function selectViewFunctional () {
$ bd = connectBank ();
$ sqlViewFunctional = "SELECT * FROM totalfunctions";
$ result = $ bd-> query ($ sqlViewFunctional);
$ row = mysqli_fetch_assoc ($ result);
return $ row;
}

Use the lag function in mysql to get the previous values

I'm trying to create a MySQL dataset containing entries from previous studies (surgical study, the first study worth 1) as well as for this user ID. Each user can have multiple studies. I'm trying to use the Lag function to get the data from the previous study. I get duplicate values ​​for study 1 when trying to use lag function.

WITH Complete_Data AS (
SELECT *
FROM Data
GROUP BY UserId, studyno
)
SELECT *, LAG (indication_of_chill, 1)
MORE THAN (
PARTITION BY UserId
ORDER BY studyno
) prev_study_indication_of_failure
,
LAG (BCVA_State, 1)
MORE THAN (
PARTITION BY UserId
ORDER BY studyno
) prev_study_BCVA
OF
Complete_Data
GROUP BY UserId, studyno
;

I expect null values ​​in prev_study_indication_of_failure and prev_study_BCVA when studyno = 1 but filled with values ​​when studyno> = 2.

Due to duplicate entries for studyno = 1, I get values ​​in prev_study_indication_of_failure and prev_study_BCVA

SQL Server – How to Properly Index a Table to Optimize LEAD / LAG Window Functions

I have an R table that contains 1.3 billion rows with a primary key and a unique clustered index on the S, L, P and Date fields. When I execute a query on R alone with LEAD or LAG window functions or by limiting the partition by ROWS:

OFFSET ([SomeData], 1) OVER (PARTITION BY S, L, P ORDER BY Date)
AVG ([SomeOtherData]OVER (PARTITION BY S, L, ORDER BY Date ROWS N PRECEDING)

the execution plan has an unnecessary sort on S, L, P and RowNumber. It's useless. The date must be unique for all S, L and P. In addition, if I perform a SELECT TOP (N), the 1.3 billion rows are analyzed when N lines only are needed.

Curiously, this problem does not occur at all if I do not have a partition on my LEAD / LAG function nor to use RANGE instead of ROW for framing:

OFFSET ([SomeData], 1) OVER (ORDER BY S, L, P, Date)
AVG ([SomeOtherData]) OVER (PARTITION BY S, L, ORDER BY Date Range PRECEDING UNBOUNDED)

but then I do not have proper frames. What should I do differently on the index or query hints to prevent unnecessary sorting and full analysis of the table?

Youtube – 4k 60fps – Deleting frames (Stutter / Lag / Freezes)

I'm trying to watch 2160p content (4k 60fps) on Youtube, but I'm experiencing a lot of image loss … that is to say that the video freezes / stammers completely ( the sound is perfect).

The Youtube example I use: Costa Rica – 4k 60fps – Youtube

If I watch the video in 1440p, it is read without any lost image. However, when switching to 2160p, the video freezes / stutters due to the considerable number of image losses (80%), see below.

Lost Images - 28 sec. - Youtube 4k 60fps

As a result, my Internet is stable and thin (via cable) and I use the VP9 codec in combination with HTML5 and Mozilla Firefox / Microsoft Edge (same result). I do not use hardware acceleration.

My PC specs .:

  • MSI H97M-G43
  • Intel Core i5-4460 in a box
  • MSI GeForce GTX 1080 GAMING X 8G
  • Crucial Ballistix Tactical BLT2C4G3D1608ET3LX0CEU
  • Seasonic M12II Evo 620W
  • LG 27UK850-W Zilver
  • Windows 10 Education (Professional Edition) – Version 1803 – Build 17134.590
  • Nvidia Driver – 25.21.14.1771 (NVIDIA 417.71)

Therefore, in my opinion, it should be enough to watch 2160p videos on Youtube? The processor is a little stressed, but the use is about 80%. The graphics processor barely works because the 2160p content requires a lot of decoding by the processor.

Current (after 28 seconds) – Min – Max:
CPU - 28 sec. - Youtube 4k 60fps

Does anyone have an idea of ​​what is wrong / how to fix it (software configuration or does it really mean the processor)? Thank you for any information!

Latency, Lag, CRON Media Library?

When I add images to my media library, these are not available for about an hour. It seems that there is a queue or some sort of CRON that goes off. The image appears in the media library as a transparent image for the time being.

How can I load the image to load when I download it?

The images worked previously, but I'm now downloading to S3 with a CRON that fires every minute. Maybe this concerns the question.

Editing panel that shows the picture correctly:

Editing panel with image

Media library that shows pause:

broken media display