Do predictable bank account numbers pose a vulnerability?

Question: Let's say my significant other and I go to the bank to open our accounts and our account numbers end up 14682-4 and 14683-5. They are clearly sequential. Can this detail be used in any sort of attack?
Comment: It depends on what account numbers are used for. There's probably no universal answer.
Comment: bank account numbers are pretty common -- i don't mean any associated data (like account->person or the like). just knowing that numbers are somewhat sequential and the latest was X
Comment: If you can't describe the system I think it'll be difficult for us to enumerate vulnerabilities.
Answer: Generally an account number on its own isn't really very useful. You can usually transfer money to it - but unless you know the details of the person who it's linked to it's hard to do much more. This will depend on the specific systems though.
But sequential numbers would leak some information. For example, if you could find out when someone opened an account, it could potentially allow you to guess their account number, which you might then be able to use in conjunction with the other information you have about them.
It also leaks information about the number of accounts that are being opened, which could be commercially valuable. For instance, a competitor could have one of their staff open an account every week with the bank, and then get an idea of how many new customers they're getting based on how much the account numbers are going up.
And if you know they're sequential, you don't even need to be opening accounts - you can make some fairly accurate guesses based on a sample of account numbers that you find (known as the German tank problem, after the allies used the serial numbers of German tanks to estimate their production rates).
Answer: Whether it is a bank account, a user id or a serial number, predictable identifiers  will always create a weakness by design in any system.
This weakness would translate to a vulnerability if it is not taken into account when implementing systems, as it could happen with insecure APIs (ie. with guessable ressource IDs or scrappable users).
If this weakness is taken care of then the main cause of concern (or remaining risk) would certainly be the information leaked (possibly deduced) by the sequence. Which in the case of bank accounts is certainly harmless: a bank account does not bear any data about the owner (customer) to my knowledge but only about the country, brand, institution, issuer... This information would barely make the difference in an attack.
Of course, we should always restrict ourselves from leaking bank numbers (voluntarily or not) as this information can help to correlate personal data and open the door to social engineering. But incremental account numbers will not really increase this risk as well.


How to parse St Address "type" from an attribute table column and move it into another column?

Question:
I need to move address type to the column next to it, see photo for info.
Any quick ways to do this? I am somewhat familiar with this process. I have tried the address toolbox to no avail.
Comment: I need some more clarification Kristen. By "Address Type" do you mean you want to populate OWNER_ST_T with _ST_, _DR_, _AVE_, etc.? So **row1=DR**, **row2=AVE**, **row3=RD**, etc? The _CALLE_ may give us issues if this is the case.
Comment: That is correct. I would like to move and "DR .. AVE.. or RD types for street name to column "owner_st_t"
Answer: I'd suggest something like this, because there probably aren't that many variations of street types:
code block:
def getType(streetname):
    street_type = ""
    types = ["DR","ST","AVE","CALLE"]
    words = streetname.split(" ")
    for type in types:
        if type in words:
            street_type = type
            break
    return street_type

expression:
getType(!OWNER_ST_1!)

I'd suggest running this, and then sorting the new field to find the blank ones. That way you'll be able to find new street types and add them to the list in the code block.
This method assumes that there will not be street names like "CALLE DEL MAR AVE" and that any "Saint" streets will be spelled "ST. JOHN ST" or "SAINT JOHN ST".  Depending on your dataset, these may be unfair assumptions, so you'll need to do a little inspection.


how to show all attributes even filters applied in magento 2.1

Question: how to show all attributes even filters applied i.e., if we click on like color options then some options get's cleared so i want to display all filters whether if we choose another option also.
Answer: You can show color attribute even if there is no products available related to this. You have to select Filterable (no results) in attribute's storefront properties.
Navigate to

Stores > Attributes > Product > Color > Storefront Properties > Used
  in layered navigation

and select Filterable (no results).
Comment: Hi @dinesh, yes it is working but there are all options which have no results also so  I want with results.
Answer: To show all attributes even filters applied in magento 2.Please check below solution.

Have to set Filterable (No results) For that Attribute:

Store > Attribute > Product > {Your Attribute} >StoreFront Properties > Used in layered Navigation

select Filterable (no results).

Checked Category Selected as Anchor.
Coding changes to display all attribute.
We have to override Magento\CatalogSearch\Model\Layer\Filter\Attribute File. So Use this link https://magenticians.com/override-model-magento-2/ To override Model in Magento 2.After Override of this model complete do below changes in Attribute.php file of your.

Have to change in apply() Function of Attribute.php file.
Please check $this->setItems([]) in apply() function and replace this line by this if($productCollection->getValueSearchRequestName() != "catalog_view_container"){
    $this->setItems([]); // set items to disable show filtering
}

Do DI compile,Flush cache,Deploy Static content and remove files from generated folder then check it.

php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento setup:static-content:deploy -f
rm -rf generated/*

Thank you


Why was Inglourious Basterds misspelt?

Question: Did Quentin Tarantino ever give the reason for misspelling the movie title Inglourious Basterds?
Comment: Becuase Quantin Tarentno haz speling problmes.
Comment: Take an existing title, modify it so 1) google hits are not showing the old and 2) have people talk about that thing.
Comment: @Paulster2. May be I hacked in and got rid of the first question somehow ;)
Comment: I could have sworn this question was brought up before, but nothing listed under the tag ... hmmmm.
Comment: @Tivep ... I knew it, I knew it, I knew it ... ;-)
Comment: maybe the first question was in the "inglorious basterds" tag, not in "inglourious basterds" tag?
Answer: From Wikipedia page on the film:-

The film's title was inspired by the English-language title of
director Enzo G. Castellari's 1978 war film, The Inglorious Bastards.
When asked for an explanation of the film's title's spelling during a
news conference at the Cannes Film Festival, Tarantino said, "I'm
never going to explain that".
When pushed on it, Tarantino would not explain the first u in Inglourious, but said, "The Basterds? That's
just the way you say it: Basterds." Tarantino later stated in an
interview that the misspelled title is "a Basquiat-esque touch."
He further commented on Late Show with David Letterman that Inglourious
Basterds is a "Quentin Tarantino spelling".

Tarantino is famous for raising this kind of unanswered question to play with viewers mind.
Comment: I thought that was intentionally misspelled to reflect how their German enemies would spell it wrong.
Comment: yeah, saw that. But did he ever give the reason out? He seems to be avoiding the question, looked like.
Comment: @Tivep its Tarantino's way of raising question and leaving then unasnwered.
Answer: From IMDB FAQ
Why is it spelled "Basterds"?
Tarantino commented on "The Late Show" that Inglourious Basterds is the "Tarantino way of spelling it," but he hasn't commented on where the idea for the misspelling arose, nor is he likely to. "I'm never going to explain that," Tarantino was quoted at the Cannes Film Festival.
Three theories have been offered by viewers.

Basterd may be derived from the word Baster, a word derived from Dutch bastaard (bastard). The original Basters were mainly persons of mixed descent between the Cape Colony Dutch and indigenous African women who at one time would have been absorbed in the white community. In the movie, the Basterds are American/Jewish, and their plan was very similar...to be "civilians absorbed" in France, walking among the Nazis.
The misspelling may connote that Lt Aldo Raine (Brad Pitt), who grew up in a family of backwoods bootleggers and moonshiners, has had little in the way of schooling. The words are briefly shown in their misspelled form on his rifle.
Tarantino misspelled the title on the cover of the script, which then leaked onto the internet before production began. Rather than admit his mistake, Tarantino chose to maintain the spelling.

The above were merely audience opinions. But here's a promising article from RottenTomatoes where Weinstein Co. and Universal Pictures, confirms that QT is not a poor speller and gives the reasons for the title.

Inglourious Basterds begins in German-occupied France, where Shoshanna Dreyfus (Mélanie Laurent) witnesses the execution of her family at the hand of Nazi Colonel Hans Landa (Christoph Waltz). Shosanna narrowly escapes and flees to Paris, where she forges a new identity as the owner and operator of a cinema.
Elsewhere in Europe, Lieutenant Aldo Raine (Brad Pitt) organizes a
  group of Jewish soldiers to engage in targeted acts of retribution.
  Known to their enemy as "The Basterds," Raine's squad joins German
  actress and undercover agent Bridget Von Hammersmark (Diane Kruger) on
  a mission to take down the leaders of The Third Reich. Fates converge
  under a cinema marquee, where Shosanna is poised to carry out a
  revenge plan of her own...
Comment: Also: https://www.urbandictionary.com/define.php?term=Basterd "A clever misspelling of the word "bastard" used to ensure your movie title stands out when googled.
Answer: Because they're from Bostin
It's spelled basterd because they're from Bostin and that's how they spell it there — or rather, how they pronounce it.
Unfilmed flashback
According to an article on Cracked.com, "6 Crucial Movie Scenes That Never Made It Out of the Script", this was explained in a scene that was scripted but never filmed.
It was a flashback to Boston, spelled "Bostin" in the script, where Donny buys a baseball bat and then goes around his Jewish neighbourhood, asking people if they have any loved ones in Europe they're concerned for and if they want to sign the bat for them.

INT - SPORTING GOODS STORE- DAY
MR.GOOROWITZ'S sporting goods shop in Donny's Jewish Bostin
neighbourhood. Donny walks in.
MR.GOOROWITZ
Hello Donny, how are you?
DONNY
Ah, just dandy, Mr.Goorowitz.
MR.GOOROWITZ
Your mother, your father - everything
good there?
DONNY
There just fine. I'm shippin off next
week.
The store proprietor, extends his hand to the young man.
MR.GOOROWITZ
Good for you son. Kill one of those
Nazi basterds for me, will ya?
DONNY
That's the idea, Mr.Goorowitz.
MR.GOOROWITZ
What can I do you for, Donny?
DONNY
I need a baseball bat.

He goes to a mrs. Himmelstein, who is about to sign it "Madeleine".

MRS.HIMMELSTEIN
You must be a real BASTERD, Donny?
DONNY
You bet your sweet ass I am.
MRS.HIMMELSTEIN
Good. A Basterds work is never done.
Specially in Germany.

We then see Donny beating Werner to death with that same bat.
Answer: Quentin Tarantino loves to muddy the waters in interviews with answers like the ones quoted by others here. My theory is the misspelling of the title is his way of paying tribute to Enzo Castellari's original film, while making his title different. He didn't remake the original, he was inspired by it. The original plot only superficially has a resemblance to the newer film. I believe it also reduced confusion with the original.
Answer: To prevent the name being censored in listings
What looks better in listings?

Inglorious Basterds
Inglorious B******s

Since social media is pretty endemic these days, this gets the name of the film out there without automatic censor software bastardizing (sorry) the title.
I have no source for this theory, but it seems a pretty Tarantino thing to do.

Why was Inglourious Basterds misspelt?


How to increase the length of out-of-the-box fields?

Question: Currently, we are using the full 30 characters of the InventoryItem.InventoryCD field, but we need more. How can we increase this field length to 45 characters ?
Comment: You can try to update the database record for `INVENTORY` segmented key to set it's max length to 45. But after that you will have to modify every field in the system which contains `InventoryCD` to have  at least **45** characters length.
Answer: This can easily be done by creating a customization project containing a database script. This guide will be specific to InventoryItem.InventoryCD, but the idea can be applied to any fields. See the Notes sections at the end for more info.
For InventoryCD, here are the 3 steps you need to follow.
1. Database script in a customization project
Navigate to the Customization Projects screen (SM204505) and create a new customization project. Go to the DB Scripts section, click on Add and choose Script.
Copy the script matching with your database and click OK :
SQLServer

DROP INDEX [Inventory_InventoryCD] ON [InventoryItem]
ALTER TABLE InventoryItem ALTER COLUMN InventoryCD nvarchar(45) NOT NULL
CREATE UNIQUE NONCLUSTERED INDEX [Inventory_InventoryCD] ON [dbo].[InventoryItem]
(
    [CompanyID] ASC,
    [InventoryCD] ASC
)

MySQL

ALTER TABLE InventoryItem
DROP INDEX Inventory_InventoryCD;

ALTER TABLE InventoryItem CHANGE InventoryCD InventoryCD NVARCHAR(45) NOT NULL;

CREATE UNIQUE INDEX Inventory_InventoryCD
ON InventoryItem (CompanyID, InventoryCD);

These scripts only alter the columns we need but to do so, we drop the existing index and recreate it at the end. You can run these commands manually to test them before adding them to your customization.
2. Publish project and restart application
We have all we need in this customization project. Publish it by going to the Publish menu and click on Publish with Cleanup. When it successfully publishes, navigate to System > Management > Process > Apply Updates screen (SM203510). We are going to Restart Application which will restart the whole website. Make sure to notify all your users to save their work before doing it! When you are ready, click on Restart Application.
This step will ensure that the framework discards the previous database schema and loads the up-to-date schema in memory.
3. Change segment length
The last step will be to modify the INVENTORY segment to allow longer length on our InventoryCD. Navigate to Configuration > Common Settings > Segmented Keys > Segmented Keys screen (CS202000) and select INVENTORY as the Segmented Key ID. Apply the new length to the segment in the grid and Save. You are now ready to test !

Notes
If you want to modify any out-of-the-box fields in Acumatica, step 3 will have to be adapted to the field.
3a. Alternate DAC modifications
In this steps
, you would need to make sure that the DAC field type attribute matches the new columns length. As an example, a DAC string field could have been changed from
[PXDBString(30, IsUnicode = true)]
to
[PXDBString(45, IsUnicode = true)]
You can find more info on DAC fields attributes modifications at this link :
https://help.acumatica.com/(W(11))/Wiki/ShowWiki.aspx?pageid=1911428f-d4ca-4207-9396-a744db21cdfb
Answer: Be aware that increasing field length may corrupt data during upgrade as database schema that is used for upgrade procedure is defined inside %AcumaticaPath%/Database/database_schema.xml
For smooth upgrade don't forget to modify database_schema.xml:
<col name="InventoryCD" type="NVarChar(30)" />

to
<col name="InventoryCD" type="NVarChar(45)" />

Otherwise you may receive "string will be truncated" errors followed by data corruption.


Create pickup bar for one instrument only (example provided)

Question: we got an assignment in class to create a Sibelius score from PDF file.
Now I was wondering how I can create a pickup bar only for the "Continuo" instrument. And how it's possible to shift the barline brackets after the pickup bar.
Answer:
Add a new bar before the first bar of your completed score. Select it and untick all the boxes in the Bars pane of the Inspector (Brackets, Initial clef, barline, key signature).
For each staff that you wish no incipit to be shown, select the first bar and make an instrument change to a 'No lines (hidden)' instrument for that bar only. For each staff you wish to show an incipit, change the rest type in that first bar to 0, or simply hide the rest.
Select the barline between bars 1 & 2 and drag it left until it's a suitable size for the incipits. Then choose Create>Barline>Invisible and apply it to that barline.
Select the second bar (the former first bar) and make the Gap before bar (also in the Bars pane of the Inspector) -0.06. If necessary, insert a bar number change to make this bar 1 again.
Use cue-size symbols to insert the incipit clefs and/or time sigs and/or notes.

I think that's all. Beware that braces (not brackets or sub-brackets) will look terrible if you run the incipit staff directly into the main one. In that case use a positive Gap before bar, and everything else will still work.
(From a post by Jeremy Hughes in the official Sibelius forum.)


Are questions on what-is-this-exercise on topic?

Question: Often times, you can just look up what an inverse curl is, or how to do a decline pushup.  Sometimes though, there are weird terms like a Hail Mary lunge (sometimes used in mass/military training; it's a forward lunge done in unison to a count).  Are questions about what those are on topic?
Answer: My opinion? Definitely yes. It's an area where people obviously do get confused, and there's generally a definitive answer, or at least a narrow enough spread that we can count one answer as most correct (occasionally, especially when there's only a partial text description or a single image, you kind of get into a "well, if he's moving down, that's a "Mahler Dip", an arm exercise, but if the focus is on contracting the glutes, you actually get a different exercise, the "Popkin Push", which targets the lower back..." situation). In my opinion, it's especially important when there are a lot of variations, the same name applies to different exercises, or several names are used for an exercise, because that's where confusion lies. I could see someone having been told to do "Romanian dead lifts" as a bodyweight exercise, and getting confused because all of the examples are with weights, not realizing they should be looking for the "single-leg Romanian dead lift" (which can also be done with weights, but is perfectly challenging as a bodyweight exercise for most people).


How does ANOVA explain a difference in means?

Question: To look for differences in more than 2 sample means an ANOVA is used. SST (between groups) and SSE (within groups) is calculated. F = MST/MSE. I get all this, however why can we say that there are differences between sample means when MST > MSE? When the variance between groups is larger than variance within groups?
Answer: Exactly. When the variance of the means of the groups is greater than the variance within the groups, we have evidence that the population means are spread out and not equal. If the group means have about as much variability as the data do in general, then of course the observed group means are spread out some.
Further explanation:
Under the null hypothesis, the group means are the same. Thus, you're essentially sampling from the same distribution three times. I just sampled 10 observations from a standard normal three times and got means of 0.143, 0.451, and -0.248. There's variability, but those three values have a variance of 0.116. Sticking those values into the ANOVA equations, we get an F-statistic of 1.65 and a p-value of 0.211. There is no evidence that the three groups have different means, nor should there be.
However, as one of the groups gets a different mean, the spread of the observed means is going to get to be bigger. Imagine that the observed means had been 0.143, 0.451, and 600. Suddenly the spread of those three values is very large, not enough that the sampling variability accounts for the spread, and I would reject the null hypothesis of equal means.
Comment: Could you intuitively explain this evidence? How does variance between groups > variance within groups "proves" that there is a difference in means?
Comment: Please see my edit.
Comment: So could I intuitively say this: "Because the variance between groups is larger than within groups, we can conclude that the distribution of one or more groups doesn't overlap and thus don't have the same mean"?
Comment: The groups can overlap. Consider sampling from N(-1,1), N(0,1), and N(1,1).
Comment: Explicitly, it has to do with the distribution of sample means. As you get many observations, your sampling distribution gets very tight. If you deviate from that tightness by having one or more group means out of the mainstream of the sampling distribution, you have evidence that the groups are not the same.
Comment: I think I can wrap my head around it a bit better. It's just kind of abstract and didn't want to just learn without understanding the why.
Answer: Here is a very simple explanation.
Basically, if there's more variation between groups than within groups, that's evidence that the groups are different.
Answer: I don't have any formal answer here, but I saw some discussion in the comments to the previous answer that wanted a more intuitive sense for why the ANOVA works. I think I might have a way of explaining it that doesn't involve any math or thinking about sampling distributions (but at the cost of not being perfectly nuanced).
Say that we have 3 different classrooms who all took the same math test. Each classroom was taught by the same teacher but using a different method. The natural question would be: did the teaching method impact test performance. This is a fairly typical ANOVA question, and hopefully it's a familiar enough scenario to imagine.
To understand how the ANOVA works, it's useful to think about the problem from the perspective of the null hypothesis. Under the null hypothesis, we assume there is no difference in the means of the three classrooms. We might be tempted to check this by computing the mean test scores of the three classrooms and just looking at whether they are the same. The issue with this, of course, is that we don't really expect the means to be exactly the same. Since each classroom will have its own variation around the true mean, we need to have some method that lets us set a threshold hold for when variation between the classrooms is just error versus when it reflects a true difference in means.
Again, taking the case where the null hypothesis is true, this would mean that the between-group variance (variance in means between the classrooms) is not really any larger than the within-group variance (variance around the mean within each classroom). If we think about this a different way, then this would mean that the groups are just kind of labels (e.g., Classroom A, Classroom B, and Classroom C) but are totally interchangeable (i.e., the teaching method used in Classroom A had no different impact than the teaching method used in Classroom C). So, when the within-group variance = between-group variance, we suspect that the groups all come from the same population and just reflect typical sampling variability. Why is this the case? Well, it's because the within-group variance is basically an empirical point of reference for the sampling variability: no single student in the class is expected to score at exactly that class' mean, so there's variability related to this phenomenon that is described by the within-group variability.
With this in mind, now consider a case where the between-group variability starts to grow. This means that one group is starting to pull away from the others with regard to that mean performance and thus introduces more variability. If we compare this new variability source to our empirical sampling variability in the within-groups case, then we can essentially check whether or not we're observing something that might be sampling error versus something different. Once the between-group variance exceeds some threshold, we have to say that a better explanation is now that the classrooms are not equivalent or interchangeable anymore but instead represent at least two (though maybe more) different groups (i.e., the teaching method produces distinctly different test performance).
To your more implicit point about why this ratio of variances lets us make a distinction about the equivalence of means, this is mostly related to the sampling distributions as noted in the other answer here; however, perhaps the reason this doesn't exactly feel intuitive is due to the nature of frequentism and traditional cut-off points for "significance." There is certainly some ratio of between to within group variances that anyone could look at and say "for sure, there's differences in the means of those groups," but research is not generally filled with those kinds of examples. Instead, we often are looking at cases where the effect sizes are relatively small, where there is considerable overlap between the groups, and we're relying on means as summaries of group behavior. Ultimately, the decision of how large that ratio of variances needs to be is arbitrary, and as a result, may not really ever make great sense for some research interest or goals. Still, it's a helpful heuristic for many cases


Setting up Nextcloud on Raspi; cannot connect to custom domain

Question: My Goal:
I'm trying to setup my raspi to host a nextcloud server, and I've also purchased a domain name; let's say it's www.johndoe.com . My goal is to be able to log in to this cloud from any machine at the url www.johndoe.com/nextcloud.
Edit: Solution: I hadn't set up port-forwarding for http for the domain johndoe.com within my router's config. Having done that now, the cloud hosting is working. Dumb mistake that isn't related to the raspi, Sorry everyone.
My approach, and the problem:
The instructions I'm following here are great (alternative suggestions also welcome), however the problems start when I get to the section "Nextcloud Initial Setup", as I am not able to connect from other devices. To work around this and complete the initial setup, I worked from the raspi itself at the url localhost/nextcloud. That works fine. I've also got the raspi's IP address using $hostname -I, (let's say it's 123.456). However I cannot connect via the domain.
To narrow things down:

When I type in 123.456 into the browser of my laptop, I get the Apache2 Debian Default Page, which establishes that my raspi is connected to the network and able to host.

When I type in http://123.456/nextcloud/ on my laptop, I'm able to connect to the cloud on the raspi (provided I add 123.456 to the "trusted_domains" setting in config/config.php). This establishes that http connection from my laptop to the nextcloud instance on the raspi is also working.

When I open a terminal on my laptop and type $ssh [user]@johndoe.com I'm able to connect headless to the raspi. This establishes that the domain name is properly forwarding to my raspi.

However, when I type http://www.johndoe.com/nextcloud/ into that same laptop browser, I get "Unable to connect" (even with johndoe.com included in "trusted_domains")
My best guess:
My first doubts were at the point where I had to choose between "Running Under a Directory" and "Running NextCloud on its own domain" (which determines what one should use for the nextcloud.conf file). The choice seems unclear to me, because johndoe.com is the domain for the raspi. Can someone clarify which version of the nextcloud.conf file I want?
Any suggestions or observations would be much appreciated (also please let me know if I'm posting this in the wrong place).
Comment: Please [edit] your question and add more details. Are you trying to connect to `http://johndoe.com/nextcloud` from the same computer where you can use `ssh firstname.lastname@example.com`. Use a network sniffer like Wireshark or tcpdump to see what exactly happens when you try to connect using your browser.
Comment: Thanks for the suggestion. Yes, the laptop where I ssh into my raspi at johndoe.com is the same machine from which I cannot access the http link.
Comment: Sorry, I just realized that I wasn't forwarding all the necessary ports to the raspi. Problem solved.
Answer: Had to add port-forwarding for http. Everything works now.


It says that I received an atlas pass v2 but I don't have the recipe in my inventory

Question: I went to multiple stations where I solved problems and got blueprints.  Eventually I got an atlas pass v2 but it does not show up anywhere in my inventory.  Is that normal?
Comment: Have you pressed `E` to craft and scrolled through the list? It might be further down the list.
Comment: Are you sure it's not there?
Comment: Timmy Jim has got it, have you actually tried to craft the Atlas Pass V2? You will only learn the blueprints, I've never seen a case of someone receiving the actual pass.
Comment: Also dont you get the Atlas Pass V1-X from the "quest" guy and not from random drops ?
Answer: You don't have the recipe
If you're playing a pre-patch 1.07 version of the game, you may have encountered a known bug:

Under some circumstances a message was sometimes misinforming you that you learnt a blueprint when you hadn't, this has been fixed now.

The patch was released for the PS4 version on August 30th, and the Steam version of the patch was announced on September 2nd. If you're playing on one of these two platforms, check to see if an update is available.
Comment: For the record, this does not add/allow you to see the missing item, correct? It seems to be saying that the bug was in telling the user that they received something they did not, rather than failing to show a blueprint they already own.
Comment: @Yorik There are two separate bugs - one says you found a new blueprint and doesn't reward you with anything, and a second bug reports new blueprints as already known, but does reward the blueprint.


How to move selected object to the curser location using a python command?

Question: I am trying to figure out a very simple python command to move the selected object(or move the object by name) to the cursor location. Anyone know the command to do this?
Thank you!
Answer: Cursor location is global
The location of the cursor can be considered as "global coordinates".  The cursor has no parent. When the cursor location is set to zero, it sits at the scene origin.
An object's location is relative to its parent.  Its "global" or "world" transforms can be gleaned from obj.matrix_world.
To get an object in the scene by name
name = "Foo"
scene = context.scene
obj = scene.objects.get(name)

If there is no object named "Foo" obj is None
To move the object to the cursor location.
obj.matrix_world.translation = scene.cursor.location

To align both location and rotation to the cursor (Note assumes obj has unit scale)
obj.matrix_world = scene.cursor.matrix

Comment: this is not working for chidren (vertex parented)
Answer: I would recommend writing a little function that copies the cursor's location and sets it for the active object.
import bpy

def snap_active_to_cursor(obj: bpy.types.Object, copy_rotation=False):
    cursor = bpy.context.scene.cursor
    active_object = bpy.context.view_layer.objects.active
    active_object.location = cursor.location

    if copy_rotation:
        active_object.rotation_euler = cursor.rotation_euler

obj = bpy.context.scene.objects["Cube"]
snap_active_to_cursor(obj)

If you want to move all selected objects individually your function could look like this:
def snap_selected_to_cursor(copy_rotation=False):
    cursor = bpy.context.scene.cursor

    for obj in bpy.context.view_layer.objects.selected:
        obj.location = cursor.location

        if copy_rotation:
            obj.rotation_euler = cursor.rotation_euler

Blender already has an operator with similar functionality, however it requires the 3D View as context. Since custom contexts are not worth the hassle for as simple task like this, I wouldn't use bpy.ops.view3d.snap_selected_to_cursor(use_offset=True) within scripts/add-ons when you only want to move the active object.
Comment: this is not working on children and especially for chidren (vertex parented)


Divergence in cartesian coordinates conflicts with spherical divergence.

Question: Consider the vector
$$
\vec{a}=f(r)\hat{r}+r\hat{\theta}+r\hat{\phi}
$$
Where $\vec{a}$ is a vector in spherical coordinates and $f(r)$ is a function of $r$.
Let's calculate $\nabla\cdot(\vec{a}\times\vec{r})$, where $\vec{r}$ is the position vector.
$$
\nabla\cdot(\vec{a}\times\vec{r})=\vec{r}\cdot(\nabla\times\vec{a})-\vec{a}\cdot(\nabla\times\vec{r})
$$
$\nabla\times\vec{r}=0$. Thus, by using divergence formula in spherical coordinates, I concluded that
$$
\nabla\cdot(\vec{a}\times\vec{r})=r\cot(\theta)
$$
But, the same calculation in cartesian coordinates lead to
$$
\nabla\cdot(\vec{a}\times\vec{r})=0
$$
Why is this quantity different in these coordinates?
Comment: In your first equation $\vec{a}=f(r)\hat{r}+r\hat{\theta}+r\hat{\phi}$ what is $\hat{r},\hat{\theta},\hat{\phi}$?
Comment: @Somos [This page](https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates) is an excellent refresher or starting reference if you are seeing this notation for the first time.
Comment: Your product rule formula is incorrect since there should be a minus sign, but it may not have affected your answer since that term with the sign change vanished. It is hard to tell where you went wrong if you don't post your full calculation in both coordinate systems.
Comment: Thanks for telling me, the sign was incorrect. I checked my results with mathematica, they're completely correct.
Answer: I think you are using the wrong identity .
$\nabla \cdot (\vec{a} \times \vec{r}) = \frac{\partial }{\partial x_i}(\epsilon_{ijk}a_jr_k)=\epsilon_{ijk}(\partial a_j/\partial x_i)r_k + \epsilon_{ijk} ( \partial r_k/ \partial x_i)a_j= \vec{r}\cdot (\nabla \times \vec{a} )-\vec{a} \cdot (\nabla \times \vec{r}) $
$\nabla \cdot (\vec{a} \times \vec{r}) = \vec{r}\cdot (\nabla \times \vec{a} )-\vec{a} \cdot (\nabla \times \vec{r})$
$\vec{a}=f(r)\hat{r} + r \hat{\theta}+r \hat{\phi}$
$\vec{r}=r\hat{r}$
$\vec{a}\times \vec{r}= -r^2\hat{\phi}+r^2\hat{\theta}$
$\nabla \cdot \vec{E} = \frac{1}{r^2}\frac{\partial }{\partial r}(r^2 E_r)+ \frac{1}{r \sin \phi }\frac{\partial E_\theta}{\partial \theta}+\frac{1}{r \sin \phi}\frac{\partial }{\partial \phi}(\sin \phi E\phi)$
Since the $r$ component is $0$ and the other components only have radial dependence, the divergence is $0$.
Further $\nabla (r^2/2)=\vec{r}$ and for any scalar $f$, $\nabla \times \nabla f=0$ in any coordinate system.
It follows that $\nabla \times \vec{r}=0. $
$\nabla \times \vec{E} = \frac{1}{r \sin \phi}(\frac{\partial }{\partial \phi }(A_\theta \sin \phi)-\frac{\partial A_\phi}{\partial \theta })\hat{r}+ \frac{1}{r}(\frac{1}{\sin \phi} \frac{\partial A_r}{\partial \theta}-\frac{\partial }{\partial r}(rA_\theta))\hat{\theta}+\frac{1}{r}(\frac{\partial }{\partial r}(rA_\phi)-\frac{A_r}{\partial \phi})\hat{\phi}$
Since the components of $\vec{a}$ are only dependent on $r$, the derivatives for the  r-component of the curl are 0, so the r coordinate of the curl is 0.
$\nabla \times \vec{a}= 0 \hat{r}  -2\hat{\theta}+2\hat{\phi}$
So $\vec{r} \cdot (\nabla \times \vec{a}) = 0. $
Combining this we have $\nabla \cdot (\vec{a} \times \vec{r})=0$
Comment: I'm completely sure that you're using the wrong formula for divergence in spherical coordinates. please check https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates
Comment: I first learned about these with $\theta$ and $\phi$ switched, which I think makes more sense intuitively. Keeping that in mind, does my equation otherwise hold?
Comment: I guess you omitted the partial derivative of sine function with respect to phi when you were computing the divergence.


Determining location of element.style

Question: I am working on a website for a friend, using wordpress. It is located at revere glass. I have installed the NextGen gallery, and am attempting to modify the size of the slideshow via the code, as the plugin editor does not seem to work properly.
When I use firebug to examine the layout, I see:
<code>img src="http://revereglass.seeimpactdesign.com/wp-content/gallery/revere/big-instructor.jpg" style="height: 300px; width: 400px; position: relative; top: 0px; left: 0px; "
</code>
The class is .galleryview. I have attempted to edit the .js files, and galleryview.css, but I can't get the slider to change dimensions.
Any help would be greatly appreciated!
Comment: so... what you wanna do? increase or decrease size?
Answer: Check your markup. Make sure there are no inline styles. You can also try:
<code>.galleryview {
     width: your-width-here !important;
}
</code>

Determining location of element.style


Head/Tail in lists Java

Question: Is it possible for a Linked list to have  null header but not a null tail? I mean when the header is null does this mean that the list is empty?
Answer: If the head is null, it should mean that the list is empty. If not, the linked list data structure is implemented incorrectly.
Answer: That doesn't make much sense from a logical point of view does it? So no.
Especially if you look at the actual implementation of the LinkedList in Java which uses one element as both head and tail (the last element of the list is the prev element of the dummy node, the first element of the list is the next element).
Answer: If the header is null so is the tail. The "tail" of a list is the rest of the elements after a given element, if the header is null then by definition it doesn't have any more elements, so the tail is null. And yes, a null header means that the list is empty.

Head/Tail in lists Java


Picard's dislike for children: out-of-universe origins?

Question: Have the writers or anyone associated with TNG ever commented on why they chose to make Picard uncomfortable with children?
Comment: "The paragraph also mentions that he doesn't really know how to deal with Wesley Crusher" —non-one knows how to deal with Wesley Crusher. Apart from that one planet that wanted to execute him.
Comment: Picard knows how to deal with Wesley, "SHUT UP WESLEY" seems to sum it up well enough.
Comment: P. 23 of the ["writer's bible" by Gene Roddenberry](http://leethomson.myzen.co.uk/Star_Trek/2_The_Next_Generation/Star_Trek_-_The_Next_Generation_Bible.pdf), which was written before the roles had even been cast, mentions this in a paragraph on p. 23, but Roddenberry doesn't really explain *why* he chose to include this element of the character. The paragraph also mentions that he doesn't really know how to deal with Wesley Crusher but is attracted to Beverly Crusher, so perhaps it was just for dramatic tension. Might also be to emphasize the newness of a ship having this "civilian" element.
Comment: I think it's probably just a natural consequence of having a long military career like his, where most ships don't have civilians onboard. He'd be used to dealing with adult civilians, such as traders, settlers and diplomats, and especially with military personnel, but children are very different to all of those.
Comment: Because other people's small children are horrible.
Answer: As @Hypnosifl points out P. 23 of "writer's bible" by Gene Roddenberry does state that Picard has a certain dislike of children.
However I believe that paragraph sums up why Picard dislikes children rather well. It states (and the memory alpha page on the Stargazer corroborates) that Picard was in command of the Stargazer for 22 years. During this time Picard commanded a ship with no families or children at all. When he was posted to the Enterprise he was apprehensive about serving on a ship with children and other civilians. He wasn't sure how to respond to them because he was used to the more regimented crew of the Stargazer.
In fact the writer's bible goes on to state:

Captain Picard has his share of idiosyncrasies, one being the fact he is not yet fully comfortable with having families and children aboard a vessel he commands. ... Picard supports its concept cautiously, while having his own private misgivings. He has not had much experience dealing with children...

Picard was just used to having only Starfleet Officers to deal with on his ship and didn't know how to respond to passengers.


Apply Steam Overlay to Chrome?

Question: I got Chrome to launch from Steam in kiosk mode by using <code>"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://www.netflix.com/browse --kiosk --user-data-dir="C:/AppData/SteamChrome"</code> (in this case with Netflix) Is there any way to enable the Steam Overlay? Steam Controller bindings won't toggle without it.
Answer: Did you allow Steam-Community ingame for Chrome in Steam-Library?
If you didnt, go to your libraray -> press right mouse button on Chrome -> select the tab properties -> tick the option: allow Steam-Community in game

Apply Steam Overlay to Chrome?


Gradient in Blender Render

Question: I would like to add a brown to blonde vertical gradient to my model's back facing hair. How can I do this in Blender Render?
Answer: You can use the blend texture for this.
Go to the textures tab in the Properties Editor. In the material sub-tab (it's open by default), create a new Blend texture.

Change the mapping of the texture to "Object", and select the object that represents the model. Set the X coordinate input to Z (because we want the gradient to be vertical). The other settings don't matter, because the Y and Z coordinate inputs don't affect the output.

Now that the texture is mapped correctly, you can change it's influence (in the influence drop-down accordion). In your case, the texture should influence the color of the diffuse shader. If your material is brown, this texture should make it blonde (yellow-ish) on one end. The color influence is at 1 by default, which is what we want. Just change the color to what you want.

You should now have a basic gradient from blonde to brown. Then, just play around with the mapping and influence (and other) settings, until you get the look you want.

Gradient in Blender Render


Renew the Linux, Restore to the new

Question: I'm new to Linux. My Ubuntu 13 is now meeting problem such the CPU rate is about 100% ever time and the System Drive Disk Usage is full. I think the virus is attacking my computer. Are there any ways i can do to restore it to the previous point or to make it new?
Comment: If your system drive is full, then your cpu will go to 100%.  This is not a virus, you need to clear some files.  Try this to see where the space is being used:  `sudo du -shx /*`
Comment: Well, When i checked the disk for the first time, It is used up to 86%, after only a few minutes it raise up to 94% and my System is very slow. However, i'm going to use you command! :D
Comment: Is the "System Drive Disk" your root (`/`) partition? What is taking up the CPU? You can check by running `top`. You can be almost certain it is not a virus, there are _very_ few Linux viruses and none of them are really harmful.
Answer: While I cannot exclude that your computer has caught some malware, I doubt very much that your problems are caused by a virus. Or do you have other evidence, probably suspicious files? (In fact, most malware tries to act inconspicuously, and not alarming you with much activity.)
You should first try to find out which process is running amok on your system, e.g. by running top in a terminal window. It should show you the processes causing the most CPU load at the top. Your system drive is probably being filled with log data from this berserk process. You should look at typical places for that:
ls -l $HOME/.xsession-errors

and
ls -lSr /var/log/

are candidates for growing log files and could give you some hints. (-lSr means: 'l'ong listing, sort by 'S'ize, 'r'everse order, which means you get a long list of all files in /var/log/ with the largest ones listed last. )
Next step would be to find out what caused that process to misbehave. But that depends on the process. Only if that does not work I would think about reinstalling.

Renew the Linux, Restore to the new


Excercise Band Excerises

Question: I need some advice on safety and resistance band exercises. I have a resistance band, and it is smaller than me because I saw one person doing an exercise in which the resistance band was on their shoulder and they were doing squats. How safe is those exercises, because I am trying to engage in more upper body resistance band exercises that safe for me because I am obese. I respect any feedback on the issue. In case of a summary of my two questions is basically safety of resistance band exercises, and those exercises particularly being upper body excercises.
Answer: Exercise bands are perfectly safe and recommended by many! However, make sure you're using the correct type. I'd suggest something like these which are durable with a good length. Make sure you're not using something like a hip circle band as that will be much too small.
I've personally only heard of one exercise band breaking at my local gym. It was while someone was doing "monster walks". The band would constantly rub on the ground and friction wore it down over time.
Comment: Would a question about types of exercises to do for the upper body be off-topic because I would like to ask one?
Comment: For sure. You might be able to find some that have already been asked too.

Excercise Band Excerises


Can I drink this ? Hard cider rack leftovers

Question: I just racked my hard cider. There is leftover liquid with lees now and I was wonder if that can be filtered and drank. Any thoughts ?
Comment: You probably CAN drink it, the question is rather, is it any good?
Answer: No reason why not.  It's just cider.  Though the lees will give you some weird flavors.  And bad gas.
Comment: I concur with Tobias.  Fry up some shallots, garlic, and the whites of leeks.  Season with salt and pepper.  Pour in your lees to braise the leeks, a couple sprigs of thyme, and a tbsp or two of butter.  Reduce the liquid down (15-20 minutes), turning the leeks, then crush up some hazelnuts.  Once reduced, pull out the leeks, sprinkle the hazelnuts over with some freshly chopped coriander and you have yourself the best leeks side dish you'll ever taste!  Wait...  This isn't the cooking stack exchange?  Sorry, got ahead of myself...  Also, the lees will serve well to deglaze your pans.
Comment: Or cook with it.
Comment: Cooking with the yeasty lees doesn't sound very appealing does it?
Answer: Any leftover "suds" is just as alcoholic as what you've racked, but lacks carbonation.  You can drank it, but it will be a flat version of whatever will come out of the bottles/keg in a week or two.
Personally, I've put the left over liquid from beer brewing over ice to get an advanced taste of what my brew will be like, and to make sure it wasn't infected.  Its not as enjoyable as the finished product, but still drinkable in small quantities.


How to open a door with AC 15, 18 hit points?

Question: I'm learning to play D&D and I'm following the Frozen Sick adventure from D&D Beyond. At some point, the players need to open a door with "AC 15, 18 hit points". I think AC means Armor Class, so I need to roll a D20 and get at least 15 to hit the door. But what does the "18 hit" mean?
Comment: By the sounds of it.. you should really read through the DMG and PH.  They are both extremely helpful and cover all the rules that will come up in game.    Just my 2 cents.
Comment: "18 hit" isn't a thing. "18 hit points" is a very understandable thing.
Comment: Welcome to RPG.SE! Take the [tour] if you haven't already and see the [help] or ask us here in the comments (use @ to ping someone) if you need more guidance. Good Luck and Happy Gaming!
Answer: The locked door you have cited has basically four ways you can open it. Here's the describing paragraph...

The wooden door to the cabin is locked and has AC 15, 18 hit points, and immunity to poison and psychic damage. The lock can be picked with a successful DC 12 Dexterity check using thieves' tools, or the door can be forced open with a successful DC 15 Strength (Athletics) check. Tulgi carries the key that unlocks the door.
[...]
A character who shouts back through the door and succeeds on a DC 12 Charisma (Deception, Intimidation, or Persuasion) check convinces Tulgi to open the door and allow the party inside.

The door can be opened in these 4 ways
Hack it apart with weapons
This is what you're asking about...where it lists an Armor Class (AC) and Hit Points. Armor Class is how high you have to roll on your Attack (d20 + Modifiers). HP is how much "health" the door has, i.e. how many points of damage it can suffer before it is destroyed.
So, if the players decide to attack the door with their weapons, they must roll to Attack, needing a total of at least 15 to inflict damage on the door. When they hit it, however much damage they deal is subtracted from the door's hit points. If the door's hitpoints reach zero, it is destroyed and they can go inside. All in all, treat it just like they are attacking a creature.
I'll cover the rest of the options provided here for completeness sake...
Pick the Lock
If someone in the party has Thieves' Tools, they may make a Dexterity Skill Check (d20 + Dex Modifier, adding their Proficiency Bonus if they are proficient in Thieves' Tools). If their total is 12 or greater, they have succeeded in unlocking the door and may open it normally. If they fail, it's up to you if they can try again or not.
Force it open
Apply Boot (or shoulder) to door to try to break the lock and force the door open. A player may make a Strength Skill Check (d20 + Str Modifier, adding their Proficiency Bonus if they are proficient in Athletics). If their total is 15 or greater, they break the door open. If they fail, it's up to you if they can try again or not.
Talk your way in
The occupant of the cabin doesn't want to let people in, but can be talked into it. A player may make a Charisma Skill Check (d20 + Cha Modifier, adding their Proficiency Bonus if they are proficient in Deception, Intimidation, or Persuasion--appropriate to how they decide to try to talk their way in). If their total is a 12 or greater, Tulgi opens the door. If they fail, it's up to you if they can try again or not.
Comment: @Axoren I could...but all that does is give Advantage on the check--it's not a necessary component
Comment: You might want to include using a crowbar in your **Force it open**.
Comment: While not necessary, advantage on all door-busting for the one-time cost of 2 gp is a very good recommendation. It's also part of a Burglar's Pack and Dungeoneer's Pack by default.
Answer: The door has 18 hit points. You'd need to do a total of 18 damage to it to break it down.
You're correct that the "AC 15" is Armor Class; note that you'd need to roll a d20 plus your attack bonus and get a 15 or higher. Usually your attack bonus will be your proficiency bonus (based on total level) plus one of your ability modifiers, such as Strength for most melee weapons, Dexterity for most ranged weapons, or a spellcasting ability if you're using a spell.
Answer: You use the handle if there is one.
This is a free object interaction assuming you are in combat and requires no rolls unless it is stuck, locked or otherwise difficult to open.
The AC is if you want to hit it with a weapon and destroy it whereas the hit points are for how much damage you need to inflict for it to be compromised enough to bypass.
There is the addition that depending on which material and size of the door is made out of it might have resistance or immunity to a given damage type and there might be a hardness which is essentially a threshold on how hard you have to hit it for it to show damage.
More details can be found in the DMG p246
DM advice. Bashing or hacking down a door in a dungeon usually draws unwanted attention with so much noise.
Also, unless there is a meaningful consequence for failure don't require rolls for things. It bogs down play.
Answer: In D&D 3.0 and beyond (not sure about older versions, but probably it was probably the case then, too), objects can be the target of regular weapon attacks just like creatures can. The base rules are exactly the same: roll the attack, compare to the target's AC; if the attack hits (ie., equals or exceeds the AC), roll damage. Some spells can target objects, some can't.
In this particular case, the door has an AC of 15. That doesn't necessarily mean you need to roll a 15 or better on the d20, though: you'll have attack modifiers. The exact modifiers will vary by edition (3.0/3.5 (and, IIRC, 4e) have a Base Attack Bonus; 5e has a Proficiency Bonus which will probably apply, depending on the weapon; both will add Strength to the attack roll for melee weapons and Dex for ranged weapons (with caveats around specific weapons/abilities/feats/...)).
The door then has 18 hit points (HP), which work just like the HP of a creature. Roll damage as usual; if you do 18 or more damage, the door's destroyed; if you do less than 18 damage, the door's been damaged but is still effectively barring your progress. Generally, you (or another creature, probably an ally) can attack it again and keep going until it's been destroyed (just like you can generally keep attacking a monster until it's dead).
In 3.0 and 3.5, objects often have Hardness, which reduces the damage from all sources (not just attacks, like Damage Reduction does). In 5e, it's likely that a door will be resistant or immune to some types of damage (eg., does a door care about psychic damage?) and may have a Damage Threshold (which allows it to ignore damage if a single attack does less damage than the threshold). In any event, those things should be called out in the specific object's description (especially for things like doors that players are apt to try to destroy if they can't open them the normal way).
It also may be worth noting that you might not need to attack the door: it may be that the door is unlocked and all you need to do to open it is to open it.
Comment: @Rykara I don't consider adding the [dnd-5e] tag to reflect they're playing a D&D 5e adventure to be guessing at anything.
Comment: @Rykara At the very least, the original question mentioned D&D Beyond which is a scenario [I have specifically asked about in the past](https://rpg.meta.stackexchange.com/q/9988). People at least seem to majorly agree that adding the [dnd-5e] tag to such questions is acceptable
Comment: Tags have clarified that OP is asking about 5E.
Comment: Full disclosure: I added that tag, because they're playing a specific published adventure that is only available for D&D 5e.
Comment: @Dopp I thought that was frowned upon, given our [policy](https://rpg.meta.stackexchange.com/a/6869/48793) on not guessing a system no matter how obvious it is.
Comment: @Dopp Well, it's just that I've had [my wrist slapped](https://rpg.meta.stackexchange.com/q/9221/48793) for doing the same thing based on the "AL" designation for Adventure League. /shrug.I'm not saying I disagree with the action. It's just that I'm having trouble reconciling what seems to be disparate outcomes from virtually identical situations.
Comment: @Rykara That said, the Meta you've pointed to involves an interpretation of the phrase "AL game" to mean "Adventure's League" (one could argue, a logical leap). Whereas here we have an interpretation of "the Frozen Sick adventure from D&D Beyond" to mean exactly that. There was no assumption made in terms of meaning; though it's certainly possible there's some other Frozen Sick adventure somewhere had the OP not mentioned D&D Beyond... Here's a similar question, which is currently closed: "[How many hours of gameplay for Tales of the Yawning Portal?](https://rpg.stackexchange.com/q/143908)"


Use survival analysis to predict survival probabilities for future periods not contained in the survival dataset, like a time-series forecast?

Question: I've used time-series forecasting (ETS, ARIMA, etc.) models but because of the depth of my data I'm exploring using the survival and related packages in R to forecast future period survival probabilities. For example, if we have 24 months of survival data, I'm interested in forecasting months 25-36 using the statistical parameters derived from analyzing months 1-24, using either Kaplan-Meier or a parametric distribution like Weibull. In the form of simulation with multiple simulation paths derived, as I've done with traditional time-series methods. I'm exploring alternatives to the traditional time-series methods because they seem overly-simplistic in light of depth of data I have (similar to what you see in the lung and kidney datasets that are part of the survival package). Please, does anyone know if this type of probabilistic future period forecasting is possible in survival analysis, and know of any simple examples on-line that I can start with?
Answer: One obvious solution, as you already alluded to is to use a parametric model (such as Weibull regression). Non-parametric/semi-parametric models like Kaplan-Meier or Cox do in their standard implementation not extrapolate beyond the largest observed event time. There's other implementations that more or less do the same thing, but can extrapolate, e.g. an exponential model with piecewise constant hazard rates can be very similar to Cox regression, but will extrapolate if you just assume the hazard rate of the last interval going forward (similarly, e.g. the brms R package implements a kind of Cox model using M-splines for the baseline hazard function which I think should permit extrapolation).
E.g. if you use R, one obvious option is to penalize Weibull regression
fit <- survreg(Surv(time, has_event) ~ 1 + ridge( predictor1, predictor2, ... , theta=1, scale=T), dist = "weibull", data=mydata), where the ridge-penalty theta could be picked using cross-validation. After fitting, the traditional shape parameter is given by 1/fit$scale and the scale parameter for a record predict(object=fit, newdata=newdata, type="lp"), so that you get an estimated survival curve by plotting the Weibull CDF with these parameters, but that ignores uncertainty about the parameters. This gets a lot easier to deal with in the Bayesian version of Weibull regression, which is nicely supported in the brms R package (if you want instead of individual patient time predictions to predict the parameters of the distribution, there's some nuances: see here).
Alternatively, a more machine learning oriented approach would be to e.g. use XGBoost with an accelerated failure time loss, but calibration tends to be poor. However, there's alternatives that try to fix this.
Answer: for discrete time survival problems, a simple logistic regression framework with calendar month as an input is straightforward to use.
your data set should be in so called person-period format, where for each month the person survived until the previous month, you create a row indicating whether they survived the current month.
You can then interact time with any of your other independent variables, or use spline interpolation for your time variable etc - ie use any of the standard input transformations you would use with linear/logistic regression.
then to predict in the future you predict probability of surviving each month given survived up till then ( from logistic regression output, just changing the input time)
and your simulation is just a markov chain using these probability outputs


How rare are these miniature AD&D books?

Question: I bought a box lot of some items (Board Games)  I collect at an auction recently and in the box was another box full of D&D stuff. I gave the figures to a relative who plays the game but he wasn't interested in any of the little books. I was thinking of selling them but don't know if it is worth my trouble.  It is a set of 13 different miniature Advanced Dungeons and Dragons Books. All the books are about 3.5 x 4 " & have orange spines except one, it is blue. I have been looking for info on them but everywhere I look it says sold out. Are these rare? Any idea what I should sell the set for (excellent shape, almost look new)?
Answer: Those books were licensed reprints done by a now-defunct third party company, Twenty-First Century Games, sometime in the late 1990s or early 2000s after TSR had been bought by Wizards of the Coast but before WotC began publishing their 3rd edition of D&D. They were created specifically for the collector's market, and it appears that their value has gone up since then. They are long since out of print.
Depending on the exact books and how many you have, these are worth a bit of pocket change compared to their original retail value. Noble Knight, an online retailer specialising in out-of-print roleplaying and wargaming products, has a section for Twenty-First Century Games's AD&D reprints that lists the miniature Dungeon Master's Guide at US$50, among others. Currently, eBay is listing a sale of the miniature Wilderness Survival Guide at 51 Euro (~US$64) or-best-offer (plus shipping from Italy), but that's probably not an accurate valuation of the book, as Noble Knight is selling the same for just US$15 plus shipping.
The value of your books individually is probably somewhere in there. Depending on the exact composition of the collection, it may also have additional value as a set to someone.
And therein lies the difficulty: you won't find anywhere to unload these for full value without a bit of work, and some skill in selling collector's items. The easy route would be to sell them to a reseller like Noble Knight, which will give you some fraction of their value but is relatively effortless; the hard route would be eBaying them or similar, as a set or individually, but only you can factor how much your time and the headache of shipping is worth to you.
I don't think this has given you a full, stand-alone answer that you can skip off to the bank with; but I hope it has given you the means and knowledge to move forward in the direction that most suits your resources and goals.
Comment: As a warning, the few times I've browsed Noble Knight I've noticed a definite premium on the items there compared to when I've seen them in gaming stores, on Amazon or similar. That said, often it is the only place to get some stuff. So take it with a grain of salt, and pick a few items on Noble Knight and compare them to eBay, Amazon, etc before pricing your own item.


How do I keep Smooth Corrective Modifier from affecting face Shape Keys?

Question: I'm using Smooth Corrective Modifier to help keep the joints in the mesh on my model from looking ugly but while that fixed one problem it causes another where the Shape Keys for the face get messed up. The image above shows how the face was supposed to look like, but Smooth Corrective Modifier has an error while the image below shows the face a bit deform but Smooth Corrective Modifier seems to have no problem. How do I fix this?
Answer: Create a vertex group, go to edit mode and select all vertices but the face, select the newly created group in verex troup tab and click Assign making sure all vertices in the group have weight paint of value 1 (set weight bar to 1 before clicking the Assign button).
In Smooth corrective modifier tab, there's a vertex group option, click on that and choose the newly created group.
That way it'll act as a "mask" for this modifier so it wont effect the face and keeps the smooth joints deformation you want.
Answer: Using GN (and most conveniently, an extra object) you can do this:

The object on the far right is getting armature deformed and correctively smoothed.  Then, it is checking the difference in position between two meshes: one that is armature deformed only, and one that has both a shapekey and an armature.  It can then apply this positional difference as an offset.
It could be saving its own position, prior to the corrective smooth, and using that instead of another object; it could even have its own shapekeys stored as GN vector attributes on the mesh, so that no other objects would be necessary.  But I think it's easiest to demonstrate using additional, non-rendering objects.  In a real-life situation, all three of these objects would be in the same location, parented to the same armature.


how can i git clone git://foo.git AGAIN?

Question: I did
 git clone git://foo.git
 cd foo
 ...edit files..

now I want to start fresh. I don't care about any changes I already made,
but I don't want to clone the whole giant foo.git again, just lose all my changes.
how can i git clone git://foo.git   a second time, without getting

fatal: destination path 'foo' already exists and is not an empty directory.

what is the proper command?
Answer: git checkout . # revert your changes
git clean -xdf # delete untracked and ignored files

Comment: Note: git checkout . obviously will not work if you are not in the top of your repo. `git reset --hard` will work universally.
Comment: Nice ~! I didn't know about `clean`!
Answer: To revert all your changes, use:
git checkout .

Untracked files (files that didn't originally exist in the tree, ones you created and not edited) will not be removed, though. To find the untracked files, use:
git status

Then delete them manually.
By the way, if you'd like to make a copy of the repo, you don't need to clone the original repo, you can simply clone the one you already have on your hard disk. Go somewhere outside foo, and do:
git clone /path/to/foo

Answer: You can use "git checkout ." or "git checkout HEAD -- .", or even "git reset --hard HEAD" to reset your working area to known state (to state recorded in index in first case, to state recorded in HEAD commit in second and third case).
To delete untracked files you don't want to keep you can use "git clean" (see documentation for details).
To get new changes from remote repository you cloned from, use "git fetch" (or equivalent "git remote update", after some setup), or "git pull" (to fetch and merge changes).
Answer: If you really screw it up:
git clean -df
git reset --hard HEAD

Answer: You can also always use
rm -rf *
git checkout master

Less commands to remember :)
Comment: That doesn't work if master already contains local commits since they will still be there.


What's the best thing to do after an unsubscribe link was clicked?

Question: What's the best thing to do after an unsubscribe link was clicked from an email? Should I present a landing page, or just an alert box that says, "you're now unsubscribed" and redirect to the main portal?
Answer: Surely the practicalities of trying to launch an alert from an email preclude that option.
What you are trying to achieve is, initially, reassurance for the user that they have successfully unsubscribed. The most simple way to do this would be with a landing page that says something like "You have successfully unsubscribed".
However, your secondary concern is to still try to retain some sort of relationship with the user and I don't think an alert box is the way to do that - alert boxes are more associated with bad news than good news.
I would use a landing page that makes use of your site's top-level navigation (at least) and a friendly page saying how sorry you are to see them go and suggesting that maybe there's something else you can help them with before they leave. Maybe some sort of tempting offer (depending on your business model) or maybe even a quick survey to find out why they left (frequency of emails, email content, relevance...)
Maybe you avoid the unsubscribe link altogether and offer them a way to 'manage' their subscription instead - allowing them to refine the reasons/frequency you email them...
Just try to make the most out of what is potentially a bad situation.
Comment: I would say that it depends on how the product works - If we're talking about a product that has a distinct and valuable function but also allows users to subscribe to various newsletters relating to that product then I don't see a problem with having users log in to 'manage' subscriptions. On the other hand, if were talking about a product that has limited value beyond the newsletters it emits then yes, users should be able to unsubscribe by simply clicking a link on the email and nothing more.
Comment: not sure about the best thing but the worst thing to do is asking people to login to unsubscribe, what do you feel about that
Answer: The first thing to do is to confirm the action e.g. "You've unsuscribed"
Depending on how is designed your previous page you could:

Provide an "Undo" action. If the unsuscribe is just a click-a-button process
they user could have unintentionally click it, so giving the option to undo and suscribe again never hurts.

Ask for reasons after they reached they goal (after stating that the user is already unsuscribed and if you're not doing it in the unsuscribe page).
Instead of redirecting, let the user get the control by providing a link like "Go back to home page".


Different background colors for posts with Wordpress

Question: I have a question. Right now I displayed my posts in the next way: Title and under it a short description of that post(everything centered and the post is looking like a card). My client wants each post to have a background color and a text color, but set by him, something like on this site: https://the.loeuvre.co/. Do you have any ideas of how can I make this? Yes, I can give a random class to each post and created those classes with background and color but I don't know if it will appear something new and it will be too many classes with a lot of combinations. Thank you!
Answer: If the site uses the Block Editor, support is already built in. Add a Group block first, and set its background color. You can then add blocks inside the Group block and set their text colors.
You can define a specific palette for your theme so there are set colors, or you can let WordPress set default color palettes. It also supports custom colors so you can use a color picker to define whatever combinations you want.
It would be wise to educate the client on accessibility as it relates to color contrast. It may also be helpful to educate the client on the ways having defined, predictable color and UI schemes is helpful to visitors who navigate through multiple pages on the site - changing colors frequently may create a jarring or difficult-to-read experience.
Answer: Thank you for your response but I forgot to add the code:

    <?php
        $args = array(
            'post_type' => 'post',
            'posts_per_page' => 5,
            'orderby' => 'date',
            'order' => 'DESC',
            'post_status' => 'publish',
            'paged' => 1,
        );
        $my_posts = get_posts($args);
        if(!empty($my_posts)){
            foreach($my_posts as $post){ ?>

                            <?php echo get_the_title($post); ?>

                            <?php echo the_excerpt(); ?>

            <?php }
        }
    ?>

<button class="load-more-homepage-articles-btn btn">Load more articles</button>

This is my code in articles.php(template that I use it on article page). I want to add that background color and color to the article class. Yes, The site will use Block Editor. It's not a problem about colors. He know about how to use/choose hex and rgba
Comment: Please edit your question to provide this information rather than post as an answer. Click the edit link directly below the question text.


How to avoid "character said" when there is a group of people talking?

Question: I am at a certain part in my book where a group of six people travel and talk with each other. I would like to make them all talk, as that would be what would happen in real life but I can't really figure out how to specify who is talking without using. "Character said" or "Character noted". Are there any other words then those two or is there even a way to avoid it all together?
Comment: Have you tried studying the way your favourite authors / books do this?
Answer: You may want to use action words to imply a speaker without outright stating it.

John pushed the brush aside. "This is thicker than I expected!"
Answer: Don't use "Character noted." Stick with "Character said." It works perfectly because it gets the job done and because when done right it becomes invisible to the reader.
Try to edit out as many "Character said" as you can without forcing the reader to count lines.
One way to do this is to use action to "indicate who owns the paragraph." I.e. a "Character does something," followed by the dialog without a "said" after.
But as you've noticed, when more than two people are talking and especially when they are talking over each other you need to use other techniques.
In this case, it's not unlikely that the conversation will be so complex a single person (imagine an "I") would not be able to follow it all but would have to focus on some parts and shut other parts out.
Think of it as a camera/microphone covering the dialog. It can only focus on a small part (or an auditory group shot wouldn't be much more than a "murmur of voices").
This focus can move, jump from one conversation to another and even cut things off halfway.
This way you can allow the conversation to split and merge naturally and still cover it on the page.
Answer: If you have previously established a speaking style of some of the characters then you can try using dialogue tags only where it is not immediately obvious who is speaking. Sometimes in a group scene it may not be necessary to quantify who said what.
If you have a section where only 2 characters are talking, you could use this to emphasise their speaking style.
Using tags can help you control the flow and pacing of the scene. Try to avoid raiding a thesaurus for tag adverbs if you feel 'said' is being used too much.
Try a few ways of writing the scene and see what flows.
Answer: If it is clear which character is speaking(like pincq suggests) you don't need them. You can also establish who is talking in dialogue by referencing their own unique past. Since the others haven't done the event, they can't be the ones saying they did it.
Another reason you might not need them is because it doesn't matter who said it.
If your group is just making small talk, and they're just talking about, say, how much bread costs, then it probably doesn't matter who says it's $3 and who thought it was $2.25. In cases like that, you can leave out dialogue tags since it doesn't really matter who is speaking.
Answer: Establish the order and tone of those conversing and then stick to it, your reader will have to pay attention to keep up but you want them to do that anyway. If you have a new character come in part way through make a note of their particular way of speaking by way of introduction "so-and-so's yokel burr cut into X's flow mid-sentence to note ... ". For a number of good examples of conversations that are established and then left to run without further speaker's names read S.M. Stirling's The Protector's War, about a third of the book is a round table meeting with as many as 7 speakers. I recommend the Emberverse series for picking up writing technique in general in fact.


K-Means clustering - What to do if a cluster has 0 elements?

Question: I'm writing code for k-means clustering. I have around 100000 vectors of size 128x1 (SIFT descriptors). I'm trying different initialization methods such as Forgy and Random Partition.
What if suppose, no vectors are classified to a cluster (in one of the iterations)? How to calculate centroid for that cluster?
Answer: This is mostly an issue with really bad initialization (random vector generation as well as random labeling are stupid, don't use it - choose k points wth sampling, or k-means++) and with data where k-means doesn't work well at all. So if this happens, you know the results won't be good!
Either way, the standard and straightforward solution is simple: use the previous mean if a cluster becomes empty. It could be assigned points later again. And if it doesn't, well, then the cluster is empty. No surprises here, no infinite loops, convergence issues, etc.
Comment: This method may give you an empty cluster at the end of all iterations. If something else is relying on getting k non-empty clusters you may run into issues down the line in your software.
Answer: If you get an empty cluster, it has no center of mass. You can simply ignore this cluster (set k=k-1 for next iteration), or repeat the k-means run from a new initialization. You can also choose to place a random data point into that cluster and carry on with the algorithm if you must have this specific number of K clusters.
If it keeps happening, there is a good chance that your K parameter is too high.
You should iterate over a few different values for k and pick the best.
Here is how an empty cluster might happen:

Consider the following example with 7 data points. The different shapes of the points are just to show that there are actually 2 natural clusters (but we do not know that before running the algorithm). In this case we choose k = 3.

Three random cluster centers are initialized. At the end of first iteration points 3, 1, 2, and 7 will be in one cluster. 4 and 5 will be in another cluster. And 6 will be in the last cluster. Note here that the distance between 3 and 4 is larger than the distance between 4 and 5 and so 4 is assigned to the cluster represented by 5. Before we begin the second iteration we update the cluster centers and the following picture shows the centers and the clusters at the end of first step.

Now, the cluster center for the red cluster moved closer to point 4 due to 1, 2, and 7. And the cluster center for the blue cluster moved away from 5 due to point 4. In the next iteration point 4 will decide that it is closer to the red cluster and point 5 will decide that it is closer to the green cluster. This will cause blue cluster to be empty as shown below.

The images were taken from the following link: K-Means Empty Cluster Example
Comment: Thanks for adding an example of this edge case.


What is the fastest speed a passenger airplane flies at?

Question: How fast does the world's currently fastest passenger plane fly (cruise speed)? Do any passenger planes fly faster than the speed of sound?
Comment: The [concorde](http://en.wikipedia.org/wiki/Concorde) was the fastest (supersonic) passenger plane. See also http://en.wikipedia.org/wiki/Supersonic_aircraft
Comment: @knut I think you'll find the [Tu-144](http://en.wikipedia.org/wiki/Tu-144) went faster? - "The Tu-144 supersonic transport was the fastest commercial jet plane at Mach 2.35 (1,555 mph, 2,503 km/h). It went into service in 1975, but soon stopped flying. The Mach 2 Concorde aircraft entered service in 1976 and flew for 27 years." - [Wiki](http://en.wikipedia.org/wiki/Jet_aircraft)
Comment: I guess I should split it then. I'll do that after I get an answer to this; that way I can build off it.
Comment: Awesome. I have some answers ready, so await the split eagerly :)
Comment: Do you mean fastest EVER, fastest in theory, or actual fastest of a currently flying commercial passenger route?
Comment: Also you have two separate questions in here, might be worth rephrasing or separating out into two (see [faq])
Comment: I mean currently flying. Is there a reason that planes aren't reaching the same speeds as before?
Comment: Go for it! http://travel.stackexchange.com/questions/16272/is-it-possible-for-non-military-travelers-to-fly-above-the-speed-of-sound
Comment: Have a look at the Convair 990. It may be long forgotten, having been used in the 60's but it would go close to beating a 747 or A380.
Answer: In history, there have only been two SSTs (Supersonic transports) around for passengers - the TU-144 and the Concorde.
Sadly, neither is available any longer with access to fly on them.
So then we look to the two major manufacturers with almost supersonic capabilities.
Long considered the fastest passenger plane, the Boeing 747 has several variants, each with slightly different speeds.  The fastest of them are the 747-400, 747-400ER and 747-8L, all of which can cruise at Mach 0.855ish, and have top speeds of Mach 0.92.  So close!
Then we look at Airbus.  Their fastest, we're looking at the A380.  Its cruising speed is said to be Mach 0.85, while its top speed was shown in a demonstration in 2005 to be Mach 0.96.  Even closer!
So with conventional passenger jets, no, we can't go faster than the speed of sound, and Mach 0.96 is the theoretical maximum you'll reach, although it's unlikely you'll be on a flight doing that (they did it with a shallow dive and without passengers/cargo).
Part of the reason for this is design - the entire design of the plane needs to change if one is to break the sound barrier - the pressure and forces exerted on the aircraft would likely see them break apart.  Another is the noise pollution - there's a very large sonic boom when the Concorde used to break the barrier.
HOWEVER, you can 'cheat'.  If you're in say, a 777 going fast with a massive tail-wind, your effective groundspeed could be faster than it, even though the plane isn't reaching the same pressures.  There's a detailed discussion of when this has happened online.
Comment: Oh I'm waiting for some plane nut to come along and correct me - there's probably some obscure model that I'm not aware of, which would be amusing. Suffice to say though, you won't be breaking the sound barrier in these.
Comment: If you build a running track down the length of an A380 and get Usain Bolt to run towards the front at 44.7 km/h (http://www.bbc.co.uk/news/technology-19506130) while the A380 flies at Mach 0.96 or 1020 km/h, (http://www.a-380.com/about-the-a-380/a-380-specifications/) he will be travelling at Mach 1.002! Anyone wanna sponsor this stunt?
Comment: Your traveling knowledge is truly immense, Mark! Very good answer!
Comment: It's not in commercial service yet, but [SpaceShipTwo](https://en.wikipedia.org/wiki/SpaceShipTwo) does eventually have that goal and [Virgin Galactic](http://www.virgingalactic.com/) is already selling tickets on it, IIRC. SpaceShipTwo is a bit faster than Concorde. And by 'a bit faster,' I mean almost twice as fast. Mach number isn't well-defined at that altitude, though. Concorde's service ceiling was about 60,000 ft. SpaceShipTwo's is about 360,000 ft. :)
Comment: @MarkMayo you're correct as to there only having been 2 SSTs. There's a supersonic (or maybe they scaled it down to transsonic) business jet in prototype stage, but it's had several crashes already and is nowhere near ready for production. As most countries don't allow supersonic overflight except for military aircraft, such aircraft are of extremely limited use and there's little incentive to design and produce them (the cost are very high, sales numbers would be very low, do the math).
Comment: @reirab I think they generally consider that a spaceplane though, rather than a passenger airplane ;)
Answer: No, there is none and there will be none (until a new supersonic jet comes out). The reason is once supersonic speed is reached the drag resistance of the airplane increases enormously because shock waves are created and maintained. So you need much more fuel for a neglible increase of speed.
< know-it-all-mode on >
Jet fighters with supercruise still have an increase of drag, but first they are modeled to minimize the impact and second they are moving with Mach >1.2 to leave the so-called transsonic regime of Mach 0.8-1.2.
"Transsonic" means that the air around the plane moves in some regions with subsonic speed (slowest under the wings) and in some regions with supersonic speed (highest above the wings). In fact a normal jet has a small shock wave above the wings during the flight.
If every air molecule of the plane moves with supersonic speed, the drag decreases again because the interaction of the sub- and supersonic areas increase the drag.
< know-it-all-mode off >
Comment: i.e. the sound barrier is an actual barrier in airplane design: hard to get through but if you manage it, things get easier.


Could the 9th planet be virtual?

Question: Astronomers recently claim that there is evidence for a 9th planet. As far as I understood it, this is mainly based on coinciding orbital parameters of a few Kuiper belt objects.
Could the 9th planet be a virtual planet? I mean this in the sense that we see the gravitational influence of a multi-body system. Could the 9th planet simply be the barycenter of the Kuiper belt and its apparent orbit some form of precession?
Apart from the question, if this was a possible or likely scenario, how could we distinguish a "real" 9th planet from a virtual one, except by the obvious answer if we can observe it directly?
Forgive me, if this is a stupid or trivial question or if this was answered before. I am not a professional astronomer, yet I have a physics/engineering background. I did a quick internet search to answer this question but I simply may have used the wrong terms or sources.
Comment: Note that the more spread-out a multi-body system is, the _less_ will its gravitational field look like that of a point mass at its barycenter. Averaging over the entire Kupier belt is certainly not a valid procedure for any point _within_ the belt.
Comment: If the 9th planet was virtual it would imply that the universe is programmed in C++. This is a fate too horrible to contemplate... :-)
Comment: The Kuiper belt is assumed to be a pretty much symmetric belt of icy bodies surrounding the Sun, which would mean that its barycenter would be pretty much at the same location as the Sun.  There are methods by which one can account for the gravitational perturbations of other planets, but they're much more complicated than finding the barycenter.  If you're not afraid of some heavy mathematical lifting, see [here.](https://farside.ph.utexas.edu/teaching/celestial/Celestial/node88.html)
Comment: Don't be so fast to "accept"! It will discourage others from answering. Give it at least a day, or two, so at least regulars in different timezones will have had a turn. I answered anyway because I have a great link to share and feel that this subject needs more attention.
Answer: The ninth planet can absolutely be a "virtual", in the way you describe it, meaning observed data indicating the gravitational influence by an object is not actually caused by such an object.
A simple visualisation of this is the case of a two-body system, where we observe two objects orbiting a common barycentre. From the observed data, one can get the impression that there is an object in the barycentre, pulling both of your observed objects against it.1
However, a barycentric way to explain the observations gets less likely as you add more bodies. Be aware that the current indications of "planet 9" is based on a mere correlation of some not-so-accurate data, from a small sample size, heavily biased by observation constraints.

how could we distinguish a "real" 9th planet from a virtual one,
  except by the obvious answer if we can observe it directly?

That is only by its gravitational influence alone.
As a rule of thumb, incomplete and inaccurate data always imply the risk of causing virtual objects.
It should also be noted too that observations in the Kuiper belt generally can not yield how a orbit changes, due to the extremely long revolution times. observing "Interactions" are actually mostly about tracing an orbit back from its current state vectors, to find probable interaction events in the past. That is literary to ask for data artefacts and virtual objects.
1Before anyone objects about how easy it is to falsify that: Yes it is easy to determine that there can not actually be an object there, based purely on observing the two bodies. But, that requires 1. accurate data about the motion of the two objects, and 2. their mass. Our current data about the Kuiper belt fails to give good enough data on both points.
Comment: Thank you for the answer. You mention that a barycentric explanation becomes less likely for a larger number of bodies. Wouldn't it inherently converge with an increasing number of bodies, if it was barycentric? Wouldn't that render this argument invalid?
Comment: @engineer I was perhaps a little unclear there. I did not mean that many bodies have less chance to orbit an empty barycentre, just that the two cases are easier to distinguish with more data points.
Answer: That's an interesting way to put it.  Indeed, since bodies spend most of their time at the slow end of an eccentric orbit, the extended lobes will attract each other, torquing the orbits into a birdsnest shape.
See this presentation by Dr. Madigan.  I'm really disappointed that the more scientifically literate press (like SciAm) doesn't cover this idea, but hypes the large distant bodies idea.
(See slide at 15:58 in the video. But, it's the explaination up to that point that describes the mechanism.)
In short, the particular clustering of orbit shapes and orientations can be explained through self-interaction of the long-term averages of the bodies' orbits: the apahelion acts as a "virtual object", as you put it, and attract each other.

Could the 9th planet be virtual?


How can I reference classes from my scripts in my unit tests?

Question: Bit of a noob question, but I'm having trouble getting unit testing working in Unity. I created a PlayMode test assembly, I toggled "Enable playmode tests for all assemblies" as directed in the manual, but when I try to edit the test script, Visual Studio still isn't recognizing references to the classes I've written. There's also no option to manually add a reference within Visual Studio. Am I doing something wrong, or is this some kind of bug? It's hard to imagine what kind of unit testing you could even do without references to your main project.
Answer: Figured out how to do it. I had to create a new assembly definition in my Scripts folder. (I also moved my Tests folder out of the Scripts folder to be on the safe side.) Then, looking at the Tests assembly definition in the Inspector, I added a new item to the Assembly Definition References list, which I made point to my MainAssembly.


How do I make my iPhone ring for phone calls but be silent for email?

Question: As a newbie on an iPhone 5, please how do I set up my phone to give an audible ringtone when I get a phone call, but remain silent when I get an email?
Answer: Open up Settings > Notification Center > Mail, then change the Alert Sound to None. This will silence any sounds when you get an email.
By default phone calls make a sound, so there is nothing you need to change for that.
Answer: I found that the small switch just top the left of the volume controls on the side of the phone was showing red and so off. move the switch and the audible ringtone etc will sound.
Comment: This will also allow emails to make a tone, which isn't wanted in this scenario.


Stealth and Sneak Attack Rogue in combat

Question: I have a rogue in my party who likes to constantly use stealth in combat after he makes an attack, in order to get the CA required for the sneak attack dice. He justifies this by standing far away and making a stealth check, and with his stealth skill ranks, this means a practical gauranteed stealth. Is this valid or is he making a mistake?
Comment: Don't forget to include the tag for your RPG. In this case, I'm guessing you're still asking about [tag:dnd-4e], so I've added that tag for you. In the future, take care to add it, otherwise people will pester you for it and your question will be unanswerable until people figure out what RPG or D&D edition you're playing!
Answer: You and your player may be overlooking some things about how Stealth and hiding work. You should both read The Rules of Hidden Club, which explains both comprehensively. It's an excellent guide, and the official rulebooks don't explain it nearly as well.
Bear in mind the Stealth rules in the first Player's Handbook are broken and incomplete. They're repaired and amended in the Player's Handbook 2 on page 222. You can read the updated rules in the Player's Handbook update PDF from the D&D 4e Updates and Errata page.
If your Rogue player wants to hide, merely standing far away is not good enough. They have to meet several other conditions, too. Quoting Hidden Club:

How do you become Hidden?  You roll Stealth at the end of any Move Action or any of your Actions (even Free Actions) during which you move.
"Move" is defined in the PHB3 glossary as, roughly, to leave one square for any reason to enter another square.  You can't roll Stealth after Forced Movement since that's not your action.  You CAN roll Stealth after a granted Free Action.
You must also meet three requirements:

You must not be visible, which means Total Concealment or Superior Cover, at the end of the move.
Your Stealth roll must beat the Passive Perception of anyone you want to be Hidden from
You cannot have HAD Hidden at the start of the action and lost it during the action.  Which is to say, you can't BECOME Hidden as part of the same action that loses your Hidden state.

By the way, any time you become Hidden, record the number you rolled.  It's important.

In addition, your Rogue player may incur a penalty to their Stealth check for the move action they're using to become hidden. Quoting PHB2 p222's Opposed Check entry in the Stealth skill:

If you move more than 2 squares during the move action, you take a –5 penalty to the Stealth check. If you run, the penalty is –10.

Once you're Hidden, it's not as simple as just staying that way. All your Rogue's enemies still know where they were before he became hidden, and he still has to follow the Rules of Hidden Club (as described in that page I linked) in order to stay hidden. For example, he has to maintain at least cover or concealment from any enemy, or he is no longer hidden from that enemy (who can then immediately inform the others).
So: get reading!
Answer: I can't find the link right now, but I believe Mike Mearls did say that the intention is for Rogues to be able to use Sneak Attack during most or all of their turns, so don't be nervous if that turns out to be the case.
Whether or not you're correctly using the (IMO convoluted and extremely difficult to adjudicate) Stealth rules correctly, I can assure you that a carefully-run Rogue can play absolutely by-the-book and remain stealthed about 95% of the time.
I was a stickler for rules adherence in a 4E campaign that got to 15th level over more than 100 sessions, and the Rogue player was a master at choosing exactly the right combination of Powers to keep himself out of sight. The result was a fantastically acrobatic ninja who was amazing fun to watch and fight.
Comment: Have you read [the Rules of Hidden Club](http://community.wizards.com/content/forum-topic/2739081)? It explains the stealth rules in _much_ simpler terms.
Comment: @JonathanHobbs - I discovered that post too late for it to do any good, we'd already spent copious man-hours dissecting the Stealth rules into something we could understand. :)