UISegmentedControl without rounded corner?

Question: Is there a way of get rid of  UISegmentedControl's rounded corners or it is the default behavior?
Answer: There's something really easy that you can do to rid yourself of the rounded junk on the UISegmentedControl ... change the style to "7".  I'm not joking.  I just figured this out:
    // Magic number ... (it's cheating, but it works)
  mySegmentedBar.segmentedControlStyle = 7;

This is the same control style they use in the UISearchBar's scope bar, like this:

But if someone only wants the scope bar, without the search, they're usually stuck with UISegmentedControl junk like this (with rounded corners):

Or worse, this...

Thankfully, by switching to bar style "7", we get the exact look of the stop bar, without all the subclassing and drawRect hackery:
Comment: Is this considered private API?
Comment: @GregCombs it's been a while, would like an answer about this ^  please, whenever you have the time
Comment: Errr ... sort of, but not really?  You're not calling any methods that you don't have access to, but you're using an integer value that doesn't have a publicly known key.  I haven't heard of anyone (including myself) who has been dinged for this one.  Regardless, iOS 7 looks like it makes this a moot point since everything is all text with thin outlines.
Answer: No, there is no API that gives you control over the layout of the segments.
You could probably try looking into the UISegmentedControl's view.subviews and try to change them according to your needs. But from personal experience I would not advice that. If Apple changed their order in the future your app will probably crash. The easiest thing to do is to create custom UIButtons that behave as toggle-buttons and control them like a UISegmentedControls (for toggle-buttons see How to use a UIButton as a toggle switch).
Answer: If you wanted a different look you could just subclass it and do your own drawing in -drawRect:. See the Quartz 2D Programming Guide for reference on drawing with Quartz/Core Graphics.
Answer: By adding a border with reasonable width you can get the squared look:
self.segmentedControl.tintColor = [UIColor brownColor];
self.segmentedControl.layer.cornerRadius = 0.0;
self.segmentedControl.layer.borderColor = [UIColor brownColor].CGColor;
self.segmentedControl.layer.backgroundColor = [UIColor colorWithWhite:1 alpha:0.75].CGColor;
self.segmentedControl.layer.borderWidth = 1.5f;
self.segmentedControl.layer.masksToBounds = YES;

Answer: After lots of tries I got below solution which works fine without any background image or subclassing:
    mySegmentedControl.tintColor = [UIColor clearColor]; //Clear all border

    //Draw your own border
    mySegmentedControl.layer.borderColor = [UIColor blackColor].CGColor;
    mySegmentedControl.layer.borderWidth = 1.0;

    //Set tint color for selected subview
    UIColor *tintcolor=[UIColor redColor];
    int subViewIndex = 0; //index which is selected
    [[_segmentControl.subviews objectAtIndex:subViewIndex] setTintColor:tintcolor];

Answer: If someone's still interested, here's the simple extension in Swift 4 (iOS 11). Just make sure you set tint color before calling this method. If you change tint color after, make sure to call this method again :
extension UISegmentedControl {

func ignoreCornerRadius() {

    let renderer = UIGraphicsImageRenderer(size: bounds.size)

    let normalImage = renderer.image { (context) in
        tintColor.setStroke()
        context.stroke(bounds)
    }
    let selectedImage = renderer.image { (context) in
        tintColor.setFill()
        context.fill(bounds)
    }

    setBackgroundImage(normalImage, for: .normal, barMetrics: .default)
    setBackgroundImage(selectedImage, for: .selected, barMetrics: .default)

}

}


Deleting part of polygon (or number of polygons) outside of another larger polygon in QGIS

Question: I have got a number of polygons within a single larger polygon. Parts of the smaller polygons go out from under the larger one, and I want to delete the parts of the smaller polygons, that go outside the larger one.
How can this be done?
Comment: Welcome to Geographic Information Systems! Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short [tour] for more about how the site works.
Answer: You want to clip (QGIS -> Vector -> Geoprocessing Tool -> Clip) your smaller polygons with your larger polygon. This tutorial describes how to do this.
Answer: If your dataset is simple enough - one large polygon, you could use the clip function (menu Vector>Geoprocessing>Clip). First select the large polygon and export it into a new layer and use that as the overlay layer.
Answer: It also sounds like you might be able to use the Delete Part tool. For example, I have a countries.geojson. In it the United States polygon includes tons of tiny islands near Alaska. I want these gone and only the US mainland to remain. The Delete Part tool allows you to remove any of the marked polys by clicking on them (I already deleted Alaska itself). The tool will work on polygons both selected and unselected.


Magento Compiler and Backup issues

Question: In admin there is no tab for compiler. And also with backup it just does nothing.
I am at a loss to what the issue could be.
I have reinstalled magento to another folder and compiler is there and backups work.
What i would really like to do is reinstall everything, and at each stage check the compiler and backup. I have tried this but am not sure of the correct route to take to do this.
Answer: Addendum to @Sander Mangel's answer as to why they may have been forcibly disabled:
If you inherited the management of this website, the compiler is probably shut off for a good reason, the previous maintainer may have found that it interacts quite foully with an installed third party module and decided to prevent the issue from resurfacing.
Starting with version 1.6, code optimization has rendered the compiler speed gains to be a moot point, better to shut it off and be using opcache.
Backup is also known to reset file permissions, causing the website to go down after executing backups with a 500 error when suPHP or WHM/cPanel security settings get violated by a bad Magento developer assumption and may have been disabled for the same reason.
You have to run a script to reset file/folder permissions every time you run the backup when this is encountered.  The best cure is to much more speedily back up the database with mySQLdump and the code with tarball scripts instead.
Answer: sounds like you either don't have the rights to compiler and backup or the modules are disabled. Check in app/etc/modules for the file Mage_compiler.xml and Mage_Backup.xml and whether or not they're set to false.

Magento Compiler and Backup issues


How do I join multiple units?

Question: When I attack an enemy so far I've only been able to send one unit at a time, which doesn't always work- how do I make multiple units move on the same objective at once?
Answer: You can create armies by getting a great military leader. Every time an Elite unit (5 hitpoints) wins a battle, you have a chance of getting one.
A military leader can form an army and you can put up to 3 (or 4 with the Pentagon wonder) units into it, who will fight in unison. Armies are exceptionally powerful tools.
Later in the game, after getting the military tradition tech you can build a military academy, which allows the city to build armies without a leader.
Apart from that, there are no ways for units to fight together, this is how the game mechanics work in every civ game. In fact, you only have armies in Civ 3 and Corps/Armies in Civ 6 as your only ever options of using multiple units at once.

How do I join multiple units?


How are questions migrated?

Question: Apologies if I should know this, but if a question fairly obviously belongs on another site, what do I do? Flag for Mod attention?
Comment: Good question, it's frustrating that only History Meta appears under migration. I remember reading somewhere that we can't migrate because we're beta (yes, beta again!). I think we have to flag it - hopefully a mod will clear this up.
Answer: Beta sites are not given direct migration paths as a matter of network policy. The only thing we can do is to rely on case by case moderator action. As such, please vote to close with a custom reason to migrate to whichever stack it should be on, and flag for moderator attention. We'll ask the target stack if they want it, and transfer it if possible.
The reason for using a custom reason is because if people voted to close with the default meta one, it just punts the question here.
Even after we graduate, we won't have default migration paths to every other stack. If the question belongs on an unlisted stack, custom close and flagging for moderator action will continue to be the way to go about it.
Comment: @TheHonRose - One of the "fun" things I look forward to upon site graduation will be compiling our list of default migration paths. I already know three I'd put on there for sure, a fourth I'd argue for, and a fifth I'd argue against.
Comment: Thanks. I had tried the "this belongs on another stack" option and, as you say, was only offered Meta! I'll flag it next time - frustrating, though!

How are questions migrated?


iTerm2 shows up on every Space. How to keep it from doing so?

Question: For some reason, iTerm2 windows show up on every one of my "Spaces" (aka Desktops). Right clicking on its icon in the Dock and looking at "Options" reveals "Assign To: None", just like every other application. I can't find anything in iTerm2's settings that determine this behavior. How can I make it stop?
Answer: I got stuck with this as well and finally found it.
Preferences - Profiles - Window and towards the bottom there is a spaces drop down you can set.
Comment: That's it! I've been annoyed by this for a year now!
Comment: Problem with this is that it requires spaces which means you can't have a window open wide taking both monitors' space.
Answer: I've been having the absolute opposite problem of this post. I've rebooted and my iterm settings have the hotkey window set to every space. Anyone else encountering that?
edit: It turns out I needed to go into the dock > iterm > options > (assign to) All Desktops
I think this setting was reset after an os update.
Comment: Thanks for that. For the last year or so, I've been annoyed to no end that my hotkey window somehow insisted to stay only on the first space, and every time I pulled it up, it switched spaces.

Have tried looking for the solution several times but always came up empty. This restores the desired behavior (i.e. hotkey window always comes up on the *current* space). Thanks a lot!
Comment: Thank you so much!!
Answer: I am not so sure if we had suffered from the same problem. My problem was: when switching from one desktop(workspace) where iterm2 resides to another desktop ( where I may want to check some documentation or browse web), iterm2 always shows on top of the new desktop and covers the application on the new desktop. This is annoying in a sense that whenever I want to switch to another desktop, I must want to use something on that desktop(which is definitely not iterm2 as iterm2 is on my current desktop) or I just want to have access to the desktop. And when iterm2 follows, it just screws my will and I need to manually hide or close it, which can be really annoying when you do the switches thousands of times a day.
And the solution to this is actually quite simple. According to my observation, as long as the iterm2 is not on the second place of the application switching list(the list that shows up when you cmd+tab), the annoying behavior doesn't appear. So what we need to do is to exclude iterm2 from the switching list. And there is a nice option to configure this in iterm2's preference panel, under the appearance tab.

And the checkbox on the bottom most is what we want!!!
I just found out the answer now and I am so happy that I finally figured it out! I had been annoyed since 2013.
Comment: Had to restart iTerm 2, but this fixed it for me.
Answer: I had the same problem with iTerm2(Build 3.4.5), tried to do from  dock > iterm > options > (assign to) but didn't worked
Following worked for me
go to menu > iTerm2 > Preferences... OR use shortcut command,
Go to window tab in Profile Tab (Don't Go to window tab in General Tab)
and select space, whichever you want to use, using Current space doesn't work sometimes so use a specific space
let me know if it didn't work we'll try to find something together,
And Good Luck
Answer: Preferences >> Profiles >> Window and set the space to "current space". Then relaunch iTerm2. Make sure to change this setting for all the existing profiles.


What is the correct choice Computer (make a computer-do computer)?

Question: If a company manufactures new computers, which is the correct way to describe this process; 'do computers' or 'make computers'?  I think it is 'make computers', because 'do' refers to a physical action while make refers to a new creation of something, but I'm not sure which is correct.
Comment: This question is more suited to English Language Learners. What is the sentence in which you want to use the expression? If you can't use _manufacture, make_ is certainly far better than _do_, which would sound very informal and not very idiomatic.
Answer: I guess that you are asking this question because عـَمـَل means both make and do.
Here is the definition of make from the Cambridge Dictionary: "to produce something, often using a particular substance or material". You are right: in writing or in formal conversation, make is the best verb to describe what a manufacturer does.

This company makes computers

Note that do has another meaning, apart from carrying out an action. According to the Cambridge Dictionary, it can also mean "to make, produce, or create something". I would regard this usage as quite informal. Here is an example:

This café does the best carrot cake in town.

So, in informal conversation, you could say

This company does computers
Comment: It's true that we can use "do" informally as you suggest but it should be noted that the cafe does not have to be baking the cakes nor does the computer company have to be manufacturing the computers; they could both be buying the product from a supplier. In most cases the customers would not care. If we say "makes", however, we would know that the company was producing the product. Also I have studied three other languages to a very basic level and in all of those "make" and "do" are translated into the same word. I believe that English is unusual in having two words.


Does every class in the design model have to be present in the domain model?

Question: I have doubt regarding design model.Does every class in the design model have to be present in the domain model?
Comment: Please be more specific. What language? More details please.
Answer: Object modeling is best done as an iterative process, so start with whatever (simple) design you think meets your current requirements and build upon it as you learn more about your domain.
Answer: The question is not well explained even if the subject is important.
UML is an object approach like Java codding while domain modelling is related to databases structure. UML is not therefore the same as domain modelling.
Having said that JD5 and later allows ORM annotations in the code. It means that at object level you can also think about databases using Hibernate annotations directly in your java code. EclipseUML is lived synchronized with the Java code but also with ORM annotations. It means that all ORM annotations written in the code are updated in the class diagram as well as in the model and each class diagram annotations change is updated in the code.
It means that UML and domain modelling are now unified using standard ORM annotation.


What is the difference between turbo wastegate and variable geometry turbo?

Question: I don't see what the difference is between turbo wastegate and variable geometry turbo. Both seem to allow some of the gas flow, without turning the turbine, ie. bypassing the turbine, have I understood correctly? The only difference I see, is that the wastegate allows the gas to flow before the turbine, while the variable geometry, after the turbine. Any idea?
Answer: The real difference is that a wastegate or dump valve  is a way of limiting the maximum boost pressure in order to prevent damage to the turbo itself of downstream parts on the other hand variable geometry is intended to improve performance across a range of engine speeds.
One disadvantage of simple turbos is that they tend to have a fairly narrow effective RPM range which can adversely affect drivability and make it difficult to predict and control torque response. Specifically a wide aperture tends to make the turbo less effective at lower engine speeds and increases lag while a narrow aperture can choke the exhaust flow at higher speeds and limit peak power.
A variable geometry outlet is intended to allow the turbine to be effective across a wider range of engine speeds.
Comment: And a variable geometry turbo makes the engine so much more drivable - earlier boost, smoother, progressive : see duratirq Ford/Jaguar as one out of many examples. Upvoted good answer.


Controlling the position of dropdow submenu

Question: can someone explain how I can modify the position of a submenu so that it can be higher than it is now (eg closer to the menu bar, without the gap between the header and the dropdown box of the submenu...see attached picture)?

Here is the code underlying the submenu:
Comment: I added the coding where the submenu appears. Hope this can help offer a more specific advice. Also I am not sure how to do what you suggest, but if I do as you suggest still the submenu box would appear quite big I reckon, a bit out of proportions
Answer: Without seeing the current code, you could try the folllowing:
Use padding-top over the
 tag and colour the
 tag's background colour in the dark grey. This way you avoid using top / margin-top.


The meaning of 'take over' in this sentence

Question: I've recently watched a youtube video where a person mentioned a phrase 'It's pretty much taken over my Instragram'. I think she meant 'The pictures are taken over.' I tried to find out all of the meanings of the phrasal verb but I didn't find the one that would suit the context.
Could anyone explain it to me? :-) I wondered if it might be a slang.
Comment: "It's" is an abbreviation of "It has" in this context. So it would presumably mean "The pictures *have* taken over.'  This means that they dominate her Instagram.
Comment: "Taken over" can be roughly translated as "taken control of".
Answer: There are many definitions of the transitive verb "take over". But the relevant ones in this context are to take possession of, to dominate, or to take control of. These definitions make sense when you understand the first word in your example sentence to mean "It has" rather than "It is."

It has pretty much taken over my Instagram.

Or more simply:

It has taken over my Instagram.

Thus, whatever "it" is has dominated this person's social media news feed.
For reference (from The Free Dictionary):

take over

To assume control, management, or responsibility: I'm taking over while the supervisor is on vacation.
To assume the control or management of or the responsibility for: She took over the job after he left.
To become dominant: Our defense took over in the second half of the game.
To do (an action or a play in a game) again when the first performance has been discounted or is under dispute.


Cleaning Acetone residue on sink stopper

Question: I left some acetone in a sink for around 90 minutes and it turned white. From scraping at stopper I found that it appears to be a residue or at least surface level damage. What is the best way to remove this residue?
Comment: thinking about it more, I would try more acetone; the mark could be a deposit of minerals dissolved by the acetone and left behind on the stopper when it evaporated. If they dissolved once with acetone, they have to dissolve again with acetone. Just wipe it up before it dries this time...
Comment: acetone evaporates cleanly, so it should/can't leave a residue. If something was left behind, certainly new acetone will remove it. I suspect however that it dissolved coloring of the material, which can't really be fixed.
Comment: Be very careful about leaving acetone around in the open without a lot of ventilation - it evaporates easily and you don't want an explosive mix of acetone vapour in air.
Answer: I tried what dandavis suggested in the comments and used more acetone to dissolve the residue and it worked. It allowed me to remove the residue to the point to where it now looks close to the way it did originally.


Confusion regarding inductors

Question: I understand that a change in flux linkages of an inductor results in induced emf across it, the magnitude and direction of which can be determined by Faraday's and Lenz's laws. The magnitude of this emf can be given in terms of rate of change of current and inductance ($L \frac{di}{dt}$) as well as rate of change of flux linkages ($N \frac{d \phi}{dt}$). By equating the two, it appears that the value of Inductance is directly proportional to infinitesimal change in flux and inversely proportional to infinitesimal change in current. Does it mean that for a given change in current, if the value of Inductance is large, it results in a larger change in flux linkages? But doesn't it also mean that a larger inductance allows a larger flux change, which sounds contradictory to the original definition that a large inductance will oppose the change in flux more? I am not able to understand where I am making a mistake in understanding?
Answer: You're right on both counts.  For a given $\frac{di}{dt}$, big $L$ means big $\frac{d\phi}{dt}$ (your first statement) since $\frac{d\phi}{dt}= \frac{L}{N}\frac{di}{dt}$.  At the same time, the "opposition to the change in flux" is a flux (not a change of flux), produced by a current, produced by the back-emf, and the back-emf is $L\frac{di}{dt}$.  In other words, if $L$ is big, a given $\frac{di}{dt}$ induces a big voltage, and hence a big $i$, which produces a big $\phi$ in opposition to $\frac{d\phi}{dt}$.

Confusion regarding inductors


A complicated question about views, pls help~

Question: May I ask how to achieve this requirement? There is a task content type, which has an applicant field, which is multi-valued (that is, a task allows multiple people to apply at the same time), which refers to the paragraph type applicant, and the paragraph type applicant has an applicant (referring to the user entity) field and an application status field, both of which are single values. It is expected that when the applicant requests a task, the task will disappear from the applicant's (currently logged in user) task list view, how to implement this.
Answer: The way it SHOULD work is to create a view to list Work items. Then add a contextual filter for the Applicants field. In that filter under "When the filter is not available" set to "Provide default" and select "User ID from logged in user".
As this is, this will give you ALL the Work items which the user is added to, but you want the opposite of this. Now scroll to the bottom of the filter settings and under More, select Exclude.
This should give you what you want, but on my test D9.5 site it does not work. I would suggest this is a core bug.
Comment: Thanks. It works for me!
Comment: Interesting. Wonder why it doesnt for me. Glad it helped. Can you pick my answer as the answer then?
Comment: Sorry, I only tested the following cases before. At first, the worklist of user1 and user2 contained work1 and work2. Then user1 applied for work1, user2 applied for work2, and the worklist of user1 contained work2. user2's worklist is left with work1, which is correct.
But just now I continue to test, let user1 also apply for work2, work2 is still in user1's worklist, and work1 and work2 both appear in user2's worklist.


My right toolbar is gone

Question:
I recently got into blender and I think I accidentally pressed a key and now my right toolbar is gone. I looked it up and it said press t but that opens up the left toolbar. I pressed n and it open up properties but I don't want that. I want the default right toolbar. thanks for your help
Comment: At 2.92 I found the Load U/I checkbox in Blender Preferences > Save/Load
Comment: I found that clicking the modelling tab on the top next to layout opened it back up
Answer: In this case ⌃ Ctrl + ↑ is what you need. Or the return to previous button up the top.
You've entered the maximized view mode which makes one panel (in this case the 3D view) occupy the whole screen.
Another very useful trick is to create a new file (File -> New) and then open your file with out loading the UI. To open a file without loading the UI, go File -> Open and then select your file, and uncheck the 'Load UI' button on the lower left before opening it,
Answer:
Open new split screen. There are two ways to do that.

Place the mouse cursor on top right area corner. When the cursor changes to  + press LMB  and drag it to the left OR place mouse cursor between 2 split screen press RMB  and create new split screen.
Areas - Blender Docs

Select the editor. Press ⇧ Shift + F7 or from the editor type selector select Properties.

Editors - Blender Docs
Answer: You can try hitting ⇧ Shift +  Space. If that doesn't bring it back grab the top right corner of the viewport where there is a little triangle and pull it to the left to split the screen, then in the bottom left corner change it from whatever view mode it is in (i.e. 3D View) to the Properties panel.

My right toolbar is gone


Why are fixed-width file formats still in use?

Question: Are there any advantages to a fixed-width file format over something like XML? I realize XML would likely take up more disk space to store the same amount of data but the file could also be compressed. I guess you could also, in theory, read a specific piece of data based on where it is in the file (just grab those bytes). But other than that, what else?
Comment: No, I really don't. I don't know what kind of file formats are you talking about and it's not clear to me from your question. Maybe I just didn't encounter those formats. Could you specify that more explicitly?
Comment: I have seem then for well logs (drilling), and for geological information, such as CanStrat.  Usually, these are legacy files, and may be coming from/going to equipment that just hasn't been updated in a long time.  Sometimes, these files are also printed out on dot-matrix printers and the fixed width ensure that it stays in the width limit (ie: 72 characters).
Comment: As long as there are mainframes and COBOL there will be fixed-width file formats.
Comment: File formats for what? Do you want images or video as compressed XML?
Comment: I haven't seen a fixed-width file format for years. I thought they died out with punched cards. They're very efficient of course, but have zero potential for change.
Comment: I'll necro this post. @MichaelKay data warehousing uses fixed-width files like mad, even to this day. Personally, for database work, I prefer fixed width over any delimited or hierarchical format 24/7.
Comment: In my experience, most of the fixed-width data formats in use are from legacy systems, or are interacting with a legacy system.
Answer: When the data is large (Giga/Terra-bytes), fixed width format files can be MUCH more efficient.
Since each record and field has fixed sizes, you can simply seek to the (for example) n-millionth row and read a couple of records from there. You can also memory map the whole file into memory and get rather efficient and easy random access to everything.
XML files aren't a good fit in these cases.
Comment: "can be" - yes. But not always. I remember a COBOL application that was rewritten in a 4GL and ran four times faster; on investigation the speed gain was entirely due to use of variable-length fields and records. COBOL was spending all its time doing unnecessary space-padding to fill up the fixed width.
Answer: XML is complicated. And especially if you do validation according to a schema. This may not look important, because somebody else already wrote XML parser that you can use. But this adds quite a lot of processing, which means it takes longer. This may not be a problem in many cases, but sometimes can.
If you want to save one integer into a custom file format, it takes just 4 bytes and when you want to load it, you just copy those 4 bytes into memory (assuming the file format and your platform have the same endianness). But with XML, it might take something like 10–30 bytes. And loading it is means comparing strings and parsing decimal representations of integers and probably more.
Again, those performance and storage size differences may very well be too minuscule for you to even consider (and the work that  it would take to devise custom format might be non-trivial), but in many cases, those differences do matter.
For example, I encountered a system that uses SMS messages for transmission of some data. That means you have 140 bytes (!) per message. And the device that sends and recieves those messages doesn't have GBs of memory and GHz of CPU. In that situation, you make sure that every bit counts and you certainly don't use XML.
Comment: I still have no idea what kind of fixed-width formats are you talking about, so I can't respond to that.
Comment: Thanks for the answer. However, I'd argue that a complex fixed-width file is more confusing than a complex XML file. At least you can read the XML file!
Answer: I know this is old, but I deal with both Fixed Width and XML daily.  You can pretty much sum it up to:
XML = Readability
Fixed Width = Speed and Low Resource Consumption
XML is largely for readability by a human.  I don't care what anyone says about structure and validation.  If you're running a system that really doesn't need and should have humans reading the files your passing back and forth, then you're really just adding this as overhead to the amount of time it takes to process the file and to the size of the file, affecting how long the file may take to transfer it contents as well as another impact to processing.  All of this will also impact memory usage by the system consuming the XML file.
There are advantages however to XML.  You can more loosely define your structure.  Sometimes its easier if your file and code don't both require a field to be 255 characters long.  Only that your code loads that limit period.
Another advantage is that XML can/should come with an XML Schema that defines requirements of the XML contents.  This helps with having multiple system's that consume a single API.  If you can provide your schema to a developer, they can pretty quickly make typed objects that serialize into proper formatted and structured XML.
Fixed Width is for speed and minimal resource consumption.  It can be more tedious to setup than XML.  Ensuring that all systems know exact positions of "columns" in the Fixed Width file.  Often not all systems utilize the same or all columns, so you end up with only a single system that fully understands the Fixed Width contents.  This can make it challenging to grow an API or System utilizing your transferred file contents.  However because there are no field labels, no tags, nothing but raw data, you can often get a smaller package sent across the wire.  Not always true, in some cases, you may have a large number of text fields that common have small amounts of data stored in the fields, but must retain a large column width for one off cases where a paragraph length was input.  Now you've got a bunch of white space holding positions in your Fixed Width file and XML may actually reduce your overall package size.
Generally speaking though, XML is for readability.  You can't typically just pick up a Fixed Width file or even a CSV file and immediately start grasping at what the data means.  Where as well labeled XML files, you can.
There's a number of advantages and disadvantages that I've not gone into, but this is where I see the real meat and potatoes of the differences.
Comment: I saw a whitepaper years ago where an enterprise looked at its network use, and 75% of the bandwidth was useless XML going back and forth between internal "services". This does not even count the CPU burned in parsing it. XML has its place, just like every other tool, but it got turned into one heck of a hammer and a lot of people went looking for nails, and found them everywhere.
Answer: I too had the same questions until I realized the power of fixed width. We have a table that has millions of records extracting them into a file as a JSON swelled up the file size to 15GB and 2+hrs. While using the fixed widht brought it down to 6.5GB and 15 minutes.
Extraction and writing a fixed width is faster than JSON.
I tried CSV's too and even here the Fixed width scored better.
Answer: Probably mostly for legacy reasons, since parsers for XML, JSON (etc) exist pretty much on all platforms.
Theoretically fixed-width formats can be more space-efficient, as you suggest; and reading bit simpler. But these do not seem like significant benefits.
For what it is worth, tabular (but not fixed-width) formats like CSV have their uses, combining bit more compact representation and possibly better readability; CSV works quite nicely for map/reduce style jobs.
Answer: One reason could be that processing XML (not just reading and loading into memory structures, but think about regex searching in an XML file vs. a simple fixed-width or delimited file, or even making manual quick-fixes to bad data) is more complicated than fixed-width files. Sure, there are many libraries that can do it for you now, but if there isn't one for the platform you're working on, do you really want to write an XML parser, or a program that just reads n bytes at location x?


How do I link my website and YouTube channel?

Question: How do I link my website and YouTube channel? I know it involves uploading a file on my web server and verifying it from YouTube but I am unable to find the option anywhere in YouTube settings.
Comment: link from where?
Comment: Have you tried the steps listed here? https://support.google.com/youtube/answer/2887282?hl=en
Answer: To link your website with your YouTube channel, the first criteria is to be part of YouTube Partner Program (YPP). You need to have at least 1,000 subscribers and more than 4,000 valid public watch hours in the last 12 months to be part of YPP.
If you are already part of YPP, you can associate your site with your YouTube account:

Sign in to YouTube Studio.
From the left menu, select Settings and then Channel and then Advanced settings. Under "Other channel settings", select Advanced channel settings.
In the "Associated website" section, enter your website's URL and click Add. It will show as "pending," unless you've verified the site before.
Under the URL box, click verify if you own the website or request approval to have the website's owner approve it. If you select request approval, a notification will be sent to the website owner. If you select verify, you'll be redirected to Google's Search Console. Sign in with the same Google Account information that you use for your YouTube channel. (If you're not sure what account to use, you can check your account details on YouTube.)
Choose a method to verify your ownership.
Follow the instructions to add a site to Search Console. You may be asked to choose a verification method.

After you add your site to Search Console, it will go through a verification process. Once verification is complete, the website's status will change from "pending" to "success" in your Advanced Channel Settings and you can follow the steps below to add a card that will take viewers to any page in that website.
Add a card on videos to link to your website
After you associate your site with your account, you can add a card that links to your website directly on your videos.

Sign in to YouTube Studio.
From the left menu, select Videos.
Next to the video you want to change, click Details , then select Cards.
Click Add card.
Next to "Link," click Create. The first time you're using external links, you'll need to accept the Terms & Conditions.
Under "Associated website," select your website's URL from the Select site drop-down menu. Click Add an associated website or Settings to associate a site.
Click Next.
Add the card title, call to action, and teaser text. You can also upload an image.
Click Create card.

Reference:

https://support.google.com/youtube/answer/72851
https://support.google.com/youtube/answer/2887282


Slack Team for Project Managers who want to Network, Mentor, etc

Question: I searched a lot and couldn't find an answer to this anywhere - I wanted to know if there were any Slack Teams that have been created specifically for Project Managers to network, find mentors, discuss certifications, methodologies, share conferences/events that offer CE credits, etc. Does anyone know of one? I have created my own but would rather join one that's already off the ground. Thanks in advance for any direction you can offer.
Comment: Questions seeking off-site resources (as opposed to canonical answers) are not on topic per our help center guidelines. You might bring this up in chat or on meta, but it is not a question that allows for a canonical answer within the site's Q&A format.
Comment: While this is an interesting topic, it is really a request for a link to off-site resources. That's a close reason on PMSE, and on most stacks. I won't downvote it, as I think it's a reasonable question, but will have to vote to close as it's not on topic per our help center guidelines.
Comment: FYI - in case anybody else wants to learn more about it: https://get.slack.help/hc/en-us/articles/218130338-Slack-for-project-management
Answer: I found this blog post by Aja Frost to be very good. She recommends several, some of which are free, some of which are paid. A very good place to start.
I joined the Mind The Product Slack, which is well worth getting involved with. I'm also considering the Product Manager HQ Slack, which is a paid option.
Hope that helps! If you do join the MTP Slack, my username is mathew. Say hi ;)


Can i rescue my kefir grains?

Question: I had a lovely big kefir grain, been making kefir everyday for years. Today I accidentally put it in the blender with the milk and fruit. I managed to sieve out a few tiny bits of grain which I've put into milk. Will they grow again?
Answer: The grains are really just a symbiotic colony of microscopic yeasts and bacteria that grow in and ferment milk into kefir, similar to the "SCOBY" that ferments kombucha, or the "mother" that ferments vinegar. The individual organisms are far too small to be harmed even by the intense action of a professional blender; if you managed to rescue some, then given sufficient food (i.e. milk) they should grow and develop new grains.
The one caveat here is that the specific strains of the organism can differ, potentially even within a colony; it's possible that the grains which survived blending won't contain exactly the same mix of bacteria and yeast that you had originally, though they should be pretty close.
You should be able to resume your normal daily production and the grains will get back to their former size eventually. Just check the next few batches before consuming to make sure the kefir hasn't been thrown off.

Can i rescue my kefir grains?


Opengl ES 3.1 support for ios?

Question: I'm a bit new to development in ios, I was wondering if the new opengGL ES 3.1 is supported for iOS?
and if so where do i download the library?
Answer: Currently no.
OpenGL ES 3.1 is fresh development. Good thing is that its mainly driver improvement (vs 3.0 requiring new hardware over 2.0). Bad thing is, that Apple have direct competitor, and may wish to withhold OpenGL ES 3.1 features as way for pushing game devs (and other multimedia devs, and compute is not really limited to games), to their API.
Also, Apple currently do not have any OpenGL ES 3.1 driver (nobody have):
http://www.khronos.org/conformance/adopters/conformant-products#opengles
And OpenGL ES 3.0 is ready for:

iPhone5s
iPad Air
iPad mini

Of course, right now You can start learning OpenGL ES 3.0 just fine. As 3.1 will ad incremental or orthogonal (compute) knowledge.
Answer: Apple's OpenGL ES Programming Guide for iOS gives a step by step checklist for Adopting OpenGL ES 3.0 (I don't know about 3.1). If you have the latest Xcode and tools you have the OpenGL 3 frameworks already. If you are starting an iOS app from scratch, just skip OpenGL ES altogether and learn Metal -- Apple's OpenGL killer.
Comment: @wcochran You missed "vs OpenGL ES ***COMPUTE***"
Comment: There's no ES3.1 support in iOS. But most of the things it adds over 3.0 are extensions that iOS already has, or covered by Metal (which handles compute shaders much better).
Comment: I was asking about some comparision... Specifically between Metal and OpenGL ES 3.1 Compute Shaders.
Comment: Could You expand on Metal compute vs OpenGL ES compute, comparison?
Comment: Metal, which is an Apple proprietary API (for now) and runs on their A7 chips, is a much thinner API (closer to the hardware aka "metal"). OpenGL has gathered a ton of cruft over the years and simple state changes can be quite expensive and the separation of CPU and GPU memory spaces is costly. For example, with Metal you precompile your shaders, the CPU/GPU memory is unified, and most state changes are cheap. As a bonus Metal provides "compute" ability akin to OpenCL and CUDA -- so you can use the GPU as a parallel machine for non-graphics tasks via the Metal API.
Comment: @przemo_li  wow.. I haven't keeping up... CUDA, Metal, Open CL, and now Open GL Compute.. anything else I am missing...

Opengl ES 3.1 support for ios?


Customize 0x API to get more details

Question: we are testing the 0x API our goal is to get more details, like the top 5 rates along with the best rate also routing information
can anyone point me in the right direction, please
by default, it only gives the best rate and not the 2nd or 3rd best.
Answer: For your use case, you need to fork 0X API and implement the way to fit your needs, docs on 0x API don't mention ways to customize the way you want.
If I was you I would go start checking these routes https://github.com/0xProject/0x-api/blob/master/src/routers/swap_router.ts and start check the endpoint that calculates the rates and customize it to also add more rates.

Customize 0x API to get more details


SQL Server - High buffer time

Question: I'm noticing a high number of waitingRequestsCount on SQL server. The latch_class is buffer. See attached screenshots. Going through SQL server dashboard, I see high number (32221334) waits for Buffer Pool. Can someone please explain what could contribute to high number of waits?
Answer: Reference:

Diagnosing and Resolving Latch Contention on SQL Server by Microsoft Corporation
Buffer Latch Class by SQLSkills.com

Some latch contention is to be expected as a normal part of the operation of the SQL Server engine. It is inevitable that multiple concurrent latch requests of varying compatibility will occur on a high concurrency system. SQL Server enforces latch compatibility by requiring the incompatible latch requests to wait in a queue until outstanding latch requests are completed.
Latches are lightweight synchronization primitives that are used by the SQL Server engine to guarantee consistency of in-memory structures including; index, data pages and internal structures such as non-leaf pages in a B-Tree. SQL Server uses buffer latches to protect pages in the buffer pool and I/O latches to protect pages not yet loaded into the buffer pool.
Whenever data is written to or read from a page in the SQL Server buffer pool a worker thread must first acquire a buffer latch for the page. There are various buffer latch types available for accessing pages in the buffer pool including exclusive latch (PAGELATCH_EX) and shared latch (PAGELATCH_SH). When SQL Server attempts to access a page which is not already present in the buffer pool, an asynchronous I/O is posted to load the page into the buffer pool. If SQL Server
needs to wait for the I/O subsystem to respond it will wait on an exclusive (PAGEIOLATCH_EX) or shared (PAGEIOLATCH_SH) I/O latch depending on the type of request; this is done to prevent another worker thread from loading the same page into the buffer pool with an incompatible latch.
Latches are also used to protect access to internal memory structures other
than buffer pool pages; these are known as Non-Buffer latches.
My recommendation to you will be instead of focusing on the number of buffer class latch, start from wait types.  Especially Pagelatch_XX and Pageiolatch_xx type in this case if those are showing up as the top waits in your case. You will find details about these wait types here by sqlskills.com
Quote from Paul Randal:

I have not seen this latch be a noticeable contention point.
You should filter this wait type out of results from
  sys.dm_os_latch_stats otherwise it will overwhelm the other latch
  information.
Comment: Hi @SqlWorldWide, FYA, the first link referring to local drive (`C:/Users/taiob/Downloads/SQLServerLatchContention.pdf`) which required to be replaced with actual URL
Comment: Fixed, thanks for pointing that out.

SQL Server - High buffer time


After installing RDS on WinServer 2016 I still can only connect with two users?

Question: What I'm trying to do: I have a software that multiple users are supposed to use on one system. Because a standard installation of WinServer2016 can only hold a maximum of two users at once I googled and was told that a Terminal Server / RDS Server would remove this limitation so I tried that with the help of some tutorials.
All of this is happening in Azure.
The problem: I thought I had everything set up correctly but when I try to RDP into the machine with the third user it tells me that there's too many users and that I need to disconnect one of them to continue (as it would be if I had done nothing at all).
What I did so far :

Installed a DC for my Terminal Server and let the Terminal Server join the Domain (set up the DC as DNS Server in the VNET, not in the TCP/IP Adapter settings)
In Server Manager I started the Role and Features Menu, and chose install RDS, Quickstart, Session-Based, selected the Terminal Server
Watched as it was installing, then had a disconnect, couldn't reconnect for a while, had to reset the connection configuration in azure and was able to reconnect.
Upon login the installation window opened again and told me it was still doing something. After a few moments it completed with the statuss message "Successful".
Installed the Licensing Server Role through the server manager, added my license through the server manager.
opened gpedit.msc and made the following changes to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Session Host > Licensing :
"Use the specified Remote Desktop license servers" > Enabled
"Set the Remote Desktop licensing mode" > Enabled (per Device)
Also in gpedit.msc, only in the directory Remote Desktop Session Host > Connections :
Allow users to connect remotely by using RDS: Enabled
Limit Number of connections: Enabled, Max Connections = 999999
Restrict Remote Desktop Services users to a single RDS session = Disabled
Allowed remote start of unlisted programs: Enabled

Still, not working. Maybe the settings reset has something to do with it? Or maybe I'm missing something obvious? Never used or set-up RDS before, except to RDP into my VMs on Azure...
Checked the RDS Events Log, found a few error messages:

TB-TK-TERMINAL1   2056    Error   Microsoft-Windows-TerminalServices-SessionBroker    Microsoft-Windows-TerminalServices-SessionBroker/Operational    2/6/2018
  10:53:33 AM
The Remote Desktop Connection Broker server could not enumerate the targets for the provider named NULL from the database.
Pooled virtual desktop collection name: NULL
  Error: Logon to the database failed.

I googled this message, but only got responses saying that my Domain is old. I created this domain specifically on/for a WinServer2016 so I doubt that this is the case.

TB-TK-TERMINAL1   1280    Warning Microsoft-Windows-TerminalServices-SessionBroker-Client Microsoft-Windows-TerminalServices-SessionBroker-Client/Operational 2/6/2018
  10:55:01 AM
Remote Desktop Services failed to join the Connection Broker on server
  tb-tk-terminal1.domainname.local. Error: Current async message was
  dropped by async dispatcher, because there is a new message which will
  override the current one.
Comment: Did you create a session collection, etc?  Can you show a screenshot of server manager and the installed roles, etc?  In session-based setups, I have found that you have to publish at least one app for it all to work (even if you plan to just RDP to the server)
Answer: For the basic setup under

Remote Desktop Service

You will need to make-sure you have installed and configured

RD Connection Broker
RD Session Host
RS Licensing

The error above looks as though the the database that the Connection Broker uses can't be accessed, by default it will use a windows internal database unless you have configured the server as High Availability using a shared databases.
If you run through the Remote Desktop Services Installer again to verify your installation.
It is not recommended to run Remote Desktop Services role and Active Directory Domain services on the same server, I am guessing your DC is separate but your are not clear in your in question. Personally I would never run it in Server 2012 Environment it was next to impossible and required an update.


Opposite Title of a case

Question: All the cases have the plaintiff's name first and and defendent's name after it ( as in Mohiri Bibi v. Dharmodas Ghose). But there's a case wherein the defendant's name comes first ( in: Khwaja Muhammad Khan v. Husaini Begum). Why so?
Comment: (1) The tag "*contract-law*" is misleading, since the question is only about caption of a case and has nothing to do with contract law. (2) In some jurisdictions, caption starts with the appellant's (rather than plaintiff's) name. (3) It could be that there are two unrelated lawsuits between the same parties, except that each party is plaintiff in one case and defendant in the other. The lack of detail in your question makes it very hard (if not impossible) to ascertain whether your question truly is about *one* same case.
Answer: The custom is that the person who brings the case is named first. This will be the plaintiff in a civil case. But when the plaintiff wins, and the defendant appeals, the case in the appeals court may have that person (often referred to in older cases as the "defendant appellant") named first. More recent practice is to keep the name of the case the same. But it used to be considered a separate case with a separate name in some jurisdictions.
In any event, this is merely a custom, and not a law. The court has discretion to name cases as it chooses in its judgements, and if a court chooses for whatever reason to follows a practice that differs from the usual one, that is the name of that particular case.
Without a full citation or a link, so that the actual opinion could be consulted, three is no way to know what reason, if any, there was for the order of parties in the particular case mentioned in the question. A quick Google search did not turn up the case.

Opposite Title of a case


Add additional field to approval workflow form

Question: I want to add an additional field to the approval workflow form so that approver can also fill the values for that field. The field exists in Tasks list.
Answer: You can make changes in Task Form. Basically approval form is Task form where approver can approve the task. If you are developing Workflow by Visual Studio, then given link can help you.
https://prasadgavande.wordpress.com/2015/04/06/change-task-edit-form-of-sequential-workflow-in-sharepoint-2010-using-visual-studio/
Comment: I am not using Visual Studio or Designer. I am just using approval workflow for a list from browser.


3rd visa application

Question: I am a Nigerian. I will be visiting Germany in August on a tourist visa. Would I be able to get apply for a study visa for Poland as a tourist while in Germany or Austria or any Schengen country? Applying from my home country is a bit unfavorable.
Comment: I'm not sure if I understand, are you asking if there's a better chance of success if you apply from Germany than from Nigeria? I think success rate depends more on your nationality than the place from where you do it.
Comment: Hello TFAG, for long-term stays you should ask on Expatriates.SE, not on Travel.SE. It is also likely that the Polish officials will inquire into your residency status at the place you apply from.
Comment: What if I go to Poland before studying on a tourist visa, and do it there  will it work that way, the chances of getting a visa in my home country is very slim
Comment: The chances will not get better based on the location you are currently in because that is unimportant compared to what country you are a resident of. Your home country is still your home country. Unless you are thinking it is unfavorable because of the people/ the buerocracy you will have to deal with at home. Still: It will only make it way harder, as you might not be able to easily provide the required documents.
Answer: It may prove difficult to apply for a visa to study in Poland, as the Consulates in both Germany and Austria generally accept applications from those who reside there. They may not let an individual to apply who is in the country on a tourist visa, and prior refusals may make it less likely, although exceptions can occur.
The Polish Consulate in Berlin notes that:

Application is considered by the consulate in whose jurisdiction legally living person applying for a visa. Consulate examine the application filed by the person who legally resides, but not residing in the jurisdiction of the consulate only if the person applying for a visa in detail, written justification for lodging the application at the consulate.

The Consulate in Austria has a similar stipulation:

[V]isa application should be lodged with the competent territorial consular office, adoption of the proposal in another office needs to be justified by the applicant.

The application requirements remain the same as when done within your home country, from registering for a visa appointment at www.e-konsulat.gov.pl to the additional documentation for a study visa (e.g., acceptance letter, confirmation of payment of fees, accommodation confirmation, proof of funds etc.).
Comment: Are you saying that it's very possible in Austria or in any other  schengen or non schengen countries apart from Germany in Europe
Comment: @TFAG no, the opposite, that trying to apply for a visa when you don't  reside/live in the country means the consulate may not even consider your application, and would tell you to apply in your home country. There are exceptions, yes, but there has to be a VERY good reason, and saying that doing it in Nigeria is unfavorable probably won't work.

3rd visa application


Does Alchemical Allocation work on extracts?

Question: Does Alchemical Allocation allow you to consume an extract on the round following the consumption of this extract [Alchemical Allocation], spit it [the other extract] back into its container as a free action, gaining all the benefits of the extract, but without it being consumed?
Comment: @SevenSidedDie I edited it to conform to your recommendations.
Comment: As a note, it would be appreciated, and likely receive better vote ratings, if future questions contained more than "link (quote) link (quote) (brief obscure sentence that might imply a question)". In general, the question should be easy to understand without the title, and should contain a question somewhere before the supporting material. Also note that it is unnecessary (and sometimes discouraged) to quote blocks of rules text unless it is necessary to point to a confusing portion of text.
Answer: No. Alchemical Allocation works on potions and elixirs. An extract uses some of the same rules as potions and elixirs, but an extract is neither a potion nor an elixir.
Comment: This is an excellent answer, because it addresses the fact that potions and extracts are not the same. I've seen more than a couple people ask on other sites if the Accelerated Drinker trait from Cheliax, Empire of Devils applies to extracts as well, because most people think "Well, they're just potions, right?"
Answer: A level 2 extract is never going to give a free reuse of a higher level extract. It makes no sense from a game design standpoint. You are correct that Alchemical Allocation does not work on extracts; this is working as intended.


Are my US dollar bank notes still valid and for how long will they be?

Question: I have some  US Dollar  Federal Reserve notes:
Some   12  Federal Reserve Notes  100  Dollar   Notes   Series 2006  A
Some   40  Federal Reserve Notes  100  Dollar   Notes   Series 2009  A
Please tell me whether they're still valid and whether they will continue to be.
Comment: Federal reserve notes are valid indefinitely.  How is your question related to travel?
Comment: Related interest: *[Converting Older United States Dollar Bills](http://travel.stackexchange.com/questions/25959)* and *[Older US dollars not accepted everywhere?](http://travel.stackexchange.com/questions/48579)*
Comment: I'm voting to close this question as off-topic because this is not related to travel (although currency exchange might be).
Comment: How is this question NOT related to travelling? In my travelling it has already happened to me that I had some left over banknotes from my previous visit, and in my next visit some times later they stopped being valid.
Answer: Yes, they're still valid, and should never expire. You may find that some places look suspiciously on the old designs for larger bills like that, but you can always trade them in at a bank at no cost.
Comment: I don't think there's any debt involved in this situation, so I don't think the "legal tender" thing is relevant here.
Comment: I don't know about "you can always trade them in at a bank".  My experience is that banks in the US usually won't provide such services to people who don't have accounts at that bank, which is probably the case for a traveler.
Comment: @NateEldredge but the people looking suspiciously on the old designs are usually outside the US.  I've never had trouble using an old bill in the US.
Comment: @NateEldredge - you can *sometimes* trade them at a bank?  My brothers have reported being able to trade bills for rolls of quarters even at banks they do not have accounts with, and that is basically the same service (trade one form of money for another).  So it might take a bit of asking around, but probably one bank or another can be found that will.
Comment: @Calchas: Yes, it's a service to the check writer. In fact it's really the definition of a check: when it's presented to the bank, by the payee or anyone to whom the payee has endorsed it (e.g. the payee's bank), the bank will pay it.  If they don't they are liable to the writer for [wrongful dishonor](https://www.law.cornell.edu/ucc/4/4-402).  But that's not relevant to the question of whether they will exchange currency.
Comment: If a US bank refuses to honor these notes, from _anyone_, then you can simply report them to the FDIC (if it is a credit union to the NCUA) as they are in violation of their basic role in banking.
Comment: @BurhanKhalid: I wasn't aware that FDIC regulations require a bank to offer such services to non-customers.  Do you have a reference?
Comment: It's has nothing to do with being a customer or not. The currency says its legal form of tender for all debts private and public and banks (other than validating the authenticity of the notes) cannot refuse to service anyone that comes with them. It's kind of the basic tenants of banking. They are of course free to charge you fees and have other reporting / regulatory requirements but they cannot refuse to exchange them.
Comment: @NateEldredge Banking regulations aside, I rather suspect that if someone shows up at a bank teller wanting to exchange money, the cost of verifying whether that person has an account exceeds the cost of providing the service to a non-customer.
Comment: @NateEldredge I used to have no problems cashing checks at US banks at which I held no account. But perhaps that is a service to the check-writer rather than to me.
Answer: Every bill and coin ever issued by the US government in its history remains valid and will be valid while the government continues to exist.
At some point, the collector value of a bill or coin will exceed its face value, but with 2006 $100 bill, that will likely be decades or centuries from now.
Comment: Yes, if they need an expert to authenticate or for some technical reason like that, but the 14th Amendment provides that US debts "shall not be questioned".  The closest thing to an exception was the "Hawaii overprint note", current in Hawaii from 1942 to 1944: each was prominently marked "HAWAII" and if that island chain fell to the Japanese, the notes could have been repudiated _en masse_.
Comment: I wouldn't use the word "never" when it comes to government promises...
Comment: This can be true, but some old bills may require special measures to exchange.


Understanding Fock space

Question: Let's start with a single particle Hilbert space $H$ with basis $\{|\alpha\rangle\}$, where $\alpha$ represents a complete set of quantum numbers. If we now take two particles of the same type, we must consider the space $$H_2=H_1\otimes H_1,$$ and more generally $n$ particles live in $$H^{\otimes n}=H_1\otimes...\otimes H_1.$$ The (free) Fock space is now defined by taking the direct sum $$\mathcal{F(H)}:=\bigoplus_{n\ge 0} H^{\otimes n}.$$ I understand why we take the tensor products: we wish to describe the whole system of $n$ particles at the same time. However, it is not at all clear to me why we also need to take the direct sum. What is its physical interpretation?
Answer: Consider identical particles. Consider also first just a single particle in your system. This "1-particle sector" is described by Hilbert space $H_1$. This is the first term, $n=1$, in the direct sum you wrote. ($n=0$ can be probably ignored.) Consider now two particles. This system's Hilbert space is $H_1 \otimes H_1$. This is the second term in the direct sum. And so on. The sectors with different numbers of particles are independent and thus you take the direct sum over them.
Comment: This is all nice and well, but what is the need to actually consider such "$m$-particles sectors" in the first place?

Understanding Fock space


Are 2 independent PDAs equivalent to a turing machine?

Question: I was thinking about the language $a^nb^nc^n$, which is obviously not context free, but if we run it through 2 automata at the same time (the first for $a$ and $b$ and the second for $b$ and $c$ and they both accept, the construction would basically accept the language)
Answer: No, such a construct can recognise at most the intersection of two context-free languages. To see where it's lacking, consider $L = \{\textsf{a}^n~|~n\in\mathbb{N}~\text{is composite}\}$. I conjecture that to express $L$ as the intersection of CFLs requires infinitely many CFLs.
The paper An infinite hierarchy of intersections of context-free languages by Liu and Weiner (Math. Systems Theory 7, 185–192 (1973). https://doi.org/10.1007/BF01762237) presents languages that can be written as intersection by $k$ context-free languages but not by intersecting $k-1$-languages. For $k=3$ the language is $\{\; a^k b^\ell c^m a^k b^\ell c^m \mid k,\ell,m \in \mathbb{N}\}$.
Thus, that language is the intersection of three cf-languages, but not the intersection of two cf-languages.
For other $k$ the same pattern is repeated. The quote that paper "The proof is quite complicated".
The language
$\{\textsf{a}^n\textsf{b}^n\textsf{c}^n\textsf{d}^n\textsf{e}^n~|~n\in\mathbb{N}\}$ seems as complicated but is in fact the intersection of two cf-languages: $\{ \textsf{a}^m\textsf{b}^m\textsf{c}^n\textsf{d}^n\textsf{e}^p \mid m,n,p\in \mathbb N \} \cap\{ \textsf{a}^m\textsf{b}^n\textsf{c}^n\textsf{d}^p\textsf{e}^p \mid m,n,p\in \mathbb N \}   $.
Comment: I have added an example directly into your answer so you don't have to copy it. Hope you don't mind.
Comment: @HendrikJan You're right! I'll edit but will keep my blunder so your valuable comment still makes sense.
Comment: I'm not very proud of my new example. Is there a simpler one?
Comment: @HendrikJan not at all. Thanks for finding the Liu/Weiner paper!
Answer: What you actually ask is: can language of every grammar be represented as an intersection of two context-free languages?
The answer is no.
To prove that, we can observe that, while the class of context-free languages is not closed under intersection, the class of context-sensitive languages is.
This means that intersection of two CFLs is always a CSL (since every CFL is also a CSL).
If you could represent language of every grammar as an intersection of two (or, in general, any $k\in\mathbb{N}$) CFLs, it would mean that every grammar has context-sensitive language, which we know is not true.
Answer: The language $\{a^nb^nc^n | n \in \mathbb{N}\}$ belongs to a strict subset of context-sensitive languages that can be expressed in terms of an intersection of two context-free languages.
Having two PDAs cannot recognize a language like $\{a^nb^nc^nd^ne^n | n \in \mathbb{N}\}$.
Comment: Two PDAs can match that though, one can check both on if the `a`s and `b`s are equal, then also check if the `c` and `d`s are equal. Then the other can check if the other side by side pairs are equal.


Is it acceptable to use non-English references in a paper?

Question: I have a paper extracted from my thesis. Since English is not my first language, a few of references are non-English. I have also designed a model based on those non-English references. Now, I want to send it to foreign journals and I think it will be rejected. Is it necessary to use just English references in my paper?
Comment: Using references in other languages is very common.
Comment: In English papers, we often see references in German, French, Spanish, etc.  But for references in different alphabets, in addition to the original I would include a transliteration of the Author's name and a translation of the title.  (Russian, Chinese, Arabic, Thai, etc.)
Answer: You must use non-English references if you use non-English sources. Citing sources is about giving credit where it is due for the ideas you use in your paper: it doesn't matter what language those ideas came in.
Some journals may request parts of the citation to be translated (such as the title), but it's most important that readers can find the original source.
Comment: This is absolutely correct and I've upvoted, but I think what OP really wants to ask is "is it acceptable to use non-English sources", e.g. for textbook stuff where exactly the same information is available from many sources.  (And the answer in that case is "yes, it is perfectly acceptable".)


How to take a beating from a bully?

Question: I was wondering how to take a beating from someone who trains in MMA and Wrestling. There is this guy at my job who regularly follows me home and beats me. I need to know how to take this punishment like a man so maybe he'll stop. How do I take a beating? P.S. My beating normally takes the shape of 100's of punches, kicks, and anytime I try to hit back he just blocks or dodges them. How do I deal with this?
Comment: Is calling the police an option in your part of the world?
Comment: Yeah, this is criminal assault. "Taking punishment like a man?" That's ridiculous. Although if it's "100s of punches and kicks" I question either his skill or intent.
Comment: I don't know if there is a single answer that any one of us could give you here. All martial arts training takes time, so you can't expect to get a solve-all answer by asking the internet. Since it seems like you need help as soon as possible, I would recommend contacting the authorities and also telling your employer, since you said he works with you.
Comment: I don't want to be a baby.
Comment: If I call the police his buddies will just beat me up worse.
Answer: Welcome, Mike.
It is NOT 'being a baby' to ask for help in your situation. Being victimised in this way can be a horrible, distressing experience. You don't deserve to be going through it.
You need help, and the smartest thing for you to do is to seek help. There is absolutely no shame in this.
You don't have to answer the following questions, but if you do, it may be possible to provide you with some more specific advice, including a range options for seeking help.
Are you deemed an adult in your country/state/province?
Which country/province/state do you live in?
What support networks (family/friends/acquaintances/colleagues) do you have access to?
Can you remove yourself from the situation, either by changing jobs or by changing the times you go to and from work?
Contrary to one of the previous answers, it may not be wise you arm yourself, as any weapons you try to use may well be used against you, especially if you lack skills and are afraid of your attacker (as you have every right to be). Producing a weapon may also provoke more severe attacks.
You will likely be able to resolve this situation eventually, but simply waiting for the abuse to stop may result in you suffering more harm than necessary. Hang in there.
Answer: It seems that this guy is using you as a wooden dummy, and that he does not intend to hurt you (given the information that you are still able to type after receiving 100's of punches and kicks from him). With this in mind, you can try to fight back as fast and as hard as possible. The essential thing would be not to lose confidence so that you can continue fighting if no serious injuries occur. You can also try to carry a tactical pen with you, for that it is an amazingly capable weapon for people with a bit of martial arts training.
Consider learning parkour if you are fit enough to do so. Parkour should help you get rid of any untrained pursuers.
But, still, the ideal way to solve this is to call the police (and inform them that you will get beaten up worse if the suspect knew you called them). If you live in a country with up-to-standard police forces, then you should be safe.
Answer: First of all, I would like to remind you that if you think that the life of you or others is in danger, do not try to take the threat on by yourself. Get to a safe place and call the police.
But if you are cornered, and there is absolutely no other option, you may have to fight. I'm only a white belt right now, but I know a few things that I would trust a person to use to protect me if I were in your position. Here are a few basic kajukenbo moves that I know:
punch 1. Punch one is a normal nothing special move with your left hand. Try to place it in the stomach or face. Punch 2. Punch 2 is a punch 1 but with your right hand. Punch 3 is basically where you strike the side of your target, either on the side of the head or on the side of the body with your left hand. Punch 4 is an uppercut with your right hand.
Kicks are very simple. Basic: Just kick! But be sure to keep your block up at all times. Also be sure to hit them with your heel and not your toe.
Sidekick: No, not like robin. A sidekick is where you take a sideways fighting stance and kick to your side at or near the bully's stomach.
Roundhouse: I'm sure you've heard of this one before. Like a sidekick, but you keep yourself at the forward and rotate your body to move your leg with it. Be sure to turn your leg sideways when you do this, as striking somebody using your hamstring will likely not be a pleasant experience, and it won't actually do much. Use a tough part of your shin.
Groin: quick sidenote, this is the ONLY kick that I know of where it is acceptable to strike with the top of your foot, for all other kicks unless an instructor tells you otherwise, use your heel. A groin kick is exactly what it sounds like (Works best if you're wearing a boot). A groin kick will inflict a lot of pain and I feel sorry for anyone who was on the wrong end of one. Use the top of your foot and strike upwards.
Alright, pay close attention to this part, as it may save your life one day. Blocks. What I've said so far is telling you how to kick butt, but from what you've said, you probably need more advice on what to do when you're getting your butt kicked.
Guard: You should be doing this the entire fight anyway. Hold both hands above your jaw but just below your eyes so you can see. Only take your hands away from your face if you are attempting to strike, as soon as you are done, return to your guarding position.
Block 1: Counter an oncoming punch by taking it with the side of your left arm. Then offset the bully's arm away from you and hold it there, then hit 'em with a punch 2.
Block 2: Block 1, but with your right arm, and end with punch 1.
Block 3 (body block): Position one of your arms to cover your entire lower body while keeping your other arm in guard. This can be used to take a kick or if your opponent also uses kajukenbo or another martial art, it can also be used to counter block 1/2 or punch 1/2.
Now I'd like you to remember that fighting should be your absolute last resort. Only do so if you think you are in real danger and the police will not arrive in time to stop them from killing you. It is true the police will usually arrest anyone and everyone involved in a fight (guilt by association) including the one who was being attacked. While I believe this system is flawed, it is how it is, and I can't change that. You mentioned that he may beat you harder if you call the police, but if you call them again, he will probably go to prison for repeat offences if not immediately for criminal assault.
Answer: The only way to stop people like this is to hurt them badly enough that they will leave you alone, and if you really think his friends will be a problem you need to hurt him enough to scare them.
It would probably violate the Code Of Conduct to give more explicit advice.

How to take a beating from a bully?


In macOS Mojave, is there a list of unused keyboard combinations for shortcuts?

Question: I am trying to define a new shortcut for "Select the previous input source", since the default shortcut (Control + Space) is conflicting with another app I need to use. Is there any table with a list of unused shortcuts in Mojave that could be good candidates for custom shortcuts? I am trying to find a balance between good usability (not having to stretch the hand in awkward positions to type the shortcut) and avoiding conflicts with already existing shortcuts.
Comment: Firstly, welcome to Ask Different! :)  I hope you come to find this site has a lot to offer! In case you haven't already, it's worth taking the time to read the [tour](https://apple.stackexchange.com/tour). As for your question, I think the difficulty is that you're asking about keyboard combinations for shortcuts in macOS Mojave, but the conflict you're describing is actually with a keyboard combinations used by a 3rd party app. So, getting a list of all keyboard combinations  isn't a trivial exercise if you need to know what they are across all apps. Or am I misreading your question?
Comment: What are your input sources?  If one is Latin and one non-Latin,you can use caps lock to switch by checking a preference box.
Comment: How about command plus space?  That used to be apple's default.  If it conflicts, change the other one.
Answer:
Is there any table with a list of unused shortcuts in Mojave that could be good candidates for custom shortcuts?

There is not. There are a few utilities out there which will show you which key combinations are in use¹ but none (that I am aware of) show you available keyboard shortcuts.
¹ I believe KeyCue is the most well-known and best supported.
One common method among Mac power users is the use of a Hyper Key which is (generally speaking) where you remap holding down the Caps Lock key to equal holding down ⌘ ⇧ ⌥ ⌃ because few apps (and few macOS default shortcuts) use all 4 modifiers (mostly because it is awkward to try to press them all at once, which is why remapping the Caps Lock key is recommended).
Personally, I use a Hyper Key with Keyboard Maestro because, unlike shortcuts defined in System Preferences, Keyboard Maestro's shortcuts are easy to backup/restore, and easy to sync across multiple Macs.
Comment: The "hyper" key - good one... plus 1. Better than the "any" key as in "press any key"...


Are edit-form-only interfaces effective for CRMs?

Question: What do you think about the user interface with only an edit form—where there is no separate interface for viewing data—like in Microsoft CRM?
Is it effective? What problems do such interfaces tend to have?
Comment: Thank you for your comments and so the good solution would be to gather first usage statistics of edit/view factor, additionally it would be niece to add button to view and to edit into the grid.
Answer: I think there are cases when users enter/update such a high percentage of the time so you make it the default. When you are using forms every day, you start to know what you're doing and don't have to worry about making a mistake because you're always in edit mode. For instances where users won't use the form enough to develop any fluency, you try to protect them from themselves.
Too often we only develop for one type of user. Often a user's needs evolve through experience and proficiency. My online banking site can "walk" me through entering a transaction or display a grid where I can enter several simultaneously. After using the wizard a few times, the grid just makes more sense, but not at first.
In this case, your primary data entry person for CRM will be sales, marketing and support people. Getting data into a CRM system is an issue because sales people would rather make sales instead of data entry. Anything they perceive as a roadblock should be removed. Support people may be on the phone with a client, so saving a click in this case is crucial. Not sure how many times I've heard apologies while they get the form open.
Answer: I'd see this as dangerous and possibly a poor idea for a few reasons:

If the user doesn't have write permissions how is this handled?  Are the text boxes disabled, the submit button disabled or the form throws a message of, "Not gonna do it," to tell the user that this isn't allowed?  Is it assumed that all users will have write access to the data?
How well does this handle cases where someone is mistakenly overwriting someone else's changes? It is possible for multiple people to open the same customer but one makes changes that the other may end up overwriting as both have the option to edit the data.
Would there be checks before updating the data or would it just always update regardless of if there is a change or not?  Each has its own overhead of course.

While I can understand the intent of having such a set-up being convenience there is a price to pay for that which should be understood.
Answer: You may be able to control this from the UI preceding the dialogue you are concerned with in your question. That is, you run a search, you get a list and you select one item to open a details window/page. The selection act could allow the user to chose what they want to do (display vs edit).
This gives the user the flexibility to choose the exactly required action.
If the data is sensitive, you may want to 'lock' the row when one user requests editing it and then release the lock after the edit is complete.
The above design also allows users who don't have access to edit mode to see the data in read-only mode by either eliminating the menu options from the list or by graying it out.
Answer: I like a form that can switch modes without a reload. So it comes up with plain labels, and then by clicking an "edit" button, all the data fields are replaced with form fields. That way you have to mean it about changing the values, but it's not burdensome to do so.


Email doesn't get sent if it includes a specific URL

Question: Using AcyMailing to send out a Newsletter to our group. The Newsletter has a number of links to our sponsors' websites.IF I include a link to one very specific URL, the email never gets sent. AcyMailing reports it as sent, but no-one receives it. If I remove that URL, the exact same email gets sent no problem. I can use a bit.ly substitute and that works. Thought maybe it was the .org somehow being filtered out as invalid and tried other .org addresses, and they all worked. Even went and put in other URLs hosted on the same server (thinking that maybe the server IP was blacklisted) and they got through fine.
AcyMailing support suggested trying the other mail options, but none of them worked. So not sure that it is AcyMailing's fault. Also tried talking to both our hosting (Gatorhost) and the hosting for the errant URL (A Small Orange) but they weren't able to help me either.
Has anyone ever encountered this? Or have suggestions as to why an email would be blocked just because of a specific link?
Thanks.
Comment: try posting this on acymailing forum.
Comment: Are you using PHP or SMTP? If SMTP, is that the same server on "Gatorhost" that hosts the site?
Answer: Not an answer but some suggestions:

Is there something unusual about that specific URL that would be causing acymailing (or some other component) to have a problem sending it?
Maybe contains spaces or other character?
References a type of document that is getting the email blocked without warning?
Have you tried sending that url in an email outside acymailing/Joomla to determine if the problem is within acymailing or just a general problem with that URL?
Answer: Use Acymailing spam test option.
The test will give you some clues about the rejected URL.
I suggest also to use this service:
https://www.mail-tester.com/
and againg check the report.


What, exactly, does it mean to play a hand?

Question: Various online poker guides (for example, this one) talk about which preflop hands you should or shouldn't play from a given position, and all say basically the same thing. Basically, they group various hands by position, and say that for beginners just learning the ropes, you should only "play" a hand from a given position if it's in the list for that position. But they never seem to elaborate on what they mean by "playing" a hand. Does that mean you should bet whatever's necessary to see the flop (i.e., call/reraise any raise), or does it just mean you definitely should call the blinds, and whether or not to reraise/call any raise is another question altogether?
Comment: Playing the hand is just a starting point in the learning process. Learning how to play the hand is the learning process. There is lots of commentary on how to play hands, online in books etc. This commentary is the elaboration your looking for.
Answer: Putting any money in whatsoever constitutes "playing" the hand in this context.

If you call a blind, bet, or raise, you are playing the hand.
If you fold, you are not playing the hand.
If you are the big blind and there are no bets, raises, straddles, or other additions of money beyond the blinds -- so you do not have to add any money to see the flop -- you are "playing" the hand in a literal sense, but not in the sense that most books or guides are talking about. You almost never want to fold a starting hand -- even a terrible one like 72o -- if it is free to see the next card(s). But you would only keep playing in that situation if you connect with the board in a meaningful way.


Is there a mathematical way to determine if a force, phenomena or physical entity is in a state of chaos?

Question: We often talk about chaos, but is chaos an objective term or a subjective term? If it's an objective term, is there a mathematical way to determine it? Is it possible there's a threshold where something is neither chaotic or in a state of order?
Comment: https://en.wikipedia.org/wiki/Chaos_theory
Comment: https://en.wikipedia.org/wiki/Edge_of_chaos
Comment: Please look at the links Wolphram Jonny provided and let us know if they fail to answer your question.
Comment: Chaos has different meanings in philosophy and mathematics. Are you asking about one of these in particular or the relationship between them?
Answer: Chaos in the sense of chaos theory is a property of a dynamics. There are several competing definitions, most of which require a rather deep understanding of dynamical systems, but they yield the same result except for some pathological cases (about which very few people really care). To keep things simple, let's consider the simple definition, that a dynamics is chaotic if it is deterministic, bounded, and has a positive Lyapunov exponent (i.e., it is sensitive to initial conditions).
This is a clear mathematical definition and allows no grey area between chaos and other dynamics. A dynamics can neither be half-deterministic, half-bounded, nor can it have a half-positive Lyapunov exponent. If a dynamics is completely accessible to me (i.e., I can simulate it for an infinite time and observe all dynamical variables), I can determine all the properties that go into the definition of chaos and that's it. What can happen is that a dynamics is changed and transitions between chaotic and regular (think of a periodic oscillation). For example a dripping tap may switch between chaotic and regular dripping depending on the temperature.
For real systems, things get a lot more messy, as we only can only observe a part of them for a finite time and always have noise. Here you can only answer to which extent a dynamics is dominated by deterministic components and whether those are regular or chaotic. The main challenge for asserting chaos here is to distinguish it from a stochastic phenomenon, a topic about which entire textbooks exist. Very briefly, you try compare the Lyapunov exponent (or another indicator of chaos) with that for instances of an appropriate null model derived from the data. As we are dealing with reality, mathematically rigorous answers do not exist.
Answer: There seem to be several methods of determining whether observed random behavior is truly random or the result of dynamical chaos, of course mathematics is used.
There are the methods using the Lyapunov exponent. On page 504 the exponent is defined and its use for chaos is discussed .
I found this, and it is a mathematical method that seems to be used with success.

The  0-1  Test for Chaos: A review  Georg A. Gottwald and Ian Melbourne

AbstractWe review here theoretical as well as practical aspects of the 0-1 test for chaos for deterministic dynamical systems. The test is designed to distinguish between regular, i.e. periodic or quasi-periodic, dynamics and chaotic dynamics.

So yes, there are mathematical tools to define chaotic behavior in a sample.


Harmonic Series Paradox

Question: How to resolve the harmonic series paradox presented in this video by James Tanton?
Answer: If your concern is the apparent paradox about a infinite length of paint and a finite area, then you might want to consider what Wikipedia says on about Gabriel's horn with an infinite area of paint and a finite volume, and then take it down a dimension:

Since the Horn has finite volume but infinite surface area, it seems
  that it could be filled with a finite quantity of paint, and yet that
  paint would not be sufficient to coat its inner surface – an apparent
  paradox. In fact, in a theoretical mathematical sense, a finite amount
  of paint can coat an infinite area, provided the thickness of the coat
  becomes vanishingly small "quickly enough" to compensate for the
  ever-expanding area, which in this case is forced to happen to an
  inner-surface coat as the horn narrows. However, to coat the outer
  surface of the horn with a constant thickness of paint, no matter how
  thin, would require an infinite amount of paint. Of course, in
  reality, paint is not infinitely divisible, and at some point the horn
  would become too narrow for even one molecule to pass.
Comment: You beat me to it!
Answer: In general, the length of a line and the area of a curve over that line do not have to both be infinite, or both be finite.  It is not a paradox.  See improper integrals. http://en.wikipedia.org/wiki/Improper_integral.  Note that length and area do not have the same dimensions.
Answer: The infinite amount of ink is due to the fact that you draw with a pen of constant width.
But when painting the squares, the width gets smaller and smaller, at some point smaller than the ink stroke, further down to zero. This allows a finite amount of paint.
Answer: There is no paradox here. The length of the ink needed to color the real line is equal to the length of the ink needed to color those squares and both lengths are infinite but area of the ink needed to color those squares is finite. The paradox arises because the author talks in such a way that he does not mention (or I did not hear it) that when coloring the real line the ink needed is measured as length and when coloring the squares the ink needed is measured as area.

Harmonic Series Paradox


How do you play Mouseguard (2nd edition) with a group of five?

Question: My group is playing Mouseguard on the "off weeks" of a different RPG so it's a bit difficult to simply kick someone out of the group for this. My main problem is how do you deal with conflicts with a group of 5. I've read about splitting into two teams for each conflict but that seems overly complicated and it seems hard to create a fair opponent. I'm also against running two separate missions at once and splitting the party. Any tips or advice would be appreciated.
Answer: Conflicts can go multiple rounds of three actions each. So if there are more than three mice, three mice go in the first round. If the neither side's disposition is lowered to zero, the other mice involved in the conflict have to go, before the three are up again. Every mouse that is able to help can and should for every action. That includes the mice that do not have an action in the current round. If there are only two mice in the conflict, they alternate their actions, if there is only one mouse, they go every time. Page 106 of the second edition rulebook explains these rules.
In a literal interpretation of the rules, the conflict captain should privately choose the three actions and assigns a teammate to each action. They can only assign an action to themselves, if there are less than four mice in the team. In my experience, it is more interesting if the players discuss what actions to take and which mouse will take which action, but it will take more time. The team captain has last say.
I would advice against planning more than three actions at a time. That would make reactions to changing circumstances hard. While that is true for both sides, I feel it would make the conflict harder for the patrol.
Example: The five mice Alice, Bertie, Charlie, Dave and Elle fight a snake. In the first round, Alice, Bertie and Charlie resolve actions against the snake, lowering its disposition to 2. In the second round, Dave and Elle have to perform the first two actions, before Alice, Bertie or Charlie can take the third action and so on.
<code>       1st Round   2nd Round
Mouse  A|B|C       D|E|C
Action M|A|A       D|M|A
</code>
Answer: Not sure what the problem is here? Most of the premade missions already use four-mouse patrols, so there's already somebody "sitting out" in conflicts. The winter mission (in the "new rules, new missions" supplement) has a team of five!
Conflicts rarely consist of guardmice doing individual actions with no backup. Somebody just takes the lead on doing one action for one round out of three, and since the whole patrol is already facing full conflict consequences, there's no reason not to provide a helper die if you can.
Answer: In conflicts, players are supposed to submit three attacks, and the game master does the same.  This is arbitrary, as near as I can tell.  A quick look at the burning wheel rules suggest that the origin comes from the way turns were divided time-wise in that system.  There is no reason that the players need to stick with three actions.  It would make as much sense to use four or five actions on both sides.  Alternately, the extra players can help one of the actions, contributing dice, a scenario which would promote creative teamwork.


Creative way to kick off a talk?

Question: I have to do my defense seminar in couple days. I personally hate to kick off the talk with "hello and thank you for attending my talk". I am wondering if you know better ways/phrases to start a talk. You attended many conferences so I bet you saw some good starts.
Comment: "Much like Sir Patrick Stewart ..." was an interesting one because we thought it was going to be a reference to his baldness. It turned out they supported the same football team. I don't remember what that had to do with the rest of his talk
Answer: Start it with a compelling question that add some context to your talk. A recent talk at a conference I attended started like this:

What is the largest sumfree subset of the numbers 1 to n?

This is a well-known problem first posed by Erdos, and if someone can say that their research leads to a nice way to solve it, a lot of people will be interested (or at least more interested than if the speaker starts by saying "I'm going to talk about containers for hypergraphs").
Otherwise, start by presenting a situation (or amusing anecdote) where your results would be applicable:

Suppose 11 of your spouse's charming relatives are visiting for two weeks. How do you seat everyone around the round table you had to drag out of the garage so that everyone has everyone else on each side of them at least once during the two weeks? What if you want to avoid their annoying cousin but would love to sit next to their mother-in-law more times?

Both of these were very interesting beginnings, and as the speakers continued through their talk, they kept connecting back to the original problem, explaining how their result provided easier or more convenient solutions to the basic problem. There is really no need to start with "thank you for attending". Wait with that until after, and save the title and collaborators until you've explained why everyone should care what you and some other people they don't know wrote a paper about. You have already been introduced by the organiser, so you can just dive right into the motivation.

Creative way to kick off a talk?


Removing from dock when quitting

Question: Many programs are not removed from the dock when quitting them (using apple-Q) or when closing their visible windows. I know this behaviour is on purpose, but I don't like it. Is their a way to consistently enforce that programs are really closed (i.e., the process is terminated), and hence removed from the dock when quitting / closing the windows?
Comment: Based on your comments, it seems like the problem is actually programs that don't quit just because they no longer have any open windows. Some apps have settings to quit automatically, but I do not know of a way to force all programs to behave this way, as far as I know it's up to the author of the app. Someone else might know, though, you might want to try asking a separate question.
Answer: I found an answer here: https://superuser.com/questions/53935/getting-mac-os-x-applications-to-close-after-last-window-closed
Essentially, there's a program called RedQuits that automatically quits application when you close the last window.
BUT, it does no work for Yosemite. So still no dice.
The thing about applications not closing when hiting Cmd-Q was probably me misremembering things, because I couldn't find back any application doing that.
Answer: I had this issue with Word. The program would open but the Word icon would stay in the dock after I quit the program.
Try:
Go to System Preferences > Dock
Uncheck "Show recent applications in Dock"
Now the word icon will be removed from the dock after I quit it.
Answer: You can remove those apps by right clicking on the Dock icon and choosing Options -> Remove from Dock, or drag the app icon from Dock to the top untill You see Remove label. After this, app will automatically dissapear from Dock after quitting.
Comment: Please see my comment under iskra's answer.
Answer: Dock doesn't contain programs in it. It is just aliases of those.
There permanent (sticking aliases) and temporal ones.
When you drag some app to dock you assign alias for that app in the dock. Or if you choose Keep in Dock from context menu of present alias. When you launch that app you get dot under it denoting it is launched.

When you launch an app by other means — from Finder or spotlight you get temporal alias for that app in the dock it will vanish the moment you will quit an app.
Only way for you for dock to do what you want is to remove all icons from the dock. This way you will be left with only Finder and Trash. And any other app you specifically launched.
Comment: @Norswap so I misunderstood Your question. There must be something wrong, since ⌘+Q quits the app and it should be removed from the Dock (at least dot indicator should go away).
Comment: On mac closing last window is not always closing app as in Windows. Cmd+Q will quit an app. Depending on your system version and preferences it will close windows or save their state.
Comment: I'm not referring to programs "pinned" to the dock. I'm referring to programs that are left running (as indicated by the dot) even after I close all visible windows. Exemple of such programs: Preview, and Textual (the IRC client). I actually might be misremembering about programs left running after with apple-Q; although I thought there was at least one that did it.
Comment: Like I said, I might be misremembering that. Ignore it until I can find the app that did that (if there was one to begin with). But what about forcing a program to close if all of its visible windows are closed?
Comment: I doubt there are apps that can not conform to cmd+Q i.e. system shortcut for quit. There are apps that disable close window control in the windows of the app but none except Finder that cannot be quit.
Comment: (wrt your last comment:) I know that, it's exactly the behaviour I'm reporting. What I'm asking is whether there is a way to coerce the apps to behave as in Windows: i.e. to terminate their process when the last visible window closes. If there is a way to do it on a per-app basis, that's fine too.

Removing from dock when quitting