c# – Why is my bool value, set within a ScriptableObject, not being updated in another script?

I have a problem with my bool value that I dont understand. I have an Actions script, which derives from MonoBehavior. In that script I have a bool variable “IsCompleted”, which shall indicate whether an Attack is finished or not. In Awake there I set this bool to true, to indicate that no attack is running. In another Script – ScriptableAttack – which derives from ScriptableObject, I have a function that is the main part of an attack. There I edit this value and set it to false. Then, if conditions are good, I want to run a timer after that the bool is set to false again. Now, since I can’t use the typical Update method on a ScriptableObject, I want to check if this value is false in a third script I have – CharacterSettings – which derives from MonoBehavior. The problem now is that when I check that value on Update in the CharacterSettings script, it always returns true, while I see that it is indeed false within ScriptableAttack. I also checked if I overwrite this value somewhere but couldn’t find anyhing. The usages I wrote down here are the only ones I have in my application. Maybe somebody can help or at least explain this behavior to me.

At this point I don’t post code since I don’t know if that’s relevant and if, what part is relevant. If anybody has an idea what part of my code might cause this, I’ll add some code to this post.

Bash script whitespace compliant – Code Review Stack Exchange

I have an huge amount of file to organize, they are a JPG files in an absurd folders structure.

I need to move all files from its actual position to an organized folder structure, saving its actually position as EXIF comment because in path there information to preserve.

For example I have a file with this path:


The destination will be something like: Archive Digital/AA/1995/CCC_BB_000002.jpg

My idea is to run the script from the OLD ARCHIVE/ path in order to have all information in the fname var. Then extract information from fname var and put them in exif (and in path), at the end, move the file logging what I’m doing.

I am writing this in bash, it was working but had some problem with whitespace management, so I tried to make it whitespace compliant…but it is not working anymore.

Can someone help me?

Thanks in advance.

#Parametri: CartellaOriginale CartellaOutput Prefisso NumeroIniziale Keywords
filenameNumber=$(printf "%05d" $4)
data=$(date +%F)
echo "DEV Working on $1"
echo "DEV output folder $2"
echo "DEV filename start $filenamePrefix$filenameNumber"
echo "$1/$filelog"
echo "Backup in ${1%/}_BAK/"
#echo "$data"
read -p "Press enter to continue"
echo 'Backup in corso'
#cp -R "$1" "${1%/}_BAK/"
echo 'Backup terminato, inizio elaborazione'
#mkdir "$2"
touch "$1/$filelog"
find "$1" -name "*.jpg" -or -name "*.JPG" -type f -not -path "*_BAK"| while read fname; do
    echo "$fname"
#Chiedo l'anno
    forseAnno=$(echo `grep -oP  '(?<!d)d{4}(?!d)' <<< "$fname"`)
    if ( -z "$forseAnno" )
    echo "Inserire cartella anno dove inserire la foto oppure lasciare vuoto se $forseAnno"
    read annoIn </dev/tty

    if ( -z "$annoIn" )
    then #Se input è vuoto
    else #ho input, metto lì.
    #echo "$anno"   
#Keyword per Lightroom
    #Estraggo alcune possibili KeyWord
    if grep -q 'palio' <<< "$string"; then
        extraKey=',palio del niballo'
    if grep -q 'dama' <<< "$string"; then
    if grep -q 'not' <<< "$string"; then
        extraKey="${extraKey},nott de biso"
    if grep -q 'cavaliere' <<< "$string"; then
    if grep -q 'bigorda' <<< "$string"; then
    if grep -q 'corteo' <<< "$string"; then
    if grep -q 'paggi' <<< "$string"; then
    echo "$extraKey"
    read -e -p "Correggere le Keywords: " -i "$anno,$CommonKeywords$extraKey" KEYWORD </dev/tty
    suffix=$(printf "%05d" $filenameNumber)
    exiftool -p -Keywords='"$KEYWORD $fname"' -overwrite_original
#Registro il precedente nome file nella descrizione
    exiftool -p -Description+=''ERA: "$fname"'' "$fname" -overwrite_original  
#Sistemo la CreateDate
    echo `exiftool -wm cg -CreateDate='"$anno":01:01 00:00:00' -overwrite_original "$fname"`
    if ( $? -ne 0 ) #avevo già una data
        datafile=(exiftool -S -createdate "$fname")
        while true 
            if ( $anno -lt 2021 ) #la scrittura della data in EXIF la faccio solo se è un anno minore di 2021. Se ho messo 5060 per indicare anni 50-60 non lo metto
                    read -e -p "Sovrascrivere la data $datafile con $anno?(Yes/No/Vuoto)" -i "Y" yn </dev/tty
                    read -e -p "Sovrascrivere la data $datafile con $anno?(Yes/No/Vuoto)" -i "N" yn </dev/tty
            case $yn in 
                (Yy)* ) exiftool -p -CreateDate='"$anno":01:01 00:00:00' -overwrite_original;break;;
                (Nn)* ) break;; #Non fo una sega
                (0123456789)(0123456789)(0123456789)(0123456789)* ) exiftool -p -CreateDate='"$yn":01:01 00:00:00' -overwrite_original;break;;
                * ) echo "Inserire Y(es)/N(o) o l'anno";;
#Procedo allo spostamento e logging
    echo 'Sposto '"$fname $2/$anno/$filenamePrefix$suffix.jpg"
    read -p "Confermi?"
    mv ""$fname"" ""$2/$anno/$filenamePrefix$suffix.jpg""
    echo ""$fname"; "$filenamePrefix$suffix.jpg"" >>$1/$filelog
    echo ""
echo "Completato";


How long does a HiddenEye keylogger script last in an Android browser?

I recently clicked on a phishing link and entered my credentials but then I changed the password. I believe the phisher used HiddenEye with a keylogger script in the webpage so how long can he capture my keystrokes for, after clicking the link I immediately closed the browser and cleared the cookies and seemed to find no malware when I did an antivirus scan but what if he enabled the keylogger script in my browser when I clicked the link, how do I find out?

plugin development – What’s the right way to tell if a block is rendered in the editor from a front-end/public script?

I’m writing a block that generates a skeleton via server-side render, and then populates the skeleton via React from a public-facing script (i.e., one that loads both on the front-end and the admin side of things). This works fine on the front-end, because the server-side render is triggered … from the server side. So, when the DOM is loaded, I can look for my skeleton, and then insert my React component. However, when in the editor, the server-side render is triggered via ServerSideRender in the block’s edit function, and the content is returned by API; so, the blocks aren’t yet rendered when the DOM is done loading. To work around this, I set a MutationObserver on the editor, and watch for my skeleton(s) to arrive. This seems inelegant. The below code works, but a) is it the Right Way to do this; and b) if it is, when (if ever) is it safe for me to remove the observer?

document.addEventListener("DOMContentLoaded", (event) => {
        let myEls = document.getElementsByClassName("my_class");

        if (myEls.length > 0) {
                for (let myEl of myEls) {
                        render(<MyReactComponent />, myEl);
        } else {
                //we're on an admin page, and the my_class divs arrive
                //later via API call, so we have to watch for their creation
                let editorDiv = document.getElementById("editor");

                const config = { childList: true, subtree: true };

                const callback = (mutationList, observer) => {
                        for (let mutation of mutationList) {
                                if (mutation.type === 'childList' &&
                                    mutation.addedNodes.length > 0 &&
                                        ".my_class")) {
                                        let myContainer =
                                        let myChild =
                                        render(<MyReactComponent />, myChild);

                const observer = new MutationObserver(callback);



Ajuda Script VBA para excel

estou desenvolvendo um script para Excel, que copia campos específicos de uma planilha, e cola em outra, pega o nome da célula A9 e salva um arquivos com os dados copiados com o nome da célula A9 em formato .txt, após deleta a linha A9 e continua o loop ate que chegue na célula A9 sem valores, o script para isso funciona como eu quero, mas estou quebrando a cabeça é para salvar esse .txt dentro da pasta que tambem o script cria com nome da célula A9.

EX: C:userdesktopsaves0101.txt,
C:userdesktopsaves0303.txt e assim por diante.

alguém poderia me ajudar?

abaixo o codigo que estou usando:

Sub CriarNovaPlanilha()
 linha = 9
 Do Until Cells(linha, 1) = ""
   Application.DisplayAlerts = False
    ' declara as vari√°veis
    Dim ultimaPlanilha As Integer
    Dim planilhaVerificada As Integer

    ' define a √ļltima planilha com nome Dados encontrada,
    ' o 0 (zero) indica que ainda n√£o foi encontrada
    ultimaPlanilha = 0

    ' desativa atualização de tela
    Application.ScreenUpdating = False

    ' adiciona nova planilha no final
    Sheets.Add After:=Sheets(Sheets.Count)

    ' percorre todas as planilhas existentes
    For i = 1 To Sheets.Count Step 1
        ' verifica os nomes das planilhas
        If Sheets(i).Name = "Dados" And ultimaPlanilha = 0 Then
            ' define que foi encontrada uma planilha com nome Dados
            ultimaPlanilha = 1
        ElseIf Sheets(i).Name Like "Dados (*)" Then
            ' pega o n√ļmero que est√° entre os par√™nteses
            planilhaVerificada = CInt(Mid(Sheets(i).Name, 6, Len(Sheets(i).Name) - 6))

            ' verifica o n√ļmero da planilha atual com o n√ļmero da √ļltima encontrada
            If planilhaVerificada > ultimaPlanilha Then
                ' define o n√ļmero da √ļltima planilha encontrada
                ultimaPlanilha = planilhaVerificada
            End If
        End If
    Next i

    ' seleciona a planiha atual

    ' verifica qual o nome dever√° ser considerado
    If ultimaPlanilha = 0 Then
        Sheets(Sheets.Count).Name = "Dados"
        Sheets(Sheets.Count).Name = "Dados (" & CStr(ultimaPlanilha + 1) & ")"
    End If

    ' ativa atualização de tela
    Application.ScreenUpdating = True

'Cria a pasta com o nome da Celula A9

     Dim pasta As Object, nomePasta

        Set pasta = CreateObject("Scripting.FileSystemObject")

            On Error Resume Next

    nomePasta = ThisWorkbook.Path & "" & Planilha1.Cells(9, 1).Value

        If Not pasta.FolderExists(nomePasta) Then
            pasta.CreateFolder (nomePasta)
        End If

'Copia os dados definidos da plan1

    Dim Nome As String
    Nome = Planilha1.Range("A9").Text
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    Application.CutCopyMode = False
    'Salva os dados copiados em formato .txt 
    ActiveWorkbook.SaveAs Filename:="C:UsersarthuDesktopsave" & Nome & ".txt", _
        FileFormat:=xlUnicodeText, CreateBackup:=False

    Selection.Delete Shift:=xlUp

    Application.DisplayAlerts = True

End Sub

Selling a casino script for a casino club Goldsvet 7.1 MRS

Our casino script is designed to create a club casino.
There are 954 games in the casino set.
The script has a convenient admin panel, cashier.
Our games are written in html5 and work on computers and phones!
We want to clarify that all casino games are source code!
The most important thing is that our script is not bound to a domain, and ip.
The casino has two unique templates (casino design).
We also provide detailed instructions on how to set up a casino (in case of difficulties, we will help you set up!)

We accept payment on a crypto wallet!
Price of a full casino set: 1500 euros

For all inquiries, contact the cantaks:
                                telegram: https://t.me/kseGB
                                mail: (email protected)

Rewrite php script – Code Review Stack Exchange

I have written one script in PHP which is defined here:

Click Here to See Code

I am improving the code quality and readability. For example splitting it into multiple functions, use PHP predefined variables, use PSR naming conventions etc.

class nextcrontime{
//Get Single argument passed
function calculate_next_cron(){
    If(isset($_GET('time')) && !empty($_GET('time'))){
        //Read config.txt file
        $read_txt_file = fopen ("config.txt", "r");
        $splitime = explode(":", $_GET('time'));
        // Loop Content from config.txt line by line and perform required actions
        while (!feof ($read_txt_file)) {
            $line = fgets($read_txt_file, 4096);
            $list = explode(" ", $line);
            if($list(0) != '*' && $list(1)=='*'){
                $newtime = $splitime(0).":".$list(0);
                if(strtotime($newtime) >=  strtotime($_GET('time'))){
                    echo $newtime." ".'Today'." ".$list(2);
                    $time = date('Y-m-d H:i', strtotime($newtime) + 60*60);
                    if (date("Y-m-d") > $time) {
                        echo date("H:i", strtotime($time))." ".'Today'." ".$list(2);
                        echo date("H:i", strtotime($time))." ".'Tomorrow'." ".$list(2);
        echo "Please Pass Time in HH:MM format. Example > php-cgi -f Index.php time=16:10.";
    //Close File Handler
    fclose ($read_txt_file);

mysql – how to add a new sql file into a script?

I’m using dbeaver and within a script I’m writing, I’m aiming to open up another .sql file so that I can work with the script within that other file as well.

For example:
I’m using this in the script to open a file called cars:


for a file located in


I get this error:

SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@~makersAnnDocumentsnew_projcars.sql;' at line 1

Thanks for your help!

Dealing with time zones in Apps Script when importing data into Google Sheets

I’m having some trouble getting time zones to play nicely with a custom Sheets extension when importing data into Google Sheets.

It seems that there is sometimes a mismatch between time zones that results in incorrect behavior.

Here’s my code to try to combine some date data columns in order to display a properly formatted date:

   activeSheetTimeZone = Session.getScriptTimeZone();
  //Merge dates into start and end only
  var range1 = sheet.getRange(2,shiftDayIndex,sheet.getLastRow()-1,1).getValues().map(date => Utilities.formatDate(date(0), activeSheetTimeZone,"MMM d"));
  var range2 = sheet.getRange(2,shiftStartIndex,sheet.getLastRow()-1,1).getValues().map(date => Utilities.formatDate(date(0), activeSheetTimeZone,"h:mm a"));
  var range3 = sheet.getRange(2,shiftEndIndex,sheet.getLastRow()-1,1).getValues().map(date => Utilities.formatDate(date(0), activeSheetTimeZone,"h:mm a"));

When importing a .csv file, this causes the dates to be shifted inappropriately (looks like it’s treating the imported data as GMT +0 and adjusting it to Central Time according to the project settings).

However! If the user does certain things in the imported sheet, it seems to synchronize the imported data to be in Central Time, so the formatted dates show up correctly. It’s not totally clear to me which actions cause the sync and which ones don’t. It’s also not clear to me if I can somehow force the “time zone sync” to occur in the scripting for the custom extension.

Does anyone have a way to make sure that there aren’t time zone conflicts when using custom Google Sheets extensions?

networking – ncat script to test source IP addresses with UDP load balancer

I have two Ubuntu Virtual Machines behind an Azure Load Balancer. I’m observing some inconsistencies with the source IP addresses set in outgoing UDP packets from the VM’s. I’m trying to come up with a simple ncat command or script that I can run on the VM’s to test the source IP’s.

My idea is to create a circular path (note the Load Balancer is transparent as far as the scripts and test go):

client -> LB -> VM1 -> VM2 -> LB -> client

What I can’t workout is how to pass the command through VM1 to VM2 to get it to execute a connection back to the client.

I’m thinking it needs to be the same command on VM1 and VM2:

ncat --sh-exec "/bin/bash" -k -u -l 1235

And the client connects to VM1 and sends it a command which gets through to VM2 and cause it to execute an ncat connection back to the client:

ncat -u 1235
echo "ncat -u $NCAT_REMOTE_ADDR $NCAT_REMOTE_PORT" | ncat -u 1235

The connection makes it to VM2 but not back to the client.