onepage checkout – magento 1.9 does not redirect the customer to the success page after a successful order

I have a strange problem with Magento 1.9.
Sometimes after a successful order the customer is not redirected to the success page, this does not happen in all orders, possibly 1 out of 5.
After diagnosing the problem, I found that in

core/Mage/Checkout/controllers/OnepageController.php

It seems that there is no getLastSuccessQuoteId () as shown in the pictures below

I thought it could be because of Redis, but I'm not sure. Has anyone previously had a similar problem or idea how to solve this problem? Thanks a lot 🙂
Screenshot 2020-03-31 at 22.05.47.png

strong textEnter the image description here

Exercise: Design a stack

Exercise: Design a stack

A stack is a data structure for storing a list of items in a LIFO
(last in, first out) fashion. Design a class called Stack of Three
Methods.

void Push(object obj)
object Pop()
void Clear()

The Push() The method saves the specified object at the top of the stack. We use
The type "object" here so we can save all objects in the batch.
Remember that the object class is the basis of all classes in .NET
Frame. In this way, all types can be automatically transferred to the object.
Make sure that you consider the scenario to which null is passed
this object. We shouldn't store zero references in the stack. So if
If null is passed to this method, you should throw one
InvalidOperationException. Remember when you code each method, you
should think about all the options and make sure that the method behaves
right in all these marginal cases. That differentiates you from
an "average" programmer.

The Pop() Method removes and returns the object on top of the stack
it. Make sure you consider the scenario we call Pop ().
Method on an empty stack. In this case, this method should trigger one
InvalidOperationException. Remember your classes should always be in
a valid condition and used correctly. If they are abused, they should
Throw exceptions. Here too, thinking of all these marginal cases separates
From an average programmer. The code so written will be more
robust and with fewer errors.

The Clear() Method removes all objects from the stack.

We should be able to use this batch class as follows:

var stack = new Stack();

stack.Push(1);
stack.Push(2);
stack.Push(3);

Console.WriteLine(stack.Pop());
Console.WriteLine(stack.Pop());
Console.WriteLine(stack.Pop());

The edition of this program will be

3
2
1

That was the task assigned to me. My code follows.

using System;

namespace Exercise
{
    class Program
    {
        static void Main()
        {
            var stack = new Stack();

            stack.Push(1);
            stack.Push(2);
            stack.Push(3);

            Console.WriteLine(stack.Pop());
            Console.WriteLine(stack.Pop());
            Console.WriteLine(stack.Pop());
        }
    }
}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace Exercise
{
    internal class Stack : IEnumerable
    {
        private object _object;
        private List list = new List();

        public IEnumerator GetEnumerator()
        {
            while (list.Any())
                yield return Pop();
        }

        internal object Pop()
        {
            if (list.Count == 0)
                throw new InvalidOperationException("Cannot use .Pop() if list count equals 0.");

            _object = list.FirstOrDefault();

            list.RemoveAt(0);

            return _object;
        }

        internal void Push(object obj)
        {
            _object = obj;

            if (_object == null)
                throw new InvalidOperationException("Cannot use .Push() if object is null.");

            list.Insert(0, _object);
        }

        internal void Clear()
        {
            if (list.Count == 0)
                throw new InvalidOperationException("Cannot use .Clear() if list is empty.");

            list.Clear();
        }

        public void Print()
        {
            if (list.Count == 0)
                throw new InvalidOperationException("Stack is empty.");

            foreach (var s in list)
            {
                Console.WriteLine(s);
            }
        }
    }
}

I am a beginner in C #. Is there anything else to improve that is within the boundaries of what the instructions expect? Any advice or suggestion if anything to teach me something new would be great. Thank you for the help on this page so far.

theming – variable in file-audio.html.twig

I've created a pre-process to generate a variable like this, and I can get that variable in the branch field template, but not in the child file-audio.html.twig

function mytheme_preprocess_node__audio(&$variables) {
  $node = $variables('node');
  $media_field = $node->get('field_image')->entity->uri->value;
  $variables('poster') = file_create_url($media_field);
}

And then I want to output the poster variable in the file-audio.html.twig file


The poster variable is empty. I tried several methods without success.

I can get the variable in the field branch template (field – field-audio.html.twig), but it is not available to the child file template

Any help is much appreciated, thanks

SQL Server Help, How do I insert a script into a table that already contains data?

It was if you could help me with the following question:

Generate a script in SQL Server only from the data in the agency table (agency_id, name).
This script is intended to be used for another table in another database, also known as an agency, which uses the same structure.

My problem is that this other table already contains data and the script it generated contains the ID. When I run it, a double data error occurs

This is the script that you generate using the SQL Server Generate Scripts option:

Enter the image description here

—- "Message 2627, Level 14, Status 1, Line 1
Violation of the PRIMARY KEY restriction & # 39; PK_AGENCIAS & # 39 ;. Duplicate key cannot be in object & # 39; dbo.AGENCIAS & # 39; be inserted. "

I wanted to know how to import these scripts without considering the same IDs, or how to insert but replace the same IDs.

My spreadsheet is identity, so the ID can be incremented automatically.

Guatemala – How long is the mopan between San Ignacio and Melchor de Mencos?

I'm researching river trips for a novel and have to figure out how long it would take a canoe to get from San Ignacio to Melchor de Mencos via the mopan. This would be an upstream trip, so I imagine a portage would be required. I was expecting to find at least some adventure trips from people doing this trip, but I can't find anything.

Set theory – monotonous subsets of innumerable level sets

To let $ S $ be a myriad of points in the Euclidean plane. Define a subset of $ S $ be monotonous upwards if every two points define a line with a non-negative slope, and downward monotone if every two points determine a line with a negative or infinite slope. It follows from the Erdős-Dushnik-Miller theorem that one or more of the following three things happen:

  • $ S $ contains an innumerable upward monotonous subset
  • $ S $ contains an innumerable downward monotonous subset
  • $ S $ contains both a countably infinite upward monotonous subset and a countable infinite downward monotonous subset

(This can be seen as an infinite version of the Erdős-Szekeres theorem about the existence of square root monotonous subsets of finite point sets in the plane.)

My question is about sets $ S $ this only satisfies the third option: $ S $ has no countless monotonous subsets, but countable monotonous subsets in both directions. Is it known that there are quantities or that there are no quantities? $ S $ what is it true for How can they be constructed if they are known to exist? Alternatively, both the existence and the non-existence of such a set are $ S $ known to be consistent?

Unity – How can I tell if a game object is touching another game object on a particular day?

I've seen similar questions here on Stack Exchange – Game Development, but none of the answers to these questions helped my problem. I work in Unity 2019.2.18f1 with the Visual Studios 2019 community.

What I want to know to know when a game object (the player) is touching another game object with the tag name "Block". If the player collides with a "block", he should be placed: jumpPossible = true; But when it leaves the block (by jumping or falling) jumpPossible = false;

What I currently have in mine PlayerController Script (the important stuff anyway):

private void OnCollisionEnter(Collision collision) {
    if (collision.gameObject.CompareTag("Block")) {
        jumpPossible = true;
    }
}

private void OnCollisionExit(Collision collision) {
    if (collision.gameObject.CompareTag("Block")) {
        jumpPossible = false;
    }
}

The problem I have is when the player is in one block and then touching another block. If it leaves one of the blocks, the following is set: jumpPossible = false; and you can't jump like that.

I want this script to run whenever the player touches any Gameobject with the tag "Block" should allow jumping.