unity – TextField Add in editor does not display when put under if statement

I’ve been trying to make a custom editor window in Unity, and i needed to make an “add TextField” button.
But when i add TextField directly ( without requiring a button ) it works
when i put it under if(GUI.Button()) it does not show up.
Here’s my code:

private static List<string> s = new List<string>();
private void OnGUI()
    if (GUI.Button("+");)
        s.Add(GUI.TextField(new Rect(0,50,Screen.width,20),"field"));

dnd 5e – Does the Sleep spell put a warlock with Aspect of the Moon to sleep?

Sleep says:

The spell sends creatures into a magical slumber. […] each creature affected by the spell falls unconscious until the spell ends, the sleeper takes damage, or someone uses an action to shake or slap the sleeper awake.

The spell makes it clear that it puts the creature to sleep. Note the many reference to sleep sleeping and awake in the spell effect description. The unconscious condition is simply a mechanical way the game models sleep, but it does not change the fact that the spell indeed puts a creature to sleep.

The Aspect of the Moon invocation says:

You no longer need to sleep and can’t be forced to sleep by any means.

Having this aspect clearly then negates any attempt to put the warlock to sleep. And since sleep tries to do just that, the invocation allows them to be completely unaffected by the spell.

how we can put restriction on the customer reviews on the Magento

How I can put restrictions for customers in the review section. Only those customers can put review who are bought our products.

Thank you

navigation – I’m not sure what to put on my desktop app’s home screen

I’ll take your word you cannot predict the sections users are likely to want when the app starts (but see jgthms’ answer before settling on that). You’re correct that if you already have an efficient sidebar menu on every section, then it doesn’t make sense to make the home section the “speed dial” page. Eliminating the sidebar in favor of the home speed dial controls slows navigation, and having both adds complexity with little benefit.

Enhanced Navigation

However you might be able to do something to enhance the performance of the sidebar menu on the home section. For example, if the side bar menu has cascade menus, then the home section can display the cascade menu items across from their respective sidebar menu items, as if they’re “pre-opened.” That will give the user on the home section one slew-and-click access to any menu item, while still being consistent at the top level with the sidebar menu for every other section. Such a home section also educates the user of what options lie under what sidebar menu item so they can find them faster when using the sidebar menu in other sections. A page with all menu items visible is faster to use and less disorienting than a cascade menu (see Bernard ML, Hamblin CJ, Chaparro, BS (2003) Comparing Cascading and Indexed Menu Designs for Differences in Performance and Preference. Proceedings of the Human Factors and Ergonomics Society 47th Annual Meeting, 1370-1374). It’s just we usually don’t have the space for it, but here you do.

As similar example, the home section could include controls to set the parameters for each section. If the user needs to filter or populate the content of each section (e.g., provide a date range for the Orders section), you can list the most recently used date ranges across from the Orders menu item on the home section. Or you can provide blanks to enter the date range on the home section so the user can get to a populated Orders section directly.

Work At Home

You already have notifications and alerts on the page, which are presumably important to see when the app starts (maybe even more important than the navigation options). Is there anything else you can put there that useful to the user? Maybe the home section can feature subset of the content of each section (again, proximal to the corresponding sidebar menu) that allows the user to do the most common and easiest tasks for that section right on the home page. Maybe some users will never have to leave the home page, making for simpler and easier-to-use app for them. If the users find they need more detail, they can “drill down” to the section, which will carry over their input from the home section.


Your concern is there’s “not enough to fill the screen.” Why is that a problem? Blank space is a pretty good indication to the user of what they need to do next (create or retrieve something). Many office-type apps start with a blank virtual page. If users are complaining about it looking too boring, then maybe add some non-distracting wallpaper. Or make the window smaller (e.g., tall and narrow so it’s tight around the sidebar menu), and expand it only when the user selects a section to show. If adding anything else to the home section just adds useless clutter, then maybe your job is already done.

sql server – I have a bunch of SQL databases. How should I put these into Azure?

I have a bunch of on-premise SQL databases that contain data related to HR. One database could be pure employee data, such as staff records, leaver records or recruitment records. Another database could be from a external provider of services, which would tell me what benefits my employees are utilising. A final example could be salary review data, where data is generated by the business each year by line managers submitting employee performance scores.

I’m currently exploring Azure as I want a cloud solution for my data. I need to store all of these datasets in a central location, with some standard governance applied. I also need to have this data available to applications such as Power BI for BI requirements and I also need machine learning capabilities for data science projects.

I currently use SSIS to get my data in SQL Server, however my research has suggested using Azure Data Factory, Azure Data Lake and Azure Synapse to manage my data.

I don’t really know where to start, any guidance would be great! Thank you.

Defining domain logic and finding the correct place to put it

I’ve been practicing DDD and refactoring an app to understand it’s principles and applications better. However I can’t fully grasp some of the ideas and how to implement them in my business domain.

Let me start with stating a business requirement: A user can place and order and this order would need to be verified by a sales manager who is responsible for the orders of that specific product. User can be a registered user or an anonymous user. In both cases order comes from a request form that contains all the required information for order to be placed. Users can purchase their orders with different supported payment methods.

Now this requirement only belongs to the “placing an order” context. Other parts of the app includes how to process this order after it’s verified, and then when the processing is complete, eventually deliver the order.

For this requirement I’m trying to think of my domain entities. First I think it’d be logical to have Customer aggregate, because from the original requirement it’s clear that a Customer can place an order so my code could be something like the following:

class Customer {
   Key Id
   void PlaceOrder(OrderRequest request) {...}

However, business requirement states that this user can be an anonymous user in that case I have no “Customer” instance that I can map the incoming request to. So I change my model and come up with the following aggregate:

class OrderContext {
   Key OrderId;
   void PlaceOrder(OrderRequest request, Nullable<Customer> customer) {...}

But then DDD examples and books state that domain entities should correspond to their use cases. In this context, it’s not very clean when you read this code and out loud state “an Order can place itself” – errm what?

How do you model your domain for a business requirement like the above? Who is actually responsible for creating this order? On top of that, an order can be placed from the sales manager’s if, for example we want to gift to a customer for compensation. In this case, a “SalesManager” entity would also have “placeOrder” method in it. I’m totally confused and lost about how to translate this kind of business logic into my domain models.

How would be the relation between orders and customers and sales managers then? I could have “orders” collection in all of those entities and then it’d be a nightmare to keep all of them in a consistent state considering this is a web app and aggregates are loaded – consumed and then destroyed per request basis.

set theory – Can be this “handwaving” idea about “counting” reals somehow put on solid ground?

We know that the Cantor’s cardinality of a countable set is $aleph_0$ and the cardinality of continuum is $2^{aleph_0}=aleph_0^{aleph_0}$. Unfortunately, this measure is based on the idea of bijection, so sets of different volume can have the same cardinalities.

On the other hand, there is an idea of “numerocities” (which requires ordered or metric space), linked to the divergent integrals and series. For a subset of non-negative integers $S$ the numerocity is represented by a generally divergent series:

$$sum_{k=0}^infty p_S(k)$$

where $p_S(k)$ is the membership function, equal to $1$ if $kin S$ and $0$ otherwise. It allows to compare (using properties of divergent series) such sets as even and odd numbers, prime numbers, etc, giving more precise notion of the set’s size than cardinality.

The question is, can we somehow introduce a concept similar to numerocity to the uncountable sets, in such a way that it would reflect the volume of those sets? In other words, the set $(0,2)$ should have twice he numerocity of $(0,1)$. This is desirable…

First, let us agree on some symbols. Let use $omega_-=sum_{k=1}^infty 1$ for numerocity of natural numbers, and $omega_+=sum_{k=0}^infty 1=omega_-+1$ for numerocity of non-negative integers.

The following is pure handwaving, please don’t beat me hard.

First, let us consider the binary representation of the reals from $(0,1)$:
$0.1101001…$. Here each digit can be either $0$ or $1$. Since we start from position $1$ and have positions corresponding to all natural numbers, we can say we have $omega_-$ positions. So, the whole numerocity is $2^{omega_-}$.
Of course, if we take another base rather than $2$, we will have different expression for that numerocity. But this should not be confusing because numerocity is often dependent on ordering and filtering. So, if we make the same infinite set more dense, its numerocity changes (grows).

Can we somehow establish the expression for numerocity of reals on an interval, that would not depend on the chosen base for representation?

As I see it, the only way to avoid dependence on the base is to allow the base to go to infinity. So, we transcend to a representation in an infinite base. The digits start from $0$ but can be any natural number. As such (because we start from $0$), we have $omega_+$ digits. And the whole numerocity is $omega_+^{omega_-}$. Please don’t ask me how a particular number would be represented in such system. One can think of it as of some kind of limit. Also, since we do not have the biggest digit, the number $1$ does not belong here, so this numerocity represents the range $(0,1)$ rather than $(0,1)$.
I would point out that the expression of the form $omega_+^{omega_-}$, $omega_-^{omega_-}$ etc, often appear in the theory of divergent series, so this is not something “unseen”. It also fits well with the similar expression for the cardinality of continuum, which is a similar but less refined measure.
The numerocity of the whole real line then would be expressed as $(omega_++omega_-)omega_+^{omega_-}$.

I understand, these are very loose deas, particularly the idea of “infinite base” for a digital representation is unjustified. But I wonder whether some grains of it can be put on solid ground.

Is there a way to put two people in one body?

As in, two minds with equal-ish control over a single body like an Ettin, not full-on possession like a Ghost or Magic Jar. Is there anything in the rules that could allow this?

system compromise – How did SolarWinds get hacked? And was the Orion update put out without human approval?

Obviously there is massive information about the SolarWinds Orion hack itself of the malicious DLL injected into the update: https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html

But how did the SolarWinds company themselves get infiltrated? Are details of that available?

Also, was the update to the Orion software put live on their HTTP source by the hackers, or approved and put live by someone within the company?

How was the code injected into the DLL? In the source code or post-build?

I’m looking for technical details about the source of the compromise, not the chain reaction from it.

Can I put Google Adsense and Analytics at the end of the page instead of the beginning?

I think there are two options you have, the first would be trying to add the defer attribute to each script. It might work in conjunction with async to make sure the core info of your site (html and css) is loaded first.

I believe (don’t quote me on this though) that defer essentially reproduces what you proposed in putting the code in the footer – waiting to load after more essential things do.

More info can be found on (web.dev)(1) which you may have seen linked on Pagespeed insights.

The other option would be to create a Google Tag Manager account and drop those scripts in there. Then, you embed the GTM script, which has consolidated your two scripts, and the server only needs to make one request.

I hope that helps! It’s always frustrating when Google tools like PSI says other Google scripts are harming your site.