Density of numbers with exactly $n$ distinct prime factors in $\mathbb{N}$

Question: It is quite well known that the density of the primes in $\mathbb{N}$ is $0$, that is, $$\lim_{n\to\infty}\frac{|\{p\mid p\leq n, p \text{ prime}\}|}{|\mathbb{N}_{\leq n}|}=0$$ It is less well-known, but true, that $$\lim_{n\to\infty}\frac{|\{p^k\mid p^k\leq n, p \text{ prime}, k\in\mathbb{N}\}|}{|\mathbb{N}_{\leq n}|}=0$$
I'm looking at the sets with numbers with the same amount of prime factors. We define for $n\in\mathbb{N}$ the following: $$P_n:=\{k\mid k\text{ has exactly }n\text{ distinct prime factors}\}$$
So
\begin{align}
P_1&=\{2,3,4,5,7,8,9,11,13,16,17,19,23,25,\cdots\}\\
P_2&=\{6,10,12,14,15,18,20,21,22,24,26,28,\cdots\}\\
P_3&=\{30,42,60,66,70,78,84,90,102,105,110,\cdots\}
\end{align}
It feels like the density of any $P_n$ in $\mathbb{N}$ should be $0$ give that the density of $P_1$ in $\mathbb{N}$ is $0$, but has this been proven for any $n$? For all $n$?
Thanks for your effort in advance.
Comment: @hardmath, excuse me, I forgot the vertical bars to denote the number of elements in the sets. So for example $|\mathbb{N}_{\leq n}|=n$. I edited my answer, hope this clears up things.
Comment: Not only has this been proven, but the first-order asymptotics for every $P_n$ are known, in analogy with the Prime Number Theorem for $P_1$.
Answer: The Hardy–Ramanujan theorem says that the number of distinct prime factors of $n$ has normal order $\log \log n$... i.e., most numbers have about this many distinct prime factors.  In particular, since this estimate diverges as $n\rightarrow\infty$, the theorem tells you that the density of numbers with exactly $k$ distinct prime factors is zero for any $k$.


Is it appropriate to describe our methodological mistakes in manuscript?

Question: I work outside academia, but am working on a project with a master's student. During data collection, we had some skip-logic errors pop up while administering the survey online and it resulted in some superfluous data. She and her adviser decided to throw out all affected data and only analyze open-field text, and outlined these mistakes in great detail on her master's paper. While writing our joint manuscript for publication, is it appropriate to outline these programming errors?
Comment: What's a "skip-logic error"?  What does it mean for them to "pop up"?  What do you mean by "programming error"?  I'm trying to understand better the nature of the error, the cause, etc.
Answer: It would be inappropriate not mention the mishaps in my opinion. But there is no need to document this in great detail, as you mentioned. I would comment during the revision process that you feel the description of the "skip-logic section" is too wordy, and it should be trimmed to be more concise.
Keep the focus on the positive findings as opposed to mishaps.
Comment: Another option would be to include a brief summary of the error/resulting data loss in the main text and provide more extensive details to interested readers in a Supplementary Info section (if the journal allows this).
Answer: I would also mention significant failures in the methodology because it can serve as an important warning for future researchers. For instance, needing to change the number of samples or the testing period because of experimental (or computational) difficulties may be necessary, and it would be helpful for others to know why you needed to change the protocol. In addition, reporting such issues is important for purposes of reproducibility.
However, as the others have posted, there is absolutely no need to spend huge amounts of space discussing such issues, unless your paper is attempting to correct the methodological mistakes of others in the literature.
Answer: In the Methods section we detail the process of obtaining data to analysis. Errors resulting in loss of data is a deviation from the said protocol and hence should be reported. The details need not be excruciating fine; a sentence to explain the skip logic pattern and that affected subsections were not analyzed should be sufficient. This is by no means an uncommon practice: there are generic missing, loss of data storage media, biological samples expired, or even contamination in lab. If any of these activities can potentially bias your end result or lower your statistical power, then they should be reported.
Judging from what you said that the student and the supervisor had to throw away all multiple choices and only kept open-ended question, I am guessing the skip pattern problem was extensive? If that's the case, you should try to gain full understanding of the error and carefully decide if any of the data are actually salvageable. For instance, if the skip pattern problem had made the survey questions appear to be illogical, would you still expect the respondents to be in their right mind when filling in the open-ended questions?
The master's paper needs to happen probably because the student has done the due diligence and finished a project, despite with technical errors. But data mishap that is sufficient for a master's thesis does not imply the data are fit for publication. As your name will be on it, if you feel uncomfortable, request to be removed from the author list. You may opt for acknowledgement or even no relationship.


Lost Wi-Fi passwords after reset network settings on iPhone

Question: After a network configuration reset on my iPhone all Wi-Fi passwords were lost. They were stored in iCloud Keychain, synced with my Mac, where they disappeared too. This is very frustrating since it seems that they were store only on iCloud and I can't restore them via old Time Machine backups.
(In Keychain on my Mac I have only some of them, 90% are lost.)
Comment: What was the question?
Comment: Same happened here. I thought all password were stored on the iCloud keychain. Could we not rsync them from that?
Comment: Unfortunately, it is not possible to access this information. The passwords are kept on your phone in a safe place that is not accessible through any regular means on the phone. This is done for your protection, if you were to lose your iPhone and someone picked it up, the passwords that are stored on it would be up for grabs. This would lead to a lot of security problems.

So hereafter I would recommend to use certain apps like 1password to keep your passwords safe and backed up..
Comment: Yes, I called Tim Cook. He said it's a feature, not a bug.
Answer: I came across this question and this was suggested by someone on a forum:

Disable iCloud Keychain from the iCloud settings page (On the top of settings if running iOS 10.3, down the list if running other versions of iOS)
Do the "Reset network settings" to debug the network issue you're experiencing
All the Wi-Fi passwords should now be deleted. What you now have to do is to connect to a network manually, then re enabling your iCloud Keychain, your old WiFi passwords should have resynced and you should now have access to all previously connected WiFis.

Note that I haven't tested this personally, but I just came across this because I'm trying to debug a problem when my iPad disconnects from WiFi only when streaming Netflix.
Comment: I followed this and it worked as expected -- just disable iCloud Keychain before clearing network settings then re-enable afterwards, my Wi-Fi passwords were re-synced to my phone over LTE (as evidenced by not having to put in my password to connect to my WiFi network).
Answer: Are you using an Airport base? If so, you can force the password to be added back to your keychain from there (assuming it is in the airport base settings).
Go to Airport Utility/Edit/Wireless
in this tab the name of your WiFi should be mentioned, with the password typed but not visible. If not selected yet, then tick the box for "Remember this password in may keychain", then it should save an item in you keychain again and your mac reconnecting automatically to this WiFi
Good luck


Multiple PouchDB to single CouchDB

Question: I need to submit data from multiple mobile apps. in my mobile app I am planning to use pouchdb to store the document, later I want this document to sync to couchdb one-way only.
what will happen if I submit data from multiple devices ? will pouch db create same document ID and overwrite data in couchDB ?
Answer: The document ID will not be the same, assuming you're letting PouchDB create them (the likelihood of PouchDB generating the same ID twice is extremely low)

Multiple PouchDB to single CouchDB


How do people collaborate on maps

Question: How do people (users) collaborate on user created levels? I have seen more and more maps that have been collaborated by multiple users and was wondering how it is done, and also how do others user verify your level for you E.g Cataclysm (The newer version of it) was built by Ggb0y and was verified by Riot
Comment: @angussidney FYI: editing a question through the close vote queue removes it for other reviewers.  It's generally supposed to be used for questions that are unclear and can be edited to make it clearer.  Using it for minor edits means nobody else can review it.
Comment: @CloseVoters Map creation is an in-game feature. Therefore this question is not about game design and development.
Comment: @Frank Sorry, didn't realise that
Comment: Was this marked as game development? Map creation is an in game feature, so i am well within the rules of this website
Comment: Making maps, yes.  How people use maps, not really.
Comment: @Frank Now I am confused, is asking how people colaborate on maps in GD within the rules?
Answer: The first thing you would need to do would be verify your part of the level, then go the level selection screen in the "create" tab and select your level.

Once you've selected the level you want to collab on, click the red box with an arrow coming out of it.

This will lead you to a screen that has an option to edit the description and request the rating for your level, among other things, but what we're interested in right now is the little gear in the top right corner.

Clicking this gear will allow you to make your level available for other to download and edit, but, assuming you only want one person to have access to this level, you'll want to add a passcode and PM it to the person whom you want to have access to your level. you can do this by clicking the "requires password" box, and then clicking the "enter password" box.

After you click it, you'll be presented with a keypad, enter the passcode you want on this keypad, and then click the "OK" button. After all of this, you can publish your level, and your friend can copy it, so that they may add their part (or verify) to the level. They can also repeat this process if you want to have more people involved. Hope this helps!
Comment: Really good answer, welcome to gaming.SE!
Comment: You would then remove the online copy of the level once the other collaborators get access to a copy, correct?
Comment: Yeah, but that's purely optional @Matt07211
Answer: Winterblade's answer is a good one, but there's another way to collaborate now — one that probably appeared only in a recent update.
After you check off "allow copy", another checkbox appears: "Unlisted".  If this box is checked when the level is published, the level won't appear on any searches anywhere unless the level is searched with its Level ID (The Level ID is the series of numbers on the level's page as shown in Winterblade's post's first picture. Before the level is published, it will say, "ID: na").
Assuming both you and your collaborator have Geometry Dash accounts, you can go to Opening screen > Level Editor > Create > [Name of your level], write down the ID, and message it to your collaborator (Opening screen > [Blue profile button] > [Third button in bottom row with two heads] > [Collaborator's name] > [Blue envelope] > [Type message and subject] > [Send]). They then can find the level, copy it, and build their own part, publishing it, too as unlisted. After they message you the ID of the level with their additional part, you can delete your old version or remove it from the server (Opening screen > Level Editor > Search > [Type in Level's ID] > Get It/View > [Second button on left column, gray box with red X] > Yes), copy their version, add your stuff to it, and republish it as unlisted.
Keep doing this until the level is finished, then publish it (without unlisted on!).
Answer: I think the easiest way is what winterblade was saying. you then can also be on a zoom with the other collaborator for the best result this works as I already did it with a friend (ps. our next Collab is called atomic processing)
Comment: This doesn't add anything of value and is just advertising for a map you made.

How do people collaborate on maps


Would it be nearly impossible to remove a tick from afro hair?

Question: The other answers that detail how to remove ticks from the scalp prescribe combing through the hair carefully, however with afro hair this is not possible, especially with locs (dreadlocks). What should someone with afro hair do in an environment with ticks?
Comment: By afro hair, do you mean [the specific hairdo](https://en.wikipedia.org/wiki/Afro), or the [type of hair](https://en.wikipedia.org/wiki/Afro-textured_hair) itself?  The term gets used for both.
Comment: @jcaron Oh, trust me, a tick can go anywhere on the human body it wants to go whether you can or not. Some species are smaller than a poppy seed.
Comment: I would naïvely expect that if you can't get to the scalp, neither could the tick, but I don't have any evidence either way.
Answer: I can't give an answer from experience with an Afro, but although I have had many, many ticks over the years, I haven't had any on my scalp, that I know of.  I am very sensitive to the itching of a tick when it burrows in -- that is how I find my ticks -- so I am pretty confident that I haven't had any on my scalp.
To what do I attribute a tick-free scalp? I cover my hair completely with a scarf or a small towel -- sort of like a turban -- when I am working in the garden or my woods. I might find several itching spots a day after a long session working outdoors, and -- voila -- ticks!  But over many years, none have been on the scalp.  So, my answer is that prevention is most of the battle.  You might also consider spraying your turban-like covering with permethrin. @Ian Campbell says permethrin is preferable to DEET for ticks.  See his comment, below.)
As for what to do if your scalp develops an itch, I have found that it is easy to feel the tick with my fingertip even if I can't see it.  So you might be able to localize the tick by touch and then guide a friend with tweezers to the tick.  No matter what kind of hair you have, you will need help.
If you don't feel the itch -- not everybody does -- I don't know what to say.
PS I live in an area -- Northern Virginia -- with lots of ticks.
Comment: I've always heard "check your head for ticks", but of the many many ticks I've removed over the years, I've never had them on my head either. I've never taken any special precautions for my head. The places where I find the most ticks are at the tops of my socks, on my legs, and in my waistband. I think it's probably rare for ticks to be questing at head level.
Comment: @WaterMolecule: IME, it's rare but not unheard of. I run summer camps in an area with a fairly high tick population. I've personally found a tick attached to the top of my head after sleeping outdoors with no tent (on a smooth bare rock, proof that they don't just hide in grass, either) and one of the most awkward spots I've had to remove a tick from was a child's eyelid(!). Fortunately it came off cleanly, quickly and painlessly using a tick remover tool, because I would _not_ have wanted to try getting it off with tweezers if the remover tool failed.
Comment: Thank you! That's very helpful regarding prevention. I plan to cover my hair completely in that case.
Comment: I would consider using permethrin in place of DEET for clothing. I believe permethrin is more effective for tick prevention. It's certainly less likely to melt your head gear if made of synthetic materials.
Answer: I live in an area with lots of ticks and I've had many attach to me over the years, including on my scalp. I never use a comb. I find them by feel and then remove them with my fingers. A tick can be distinguished from a mole or other bump easily even if you can't see it because a tick can be flipped back and forth.
I can't imagine any reason why someone with afro hair couldn't do the same.
Comment: The reason I am concerned is noticing it initially. Did you locate the tick because of a sensation (e.g. itchiness) or was it purely visual? The latter is what would make it very challenging with afro hair
Comment: +1 for describing how a tick is easily distinguished by touch from a bump.
Comment: @MaheshSundaram  Relying on feeling them or seeing them on your scalp is completely unreliable even if you have straight hair. I run my fingers through my hair over my entire scalp feeling for them. Anyone can do that no matter what kind of hair they have.
Comment: @MaheshSundaram Huh? I'm not dismissing anything. I'm just saying if you can feel your scalp you can find ticks without being able to see them, and I know that people with afro hair can feel their scalp.


Update From in Toad/SQL Plus/10g

Question: I know you're all waiting to hit the down arrow, since it seems as though this question gets answered near every day; however, it seems as though an update/from clause does not work with my particular configuration. The configuration I'm using is as it is in the title: Toad DB tool, SQL Plus editor, 10g machine. I return an error whether or not I add a from clause in the following snippet (note: I've checked that all of my column names are present and spelled correctly)
<code>UPDATE distinct_network_point
SET altitude = altitude_of_point.altitude
FROM  altitude_of_point
WHERE distinct_network_point.id= altitude_of_point.id
</code>
I want to update column 1 in a table from column 2 in another table where column 1 in table 1 is equal to column 1 in table 2. Is this possible with my configuration? I've also tried modifying a select subquery to this effect, but cannot get it to group properly.
Answer: http://psoug.org/reference/update.html This was a very helpful lead, had just what I needed.

Update From in Toad/SQL Plus/10g


Do I need to repair a slit vapor barrier on fiberglass insulation

Question: I am cutting holes in the ceiling to install IC-rated recessed lights and I accidentally slit into the brown paper lining of the underside of the fiberglass insulation.  Do I need to repair the cuts in this vapor barrier?  If so, how do I make the repair?
Comment: always try to maintain the integrity of the paper. I found duct tape works well for this type of repair.
Answer: If you are installing IC rated lights an are worried about the paper, I would be concerned about the rest of the insulation that surrounds the light.
Typically when I set a "new work" style rough in I cut the drywall bigger than the light rough in by a few inches on either side up to the joists that will support the light. Yes I may cut the paper, but the larger cut in the drywall helps me address the cut and other issues.
"Remodelers" IC rough ins are a different matter.
Once the light is wired in, I add another 4'section or 2 centered over the area where the light will go, after the light is secured in place I cut the paper and the insulation to the light. You can tape the cuts in the paper if you like, and it may improve the performance of the vapor barrier.
The reason why I detail this, is if you have not cut the insulation other than the incidental cut during the time the drywall is cut, I am led to think the insulation is simply pushed up to make way for the light to go in. Doing this raises the insulation above the neighboring pieces and the R-value is diminished drastically in these ares where this happens. This is the meaning behind my opening statement.
Comment: I'm a little confused by what you're saying. Are you saying you would add an additional piece of insulation centered over the area where the light is pushed into the ceiling?  Even though the remodel lights I'm using are IC-rated, would the extra insulation directly on top of the lamp trap too much heat and create a fire hazard?
Comment: As mentioned, the remodel lights are a different issue, since they require a hole only large enough to set the light in with no repair of the sheetrock, usually the insulation is cut the same way the sheetrock is so the insulation fits snug around the fixture. I would check the specs to see if insulation can go over it, if it can and you can add it through the 4 or 6" hole that is cut in the drywall, I would do so. Only if it is not a hazard, the specs of the light should fill you in on that.


Can't Install Mac OS X Leopard/Snow Leopard on 2007 iMac

Question: A while ago, I upgraded the processor and RAM on my mid-2007 iMac so I could install macOS High Sierra. It now has an Intel Core 2 Duo Processor T9500 and 6 GB of RAM. Both the hardware and software upgrades went fine, but after using it for a while, I realized that the computer was much slower than before. Additionally, I didn't like the iOS-inspired feel of High Sierra. Because of this, I decided to downgrade to Mac OS X Snow Leopard. I backed up my files, got my Snow Leopard Install DVD, and booted up the iMac. However, right after the language selection page, the installer read:

Mac OS X can't be installed on this computer.

I opened disk utility and formatted the hard drive in case that was causing the issue, but I received the same error. I would have tried my Leopard install DVD, but it is an upgrade disk, not an install disk. So, I got out the factory restore disks to install Mac OS X Tiger. This installer ran successfully, and the computer worked fine after the installation. However, when I put in the Leopard upgrade DVD, I got the same error. Same with the Snow Leopard install DVD. I have tried every solution I could find; resetting the PRAM, formatting the hard drive, updating all my software, etc. Nothing works. The only thing I didn't try was bypassing the hardware check in the installer for two reasons: (1) I don't know if it will be the same for an Intel iMac as it is for a PowerPC Mac, and (2) It is incredibly difficult to get the required files on the iMac since Tiger doesn't support TLS 1.2. I suspect that the issue was the CPU upgrade. Should I try this solution, or is there something else? If the bypass is the way to go, is there a simple way to download XAR from the iMac? I have been trying to get this to work for weeks and it's been incredibly frustrating.
Answer: OK, I just found out that the installer recognizes my processor speed as 800MHz for some reason. To fix it, the hardware check must be bypassed, same as would be done on a PowerPC model.

Can’t Install Mac OS X Leopard/Snow Leopard on 2007 iMac


Accessing android camera using BitWebServer (PHP)

Question: Does anyone know of an easy way to grab an image from an android camera using the PHP engine built into BitWebServer? I suppose if need be, I can write an android app and make a sys call but I was wondering if there might be an easier way to do it.
Answer: There is no way to do it using PHP. PHP is a script interpreter running server side, it cannot interact with the camera hardware on an android device.
Creating a native Android app is the way to go. Performance will also be many times better using native code rather some other workaround.
Answer: I hear tell there may be some ways to do it from various scripts in OS 3.0 and above, but it's through the OS itself. I did manage to find a rather popular web-cam software that will provide it's own mini-web server though for doing video (mpeg style) streaming as well as a number of image formats. That should suffice fine for what I'm doing which is mainly going to be novelty only. I'll just have to fire up both apps when goofing around.
(I have been trying to find a cell provider or some other means to connect to the internet when camping way back in the woods of northern Michigan. I was thinking it might be cute to post a 'camp cam' to a short list of friends to see if whatever connection I get is accessible from the outside)


Are there families of known parametric copulas for non-standard marginal normal distributions?

Question: I know that a family of Gaussian copulas generates a standard bivariate normal distribution if and only if the marginal ones are standard normal. This characterizes the Gaussian copulas, where I have a problem is, if I change the standard normals for normals with mean $\mu$ and variance $\sigma^2$, do I get a family of parametric copulas?
Answer: The point of copulas is that they do not care about the margins. Therefore, if you want a Gaussian copula as the dependence structure between the margins and margins that are normal but not standard normal, go for it. Just specify the parameters of the Gaussian copula, and then specify the means and variances of the margins. No additional theory is needed.
To see why this would be a parametric family, the parameters of the Gaussian copula are the off-diagonal elements of the (population-level) correlation matrix, and the parameters of the margins are the usual (population-level) means and variances.
Comment: You could state already in the answer that the parameters of the Gaussian copula will be just the correlation matrix.
Comment: Thank you very much, yes in general I was looking for a "standard" way to arrive at the form of a known parametric family, however, I see that it does not exist
Comment: How do you figure there is no parametric family? A multivariate Gaussian distribution is characterized by its correlations (which are the parameters of the Gaussian copula) and by the means and variances of the margins.


Problem with textfields and scene transition + cocos2d

Question: I am having problems with my textfield not flowing with the scene transistion. Basically my scene is transition with this call:
Scene* gs = [[[QuestionsScene alloc] initWithPage:2] autorelease];
[[Director sharedDirector] replaceScene: [SlideInRTransition transitionWithDuration:0.5 scene: gs]];

However in my init i have a textfield called here:

    [answerBox setTextColor:[UIColor blackColor]];
    [answerBox setTextAlignment:UITextAlignmentLeft];
    [answerBox setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
    [answerBox setClearsOnBeginEditing:YES];
    [answerBox setBorderStyle:UITextBorderStyleRoundedRect];

    [answerBox setDelegate:self];
    [answerBox setReturnKeyType:UIReturnKeyDone];
    [answerBox setAutocapitalizationType:UITextAutocapitalizationTypeWords];
    [[[Director sharedDirector] openGLView] addSubview: answerBox];

The textbox does not follow the transition, it just sits there into the next scene. Anyone have an idea on how to fix this?
Comment: Just read up on Cocos2d 0.9 alpha release. This has a feature to add a `UIKitLayer`. Neat :-), that is pretty much what you will be wanting to do.
Comment: that's good to know, basically what i am doing now, it hiding and removing the text field whenever i am changing scenes, doesn't really follow the transition but it'll do for now.
Answer: You add the answerBox to the openGLView directly, not to the scene. So naturally when the scene changes, the answerBox is not affected.
If you use a UILabel, you cannot add it as a child on a CocosNode object, so you can't add it to your scene.
Look into using the Cocos2d label class instead. Either use Label or it's faster cousin LabelAtlas
I haven't checked how Cocos2d manages its views. Perhaps there might be another option? You can try on the cocos2d forums.
Answer: For this solution, i just did removed the textbox upon transition
[nameBox removeFromSuperview];

and reappear when it comes back to the scene:
[nameBox becomeFirstResponder];

which there was a smoother transition to this though.


How much money do you need to have on hand when entering USA?

Question: My friend, a Chilean citizen, is entering the US via waiver program to spend 3 weeks in USA in a couple of weeks. She already got her ESTA approval, the plane ticket, all hotels are already booked (but paid by me, not her).
How much money would she need to bring with her when entering US? Do they still check this? She would of course have credit cards with her.
Comment: The answers to this question are very indicative of the whims of US CBP. The rules are pretty much if you 'look Western' and/or well off, most CBP officers in a good mood won't ask nor care. If you 'look' non-Western (dare I say Arabic or Hispanic?) and/or "low-rent" - chances are all of a sudden they'll care. For a country that has been trying to legislate freedom from discrimination *of any kind for any reason* it isn't fair or reasonable, but true nonetheless.
Comment: Having too much cash ("currency or monetary instruments" over $10,000) may be even worse, *"Failure to report* [or mis-reporting] *may result in seizure of the currency and/or arrest"* http://tinyurl.com/lfvj69y
 And traveling the USA's highways with cash could be trouble too http://www.washingtonpost.com/sf/investigative/2014/09/06/stop-and-seize/ *"seizure of hundreds of millions of dollars in cash from motorists and others **not charged with crimes**"*, and one of the (many arbitrary) things they look for is rental cars. +1 to using debit/credit cards.
Comment: As a visitor from the UK to the USA, about a month ago they asked me how many dollars I was bringing in with me ($700, for a 10 day trip).
Comment: It helps to understand the goal of the CBP. They're looking for people who are (A) planning to overstay or (B) planning to work while on a tourist visa. The first category may have excessive funds on them, the second category may be lacking funds. Looking "well-off" (to quote CGCampbell) is an indication of a good job elsewhere. That tends to exclude you from both categories, even when travelling with quite some cash. IOW, if you travel with $5K on you, is that for 12 months rent or a new suit?
Answer: Enough to support yourself for that period of time you're in the country.
It's frustrating, but there's no fixed number. They'll likely ask your friend about her trip, where she's going, what she's booked and how she'll support herself. It's just to make sure that she's thought through how much she'll need to spend and support herself, without getting into financial difficulties.
I've been in to the US half a dozen times, and while I've been questioned, I've never actually been asked to show proof of funds.  And certainly you don't need much cash on hand, if you have access to more through your credit card / bank / traveller cheques.
Short-version: there's no exact figure, just evidence that she'll be able to cover herself for her travels.
Comment: Not sure if it is really correct to say "Enough to support yourself". They are looking for a practical real world response, not a quote from a law book. I have seen border agents say that $2000 is not enough for a handful of days (3-5, something like that). The agents do not necessarily have any idea how little or how much it can take to live on.
Comment: @JonathonWisnoski sure, but the point is they're going to ask you for evidence of this.  So if you say "well I'm backpacking, staying in hostels for a week" versus "I'm on a luxury exploration of the west coast", they're going to have different expectations of what is required to support.  And after even a week of interviewing people, I think you'll find they have a pretty good idea of who is prepared and who isn't :/
Comment: To add to this, it makes a significant difference if you have hotels etc pre-booked: You could feed yourself for a 10 day trip for $200, but you sure as hell couldn't get somewhere to stay for that much.
Answer: It may sound strange, as many travelers here point out that they never been asked if they brought enough money while entering the US. But the U.S. Customs and Border Protection states that:

Travelers visiting the U.S. must be able to prove to a CBP Officer
  that they have sufficient funds (i.e. credit cards, cash, travelers
  checks, money orders etc.)

Good thing is that credit cards are accepted as a mean of sufficient funds. To be able to give some proof, everytime I travel to a foreign country I bring with me a print of my last credit card bill where it shows my credit limit. Never had to show it to any immigration officer, but is a simple measure and should work as a proof of funds.
Comment: Yeah, just because you have to _be able to_ prove you have sufficient funds, doesn't necessarily mean you'll be asked to do so every time. Good advice.
Answer: I traveled to the USA this December from South Africa and they did not check how much cash I had. I actually had 0 dollars on me. All I had was my credit and cheque cards that I could use across America. There was no issue.
So unless you find some text on the visa website you do not need to have hard cash with you at the time of entrance.
Comment: As a traveler from Europe on two occasions, this has been my experience as well. I can't recall having needed to discuss money at all.
Comment: Same for me. 6x times to USA from Europe in the last 2 years. The question never came up. And I never traveled with more than $100 in cash. Twice without any dollars at all. I prefer to withdraw from an ATM when I arrive. It is usually cheaper than buying $$$ in Europe. If I carry $$$ on the flight it is left-over money from the previous trip.
Comment: Yeah, the requirement is just that you be able to prove that you have sufficient funds, not that those funds are in cash. Credit cards work just as well cash for that purpose. Almost 100% of businesses that deal with consumers take credit cards in the U.S. and CBP knows that.
Answer: Your friend will need "access to sufficient funds to support themselves during their stay". This can be as low as "nothing" if a local resident is waiting outside to pick them up, "access" in this example being your wallet. A lot will depend on what the immigration agent thinks of your friend (and/or you) when they approach the desk. Clothing, accessories, baggage are all part of the process. If you look moderately well off (not rich, just comfortable - the trip might be expensive for you but it's not beyond your means) then they won't ask further. Possession of a credit card will be assumed unless you provide reason to assume otherwise.
If you look like a "USA on $20/day" backpacker, a refugee, or anyone else who may need to do things like get an (illegal) job to pay their way then they will want to see some cash and/or a functional bank card, itinerary, local contacts, return ticket etc.
So just tell Miss Chile to dress nice, check her hair before landing, smile and be pleasant. You do the same - be the person immigration will take one look at and say "no problem". An Armani suit might be a bit much if its a weekend arrival but Hugo Boss casual wear will work. LL Bean at least.
Comment: Second this.  I've been in a lot of countries and the only time I've had trouble getting in was once in England when we looked more like the $20/day backpacker--we had just spent 4 months crossing Africa and a thief had gotten to our stored clothes, we only had our worn and tropical attire.
Answer: I've travelled to the US from Ireland 10+ times on a visa waiver programme (ESTA) and never asked about my funds or cash at immigration. I almost always travel with no USD$ (sometimes I have about $50 for emergency's, sometimes $0), just my credit and debit cards.
Never been a problem. Never been asked ANYTHING about funds. But, I am a 40y/o white guy from a western country, so your mileage may vary.
Comment: It's weird how people have such different experiences. I'm also 40-ish, white and from a western country. I've travelled on VWP from the UK many times and they almost always ask me how much cash I have with me. They've also always been entirely happy when I've said something like, "Er, about $15 but I use my cards."
Answer: Interesting. I am from Europe and every time I enter the US on ESTA the immigration officers ask me how much money I have with me. First, I made a mistake and told them the truth that I have $200 and they didn't like it. They asked me after that again, so I figured it was an issue, so I had to tell them I have $200 cash and about $1000 on my European atm card (which wasn't really true). Luckily, they didn't want a proof. They let me go, but asked me everything about what job I have, etc. before. Last time, I was coming to the US from Bahamas and they asked me again how much money I had. So, they do ask...


Moving image below vertically centered text pushes text up

Question: I have created a document in Word 2016. My title page is horizontally and vertically centered, with a section break (next page). I have pictures that I want to put on my title page, above and below the title. Everything works fine as long as I keep the picture(s) ABOVE the centered title and section break line. If I drag the picture below the title/section break, the text starts moving upward. I have tried every type of text wrapping and positioning option I can think of, to no avail. I don't want to have to use hard returns and page break to accomplish this.
Answer: Have you tried placing them in the Header area? They would be anchored in the header area and you would place a wrapping attribute for them to appear behind the text.


Anyone successfully adopted JaikuEngine?

Question: Are there real world adaptations of JaikuEngine on Google App Engine?
(Question from my boss which wants to use it instead writing our own system)
Answer: This is jaikuengine running on AppEngine - https://jaiku.appspot.com/
If you wish to have your own version of jaiku, its pretty straightforward. Check this out- http://code.google.com/p/jaikuengine/
Answer: Whilst I love the App-Engine.  Does your solution need to be hosted on the AppEngine?  If not I would check out identi.ca which is based on the Open Source Laconi.ca
Answer: Does http://www.jaiku.com/ count?


UIAlertView Button Action

Question: How can I use two actions for UIButton click?I have a UIAlertView showing with two button.Play again and exit.Now i want to execute two method in the click event of these buttons.
Comment: Please create a bit more context, your question contains the word UIAlertView and the description doesn't hint how that fits in.
Comment: i have updated the question.please check it now.and tell me how can i do this?
Comment: i couldn't solve the problem yes...can you help me?
Answer: UPDATE - May 2016
UIAlertView is deprecated. You can now use UIAlertController as explained here.
Old Answer with UIAlertView

You can create a UIAlertView like this
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Really reset?"
                          message:@"Do you really want to reset this game?"
                          delegate:self
                          cancelButtonTitle:@"Cancel"
                          otherButtonTitles:@"reset", nil];

[alert show];

To handle AlertView button click, you have to
conform to UIAlertViewDelegate protocol.
@interface YourViewController:UIViewController<UIAlertViewDelegate>{
  .......
  .......
}

Then implement UIAlertViewDelegate protocol methods,
- (void)alertView:(UIAlertView *)alertView
                   clickedButtonAtIndex:(NSInteger)buttonIndex{
    if (buttonIndex == [alertView cancelButtonIndex]){
      //cancel clicked ...do your action
    }else{
      //reset clicked
    }
}

Comment: [alertView cancelButtonIndex]
Comment: where should i put this funciton :      - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (buttonIndex == 0)
    {
        //cancel clicked ...do your action
    }
    else if (buttonIndex == 1)
    {
        //reset clicked
    }
}
Comment: Be sure to conform to the UIAlertViewDelegate protocol.
Comment: oops yes..do one thing too, in the .h file of your controller confirm to UIAlertViewProtocol, ie if your controller name is SomeController in the .h file when we declare @interface SomeController:UIViewController
Comment: my .h file starting like this already : how can i use another delegate here?@interface GameTableView : UITableViewController
Comment: thank you so much...finally i made your suggestion working....credit goes to you.....have a coffee by my name...:)
Comment: Is there a constant defined for cancel button? It would be great instead of 0 check.
Comment: @RahulHawge No longer dabbles in iOS, so bit slow. Thanks for the pointer. Just updated the answer to mention about deprecation.

UIAlertView Button Action


How to separate rocks and dirt?

Question: I have rocks laid down on my drive way and it clearly has some problems in the plastic layer below. Weeds have been popping out since we moved in. How do I go about getting this rock driveway redone in the cheapest and most effective way possible?
Comment: do you have rocks on the sides of your driveway as a decorative element or do you have a crushed gravel driveway?
Comment: can you provide a photo of the problem area? THough the sifter is a great solution, I wonder if the scope/scale of your job may be too large for a job like this by hand. a machine may be needed if it is a sizeable area.
Answer: I'm in the process of sifting gravel out of my backyard where I want a garden and by far, the absolutely best way to sift gravel out, is with a hardware mesh slide.

This method was an upgrade from the box with a hardware mesh bottom that I would shake back and forth to separate the rocks from the dirt.
The biggest advantage of the slide over the box, is that gravity is doing all the work for me. All I have to do is shovel dirt to the top of the slide, and as it runs down, the dirt will fall through the mesh, while the rocks run to the bottom (into the box that I had been using previously).
Not only does this mean I'm not breaking my back sifting through dirt, but I'm skipping an entire step in the process. Rather than filling up the box, then sifting the dirt, I go straight into sifting the dirt.

I do want to note that I have seen people make a dirt-sifter using the box method, but putting a motor on the box so that it shakes on it's own. So there is that option, but it didn't seem like something I would want to do, I'm not going to want to keep the sifter after I'm finished, and I didn't want to spend a whole lot on doing it.

For this method I used:

2, 4-inch boards.
  1, 2-inch board.
  2, 2x4 wall studs.
  1 roll of 1/4-inch hardware mesh.
  Staples to attach the hardware mesh to the wood.
  1 1/2-inch screws.
  2 small corner brackets.
  2 straight brackets.

All I did was I rolled out the hardware mesh and stapled each side to one of the 4-inch boards. Then, I cut the 2-inch boards, and screwed them over the hardware mesh to provide support.

Note: I placed the middle piece one-third of the way from the bottom. This creates a lip that will keep large sections of dirt, or dirt that's mixed in with plants and just isn't sifting through on it's own from reaching the bottom. All I have to do then, is run a flat shovel up through the dirt a couple times and it will all sort itself out. If you do it right, the plants will end of on the top and you can grab them for compost.

Once that piece is together, then just use something to prop it at about a 45 degree angle. That's what I used the wall studs for, since I had them lying around as scrap. It's also where I used the brackets to attach them together. I only used them because I had them next to me and didn't feel like going to dig out longer screws. You could easily use longer screws and skip the brackets if you prefer.
That's really all there is to that design. Just be sure keep an eye out for worms as the dirt runs down the slide,  you don't want to sift those guys out.
Comment: How do you break up lumps of potentially good soil after sifting? Or do lumps go out with the rocks?
Comment: @J.Musser Since it's for my garden I did till it first to make it easier to sift through. But the couple clumps I've come across have broken up just fine with a flat spade running them up and down the slide. Sort of the same effect as shaking it in the box, but less effort.
Comment: So this would only work with reasonably nice, dryish soil.
Comment: I created one of these (a bit different design model) and I agree...hands down best solution.
Comment: Looks like duct tape was employed. =)  Haha Love it.
Comment: @J.Musser If you've got wet soil/mud, you could use a hose to wash the soil through.  You probably want to move around though so you don't end up with a mud pit.
Answer: If you have a crate with small enough holes in the bottom, you could shovel the dirt and rocks into the crate, then sift the dirt out.  It does get dusty though.
Answer: A sieve. You should be able to find some at your local hardware, generally they stock various sizes. If the material is not very sturdy you could build a frame out of some lumber.
Something like chicken mesh might also work depending on the size of the rock.

How to separate rocks and dirt?


6 Layer PCB 50 ohm Impedance Matching

Question: What information do I need from the PCB manufacturer to create a 50 ohm impedance trace on my 6-layer PCB?
Comment: Most PCB houses will do this for you if you identify the tracks that need to be impedance matched.  If you need to do it yourself then you'll need to know the thickness of the dielectric between the tracks and the ground plane, and the dielectric coefficient of the dielectric itself.  Provided that the ground plane is relatively large, the tracks are much longer than their width and so on you can usually ignore the other factors.
Answer: If it's a prototype/small quantity ask about their standard stackup for 6-layer. That can save you time and money. For example, here are the standard stackups for PCBway, from their web page (they vary depending on copper  thicknesses you choose).
You can then use an online calculator to determine the trace dimensions.

Then you will generally want to tell them that you would like the impedance controlled, and they may make small changes to get within the tolerance that you require (tight tolerance is more costly, of course). You can skip this step but it's more of a gamble. In the case of a 100 x 150mm board for 5 pieces, the increase is from $212 USD to $368 USD according to their calculator and as of this date.
Their standard tolerance is

±10%,50Ω and below:±5Ω
Answer: You will need the following information to then obtain certain parameters such as dielectric thickness etc to estimate your 50 Ohms impedance :

Work out if you can the required PCB stack-up for the 6-layer PCB
Let the PCB manufacturer know of your intention to request the manufacture of a 6-layer board. If this is a standard PCB they make, they can immediately give you the dielectric thicknesses you can then use in you calculations. (they may just let you know of the stack-up from which you can get thicknesses etc.)
Once you have all manufacturing dimensions you can go ahead an calculate your Tx-line width.
At manufacturing you can let the manufacturer know you need "controlled impedances" for some of your PCB traces so that they can ensure constant, and accurate trace dimensions and tolerances etc.

Generally speaking it is fairly easy to get all this from a good PCB manufacturer prior to placing an order, but some may require that you first place an order and that you accept making payment ... good luck

6 Layer PCB 50 ohm Impedance Matching


number of possible subsets formed with odd count of odd numbers = $2^{n_{odd}-1} \cdot 2^{ n_{even}}$

Question: Let $n_{odd}$ represents the number of odd numbers in the set $S$ and $n_{even}$ denote the number of even numbers. The total number of possible subsets formed with odd count of odd numbers  $=2^{n_{odd}-1} \cdot 2^{n_{even}}$. How do we prove this ?
Comment: Let $O$ be the set of odd numbers in $S$. Half the subsets of $O$ have an odd number of odds.
Answer: Let $E$ be the set of even numbers in $S$, and $O$ the set of odd numbers in $S$. We assume (this is not stated explicitly in the post) that $O$ is non-empty.
Any subset of $S$ with an odd number of odds can be uniquely expressed as $A\cup B$, where $A$ is a subset of $O$ with an odd number of odds, and $B$ is any subset of $E$.
For any choice of $A$, there are $2^{n_{\text{even}}}$ ways to choose $B$. It remains to show that there are $2^{n_{\text{odd}}-1}$ ways to choose $A$.
So we want to count the number of odd subsets of $O$. Arrange the $n_{\text{odd}}$ elements of $O$ in order. Call them $x_1$ to $x_k$. Any subset of $O$ with an odd number of elements can be uniquely constructed as follows. Choose any subset of $\{x_1,\dots, x_{k-1}\}$. If this subset has an odd number of elements, keep the subset. If if has an even number of elements, append $x_k$ to the set, to make the count of odds odd.
So there are just as many subsets of $\{x_1,\dots,x_k\}$ with an odd number of elements as there are subsets of $\{x_1,\dots, x_{k-1}\}$, that is, $2^{k-1}$. In our case $k=n_{\text{odd}}$, so we are finished.
Another way: We sketch a much simpler approach based on the same idea. Suppose $a$ is a fixed odd number in $S$. Call a subset of $S$ good if it has an odd number of odd numbers. We count the good subsets of $S$.
There are just as many good subsets of $S$ as there are subsets of $S\setminus \{a\}$. For a subset $K$ of $S\setminus\{a\}$ is either good or not good. But if $K$ is not good, then $K\cup\{a\}$ is good. And every good subset of $S$ can be produced in this way.
Thus the number of good subsets of $S$ is $2^{m-1}$, where $m$ is the number of elements of $S$. Finally, note that $m=n_{\text{odd}}+n_{\text{even}}$, and therefore $2^{n_{\text{odd}}-1}\cdot 2^{n_{\text{even}}}=2^{m-1}$.
Comment: Let $S_a=S\setminus\{a\}$ (everybody but $a$), and take any subset $K$ of $S_a$. Maybe $K$ has an odd number of odds (is good).  Or maybe it has an even number of odds, in which case $K\cup \{a\}$ is good. So given **any** subset of $S_a$, we can produce a good subset of $S$ using this procedure. Conversely, any good subset of $S$ can be produced in this way, for a good subset either does not contain $a$, so must be a good subset of $S_a$, or does contain $a$, so must have been produced by adding $a$ to a bad subset of $S_a$.
Comment: Nicolas can you please elaborate this line more in your second approach "There are just as many good subsets of SS as there are subsets of S∖{a}S∖{a}. For a subset KK of S∖{a}S∖{a}, is either good, or appending aa to it makes it good."


Taxis from Heathrow with a lot of luggage

Question: I will be arriving in Heathrow around noon with a lot of luggage (around 4 big pieces). Will I find room in taxis to take this to downtown London or should I book something in advance ?
Comment: Where abouts in London are you headed? A black cab from Heathrow to the centre isn't the cheapest thing to get...
Comment: @AleksG  Thanks for the info, I am actually in the same situation. I followed the advice in the answer and pre-booked a taxi.
Comment: I am going near St Pancras. Which option would you suggest ? Carrying the bags myself in the public transportation is not an option.
Comment: Get a luggage trolley, down to the Heathrow Express, unload the bags onto the HEX, in the dedicated luggage areas, express train to Paddington, grab another luggage trolley from the platform at Paddington, up to the taxi rank there, and taxi along to STP. Should be quicker and cheaper
Comment: Tx for the answer. Regarding prices maybe I should have said that we were two.
Comment: Borderline whether 2 people plus 4 'big' pieces of luggage would fit in a black cab. How big is 'big'?
Comment: Not bigger that what can be checked (without extras)  in an airplane. Also not so "big" but not small
Comment: how heavy your luggage are?
Comment: @AE Several years ago, two of us arrived into Heathrow with 6 large suitcases plus 2 small-ish backpacks plus 2 laptop bags plus a couple more small bits and pieces of luggage - we were moving to UK.  Both of us plus all the luggage had no problem fitting into the black cab.
Comment: @Him about 15 kg each
Comment: Personally, I wouldn't take a cab, [they're the most expensive in the world](http://i.telegraph.co.uk/multimedia/archive/02586/study_2586614a.jpg).
Answer: Taxis that you can get from a taxi rank at the terminal (without booking ahead) are 'black cabs'. A black cab is probably big enough for 2 people plus 4 big bags, but might be a bit of a squeeze (depending on your definition of 'big'). Expect to pay £45 to £85 (depending on traffic) as per https://tfl.gov.uk/modes/taxis-and-minicabs/taxi-fares
You can get a good view of the size of a standard black cab in this video:
http://youtu.be/YzvejjipQy0
Taxis that you can only book ahead of time are 'minicabs', there's a price comparator here: https://www.minicabit.com/search_trip.php
Expect to pay about £40 - tell them about the luggage in advance so they don't send a vehicle that's too small. If you want a large, reputable minicab firm then you can do worse than Addison Lee: http://www.addisonlee.com/passenger-services/airport-transfers/heathrow-airport-transfers/
Uber exists in London and will charge you £53 for an UberXL vehicle from Heathrow to central London as per https://www.uber.com/cities/london
Personally, I'd get the Heathrow Express train to London Paddington and get a taxi from Paddington, it'll be cheaper (if you book tickets far enough ahead for the HE) and also quicker than a taxi all the way from Heathrow. (Traffic coming from Heathrow to Central London can be pretty terrible). It's pretty easy to get luggage on and off the HE, it's a large modern train designed to serve the airport. Step-free access, plenty of luggage space, enough time to load luggage, etc. https://www.heathrowexpress.com/tickets-deals/prices-fares
Heathrow Express ticket prices start at £6.99 per person (if you book 3 months ahead), a taxi from Paddington to St Pancras should take about 10-15 mins and cost 10-15 pounds. HE journey time Heathrow->Paddington is 15 mins, trains leave every 15 mins.
https://www.heathrowexpress.com/timetable-schedule/heathrow-london
If you're coming from terminal 4 then you have to change trains, otherwise you don't.
You are absolutely right not to take 4 large suitcases on the Tube (London Underground), but the Heathrow Express is a different kettle of fish entirely.
Enjoy your trip!
Comment: Just a note: several years ago, two of us arrived into Heathrow with 6 large suitcases plus 2 small-ish backpacks plus 2 laptop bags plus a couple more small bits and pieces of luggage - we were moving to UK.  Both of us plus all the luggage had no problem fitting into the black cab.
Comment: My view is that they'd fit in a black cab if you're not paying excess luggage at check-in. Remember that the space where a passenger seat in the front would normally be is available for luggage, plus the area where the other 3 people a black cab can take would sit. Note that black cabs charge extra for lots of luggage.
Comment: Yeah, @ablligh is probably right.
Comment: Agree that it should fit in a black cab, have done so a few times, though it might get a bit cramped. Note that there are now "new generation" black cabs which are much larger (Mercedes mini-vans), and there should be no issue at all in those. If it won't fit in a regular black cab, just stay on the side of the queue at the taxi rank and wait for such a taxi to come, it shouldn't take too long.
Answer: In your shoes I would get a pre-booked taxi service. You'll be able to put one or two bags on the back seat if they don't fit in the boot. If there is more than one of you travelling, you should say that you have a lot of luggage and a bigger vehicle will be provided.


Help with Logo identification on bridge rectifier

Question:
I am trying to identify this bridge rectifier. It is on a control board for a horizontal saw.  It is between the single phase 80 VA step down transformer 26 V output and the logic circuit.  There is no power on the DC side and the AC side reads 80 VAC using a multimeter.
I need to investigate a little more to find out why the transformer is outputting such a high voltage - likely the cause of the bridge-rectifier failure.
Comment: Does it really need to be identified?
Comment: I plan on replacing the component- so identifying the original and obtaining the data sheet will make sure the replacement is compatible.
Comment: Almost anything in the same size package should have comparable specs.
Comment: The generic part number is RS35. Then you have a voltage rating of 400,600,800,1000V. 400V is adequate for your application. Overvoltage tends to make the bridge rectifier go short circuit. Failing open circuit would be unusual but not unheard of.
Answer: All bridge rectifiers used in Power Supply products have the same pinout.
You don't really actually need to identify the manufacturer.
Desolder it and test it by a multimeter. There are 4 diodes inside. If the part is not damaged then all 4 diodes will show 0.5 V to 0.7 V.


Are questions about representing distorted voices via different typefaces and different languages represented by enclosing brackets welcome here?

Question: If I were to ask a question on using separate fonts to represent distorted or alien speech, <or enclose some kind of bracket to represent talking in another language>, how well would that question be received?
Comment: There is a precedent- In Terry Pratchett's Discworld series, Death speaks in his own font.  However, I agree that the place to ask this is Writers.SE.
Comment: FYI: the `<`-bracket doesn't work in posts, you need to use `<`.
Comment: There's also the ⟨mathematical brackets⟩ – U+27E8, 9.
Comment: Piggybacking on cobaltduck's comment, you could also try [the Worldbuilding Stack Exchange](https://worldbuilding.stackexchange.com/), which is sort of a combination Sci-Fi/Fantasy Stack Exchange and Writers Stack Exchange :).
Comment: @TeacherKSHuang They really don't take kindly to questions either not having a definitive answer or not being directly about strategies to accomplish something using consistent systems.
Comment: I see. Perhaps if you changed the phrasing of your question, then? Or perhaps there's some sort of graphic design SE as this sounds a bit like it could benefit from a visual artist's perspective?
Answer: I don't think it's on-topic here, as it doesn't specifically deal with the English language.
I don't know the context of your question (it might be good to add it!) but if you're writing a book, you might want to visit our sister sites Writers and Worldbuilding.
Comment: I don't think the worldbuilding section would be right for this question. But the Writing one might be spot on.
Comment: Wholly agree with this answer. Not sure why some disagree that Worldbuilding would not apply. Sounds like the OP is doing some worldbuilding.
Comment: I think that generally in English texts (academic or journalistic, for example)  foreign words or phrases are italicized. This is about how English language usage deals with foreign words. That said, I don't know about "long quotes" but there are precedents for this (to also be in italics).
Answer: I don't think that kind of question is on-topic here.
I agree with Glorfindel's suggestion to consider Writers, since the help center says

Questions on these topics are welcome here:

Non-fiction, technical, scholarly, or journalistic writing.
Writing fiction, poetry, or song lyrics.
General copywriting, style, and organization.

Another possibility for questions about typography is the Graphic Design Stack Exchange.
However, keep in mind that questions that seem like "idea generation" (per the Writers help center) or "Brainstorming or idea gathering" (per the Graphic Design help center) are broadly off-topic on all Stack Exchange sites. So make sure your question is narrow enough in scope to avoid falling into one of these categories. For example, rather than asking "How can I use typography to indicate talking in another language?", which if taken literally could be answered with anyone's opinion, you might ask "What techniques are commonly used in published novels/graphic novels to indicate talking in another language?", which implies that answers should be based primarily on facts rather than on opinion and which narrows the scope to whatever category of literature you're interested in.
Some kinds of questions about typography are on-topic for ELU. The exact lines are probably blurry, but I would say that the main thing that makes a typography question on-topic here is some element of specificity with regard to the English language; it also helps if the question is clearly objective and interesting.


No sound in precise after kernel upgrade

Question: In Ubuntu 12.04, after performing an upgrade that included a kernel update, I no longer have any sound. The sound worked fine before the upgrade. Oddly enough, if I plug in headphones I do get sound through the headphones, but without them I am no longer able to get any sound from my laptop's internal speakers.
Please let me know if there is anything else I should add.
Answer: Please provide what soundcard you have, or what modules are loaded. If unsure how to do that, use this command:
<code>lsmod | grep snd
</code>
If you have an Intel HDA card, you might try the steps on this page:
https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS


Can a PhD candidate be a guest editor in a peer reviewed journal?

Question: I am a PhD candidate (last year) and was invited as a guest editor in a peer reviewed journal. I am excited to take the experience and I am sure I will handle it well, but I am not sure if I have to be a PhD holder to qualify for such position.
Comment: What discipline are you working in? In a STEM area this will almost certainly mean that the journal that sent you the invitation is a fake/predatory journal.
Comment: Fun story: I, a mathematician, once published a paper that contained the word "old" in its title ("Old and new algorithms for "). After that paper, I have been invited several times to submit papers to predatory journals in geriatrics and gerontology. This should get you an idea of the level of scrutiny the spammers do when sending out their invitations.
Comment: Groucho Marx quipped that he wouldn't want to belong to any club that would have him as a member.  I feel somewhat the same about publishing in any journal that would invite me to be a guest editor (at least on my own). @FedericoPoloni I made the mistake of publishing a paper with the word "cancer" in the title.
Comment: Why not ask either the journal or your own institution? Who else could really have a useful view?
Comment: Is that not down to some combination of the journal itself, any relevant professional associations and your own institution? I assume none of them is required to, yet any of them might impose regulations?
Answer: I think that until you have many years of refereeing papers behind you, you are not ready to be a guest editor.
By the way, I get invited to be a guest editor about once a week.  Unless you have strong evidence to the contrary, you should assume this is spam and delete it.  One way to check if a journal is reputable is to ask your advisor.
Comment: I think I could probably get my cat to be a guest editor!
Answer: It'd be unusual to invite a PhD candidate to guest edit a journal. You are right to be suspicious. I would check if the journal is disreputable; simply being peer-reviewed is not sufficient. Even if the journal is reputable, I would still discuss with supervisor (not only about how to edit, but whether or not to do it, since it'll take time away from your PhD) before accepting the offer.
Answer: There are no general rules, inscribed on ancient scrolls, about such things, though an individual journal might have its own preferences or rules.
But, the person(s) who invited you is(are) almost certain to know of your status. So, assume it is fine.
Also, spend some effort to determine the reputation of the journal and the one who invited you. Your advisor can probably help with this.
It will take time and effort to do this, of course, so make sure you (and your advisor) are prepared for that.
Comment: I think it is too trusting to assume the person (or AI) that did the inviting knew the status of the person.  I get invited to be guest editor for topics far from my areas of expertise.
Comment: I find it much more likely that whoever sent the invitation *does not* know of the OP's status. A real guest editor invitation to a student strikes me as unusual, and spam invites are all too common. In my experience with the volume of spam vs. legitimate correspondence, I'd actually say the exact opposite, that it's almost certain that whoever sent the invite has no idea whether the OP is a PhD candidate or a PhD holder.
Comment: Also be sure you trust this journal... You should be suspicious of invitations from a journal you haven't heard of.
Comment: @Buffy Unfortunately, if my inbox is anything to go by, the worst case is also overwhelmingly the most common case here.
Comment: @TerryLoring, on the other hand, you are assuming the worst case.
Answer: The main question is whether you know the field well enough to identify reliable peer reviewers who will able to review the papers properly.  You will also need to be able to judge from the reviewers comments whether the papers should be accepted and what needs to be done to improve them.  It will be difficult to do both of these things without experience.  Are you confident that you can do both of these things?  If not experience, what is the basis for that belief?
Note that in some fields, e.g. climate, there are a lot of "fringe" scientists that repeatedly try and get obviously wrong arguments published in peer reviewed journals.  In such cases the editor really needs to be aware of these "fringe" views and make sure that they receive a desk reject, or are reviewed by reviewers who are already familiar with the argument.  Unfortunately "fringe" scientists often pick journals in other fields, where the topic could just about be considered within their remit, as they are unlikely to run into a reviewer that has seen the canard before.  Here is an example of a very obviously wrong climate paper that got published in a peer reviewed journal on medical physics.  Note the links to the comments papers towards the bottom of the page.  You would have to be confident that this could not happen in an issue for which you were the editor, as the failure of the review process is ultimately the editor's responsibility.
This means you should definitely refuse unless the scope of the journal is very narrow.
P.S. "fringe" is used here euphemistically because in responding to "fringe" views it is important not to attach insulting labels in order to make sure we respond rationally and factually.


Java Delegates?

Question: Does the Java language have delegate features, similar to how C# has support for delegates?
Comment: @Suma How can this be a duplicate if the question you mentioned was posted a year after this one?
Comment: @tbodt to be more correct, *Java 8 has a feature quite like delegates. It's called functional interfaces*. Lambdas are one way of creating such delegate instances (anonymously).
Comment: The answers below are from Pre-Java 8. Post Java 8 see the answers in this thread:
http://stackoverflow.com/questions/20311779/is-there-delegate-in-java-8-jdk8
Comment: Java 8 has a feature quite like delegates. It's called lambdas.
Comment: @nawfal, +1, but to be even more correct, Java 7 and below already has a feature quite like delegates. It's called plain interfaces.
Comment: @Pacerier. Only in a limited/cumbersome way. A `C# delegate` allows a class to pass a reference to one of its methods. Consider a class with two methods `f1` and `f2`, having identical arguments. A `c# delegate` makes it trivial to dynamically pass either `f1` or `f2` depending on the function desired. In Java 8, a lambda can wrap a call to the desired method. How do this in Java 7?  IMHO requires defining an interface and two inner classes, one to call f1, the other two call f2, then create one object of each class. Doable, but a lot of work!
Comment: @newfal: I have mixed feelings about whether to consider a functional (one method) interface to be `quite like a (C#) delegate`. It does represent a single method call, but does so via inheritance. Usage requires an object that implements that interface. Whereas a C# delegate can be satisfied by any method that matches delegate's signature (regardless of method name). OK, as a practical matter, given lambdas, it is used to satisfy similar requirements. Without the cumbersome coding that was often required prior to Java 8.
Comment: @Pacerier: Upon further reflection, I realize what you are saying. I've provided an answer [here](http://stackoverflow.com/a/30925223/199364) showing how to do so in Java 7.
Answer: Not really, no.
You may be able to achieve the same effect by using reflection to get Method objects you can then invoke, and the other way is to create an interface with a single 'invoke' or 'execute' method, and then instantiate them to call the method your interested in (i.e. using an anonymous inner class).
You might also find this article interesting / useful : A Java Programmer Looks at C# Delegates (@blueskyprojects.com)
Comment: The solution with invoke() as the only member function of an interface is really nice.
Comment: But see my example [here](http://stackoverflow.com/a/30925223/199364) of what one would do, even in Java 7, to accomplish the equivalent to a C# delegate.
Comment: the link is outdated
Comment: Thanks for the heads up - I've replaced it with a wayback machine one which should work into the future. It's worth noting, though, that quite a lot has changed in the intervening years in terms of what Java supports.
Answer: Depending precisely what you mean, you can achieve a similar effect (passing around a method) using the Strategy Pattern.
Instead of a line like this declaring a named method signature:
// C#
public delegate void SomeFunction();

declare an interface:
// Java
public interface ISomeBehaviour {
   void SomeFunction();
}

For concrete implementations of the method, define a class that implements the behaviour:
// Java
public class TypeABehaviour implements ISomeBehaviour {
   public void SomeFunction() {
      // TypeA behaviour
   }
}

public class TypeBBehaviour implements ISomeBehaviour {
   public void SomeFunction() {
      // TypeB behaviour
   }
}

Then wherever you would have had a SomeFunction delegate in C#, use an ISomeBehaviour reference instead:
// C#
SomeFunction doSomething = SomeMethod;
doSomething();
doSomething = SomeOtherMethod;
doSomething();

// Java
ISomeBehaviour someBehaviour = new TypeABehaviour();
someBehaviour.SomeFunction();
someBehaviour = new TypeBBehaviour();
someBehaviour.SomeFunction();

With anonymous inner classes, you can even avoid declaring separate named classes and almost treat them like real delegate functions.
// Java
public void SomeMethod(ISomeBehaviour pSomeBehaviour) {
   ...
}

...

SomeMethod(new ISomeBehaviour() {
   @Override
   public void SomeFunction() {
      // your implementation
   }
});

This should probably only be used when the implementation is very specific to the current context and wouldn't benefit from being reused.
And then of course in Java 8, these do become basically lambda expressions:
// Java 8
SomeMethod(() -> { /* your implementation */ });

Comment: +1. this is a decent workaround, and the verbosity may be compensated by maintainability in future.
Comment: this is great... Currently working on a project where i am unable to use reflection due to project constraints and this workaround gets the job done beautifully :)
Comment: Does Java have an I-prefix naming convention for interfaces? I haven't seen that before
Answer: Short story: no.

Introduction
The newest version of the Microsoft Visual J++ development environment
supports a language construct called delegates or bound method
references. This construct, and the new keywords delegate and
multicast introduced to support it, are not a part of the JavaTM
programming language, which is specified by the Java Language
Specification and amended by the Inner Classes Specification included
in the documentation for the JDKTM 1.1 software.
It is unlikely that the Java programming language will ever include
this construct. Sun already carefully considered adopting it in 1996,
to the extent of building and discarding working prototypes. Our
conclusion was that bound method references are unnecessary and
detrimental to the language. This decision was made in consultation
with Borland International, who had previous experience with bound
method references in Delphi Object Pascal.
We believe bound method references are unnecessary because another
design alternative, inner classes, provides equal or superior
functionality. In particular, inner classes fully support the
requirements of user-interface event handling, and have been used to
implement a user-interface API at least as comprehensive as the
Windows Foundation Classes.
We believe bound method references are harmful because they detract
from the simplicity of the Java programming language and the
pervasively object-oriented character of the APIs. Bound method
references also introduce irregularity into the language syntax and
scoping rules. Finally, they dilute the investment in VM technologies
because VMs are required to handle additional and disparate types of
references and method linkage efficiently.
Comment: Great article. I LOVE their definition of "simple": Java is a designed to be a simple language as in "Java has has to be simple to write compiler/VM for" while ignoring "Java has to be simple to write/read by a person". Explains a lot.
Comment: @Juozas: Python is explicitely made to be simple to write/read by a person and **it does implements lambda functions/delegates**.
Comment: Replaced with an archive.org link. Also, that's really stupid, Oracle.
Comment: I just think SUN made a great mistake. They just have not been convinced by the functional paradigm, and that's all.
Comment: That article consisted pretty much entirely of the destruction of a straw-man argument (implementation) of functions as first-class citizens. Particularly the artificially verbose `button.addActionListener(new ActionDelegate(this.button_clicked));` which should have been `button.addActionListener(buttonClicked);` and the unjustified claim that the use of an instance method to sort retained a reference to the enclosing class, which method should have been static (and the anonymous inner-class solution, which they tout, has this problem in spades).
Comment: As it says in what [Patrick](http://www.stackoverflow.com/questions/44912/java-delegates#44916) [linked](http://java.sun.com/docs/white/delegates.html) you want to use inner classes instead.
Answer: Have you read this :

Delegates are a useful construct in event-based systems. Essentially
  Delegates are objects that encode a method dispatch on a specified
  object. This document shows how java inner classes provide a more
  generic solution to such problems.
What is a Delegate? Really it is very similar to a pointer to member
  function as used in C++. But a delegate contains the target object
  alongwith the method to be invoked. Ideally it would be nice to be
  able to say:
obj.registerHandler(ano.methodOne);
..and that the method methodOne would be called on ano when some specific event was received.
This is what the Delegate structure achieves.
Java Inner Classes
It has been argued that Java provides this
  functionality via anonymous inner classes and thus does not need the additional
  Delegate construct.

obj.registerHandler(new Handler() {
        public void handleIt(Event ev) {
            methodOne(ev);
        }
      } );

At first glance this seems correct but at the same time a nuisance.
  Because for many event processing examples the simplicity of the
  Delegates syntax is very attractive.
General Handler
However, if event-based programming is used in a more
  pervasive manner, say, for example, as a part of a general
  asynchronous programming environment, there is more at stake.
In such a general situation, it is not sufficient to include only the
  target method and target object instance. In general there may be
  other parameters required, that are determined within the context when
  the event handler is registered.
In this more general situation, the java approach can provide a very
  elegant solution, particularly when combined with use of final
  variables:

void processState(final T1 p1, final T2 dispatch) {
  final int a1 = someCalculation();

  m_obj.registerHandler(new Handler() {
    public void handleIt(Event ev) {
     dispatch.methodOne(a1, ev, p1);
    }
  } );
}

final * final * final
Got your attention?
Note that the final variables are accessible from within the anonymous
  class method definitions. Be sure to study this code carefully to
  understand the ramifications. This is potentially a very powerful
  technique. For example, it can be used to good effect when registering
  handlers in MiniDOM and in more general situations.
By contrast, the Delegate construct does not provide a solution for
  this more general requirement, and as such should be rejected as an
  idiom on which designs can be based.
Answer: I know this post is old, but Java 8 has added lambdas, and the concept of a functional interface, which is any interface with only one method.  Together these offer similar functionality to C# delegates.  See here for more info, or just google Java Lambdas.
http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-final.html
Answer: No, but they're fakeable using proxies and reflection:
  public static class TestClass {
      public String knockKnock() {
          return "who's there?";
      }
  }

  private final TestClass testInstance = new TestClass();

  @Test public void
  can_delegate_a_single_method_interface_to_an_instance() throws Exception {
      Delegator<TestClass, Callable<String>> knockKnockDelegator = Delegator.ofMethod("knockKnock")
                                                                   .of(TestClass.class)
                                                                   .to(Callable.class);
      Callable<String> callable = knockKnockDelegator.delegateTo(testInstance);
      assertThat(callable.call(), is("who's there?"));
  }

The nice thing about this idiom is that you can verify that the delegated-to method exists, and has the required signature, at the point where you create the delegator (although not at compile-time, unfortunately, although a FindBugs plug-in might help here), then use it safely to delegate to various instances.
See the karg code on github for more tests and implementation.
Answer: I have implemented callback/delegate support in Java using reflection.  Details and working source are available on my website.
How It Works
There is a principle class named Callback with a nested class named WithParms.  The API which needs the callback will take a Callback object as a parameter and, if neccessary, create a Callback.WithParms as a method variable.  Since a great many of the applications of this object will be recursive, this works very cleanly.
With performance still a high priority to me, I didn't want to be required to create a throwaway object array to hold the parameters for every invocation - after all in a large data structure there could be thousands of elements, and in a message processing scenario we could end up processing thousands of data structures a second.
In order to be threadsafe the parameter array needs to exist uniquely for each invocation of the API method, and for efficiency the same one should be used for every invocation of the callback; I needed a second object which would be cheap to create in order to bind the callback with a parameter array for invocation.  But, in some scenarios, the invoker would already have a the parameter array for other reasons.  For these two reasons, the parameter array does not belong in the Callback object.  Also the choice of invocation (passing the parameters as an array or as individual objects) belongs in the hands of the API using the callback enabling it to use whichever invocation is  best suited to its inner workings.
The WithParms nested class, then, is optional and serves two purposes, it contains the parameter object array needed for the callback invocations, and it provides 10 overloaded invoke() methods (with from 1 to 10 parameters) which load the parameter array and then invoke the callback target.
What follows is an example using a callback to process the files in a directory tree.  This is an initial validation pass which just counts the files to process and ensure none exceed a predetermined maximum size. In this case we just create the callback inline with the API invocation.  However, we reflect the target method out as a static value so that the reflection is not done every time.
static private final Method             COUNT =Callback.getMethod(Xxx.class,"callback_count",true,File.class,File.class);

...

IoUtil.processDirectory(root,new Callback(this,COUNT),selector);

...

private void callback_count(File dir, File fil) {
    if(fil!=null) {                                                                             // file is null for processing a directory
        fileTotal++;
        if(fil.length()>fileSizeLimit) {
            throw new Abort("Failed","File size exceeds maximum of "+TextUtil.formatNumber(fileSizeLimit)+" bytes: "+fil);
            }
        }
    progress("Counting",dir,fileTotal);
    }

IoUtil.processDirectory():
/**
 * Process a directory using callbacks.  To interrupt, the callback must throw an (unchecked) exception.
 * Subdirectories are processed only if the selector is null or selects the directories, and are done
 * after the files in any given directory.  When the callback is invoked for a directory, the file
 * argument is null;
 *

 * The callback signature is:
 *
    void callback(File dir, File ent);

 *

 * @return          The number of files processed.
 */
static public int processDirectory(File dir, Callback cbk, FileSelector sel) {
    return _processDirectory(dir,new Callback.WithParms(cbk,2),sel);
    }

static private int _processDirectory(File dir, Callback.WithParms cbk, FileSelector sel) {
    int                                 cnt=0;

    if(!dir.isDirectory()) {
        if(sel==null || sel.accept(dir)) { cbk.invoke(dir.getParent(),dir); cnt++; }
        }
    else {
        cbk.invoke(dir,(Object[])null);

        File[] lst=(sel==null ? dir.listFiles() : dir.listFiles(sel));
        if(lst!=null) {
            for(int xa=0; xa<lst.length; xa++) {
                File ent=lst[xa];
                if(!ent.isDirectory()) {
                    cbk.invoke(dir,ent);
                    lst[xa]=null;
                    cnt++;
                    }
                }
            for(int xa=0; xa<lst.length; xa++) {
                File ent=lst[xa];
                if(ent!=null) { cnt+=_processDirectory(ent,cbk,sel); }
                }
            }
        }
    return cnt;
    }

This example illustrates the beauty of this approach - the application specific logic is abstracted into the callback, and the drudgery of recursively walking a directory tree is tucked nicely away in a completely reusable static utility method.  And we don't have to repeatedly pay the price of defining and implementing an interface for every new use. Of course, the argument for an interface is that it is far more explicit about what to implement (it's enforced, not simply documented) - but in practice I have not found it to be a problem to get the callback definition right.
Defining and implementing an interface is not really so bad (unless you're distributing applets, as I am, where avoiding creating extra classes actually matters), but where this really shines is when you have multiple callbacks in a single class. Not only is being forced to push them each into a separate inner class added overhead in the deployed application, but it's downright tedious to program and all that boiler-plate code is really just "noise".
Answer: Yes & No, but delegate pattern in Java could be thought of this way. This video tutorial is about data exchange between activity - fragments, and it has great essence of delegate sorta pattern using interfaces.
Answer: It doesn't have an explicit delegate keyword as C#, but you can achieve similar in Java 8 by using a functional interface (i.e. any interface with exactly one method) and lambda:
private interface SingleFunc {
    void printMe();
}

public static void main(String[] args) {
    SingleFunc sf = () -> {
        System.out.println("Hello, I am a simple single func.");
    };
    SingleFunc sfComplex = () -> {
        System.out.println("Hello, I am a COMPLEX single func.");
    };
    delegate(sf);
    delegate(sfComplex);
}

private static void delegate(SingleFunc f) {
    f.printMe();
}

Every new object of type SingleFunc must implement printMe(), so it is safe to pass it to another method (e.g. delegate(SingleFunc)) to call the printMe() method.
Answer: While it is nowhere nearly as clean, but you could implement something like C# delegates using a Java Proxy.
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes.
Comment: @StackFlowed Strip the link, and what do you get? A post with information. Vote to keep.
Comment: @Scimonster what would happen if the link is not valid any more ?
Comment: @StackFlowed It still provides an answer - use a Java Proxy.
Comment: then it could be left as a comment?
Answer: No, but it has similar behavior, internally.
In C# delegates are used to creates a separate entry point and they work much like a function pointer.
In java there is no thing as function pointer (on a upper look) but internally Java needs to do the same thing in order to achieve these objectives.
For example, creating threads in Java requires a class extending Thread or implementing Runnable, because a class object variable can be used a memory location pointer.
Answer: No, Java doesn't have that amazing feature. But you could create it manually using the observer pattern. Here is an example:
Write C# delegate in java
Answer: The code described  offers many of the advantages of C# delegates. Methods, either static or dynamic, can be treated in a uniform manner. The complexity in calling methods through reflection is reduced and the code is reusable, in the sense of requiring no additional classes in the user code. Note we are calling an alternate convenience version of invoke, where a method with one parameter can be called without creating an object array.Java code below:
  class Class1 {
        public void show(String s) { System.out.println(s); }
    }

    class Class2 {
        public void display(String s) { System.out.println(s); }
    }

    // allows static method as well
    class Class3 {
        public static void staticDisplay(String s) { System.out.println(s); }
    }

    public class TestDelegate  {
        public static final Class[] OUTPUT_ARGS = { String.class };
        public final Delegator DO_SHOW = new Delegator(OUTPUT_ARGS,Void.TYPE);

        public void main(String[] args)  {
            Delegate[] items = new Delegate[3];

            items[0] = DO_SHOW .build(new Class1(),"show,);
            items[1] = DO_SHOW.build (new Class2(),"display");
            items[2] = DO_SHOW.build(Class3.class, "staticDisplay");

            for(int i = 0; i < items.length; i++) {
                items[i].invoke("Hello World");
            }
        }
    }

Answer: Java doesn't have delegates and is proud of it :). From what I read here I found in essence 2 ways to fake delegates:
1. reflection;
2. inner class
Reflections are slooooow! Inner class does not cover the simplest use-case: sort function. Do not want to go into details, but the solution with inner class basically is to create a wrapper class for an array of integers to be sorted in ascending order and an class for an array of integers to be sorted in descending order.
Comment: What has inner class got to do with sorting? And what has sorting to do with the question?

Java Delegates?


How many poker hands contain exactly one ace?

Question: I'm getting tripped up because of the "exactly" part.  Can anyone explain how to approach this problem and ones that may be similar.  For example, if I wanted a hand that contained exactly three K's, or one K and three 9's.
Comment: One thing that may be helpful if you are stuck is to solve a simpler problem where you can enumerate things to make sure that you have your reasoning right.  For example, you could ask yourself how many 3-card poker hands with 1 ace can you make from a deck of cards that has 2 aces and 5 non-aces.  Varying the small numbers can also help you find patterns that might allow you to guess the form of the answer.
Answer: There are four ways to pick an ace.  The remaining four cards cannot be an ace, and so there are $\binom{48}{4}$ ways to choose them.
Answer. $4\binom{48}{4}$.


Why do chat apps inform the user that a message has been deleted?

Question: Is there a reason to show the user that a message was deleted, rather than just remove the message? What benefit does this provide the user over simply hiding it?
Answer: The placeholder for a deleted message helps the user in a few ways.
Serves as an indicator that the conversation has been altered.

Alice: Have you ever stolen from the company?
Alice: Just kidding! You've filled out those TPS reports, right? Could you help me?
Bob: Oh yeah, so many times! Come by my office around 2 and I'll show you how I do it.

If Alice deletes her second message without a trace, Bob has a bit of explaining to do. Bob has a much easier time defending himself if there's a This message was deleted in place of Alice's message.
Informs the user that the message they may be looking for might have been deleted.
A user trying to find a previous comment could grow frustrated knowing that they read a message in the conversation, but are now unable to find it. Showing that a message was once there but is no longer available can eliminate some of the searching and re-searching a user might do otherwise.


SSH onto new Ubuntu 14.04 server

Question: This is my first server I have set up and I used ubuntu 14.04 to run it. I opted not to use the server install because the regular ubuntu was easier to setup.
Now I wanted to make the server available for SSH and VNC so that I could manage it remotely and disconnect the monitor, but I can not figure either of them out. I installed openSSH server but every time I try to connect with my mac it says "connection closed by server IP"
It is seriously the most frustrating thing because everywhere I look online it just says install OpenSSH and it should work. I dont completely understand the modifications to the sshd_config page or if I actually need to modify it for everything to work.
I have pinged both ways and both work. I can connect to my mac from the ubuntu server but not the other way. All firewalls are off.
Can someone please help me?
Comment: which ssh client are you using? are you having problems on non-mac's as well? do you have any routers between your ubuntu server and your client computer?
Answer: You need to start the service on the ubuntu server, just use the following command
service sshd start

Comment: Since the OP already installed SSH service, I'd ask the OP to start the service first using this but before the to check the status too. It will be nice if you could add status command too along with the `sudo` option. Because, without being root you neither can start nor check the status. :)
Answer: Below is what to do after installing the openssh-server on 14.04 Trusty Tahr.

You can change the port, disable root login and other useful things by editing the config file:
sudo gedit /etc/ssh/sshd_config
Finally restart the ssh server to take place:
sudo /etc/init.d/ssh restart

More information on sshd_config can be found here.
Answer: Chech if you did install openssh-server server .
sudo apt-get install openssh-server

then check you have proper port enabled

/etc/ssh/sshd_config

if you go in it with different port number from outside or your router has a rule of forwarding it to another port
you may also need to uncomment in there if you want to be authorized by password.

PasswordAuthentication yes
Answer: Check /etc/ssh/sshd_config for one of the following,

LoginGraceTime and make sure that is set to a time limit that you can enter your password. Otherwise it will close the connection if your request doesn't get authenticated within the timeframe. (example: this will give you a 1min window, LoginGraceTime 60)
"UseDNS no" will make sure sshd would not try to resolve the hostname. If the ssh client computer and the server are using two different nameservers and they point to different IPs for the same hostname might end up locking you out. So "UseDNS no" would resolve such problems.
"PasswordAuthentication yes" will make sure the SSHd accepts user entered passwords.

Also make sure the bash_profile/bashrc scripts that are used by the user you login as to the remote server ( ssh email@example.com ) don't have any exit commands used within those scripts. Otherwise as soon as you login it will close the connection.
That's all I have come across for this issue.

SSH onto new Ubuntu 14.04 server


How many instructions can a vector processor issue per cycle?

Question: I currently have vector processors in class and wondered whether a vector processor only  issues one (vector) instruction per cycle (in order processor). Maybe this question is  stupid and it depends solely on the individual processor, however, it would be nice if someone could explain this in a bit more detail.
Answer: A vector processor is usually¹ defined as a processor which has instructions that are meant to operate on vectors.
Whether or not these instructions take one or multiple cycles, whether they even might have a throughput under some situations that is higher than one instruction per cycle, whether or not there's even a pipeline at all: all up to the individual processor design.

¹ you need to check the definition used in your class, as with everything.
Comment: can one call a processor that issues more than one instruction per cycle still an in-order processor? Meaning that if instruction **A** comes after instruction **B** (assume that they are independent) but the processor runs them in parallel without a cycle delay, is this still in-order?
Answer: A single instruction per cycle on a vector CPU can execute an array x wide by y depth pipeline.
Implementations vary greatly for speed, depth and width tradeoffs for cost of GPU's.
Cost/performance ratio of vector CPU's like the Cray were attractive in the '80's until Microchip came along. ;)
More details are better explained on Wiki


Bonnet (hood) alignment problem

Question: Yesterday, I made a mistake when I was jacking up my car. The bonnet was open vertically and I didn't notice it is close to the ceiling. I jacked up the car slowly and saw some white material is falling down! It was chalk of the ceiling. Upon close inspection, I discovered the bonnet had penetrated about 10 millimeters into the ceiling but not stuck. I lowered and inspected the bonnet and didn't see any sign of damage but when I closed the bonnet, it didn't align perfectly with the lines of right and left fenders. Now, bonnet seems to sit a bit higher than before. Is there anything I can do about it or should replace the bonnet? I haven't adjusted any bonnet before.
Comment: Could it be that the bonnet now has a greater curve front to back? Pressure from above could have caused the center to bend. If that's true, hinge adjustment may not improve the situation.
Comment: If it has been curved by compression, the opposite of that is extension. Stretch it back out. Probably not so easily accomplished, however.
Comment: @fred_dot_u - So, what is the solution?
Answer: Adjust the bonnet hinges - you may be lucky with the holes having enough play.
Comment: Be sure to mark the location of the hinge attachment points BEFORE you loosen any fasteners.  It's easy to get things really off and that will help you get back to the starting point if needed.
Comment: @jwh20 - I don't think I can do anything to improve it. I think I should replace all the hinges and the bonnet and if necessary some other parts too. I wonder what people do when their hoods damage during an accident!
Comment: The quickest way to mark the location of the hinge attachment points is to simply hit it with a very light coat of spray paint. That said, many cars are dirty enough to have the spots already marked!

Bonnet (hood) alignment problem


How to show a set of images in Google SERP?

Question: If I search for the keyword "urne cinerarie" (that is "cinerary urns") in my country (Italy) the search results show me a list of sites. In addition to title and description, for some sites Google also shows a set of images. How can I achieve a similar result for my website?
Answer: So far, no one has figured out what exactly is the cause. Every study and article I have read came to similar conclusions:

Mostly available for category pages or product-listing-pages. Basically, pages where picking an image is part of the user journey/navigational flow.
Shown both for pages with and without schema
You need a lot of images, ideally in different formats (landscape and portrait)