Java – I have 4 threads and two reference an object, but when a thread.sleep (x) is executed, that thread will not run on both objects

Create a ConcurrentLinkedQueue of strings, I have two queues and I always store data (loop in my thread), then one queue of data goes out for each given time (loop in thread), and so should both instructions of both threads running at the same time, if I have to run one thread for a while and then another

Entrada entrada_cola1 = new Entrada(cola1);
    Salida salida_cola1 = new Salida(cola1);
    Entrada entrada_cola2 = new Entrada(cola2);
    Salida salida_cola2 = new Salida(cola2);

    System.out.println("INICIO DE SIMULACION");
        } catch(Exception e){
        System.out.println("SEMAFORO CAMBIO COLOR: ROJO-VERDE PARA COLA A: Se encuentran "+cola1.size()+ " Carros en cola A");
        System.out.println("SEMAFORO CAMBIO COLOR: VERDE-AMARILLO-ROJO PARA COLA B: "+cola2.size()+" Carros en cola B");
        }catch(Exception e){
        System.out.println("SEMAFORO CAMBIO COLOR: VERDE-AMARILLO-ROJO PARA COLA A: "+cola1.size()+" Carros en cola A");
        System.out.println("SEMAFORO CAMBIO COLOR: ROJO-VERDE PARA COLA B: "+cola2.size()+" Carros en cola B");


How to protect JavaScript objects and make sense to use objects?

I am creating a website for a real estate agency. And I use some JavaScript objects as test data. The objects consist of all the details concerning a specific property. Below is an example of an object that I created:

villa2: {
            id: '0D05428FE1',
            title: 'Beautiful house',
            address: 'Coshocton',
            State: 'Ohio',
            type: 'House',
            price: '15,000 000',
            lot_size: 2081,
            num_bathroom: 1,
            num_bedroom: 3,
            num_garage: 2,
            description: 'Qui laboris nisi sint ad velit quis ex deserunt deserunt ullamco ex. Nulla Lorem sint sit aute laboris elit et aute nulla. Consequat anim reprehenderit reprehenderit enim aute.'

However, my concern is how to protect these objects from tampering as soon as the website is online. Is the use of JavaScript objects also a good way to access a real estate website?

sharepoint online – Why are marked objects not displayed in the search? [Javascript]

I have a javascript code that highlights my results on a particular status. The script works fine, but the problem with looking for an invoice ID is that the color of the highlighted item disappears in the search view.

So what do I have to add to the code to enable it in Search view?

This is my code:


Look at these 2 pictures:
Before searching

After the search

Thank you very much !

Adding objects through a scrolling script (SetParent): Objects overlap

I need to add X objects to a scroll view. I'll do it that way:

GameObject statsObject = Instantiate(instance.statsObjectPrefab);

statsParent is the content container of the scroll view.

---- Viewport
-------- Content // This is statsParent

In the pause, I see that then objects are added successfully, but all overlap and no scroll bar is visible.

The content has a content size fitter and a vertical layout group, but I have now tried all the settings and the result is always the same.

Enter image description here

I use Unity 2019.2

Is there a language in which "list" objects are avoided / not preferred?

I've reviewed the code of someone who could greatly benefit from using a list or a arrayOn the way I made the following statement:

Lists are very useful objects, no matter what language you are in …

However, I immediately afterwards made an additional comment in brackets:

I would be very interested to see a language with a bad implementation …

This is because when I made the statement, I was curious when I thought about possible comments that might be made The language x makes using lists a terrible experience, Which, of course, has made me think about the subject, and I can not imagine a language in which a list is poorly implemented. There are examples of known problems with multidimensional arrays in the C# Language, but that is not list,

Is there a popular software language in the list Objects meet at least two of the following categories?

  • Unbelievably difficult to implement
  • Unbelievably bad performance
  • Is often avoided in the language
    • Also from experienced developers.

Comments and answers to situations in which list Objects that are less useful are not necessary, because as software developers we naturally understand this.

How do I remove image distortion from distant objects taken with a telephoto lens?

This depends greatly on the camera and / or computer you are connecting to.

Most, if not all, have a feature that allows you to delete pictures that you do not want to keep.

If the camera is recording on removable media, you can physically destroy the media, which will erase the image.

If the camera records in a way that can not be removed, you must physically destroy the entire camera to remove the image.

I do not think that in this case, the choice of the lens or the distance to the objects of importance.

Java – Create a new element instance only if two objects have different signatures

When adding to a product list, a new instance of a type A product only needs to be created if the incoming entry contains at least one variable of a different value than the one already in the list. If same signature, increment count. Else, store as new instance
e.g. CarType aCar1={"color":"Red"
} CarType anotherCar={"color":"Green"} /*Should result in creation of new Car()*/
but CarType aCar3={"color":"Red"} /*Should result in incrementing the count of aCar1 */ Code can be in Java, PHP or Javascript

Is it possible in Unity to retrieve game objects from an unopened scene?

Excuse my English mistakes, I did my best to make myself understood.

On Unity 2017.1 + C #.

I'm trying to do UnitTest to check for possible errors in the scenes.
and if I want to get the gameObjects from the two different scenes,
I can only get the scene that is currently open in the editor.

How can you solve this problem?
Or is this impossible in the Unity mechanism?

Two seconds I have:

I have two seconds

Hierarchy of Scene 1:

Scene1 hierarchy

Scene2 hierarchy:

Scene2 hierarchy



Result: Retrieve only the information of the open scene

Result: Retrieve only the information of the open scene