Key based authentication (SFTP) failed

Question: I created a pair or RSA keys using Putty key generator, The Public key is attached set on the server side.
The private key at windows client machine and being used with pageant and FileZila and working fine. Now Problem is that when I want to connect same sftp through PSFTP commandline tool, it failes.
if possible please provide steps to setup ssh key on windows client to access sftp using psftp or direct through batch file.
Answer: If pageant is running and has the key loaded psftp should use it. It does on my system. Exactly how does it fail for you?
plink should use pageant the same way; does it work? How about putty user@host (not using a saved session)?
According to the manual http://the.earth.li/~sgtatham/putty/0.63/htmldoc/Chapter6.html#psftp-pubkey
option -i or a saved session containing Auth should also work, but I haven't tried them.
Answer: Make sure you are using the same version of Pageant and psftp. Some versions are not compatible.
If this does not help, run psftp -v and try again and include console output to your question.
Ideally you should see something like:

Pageant is running. Requesting keys.
Pageant has 2 SSH-2 keys

Key based authentication (SFTP) failed


How to get all users in SharePoint O365 with Rest API?

Question: How to get all users in SharePoint O365 with Rest API? For example only the username.
Answer: Try below code:
<code>$.ajax({
    url: "https://sitecollectionurl/_api/search/query?querytext='*'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'&selectproperties='AccountName'&rowlimit='500'",
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
        console.log(data);
    },
    error: function (data) {
        console.log(data);
    }
});
</code>
I am using the Search rest api with people source.
Here, i am using the search rest api with people results source to get data from search instead of directly query the user profiles as it give better performance.
If you are using this approach, then Sharepoint search has a default "rowlimit" of 500, so you need to do pagination to get more than 500 profiles as below
SharePoint REST API call with more than 500 rows
Comment: Not sure (because we abstracted all REST calls) does this endpoint work without the RequestDigest?
Comment: This is a get request , so doesnt require request digest. So yes ,  it works without request digest. To test i just login to the site, open postman chrome extenstion and paste this request, works without any input required.


How to change coordinate system in PostGIS database: alter, transform or update?

Question: I created an empty database in PostGIS and I need to change the coordinate system from EPSG:4326 to EPSG:32632. I am confused if I should be transforming, altering or updating? Also, how do I know that it has changed it? The database is currently empty.
Comment: @hgb - if you could make this an answer it can be upvoted.
Answer: Coordinate reference systems are defined for each column that contains geometry or geography data types. If your database is truly empty with no tables and therefore no columns, then you haven't defined anything yet as EPSG:4326 so you have nothing to change. When you add a table, you can define it to include a geometry column as, for example, geom geometry(POINT, 32632), if you intend to store points using WGS 84 / UTM zone 32N coordinates. See PostGIS Reference, Spatial Tables.
If you do need to change the coordinate system for a column after it is added, see Transforming geometry PostGIS column with unknown geometry type?
Answer: Databases do not have coordinate reference systems. Geometries do. When you actually load your data, make sure you're correctly specifying the coordinate reference system of the data you are loading. (Using the -s flag for shp2pgsql for example.)
If the data are correctly loaded, then the ST_Transform() function can be used to convert it to any other reference system you want.


Template Body to posts

Question: Is there any possiblity to add in a body template to the default wordpress posts? so whenever I create a post it should appear as a template inside of the body text field
Answer: Simply add following code to your theme functions.php
<code>function better_default_post_content( $content ){
    if( empty( $content ) )
        $content = "Default Template is here!";
    return $content;
}
add_filter( 'the_editor_content', 'better_default_post_content' );
</code>
With "the_editor_content" filter you can filter WordPress TinyCME editor value for changing values. In this code i added a filter for that.
It's so simple if you know WordPress action filters. you can read this for action filters: http://wpcandy.com/teaches/how-to-use-wordpress-hooks/
Comment: Please [edit] and add some details how your code is working and how it's providing the solution. :)

Template Body to posts


How do I prevent other players from taking items out of a dropper? (1.18.2)

Question: I'm currently making a trading system on my Minecraft server. You drop an item that spawns a dropper with a small UI. There are 2 empty slots where both players will put a custom player head from their inventory. These heads are the collectibles on my server. But my problem is that I can't prevent players from just taking the heads and leaving. I tried to give the heads inside of the dropper a custom nbt but I don't know how to do that. I also can't just clear the heads from the inventory because a player can have more than one head. I don't want to use data packs or plugins for this but I'm out of ideas...
Answer: /data merge block [pos] {Lock:"[password]"}

[pos] means the position of the dropper (you need to place it down first)

[password] means the password to unlock it (if you want it permanently locked just spam a bunch of random chars)

To change the password, do the same command but with a different Lock key value.


How to live feed to a laptop to show what is on a Sony HX60 camera's display?

Question: What available ways are there to output a live feed from the Sony DSC HX60 camera showing what is on its display? For example, can this be done using a cable from the HDMI port on the camera to an HDMI-to-USB dongle in one of the laptop's USB ports, or to an HDMI-to-eSATA dongle in its eSATA port, or perhaps to something that goes into its ExpressCard slot? (The laptop has both HDMI and VGA ports, but as far as I know they are both output only.) Ideally I would like to be able to shoot stills and video with the camera while viewing on the laptop what's on the camera's display, but I don't need to control any of the camera's functions from the laptop.
Comment: I'm assuming you are trying to connect to Windows, but if not, there are also some solutions listed on the Unix & Linux stack exchange for this same camera: https://unix.stackexchange.com/questions/231367/how-to-connect-to-a-sony-camera-via-wifi-from-linux
Answer: To solve this problem there are multiple ways to do it. The first and probably the easiest is to use a USB capture card like this and then record it on the computer with a software but I don't know if this also shows the HUD of the camera (and if you want this). This method has the advantage that you can use your camera normally like you would do without the cable.
Another way to do this is to use software which detects your camera as a webcam. An example for this can be found here. This method only has the problem that the camera here is in PC mode and your usage from the camera side is limited to be controlled only by software on the PC.
The HDMI and VGA ports on your laptop are only the output from your graphics card.
Another option how to do this is show and explained in this YouTube video
Comment: Many thanks for these suggestions. I'm not sure that Elgato's Cam Link works with this camera. The camera is not on their list, but their list may not be comprehensive so I've asked them. Sparkocam say their program works with Canon and Nikon DSLRs. I tried it with my Sony and it doesn't work. Am currently trying OBS Virtual Cam. Last, the Ninja Flame is very expensive!
Comment: The elegato cam link is just a capture card which captures anything that comes in its hdmi input. So it does not matter if your camera is in their list as long as the camera uses a default hdmi output(to test this just connect it to a screen With a normal hdmi cable. You could also connect a game console or another computer to it if you like. So this should not be the problem
Comment: I don't know if this also works for your camera and if you can use your screen at the same time as showing it on the computer but you could also try qDslrDashboard. its a free software available as app, pc and mac and its mostly used for remote control but worth a shot: https://dslrdashboard.info/introduction/
Answer: A web search for "clean HDMI" puts up this link which appears to demonstrate that you not only can get live HDMI output of the camera control display but can also get a clean webcam-suitable display without camera controls in it.
For getting that info into your computer, you'll need a HDMI-to-USB converter.  One possibility is a cheap USB2.0 grabber built around the Macrosilicon MS2109 ASIC.  Those do either reasonable framerates (30fps I think) with MJPEG compression or uncompressed at low frame rates (something like 5fps).  They are sold as USB2.0 metal sticks and "USB3.0" plastic with short cable whip.
The plastic version has a blue USB connector and "USB3.0" in its identification string but it not in any respect USB3.0.  It also has worse heat dispersal and so should be avoided.
While they take FullHD, their output may (or may not, this does not seem quite conclusive) be constrained to data interpolated from 1280 pixels horizontally.
If you want better image quality, grabbers intended for game capture tend to provide that.  I'd pick only those obeying the UVC standard: they don't depend on drivers provided by the manufacturer.
As an example, Avermedia Live Gamer Portable 2 plus is only USB2.0 but can do x204 capture via UVC and alternatively allows recording an MP4 stream directly to microSD card: that can be rather convenient for avoiding problems with overloaded CPUs of your work computer when preparing material that is not immediately broadcast live.
If your workstation has plenty of power to spare, an actual USB3.0 grabber providing raw HDMI data may be the most flexible choice for further processing or live streaming.  Those that don't just fake USB3.0 capability are not necessarily cheap.
But for just goofing around, the cheap MS2109 based sticks are pretty usable.


Entity Framework in n-tier application confusion

Question: I'm building a rather large (web) application where I'm using Entity Framework to communicate with the database.
My solution is set up in layers like so:

Client

Website (MVC web application)

Server

BusinessLogic (contains, well, business logic. There's a lot of business rules involved in this project)
Repository (contains repository classes for querying the database using EF)
Interfaces (interfaces for defining the repository classes, i.e. IFirmRepository)
Model (contains my edmx file, view models, enums etc)

So, the client/UI knows about the business logic layer where the business classes needed for a given view is injected into the MVC controllers. The business logic layer knows about interfaces and model and the repository implements the interfaces.
Been developing for the last week using this approach, I have a feeling that it's not quite "correct" since:

The repository classes becomes bloated with a lot of methods where I need to use the Include()method to be able to work with the disconnected entities in my business logic layer
For every query, I'm using a new context: using(var ctx = new MyContext()) and a single business logic method might be calling more than one repository method which makes for N number of new MyContext() which isn't ideal, I guess?
Relating to the above: I've read about having one context per http request is the way to go when it comes to websites, which my approach seems to "violate"?
Out of curiousity, I tried to simply make use of the MyContextdirectly in a business logic class, making the query for the object(s) needed and then performing business logic. Doing this felt very smooth/easy and made the repository seem like a lot more work than needed and almost redundant.

So, I guess different projects needs different approaches when it comes to the architecture, but before I scratch my repository completely and making use of the entity framework context directly in my business logic classes, I'd like your opinion on this. It kinda feels wrong (in the sense that I'm violating something) to scratch the repository, but on the other hand, it's so easy to simply do the magic without first defining the method in an interface, then implementing it as a repository and then make use of it in a business logic class.
So, what is your opinion on this? :-) Am I completely off the record here, or?
Thanks in advance.
Answer: Go ahead and scratch the repository. If you're using Entity Framework, you don't need it. It's just a pointless layer of abstraction. I'd recommend going with a service/provider pattern. Create an interface that lays out an API that you application can utilize. The interface will be the only thing you work with directly in your web application. You'll use dependency injection to sub in a concrete implementation.
As far as that goes, you'll want to create a one or more classes that implement this interface, but only one per discrete access method, i.e. Entity Framework. You might have another if you want to work with a Web Api, for example. This implementation should be generic, but rather than having the entire class take a type parameter, instead, you'll want the individual method implementations to be generic. This allows you to instantiate one instance that can work with your entire context and any entity that it contains.
Your entities, too, should implement interfaces, so that your service implementation can reuse code. For example, instead of having GetPublishedFoos and GetPublishedBars, you can simply have GetPublished<TEntity>, where TEntity : IPublishable. If you're smart about how you set up your interfaces, your service won't need a ton of methods.
Answer: It sounds like you have too many repositories.
As a general rule I would try to stick to one per Database. Afterall thats your underlying repository and the Tables (objects) in it should all be related. So I can expect queries/methods lile getFirmsWithCustomer etc.
I think you are taking the correct approach in seperating EF from the business logic when you have a large application.
I would go further and say don't use EF with this pattern. EF works best for small projects where you want to skip writing the data layer. If you go the whole way with Sprocs and Repositories using SQL client will be less and easier to write code.
Answer: I think your question is something similar to whether to use repository pattern over Entity framework which I was also researching recently. Here is one link I found with good answers.
The Entity Framework DBContext class already implements Repository pattern. Now, if we should abstract the Entity Framework itself depends on, if this provider (EF) itself is going to change to something like web service, xml etc. In other cases better to go without custom Repository classes.
Answer: I would say have your service layer, use DI to get it the EF db context (you could have this context stay alive if you like). Create methods on your service layer that get and do what you need. Those methods query your data via the EF DbContext. This service layer should be used by your WebAPI and then your app calls the WebAPI. Now your back-end stuff under the service hood can be changed however you want but as long as it holds to the contract nothing else has to change downstream.
A note that you can have multiple service layers as well. Group your service layers by domain.


How to change Windows 7 date format?

Question: Is it possible to configure Windows 7 to use YYYY-MM-DD instead of DD/MM/YYYY as the date format? How? Where?
Answer: tl;dr
Go to Start > Control Panel > Regional and Language Options.
Here you can configure long and short date options on the Formats tab. Click additional settings to customize the formate more under the Date tab
Edit: Updated with more detail:
Changing Date Format in Windows 7

Click Start and enter Control Panel

Enter Regional and Language Options (select the Large Icons or Small Icons view to see this particular icon).

Check the dropdown menu on the formats tab for Short date and Long date. See if there's a format that takes your fancy.

If not, make your own. Click the Additional settings button at the bottom right corner of the window
Click on the Date tab. Here you can customize the format to whatever you wish. The notations are also given on this screen.

I hope this more detailed answer helps someone in the future. Apologies for the screens as VirtualBox isn't the best with them. Feel free to update with some better ones
Answer: More info:
1) You can go directly to "Control Panel", "Region" running: Intl.cpl
2) If you change the "Language" in "Format", it automatically changes the date format.
Extracted from here: http://www.sysadmit.com/2015/11/windows-cambiar-formato-fecha-al-ingles.html

How to change Windows 7 date format?


Auto-update .dmg on mac

Question: As i am newbie on mac and .dmg for me is a black box. And i don't know is it possible rewrite some files in it like on Windows.
Someone can explain how user can update my app for one click: "There new version available. Do you want to install it now?" - [OK] [Cancel]
Answer: A .dmg container is read-only (typically, you can make them writable though). The recommended behaviour with an OS X application is to do one of two things:

Put a note in the .dmg to move the application to Applications (see: Creating nice dmg "installer" for Mac OS X)
Auto-move the Application on first run, however you need to be incredibly explicit to the user about what's happening and where they need to go to load the application in future.

I always go for option 1, it's clear and concise and there's a wealth of other software that go for it so it's understood by most OS X users.
In terms of doing an autoupdate, once it's in the user filesystem you can do it a number of ways. There's the Sparkle Framework, you can build a simple HTTP request service to grab the new .app bundle and copy it into place and then restart. Sparkle is good, well tested and very popular for OS X autoupdating, if you're going cross-platform then build the HTTP service.

Auto-update .dmg on mac


Two Sujud In Salah

Question: There are two Sujud in Salah. I have heard that one relates to Allah's command to all angels including Iblees and the other one relates to thanking by all angels that they did not disobey Allah as Iblees did.
Is it true?
Answer: IF anyone makes any claim, then he has to bring its proof that if it is present in Quran or Hadith. During my study of islam, i never came across anything like that.
Also, you should note one thing that not every question deserves or needs an answer. i mean in this case, the MAIN motive of Salah is to worship Allah and those actions have to be according to Sunnah. As long as you are doing this, that is enough. So even if you are not aware of why certain actin is done, still your main purpose of Salah is fulfilled, so nothing to worry about.
As a conclusion, i would say that you should not believe in such saying that certain Sajda is for certain reason, Unless there is an evidence for it. Just pay attention to the important part of Salah, ignoring such issues.
May Allah accept our Ibadah and indeed, Allah knows the best

Two Sujud In Salah


Why don't we rename this SE to Classics or Classical Languages?

Question:
Some other topics (Etruscan, older Greek, other ancient Italic languages) support Latin and share the same enthusiasts. We are happy to include them, but not unconditionally.

I first propounded renaming to 'Greek and Latin SE', but moderator expounded why not.
What of Draconis's proposal?
Comment: The current votes seem to suggest that the name stays as it is. Keeping it has the most support and requires no action. If there is a substantial change in these scores later on, perhaps we should have a new meta question on the topic.
Answer: This is a good question!
I will post my view here, but I would be glad to hear others as well.
As always, I'm happy to go forward with a community decision, whether I agree with it or not.
My suggestion is to keep the site name as it is for the following reasons:

Latin is the main topic of the site, and anything having to do with Latin is on topic. (This may be overly simplified, but this is my starting point to our scope.)
Simplicity is good, and the current site name is simple and informative.
We allow some Greek, not all Greek. If we Greek were to be added to the title, then we might want to add some qualifiers. "Latin and Ancient Greek Stack Exchange" might work. The key words in your quote are "but not unconditionally". I am pretty sure our community does not want modern Greek.
As on many SE sites, we can implicitly understand "Latin Language SE" to mean "Latin Language and Closely Related Topics SE". I prefer this level of specificity, so that we are free to redefine our scope.
What about other languages? Should we add other Italic languages to the title as well? The name can't be a full description of the scope.
I don't think we can change names often. If a good Greek site arises, perhaps many of our users might feel that Greek questions should be directed there in the future.

Please take these as thoughts in favor of the current name, not as hard facts.
My main argument is that Latin is included unconditionally, Greek only conditionally.
Comment: +1, AND Classical Languages could be interpreted as including [Sanskrit](https://en.wikipedia.org/wiki/Sanskrit#Classical_Sanskrit), [Arabic](https://en.wikipedia.org/wiki/Classical_Arabic), etc., which is not bad _per se_, but would be a major shift.
Comment: @Rafael I fully agree.
Answer: For the sake of clarity of interpreting votes, let me post a second answer addressing "Classics" as a name.
I do not want to change the name to "Classical Languages SE" or "Classics SE".
The reason is that in my opinion (and vision) all things Latin should be on topic.
A name focused on the classical aspects may scare away medievalists or living Latin folks.
I will not try to hide that my interests are mainly in Latin and not other languages regarded as classical.
(I might not be able to afford such a narrow interest if I was professionally engaged with Latin, but my field of scholarship is something unrelated and Latin is mostly a hobby.)
However, a combination like "Latin and Classics SE" would avoid this pitfall.
Perhaps that could be a reasonable name?
It is not immediately clear what is included in "Classics".
But names don't have to be definitive; we can specify the details elsewhere.
Even just adding "Classics" to the title is a major change in my opinion.
It shifts the focus somewhat from what we started with, and I find that significant.
It is not just a matter of names, but a redefinition of purpose.
Therefore I am against hasty movements, but not against all movement.
If this suggestion gains significant support and very little opposition, I am ready to go forward and discuss such changes with SE staff.
I can't tell what the next steps could be without such consultation.
Personally, I am slightly against this idea, but I could live with it.
This is the most reasonable way to change the name I could think of, so I am posting it for others to judge.
Comment: I see 2 issues with 'Classics' as a name. First, since – at least in the US – 'classics' as the name of a field isn't widely known, I suspect we'd start getting questions about non-Latin/Greek literary classics such as the works of Austen, Cervantes, Dante, the Brontës, etc. Second, the field of Classics is about so much more than the languages: history, literature, philosophy, art, architecture, archaeology, social history, etc.; so for people who do know the term, the new name would invite questions that have nothing to do with the languages and would represent a major expansion of scope.
Comment: @cnread Those are indeed significant issues. I would actually be happy if you voted this answer down because of them so that the votes in both directions reflect support and concern or objection. I will certainly not take any such votes personally.
Answer: For the sake of discussion, I'm going to post an alternative answer, though I do agree with everything Joonas said.
How about changing the name to Classical Languages SE or Classics SE? That neatly encompasses Latin, Ancient Greek, Etruscan, Sabellic, and the various lesser-known languages that get discussed here, while excluding post-classical Greek and the Romance languages.
Comment: I'd be concerned that those names (especially "Classical Languages") don't make it very obvious that [we exclude languages like Sanskrit, Arabic and Hebrew](https://latin.meta.stackexchange.com/a/342/9) (which have varieties that people occasionally apply the label "Classical" to, even if they aren't usually part of a Classics degree).
Comment: I see an issue with calling the site "Classics" or something similar. It appears to exclude later forms of Latin, and I would strongly prefer to keep all things Latin within our scope. Of course, the site name is never a full description of our scope, but I would hate to scare away medievalists or living Latin folks by a name. A combination like "Latin and Classics" doesn't have this pitfall.
Comment: @JoonasIlmavirta I have no objection to "Latin and Classics", if you'd like to make a new answer for it.
Comment: +1. Great suggestion. Now added to my post.
Comment: @Draconis I wrote up a new answer.
Comment: @Asteroides One of the things I find difficult, is whether or not one should consider this to be a languages only site. I think we need to reach a communal understanding of how we define Classics: Ancient studies as seen through the lense of the Graeco-Roman world's languages, or ancient studies of the Graeco-Roman world as a whole.


What is the function of the capacitor between ground and 12V?

Question:
This is a switching circuit used for a switched reluctance motor. In this circuit there is a 47μF capacitor on the right side. What is the capacitors function in this circuit?
Comment: I suspect a 47u cap would do anything to any motor larger than a clock. More likely it's used to filter out the interference generated by the sparks of the brush so that it won't contaminate the 12V supply.
Answer: The 47-uF capacitor is not used to supply the inrush current, which would be needed to start the motor: it's value is too low to do the job (the IGBT handles 7A, so the motor will be quite powerful).
It is likely used as a noise suppressor.
Answer: This capacitor is used to keep the 12V supply 'stiff' -- i.e. reduces voltage dips when the motor draws current -- to prevent fluctuations in torque/speed under load.  Put this cap as close to your motor as possible, or at least the connector for the motor on the PCB.
Answer: This capacitor is used to keep the 12V supply stable as possible.
According to the equation P=VI, when the motor draws a high current, the voltage across the motor drops, when the voltage drops, your motor speed reduces. Therefore if you have a capacitor in parallel to the motor, in times of voltage drops, your capacitor provides that necessary current to the motor so that your motor voltage remains stable, thus keeping a constant speed.


How do I make a character that has a profession besides their class?

Question: I was mainly just wondering this since there are some characters I want to create, but the classes don't always fit the idea.
Comment: Where is this generator? Was it for DnD5E or another system?
Comment: Are you the GM or a player? I ask because this is outside the normalcy of the system (at least for players) and would require their approval and for them to do a bit of house ruling to make this work.
Comment: Is there a specific profession for which you were looking?
Comment: When I went on an npc character generator (I'm running a short campaign for my brother) I came across a lot of professions. One was doctor and another messenger, ect... I was more just wondering how would one go about actually creating a character like that if they didn't want to rely on a class. But they wanted a profession. I hope that makes sense.
Comment: http://npcgenerator.azurewebsites.net/    This one is one my group and I use.
Comment: Are you trying to run a campaign where the player is primarily a doctor (for example), instead of being a classic adventurer (going into dungeons, stopping villians, etc)?
Comment: Yeah. I want to run a character where they aren't a class, but rather have a profession. But if one of my players would want to do it, I want to be able to help them create a character who's not just based on a class.
Comment: I am GM right now. But this isn't necessarily for any game. But more, I want to know how to do this so if my players want that option.
Comment: I think if we can narrow this down to **Create an NPC with a professional background/skills** vs **Create a homebrew 'class' that is a professional**, this can be answered and opened. The former is very stackable, the latter is not (until you have a homebrewed professional class that can be reviewed for balance.)
Answer: This is typically glossed over with the use of skills, tools and backgrounds.
For example, if you had proficiency in Smith's Tools you were likely some sort of craftsman or at least apprenticed to be so eventually. This would be sort of Guild Artisan background (although I don't particularly care for the naming). You get a tool proficiency as part of the background. This would mean that you could be a smith, woodcarver, alchemist, herbalist and so on.
Folk Hero even has some text on this:

You previously pursued a simple profession among the peasantry,
  perhaps as a farmer, miner, servant, shepherd, woodcutter, or
  gravedigger.

Import Option
In order for a PC to actually be a Doctor instead of a Cleric that has proficiency in Healer's Kit you will have to figure out a way to give balanced ability on par with PC classes from the book. Especially, if you have both classes and non-classes in the same group.
This is akin to old NPC classes from Dungeons and Dragons 3.0 and 3.5 (specifically the Expert) though and you could do some work on converting these to work in 5E. In any event you will have to design level progression and balance the abilities, all in all it will take a lot of work. It is worth noting that the NPC classes were less powerful than full PC classes.
This option has the advantage of being able to have this PC advance with the rest of the party, albeit being a bit weaker than the norm.
Something that sort of already exists.
Another option is to use the NPCs from the Monster Manual and add skill proficiencies as needed. These are not really designed to level up and usually are much, much weaker than a standard PC and many would even be non-combatants but not necessarily useless.
Options include starting with Commoner, Guard, Scout or even Spy.
Caution
If you create something like this and the result is a character that is somewhat weaker than the system is balanced to handle you will be required to tweak existing encounters in published modules to compensate. Unless, of course you are going for a Cthulhu or Dark Souls style horror/suspense feel.
Comment: But would there be a way to simply have a "profession" besides a class? I know there's some in the backgrounds, but if I have a player who wants to be a doctor or messenger, how could they go about it? Those are more professions than classes. I was just wondering and I hope that makes sense. I can't word it right. I'm sorry.
Comment: @Hannah I have added a bit to this with other options. You might address the other questions in the comments under your query as well. If you like several of us could workshop the question in a chat.


USB flash drive does not support boot

Question: I bought a Transcend USB flash drive (Jetflash 350, 16 GB) recently. My aim was to copy an image file (some FreeBSD ISO) on it and install FreeBSD on my machine. However, now I find that the flash drive does not support boot as mentioned here. Is there any way I can get around this? Could someone please help me with this?
Answer: Though there is no factory support for making it a boot drive, that should not pose a problem to enabling boot through any Linux installation tool, as long as it is formatted so that the PC can read it at boot-up.
Any USB drive of ~2 GB or larger, preferably formatted FAT32 (FAT might work for a smaller drive), should work. Testing FreeBSD or other Linux distro on it should do no harm.
That said, there have been some messages about slow performance in FreeBSD of the JetFlash, stating it can be helped by enabling async cache. However, this is only an issue when writing to the device... running Linux from it (without caching data to a partition), or using it to install Linux, should not be a problem.
Comment: Thanks for the reply. It seems that my BIOS / firmware was quite old and it was not supporting a 16 GB flash memory... that's the reason it was not showing in the BIOS boot menu as well. I have updated my BIOS and it's working fine now.
Comment: Good! Did the installation succeed?
Comment: Well I am not getting time to sit down and do the installation (I am a lazy kind of person). Since now I am able to boot from the flash drive, I don't think there will be any problem. Anyways, will keep you posted.

USB flash drive does not support boot


What is the meaning of "let in" in : "but they were let in in early in the spring through the Venezuelan loan, as no doubt you remember"

Question: I am quoting from The Memoirs of Sherlock Holmes, the Stockbroker's clerk, by Arthur Conan Doyle. It says: "I used to have a billet at Coxon and Woodhouse's, of Drapers' Gardens, but they were let in in early in the spring through the Venezuelan loan, as no doubt you remember, and came a nasty cropper".
I am wondering where was the company let in and what is the Venezuelan loan Hall Pycroft is refering to, It seems to me to be common knowledge since Pycroft and Waston have just met and Pycroft says "as no doubt you remember", but I still couldn't find such a thing as the Venezuelan loan, unless it's just imaginary.
Comment: I suspect the 'Venezuelan loan' is an invention of ACD's; a recent financial crisis which we are meant to assume had been in all the newspapers. We wouldn't use _let in_ in this sense today, but presumably it means that they suffered heavy losses.
Comment: @KateBunting This passage comes from the Wilipedia entry on Venezuela:  _Cipriano Castro, one of a succession of Venezuelan military strongmen to seize the Presidency, halted payment on foreign debts after seizing Caracas in October 1899. Britain had similar grievances, and was owed the bulk of the nearly $15m of debt Venezuela had obtained in 1881 and then defaulted on_. As Coxon and Woodhouse were fictional stockbrokers they could easily be supposed to have had exposure to those loans and ACD's readership would have been well aware of the crisis.
Comment: Thanks, @BoldBen. I didn't do a search as the OP said they had done so.
Answer: In this story, Coxon & Woodhouse was a firm of stockbrokers or similar financial business. Doyle implies that it was involved in the finances of a loan associated with Venezuela. Doyle uses "Venezuelan loan" as a fictional proxy for a real-life large loan associated with some distant (and in those days, either by implication or by public knowledge, risky) national business. The consequence of involvement in such a loan, risky and probably fraudulent, ruined Coxon & Woodhouse.
The firm was "let in" in the sense of:

"let in" = to involve or commit unfavorably
"the provisions … could still let us in for trouble" — Elmer Davis
" ... smiled at all her schemes, little dreaming that … she was letting him in for some £20,000"

Merriam Webster
Comment: There is no hint of *purpose* in my answer or the dictionary definitions. They were *let in ... through* ... means that they were let in (to financial ruin) as a consequence of the loan failure. The failure was the cause (not the purpose) of their being "let in".
Comment: the verb "let in" is followed later by "through" so I assume the Venezuelan loan is the mean to let them in not the purpose so I doubt that this meaning of the verb is the one meant in this context
Comment: That's a good find, Anton. It hadn't occurred to me that being 'let in' in that sense was still current, albeit not in quite the sense that Doyle has his character saying it. I think that the sort of 'intransitive' usage that the character usage is outdated but that the 'transitive' one is still around.


I need advice about iscsi + zfs(or ntfs) + windows 2008 clustering

Question: I want to setup a storage farm with iSCSI. I have 2 cluster node machine, 1 iscsi target machine that has 8TB installed as RAID 10. The capacity is now 8TB, but I'll upgrade the capacity in future. Let's say, I installed clusters as file server, and I connected these servers to iscsi target, then I shared 8TB capacity as an only folder to the windows users. Users now see only a folder whose capacity is 8TB. But if I want to add another 8TB to expand the main capacity, the users must not see the second folder for this new 8 TB. The users must see only a folder as before, but this time this folder's capacity expanded to 16TB. And so on, if I add another 8TB, the users must deal with only a folder.
For this purpose, I've learnt that ZFS can expand its size without a problem. So if I use ZFS as a file system on iSCSI luns, how can the cluster machines see the ZFS. Because the cluster machines have windows 2008. Is there another way to expand the size of shared folder without a problem? Does ntfs support it?
Answer: First off I'd say you need to take a step back here and learn the difference between block and file storage. I'm not convinced that you truly understand the difference from the phrasing of your question.
You say that you have an iSCSI target machine and mention ZFS. Is your iSCSI target system running Solaris/OpenSolaris/NexentaOS or BSD? If not then you can't realistically use ZFS. (While FUSE might work I would not depend on it for a server)
As to the Windows 2008 cluster systems seeing a ZFS files system on an iSCSI LUN. Not going to happen. Here is where I don't think you understand the difference between block and file storage, I don't know of any decent sites where you can learn about this, maybe someone else reading this can suggest a good site? Here is a link to a halfway decent article about the difference between block and file storage:
http://findarticles.com/p/articles/mi_m0DUJ/is_12_106/ai_n27577413/
I always visualize the storage in layers, in this case you would most likely have:
1) Disks
2) Raid groups (either a ZFS zpool or a traditional RAID group with a couple of disks)
3) Volume (Think C: in Windows or LVM in Linux)
4) Filesystem (NTFS in Windows, ZFS on Solaris, ext3/4 on Linux)
5) Files.
Depending on the iSCSI target implementation the LUNs could be shared up from raw devices (layer #3) or as large files on a filesystem (Layer #5). A ZFS based target would almost certainly use files residing on the ZFS file system.
When you export the LUNs from the iSCSI target the underlying ZFS filesystem becomes invisible to the Windows systems using it. To them they just see a blank disk initially. Then you simply format the LUN using NTFS and install clustering. That adds the following layers to our diagram:
5) LUN file on target (Great big binary blob)
6) iSCSI target layer
7) Volume (i.e. D:)
8) Filesystem (NTFS)
9) User data files.
I hope I've been somewhat clear :-)
And to address your central issue of extending LUNs that are NTFS formatted. That's pretty simple, basically use the extend command in diskpart and the volume will instantly expand to fill all available space. I do it all the time on iSCSI LUNs shared up from a NetApp. Be aware though that extending the C: drive can be awkward as you have to reboot into WinPE to take the volume offline for a moment to do the extend. Perhaps this is fixed in Windows 2008 though, I haven't tried it there yet... (Definitely not the case in Windows 2003, it needs diskpart in WinPE)
Comment: Actually you can use zfs with iSCSI it's how it works on Solaris.  You create a ZVOL which is then shared via iSCSI.  This shows up as a block device to the iSCSI initiator which can then be formatted with whatever file system you want.  However I'm not sure how this works with a Windows Cluster as NTFS to my knowledge does not have distributed locking and is not a cluster aware/safe file system.  So these iSCSI target LUNS may only be able to be mounted by a single system.
Comment: I should add to that.  Even though your initiator isn't using the zfs file system on the LUN/block device in this case.  You are still using ZFS to manage your storage and LUNs.  So you still get some of the benefits of ZFS.  Such as the flexible pooled storage, checksums, and self healing.
Comment: Yes, that's pretty much as I described it, depending on the implementation the iSCSI LUN could be a zvol or a file.
You do get the underlying flexible pooled storage ability, but zfs checksums don't apply to files stored in a higher level disk format such as NTFS.
NTFS does have distributed locking and is fully cluster aware as long as all the attached systems are running Windows 2008 R2 and are using the Cluster Shared Volumes option. Currently this only works with Hyper-V though so that's not very useful to a lot of people.
Comment: The checksums are still happening on a zvol and on a file backed LUN.  ZFS doesn't know anything about the file or data its storing...a bit is a bit to it.  So it's still there and happening behind the scenes.  NTFS however is just aware of the block device layer that is presented to it.
Comment: I only like to expose block devices to windows machines. Having double filesystems with LUN file targets is just asking for trouble.


Are there computable functions which can't be expressed in Lean?

Question: Lean, unlike e.g. Haskell, makes you prove that recursive definitions of functions will eventually terminate, if the compiler can't do it by using structural recursion, by using decreasing_by or termination_by. Do there exist computable functions which can't be defined in Lean because of this restriction? In other words, are there total functions which are possible to define using the partial keyword but not possible without it?
Answer: Yes. This is always going to be the case because of the halting problem: The set of functions accepted by lean is computable (because lean computes it), so if all halting functions are in the set then the halting problem is computable.
So we know there is a gap, but how big is it? One way to quantify this is to ask how fast the lean-definable functions from nat -> nat grow, by comparison to the busy beaver function which grows faster than every computable function. The answer is that the lean-definable functions grow according to the fast-growing hierarchy up to the proof-theoretic ordinal of ZFC with countably many universes, which is... really big. This is one of those stupendously large countable ordinals which defy all attempts to describe it.
As a result, constructing a counterexample is extremely difficult, other than the ones supplied already by the halting problem. A lean typechecker would be one such example: it is a computable function but lean cannot prove it always halts. On the flip side, this is one way to show that the worst-case asymptotic complexity of lean typechecking is stupendously large.
Comment: The "idealized" Lean has undecidable type-checking, though, so the halting problem doesn't apply. Do we know if we can get more from this fact?
Comment: Small nitpick:  I think this is slightly closer to Rice's theorem than the halting problem.  A specialized version of Rice's theorem states that the set of total computable functions (say from Nat to Nat) is not computable.  (Of course all these results are connected and derivable from the others, and it isn't clear what you mean by "all halting functions".)
Comment: @Pierre-MariePédrot Pick any sound Lean-like formal system which can prove certain functions are total.  (For concreteness, consider functions from Nat to Nat, but this generalizes).  This gives a computable enumeration of all provably total functions in your formal system.  (If type checking loops, or times out depending on the specific formal system, then that code for that function will not be enumerated.)  It is known that you cannot enumerate all total computable functions, so there must be some total functions which are not provably total in such a formal system.
Comment: Edit: my last sentence should state there are "some total *computable* functions which are not provably total".
Comment: @JasonRute you're assuming that type-checking is RE for this, but is it really the case? (It seems reasonable to believe so, but maybe Idealized Lean is more powerful than I thought.)
Comment: @Pierre-MariePédrot Asked in https://proofassistants.stackexchange.com/questions/1843/is-type-checking-in-ideal-lean-computably-enumerable
Answer: Since Lean programs always terminate, it cannot be Turing-complete. In particular, one specific computable-but-not-Lean-computable problem is the problem of evaluating computable Lean expressions (i.e. given the representation of an expression of type nat, output the natural number corresponding to the evaluation of the expression).
You cannot write a Lean function that interprets Lean, assuming Lean is consistent, because then using standard diagonalization techniques (e.g. see the halting problem), we could write a Lean program that checks what it is supposed to output itself and outputs something different.
Another point of view: If you tried to write this program, you would eventually run into a termination_by goal that you couldn't prove. Proving this goal amounts to proving the consistency of Lean. By Godel's second incompleteness theorem, this is impossible.
This is not specific to Lean, but holds for any theorem prover under mild conditions.
Comment: Your first sentence is slightly inaccurate. Simply-typed lambda calculus with intersection types contains exactly the strongly normalizing terms of untyped lambda calculus, and thus can decide any decidable set, thus is Turing complete.
Comment: Of course, it is actually not very defined what "Turing complete" means for anything that is not a Turing machine. For these things we need to agree on an encoding beforehand, otherwise we can hide all the work in the encoding function and cheat.
Comment: @Trebor: I belive the exact statement is that a programming language with semidecidable set of valid expressions denoting only total functions $\mathbb{N} \to \mathbb{N}$ does not denote all of them. Which of these assumptions is broken by the $\lambda$-calculus with intersection types? I worry that $(\lambda x . x x)$ can be typed with intersection types.
Comment: $\lambda x.xx : \sigma \cap (\sigma \to \tau) \to \tau$ can be typed alright. Intersection type breaks decidability (but I don't think it is not semidecidable: Given that the input is strongly normalizing the type is computable).
Answer: There are a few subtleties that should be clarified.  Lean is both a theorem prover and a programming language.  As a theorem prover, it is accepted in Lean to use the axiom of choice.  If one uses the axiom of choice, then one can actually define every total computable function in Lean:
Prove there are countably many total computable functions and there is an enumeration of them.  Then one can define nth_total_computable_function (n : Nat) : Nat -> Nat using the axiom of choice and define any particular total computable function via nth_total_computable_function.
Of course these definitions are not executable in Lean, and Lean won't let you run them.  So you likely mean to ask about the functions which Lean marks as computable (which should be any function not defined using axioms, as well as some which use axioms, but only to prove propositions).  For that, the other answers give you the basic flavor.


Excluding facts having unrelated dimensions

Question: In my Analysis Service OLAP Cube I would like to exclude facts having unrelated dimensions, which during processing produce errors. I would also like to avoid making Named Queries in Data Source View (with specific WHERE conditions).
Is there any way to do this at the level of a cube?
What is the easiest way to accomplish this?
(I am using Visual Studio 2008 and SQL Server 2008.)
Answer: If the "UnknownMember" propery of the dimension is set to "None" then the non-joined facts should be excluded automatically.
Ideally you should follow a methodology to deal with data like this, I go for the Kimball method, where you have an artificial row in your dimension table named 'Unknown' or 'Bad Data' or some such. Then, during the data warehouse load ETL, any data that doesn't match, convert that key to a key to the artificial row.
Do you have a data warehouse, or are you processing direct from the source system? What sort of data does not match up like this? Any more detail you could give is helpful.


Reducing spice in sauce

Question: How do you make already prepared sauce less spicy? I must have used too many hot chili peppers or cooked them too long. Is there something to off set it from being so hot? The sauce is for General Tso's Chicken
Answer: There is no robust way to do this in the general case, other than to create  second batch with no additional hot peppers (or a reduced quantity), and combine them.  Of course, then you will have twice as much product.
In some cases, adding a masking agent like sour cream or cheese, which tame the effect of the spiciness may help, but those methods would be very odd with a Chinese dish.
Depending on the degree to which you have over-spiced your sauce, simply using it more sparingly may help.   Traditionally, Chinese food is not swimming in sauce in any case.

Reducing spice in sauce


Methods to detect errors in cache

Question: Are there methods apart from ECC, to detect and possibly correct cache errors?
Answer: Modern processors don't have ECC. However they do have about the same error rate:

A modern 7500 Xeon with 24MB of L3 cache has about 0.2 or 0.2 error per year.
250GB of DRAM would have about 0.02 to 0.2 errors per year
Source

Physical construction of the memory cells and number of transistors has a lot to do with it. Computers that are lower in elevation or shielded from radiation experience less errors.
In a computer system if more redundancy is needed, there are fault tolerant algorithms that can can be run in software to check code multiple times to ensure that no errors have occurred in the hardware. For example, if there is a calculation, you could run it three times and then store it, the values are then checked to see if the result is correct.   See Fault tolerant computer system
Answer: Since ECC is such a broad term, the answer would have to be "no". Anything that did what you are describing would have to be called an ECC.
Are you asking whether there are ECC codes other than Hamming codes? The answer is yes, there are many different forms of ECC that are optimized for different purposes and expected level of raw error rates.

Methods to detect errors in cache


I Want to integrate sms module on checkout

Question: I have purchased my desired sms API and i have also written the code for that just need to invoke my code on checkout button how can you help me.
Looking for a quick and easy solution
Thanks
Comment: When do you want to trigger the sms?
Comment: when user click on checkout button to place order
Comment: Create a ajax function on click of the function & in controller function you can write your action to do.
Comment: i am new in magento so can you please guide in which file i have to add..
Comment: easy solution is to purchase the readymade extension https://magecomp.com/magento-sms-notification.html
Answer: In app/code/My/Module/etc/frontend/events.xml:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="checkout_onepage_controller_success_action">
    <observer name="mymodule_controller_success_action" instance="My\Module\Observer\MyObserver"  />
</event>

In app/code/My/Module/Observer/MyObserver.php
<?php
namespace My\Module\Observer;
use Magento\Framework\Event\ObserverInterface;
class MyObserver implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
       //Write your sms code here           $order = $observer->getEvent()->getOrder(); //Get order from event observer
        $order_id = $order->getID(); //Get order ID from order
        $order_number = $order->getIncrementId(); //Get order increment ID from order
        $customerId = $order->getCustomerId(); //Get customer ID from order
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $customer = $objectManager->create('Magento\Customer\Model\Customer')->load($customerId);
        $name = $customer->getName(); //customer name
    }
}
?>

Comment: can you tell me how to get information like order id customer phone number etc...
Answer: Isn't it safer to do what you have to do after success ordering or even after receiving payment?
I mean in success.phtml or with an observer when order status changes to i.e. Invoiced.
Comment: i want  to sms on successful order placement
Answer: Simply use this extension http://ext.topmage.com/Hacky_Smsnotifications.html to trigger SMS while place order, invoice, shipment etc. Its free and opensource and easy to customize (add new events for SMS).
You will only needed API details from SMS subscribing company.
Answer: I have create a module for telenor sms api.
It will send an sms to the customer when place an order.
you can Download the module Here


Is there research regarding the link between Chinese tones and musical intervals?

Question: I am using a spectrogram to find the frequency contours in Hz of the different tones that are present in Chinese, and trying to compare this to musical intervals to see if there is actually a musical element to tone. Is anyone aware of similar research that has been done?
Comment: Can you elaborate? Tones in Chinese (and other tonal languages) are about pitch contours, not specific tone heights. The latter will vary greatly between speakers and it would never work for a naturally evolved language. If you mean the acoustic properties of tones, pitch in particular, there are stacks of books written on the subject and countless papers.
Comment: The harmony is very important for the music, so the words in a lyric are carefully chosen to match the tone of the music, especially at the ending of a segment/interval. However, if no suitable word, sometimes the pronunciation of the word or its tone will be modified/changed slightly to match the tone of the music. So, the tone of music influences the tone of a word in the lyric, not the other way around.
Comment: @OlleLinge, I do mean the acoustic properties of tones, but specifically the musical intervals that are created between the different pitches that are present in any given tone. For example: a fourth tone starts high and ends low. The ratio between the frequency of the highest part and that of the lowest part are likely to be rather consistent among different speakers, even if one speaker has a higher or lower speaking voice. This ratio is what is called "interval" in music.
Comment: Thank you for the clarification; my knowledge about music terminology is terrible, and it's sometimes hard to know which words have a specific meaning and usage in an unfamiliar field!
Answer: 五度标记法 (five level tone mark, labeled 1, 2, 3, 4, 5, roughly do re mi fa so)is similar to intervals. It was invented by Zhao Yuanren in the 1920s. It's considered inaccurate, but almost always, at least in Chinese-written books, used to describe 调值 (the0 tone values) of the Chinese languages, and other languages in China that has a tone, like Yi, Hmong, Lhasa Tibetan, Zhuang and etc. In fact, it's the main tool that Chinese scholars used to describe 调值 for any tonal language if they do not want to go into much detail. Since 五度标记法 is not accurate but used as a standard, if it's a book dedicating to the phonetics and phonology of a language, the common practice is to use 五度标记法 to describe it first, then raise issues, and describe it using some other tools. One tool I particularly like is 分域四度制 (《语音学》朱晓农). Another commonly used tool is polynomials. For other purposes, 五度标记法 usually suffices.
Again, as 五度标记法 is not accurate, there are not many research dedicated to it. But rather it's widely used, so you can find chapters of it in many books, like 《语音学教程》林焘 王理嘉. Here are some applicable examples.
普通话 (Standard Mandarin) has 4 tones. Tone 1 is called 阴平, with 调值 55. It's often written as superscript, as [ma55]. Tone 2, 阳平, 35. Tone 3, 上声, 214. Tone 4, 去声, 51.  《现代汉语》北京大学中文系现代汉语教研室.
香港话 (Hong Kong Cantonese) has 9 tones. 阴平 53 or 55, 阳平 21 or 11, 阴上 35, 阳上 13, 阴去 33, 阳去 22, 阴入 5, 中入 3, 阳入 2. 《粤语(香港话)教程》
彝语诺苏话 (Nuosu Yi) has 4 tones. Tone1 55, Tone2 34, Tone3 33, Tone4 21. 《凉山彝语语音概论》
To use 五度标记法 correctly, one needs to know that 1)the intervals between levels are equal, with no step, half-step distinction. Thus the intervals 2-1=3-2=4-3=5-4. 2)it describes the frequencies of ONE person speaking ONE language. 1 is a relative lowest level for ONE person speaking ONE language. So my 55 is different to yours when speaking Standard Mandarin, and my 55's are different when speaking Standard Mandarin and Hong Kong Cantonese.
I once calculated my tone values for my dialect of Chinese. (To calculate the tone values for a language/dialect, you need to take averages on many people) The highest frequency is 374Hz, and lowest is 164Hz. Then take logs on frequencies, we have 2.573 and 2.215. Then divide the region into five equal bands: 2.215-2.286, 2.286-2.358, 2.358-2.430, 2.430-2.501, 2.501-2.573, labeled 1、2、3、4、5. For borderline values, we need to look case by case according to what it feels like and the values of neighboring tones. My testing results are 阴平 23, 阳平, 21, 上声 41, 去声, 212, for a Sub-dialect under Chengyu Region of Southwestern Mandarin.

Traditionally, Chinese music is 依字行腔, that is we sing along the tonal contour. However, modern Mandarin pop music doesn't completely follow this. We sometimes see violations. But at least, composers try to avoid obvious differences, like a rising melody with Tone 4. This is to avoid confusion for listeners. Confusion is obvious for translated pieces, especial in musicals. If you're interested, there's an excellent video, in Chinese, discussion the Chinese version of French musical Romeo and Juliet https://www.bilibili.com/video/BV1G44y1u7HW. They also published a paper: Guo. F., Zhang, C., Zhang, Z., He, Q., Zhang, K., Xie, J., Boyd-Graber, J., 2022.
Automatic Song Translation for Tonal Languages.
https://doi.org/10.48550/arXiv.2203.13420.
Cantonese pop requires a stricter match of melodies and tones. For example, the lines 3 0624700 of 《数字人生》reads the same as it sings.
If you search 依字行腔 in cnki, there are tons of papers. For example, 京剧唱腔中的腔词关系——对"依字行腔"原则的剖析, 从一字一音到依字行腔以及汤、沈之争,浅析民族声乐作品《孟姜女》的演唱技巧.
There's also a book chapter Tone and music processing in Chinese in The Routledge Handbook of Chinese Applied Linguistics https://www.taylorfrancis.com/chapters/edit/10.4324/9781315625157-43/tone-music-processing-chinese-caicai-zhang. I haven't read it, but the title suggests high relevance.

RESPONSE TO COMMENTS
The answer is no.
In music, we divide an octave into 12 half-steps, and each amounts to 100 cents. This makes the relative intervals fixed. But in Chinese tone values, we divide the full used pitch range into 5 bands (taking logs converts frequencies to cents https://en.wikipedia.org/wiki/Cent_(music). The base doesn't matter for a relative relationship). Here are two issues,

The used pitch range for a person in a language is not fixed, which makes the difference in levels 1 and 2 not 200 cents, but rather arbitrary. Take my frequencies for my dialect. The highest is 374Hz, or roughly F#4 (A4=440Hz). The lowest is 164Hz, or roughly E3. This is more than an octave, but still we label it from 1 to 5. My level one corresponds roughly to E3~G3.

The music note is a point, fluctuating for more than 1 cent is detectable by human ears. But the level for tone values is a band. If we migrate this to music, it would be that any frequency between C4 and D4 is considered as a do, which is not the practice in music.

These being said, most people who are learning a new dialect by textbook take do re me fa so as approximation. This usually suffices.
Comment: Wow! As always what a fantastic answer. So much to chew on. I'm quite lost when you start talking about log frequencies, though, which isunfortunate because I have a feeling that is where the real answer to my question lies. Do you think there is enough consistency in tone to relate a tone to a musical interval? I don't mean absolute pitch, because of course some speakers have higher or lower voices. But do you think you could make the case that a second tone in putonghua is actually a slide up the interval of a perfect fourth?
Comment: @BuddyL See my updates.


How to find list of curated datasets

Question: How does one find a list of all curated datasets in Mathematica?  For instance, I was seeking representative reflection spectra of various types of fruit, and searched through the entity foods, but could not find any spectra.  I tried natural language input, but failed, not knowing whether my query was wrong or the dataset did not exist.  Likewise for atomic spectra and several other possible datasets, such as fine art paintings, automobiles, and so forth.  Is there any way besides hunting through EntityValues[]?
Answer: I think EntityValue is more or less it, so this is not really an answer. However, I sometimes find fooling around with InputForm and the natural language interface useful. Here is an example.
I give InputForm that the argument the natural language interface returns after I type in the string "art paintings" and I get

That tells me something about how I should do queries on famous paintings.
This is helpful when it works, but it doesn't always. I find the natural language interface quirky and using it can often be frustrating.
Comment: Thanks for the up-vote. I didn't expect an acceptance. This answer only offers a crutch, not a cure. I don't think there is a cure. The issue you are raising is one of several that contribute to making it a pain to use curated data.
Comment: Thanks.  I find the natural language interface occasionally useful when I've forgotten an obscure syntax, enter the natural language query and receive the *Mathematica* function call.  As for curated databases...  Suppose I wanted the optical reflectance spectrum of human skin.  How would I search, and how would I know that (apparently) this is *not* in any curated databases?  So +1 for you (but still no check).

How to find list of curated datasets


Proving the non-derivability of formula using the of the kripke model

Question: I try proving the non-derivability of $(p\to q) \to \lnot p \lor q$, using the of the kripke model. I tried using different combinations of $Wi$, but I get fail.
Answer: You need a world $w_1$ where $(p\to q)\to(\neg p \lor q)$ is not satisfied. In other words $w_2$ needs to have at least one successor $w_2$ that satisfies $p\to q$ but neither $\neg p$ nor $q$.
The way for $w_2$ not to satisfy $\neg p\equiv p\to \bot$ is for it to have a successor $w_3$ that satisfies $p$ but not $\bot$. This is true if only $p$ is true in $w_3$. On the other hand, since $w_2$ must satisfy $p\to q$, we must then also have that $q$ is true in $w_3$.
This suggests a Kripke frame with three worlds $w_1<w_2<w_3$ where $w_3$ asserts both $p$ and $q$, but $w_1$ and $w_2$ assert neither.
(Actually $w_1$ is superfluous here; we can take $w_1=w_2$ instead).
Comment: thank you for the wonderful response.
Answer: I think that

$$w_o \to w_1 : p,q$$

will suffice.
Consider : $p \rightarrow q$.
We have that $V(p,w_1)=1=V(q,w_1)$; thus, it is true that :

if $V(p,w)$ then $V(q, w')$ for every $w' \ge w$,

i.e. $w_0 \Vdash p \rightarrow q$.
But $V(\lnot p, w_0)=0$, because $V(\lnot p, w)=1$ iff $V(p, w')=0$ for all $w' \ge w$, and $V(q, w_0)=0$.
Thus, $V(\lnot p \lor q, w_0)=max (V(\lnot p,w_0), V(q,w_0))=0$; thus :

$w_0 \nVdash \lnot p \lor q$.
Comment: thanks for a great answer.


Meaning of incentive

Question: In the table published at this U.S. Postal Service Website, USPS compares different service classes in different aspects. One aspect is called "incentive". I wonder what it means? From Google, I guess it may mean "A payment or concession to stimulate greater output or investment", but this meaning doesn't explain the aspect in the USPS table well to me.
Comment: The only definition I could find that made sense was this "an additional payment made to employees as a means of increasing production". If all have incentive, though, what's the point of it? How is it "additional"? I'm eager to see other's input.
Comment: The basic incentive is monthly or annual salary or hourly wage. The additional incentive is something akin to a tip (gratuity) for a waiter or waitress, a bellhop, etc., a commission for a salesperson, or, as I just read in a paper about teaching university classes in Taiwan in English instead of in Chinese, a 30-50% higher teaching fee per English-taught course.
Comment: I think it just means there are incentive programs available to encourage commercial mailers to use all of those classes of mail. See these links: https://www.usps.com/mobile-barcode/pdf/incentive-programs-enrollment-guide.pdf and http://www.piworld.com/article/usps-releases-details-summer-s-mobile-marketing-incentive-program/1
Comment: @JLG: Does "incentive" mean that the unit price will be lower, if a mailer mails a lot of mails?
Comment: Yes, I think they get some sort of discount if they enroll in the programs. It doesn't seem to apply to residential customers.
Comment: The more I investigated this, the more I've become convinced that this really isn't much of an English question. I went ahead and summarized my findings in an answer, but I'm also casting a vote to close as too localized.
Answer: It refers to discounts applied for certain classes of customer participation, be it volume or voluntary technological compliance (USPS barcode labelling, etc.)
Comment: That's how Old Thrashbarg got to know! :)
Comment: @asymptotically: What does "thrashbarg" mean? Same question for "Old Thrashbarg"?
Comment: @Tim In "Mostly Harmless," Old Thrashbarg is a fake sage who claims that he has been sent to the world by a mighty "Bob," and all that he knows was told to hi by Bob.
Answer: Generically, the USPS defines "incentive programs" to mean:

Incentive Programs allow customers to participate in marketing campaigns offered by the USPS®. Customers can register for these events and qualify for incentives available for certain products offered by USPS. Conditions and terms will vary.

That said, after looking through the links provided in JLG's comments, browsing some USPS websites, and talking to my cousin last night (who works for the USPS), I can't find any incentive program other than the one that gives a 2% discount if registered business customers use barcodes on their mailings.  (Intuitively, such a discount would make sense, as the barcodes would reduce USPS labor costs by allowing the envelopes to be sorted via automation, rather than by hand.)
However, a USPS website says:

The 2012 Mobile Commerce and Personalization Promotion will provide business mailers with an upfront 2% postage discount on Standard Mail® and First-Class Mail® letters, flats, and cards (presort and automation only) that include a two-dimensional (2-D) barcode or print/mobile technology that can be read or scanned by a mobile device.
Similar to last year's Mobile Barcode promotion; this promotion focuses on the integration of mobile technologies with direct mail as a means of reinforcing mail's continuing relevance as a marketing channel. The 2012 promotion specifies that barcode or similar technology must lead the recipient directly to either: (1) a webpage that allows the recipient to purchase a product or service on a mobile device, or (2) a personalized URL, which leads to a web page that is unique to an individual recipient. Best practices such as directional copy and mobile optimization are also required.

Stamps.com mentions up to four ways an envelope can be barcoded:

but I'm not sure if any of those barcodes would lead someone to "a webpage that allows the recipient to purchase a product or service on a mobile device, or a personalized URL, which leads to a web page that is unique to an individual recipient," causing me to wonder if any of those barcode(s) would qualify a registered business customer for the discount.
I don't believe any volume discount applies when referring to "incentives" in this context.  The USPS does offer bulk mailing rates, but I don't think that falls under "incentives" in the table at the O.P.'s website.
Moreover, incentive programs don't seem to be run year-round; the one mentioned above ends at the end of August 2012.

Meaning of incentive


How do I preview a template?

Question: I wish to edit a template that is frequently used. How do I preview it so I don't have to publish in order to view the results?
Answer: From Wikipedia:Template_sandbox_and_test_cases
You should use a sandbox for testing templates:

Templates are a very powerful feature of the MediaWiki software used for Wikipedia, but mistakes can be easily made, even by experienced users. Complex templates should therefore be accompanied by sandboxes and test cases to prevent bugs. Temporary sandboxes X1-X20 or the Template Sandbox may be useful places to try new experiments or for users new to template development.

Have a look at How to create /sandbox and /testcases subpages (or the next subtitle for updating existing /sandbox and /testcases) - I'm intentionally not copying and quoting the method described to here, since it can cause more un-updated content.
It would be better to stick to the main article on that topic and check the current working method for the time of creating/updating templates.

How do I preview a template?


Covariant derivative, directional derivative, and curvature tensor

Question: I'm confused about how to connect those three things together, so hopefully the question doesn't end up vague. The main problem is understanding how the curvature tensor is a commutator of covariant derivatives. As far as I understand, to take derivatives, we need to compare two vectors that are, generally speaking, elements of two different tangent spaces. The way to do that is by parallel transporting from one point to another. A related problem is that I don't understand exactly how the "connection coefficients" do that. How do they "move the vector (field)" from one point to another? And how is the path-dependence of this movement/transport encoded in the connection coefficients? Shouldn't it be?
In turn, I don't understand how the covariant derivative itself encodes the path dependence of the transport process, since transporting along different paths generally yields different vectors. The directional derivative, on the other hand, seems to incorporate this path-dependence by specifying the trajectory along which we take the derivative of the vector field. I understand the covariant and directional derivative are very closely related, but I don't understand how to use one of them, or which one to use, to arrive at the curvature tensor.
Answer: Consider a manifold $\mathcal M$.
A parallel transport on $\mathcal M$ sends each path $\gamma:[a,b]\to \mathcal M$ to a linear map $\operatorname{Pt}_\gamma: T_a \mathcal M \to T_b\mathcal M$. With the right axioms (smoothness, locality, etc), we can show that this is given by the solutions of a first order linear equation :
$$\dot \gamma^\mu\nabla_\mu X^\nu = 0 \tag1$$
The connection $\nabla_\nu$ (or covariant derivative) is related to the parallel transport in the following way : if $X^\nu(t)$ is a solution of $(1)$ then $\operatorname{Pt}_\gamma(X(a)) = X(b)$.
We can also show that, in coordinates, there exists Christoffel symbols (or connection coefficient), so that :
$$\nabla_\mu X^\nu = \partial_\mu X^\nu  + \Gamma_{\mu\rho}^\nu X^\rho \tag{2}$$

How do the connection coefficients "move the vector (field)" from one point to another ?

They do this by allowing us to write the parallel transport equation $(1)$, whose solution parallel transports vectors from one tangent space to another along a path.

And how is the path-dependence of this movement/transport encoded in the connection coefficients?

Path-dependence does not appear in the connection coefficients. They are purely local and have other uses beside parallel transport of vectors along curves.
The path-dependence of parallel transport appears in equation $(1)$. In full form, it reads :
$$\frac{\text dX^\mu}{\text d\lambda} (\lambda) + \Gamma^\mu_{\nu\rho}(\gamma(\lambda)) \dot \gamma^\nu(\lambda) X^\rho(\lambda) = 0 \tag3$$
where $\lambda$ is the parameter along the path $\gamma$.

The directional derivative, on the other hand, seems to incorporate this path-dependence by specifying the trajectory along which we take the derivative of the vector field.

I am not sure what you mean by "directional derivative". The usual directional derivative from flat space, $X^\mu\partial_\mu Y^\nu$, is not a tensor. It can be generalized by the covariant derivative $X^\nu \nabla_\nu X^\mu$ or by the Lie derivative $ (\mathcal L_X Y)^\mu = [X,Y]^\mu = X^\nu \partial_\nu  Y^\mu - X^\nu \partial_\nu X^\mu$. The latter is not related to connections or parallel transport.
Edit : Covariant derivatives
Given a function $f$ on a manifold, we can define its differential $\partial_\mu f$ (or $\text d f$ in index-free notation). As this expression is covariant, it defines a $(0,1)$ tensor (ie a $1$-form). Given a vector field, $X^\mu$, we can define the directional derivative (in the direction of $X$) as $X^\mu\partial_\mu f$ (or $X(f) = \text df (X)$ in index-free notation).

The second question is what's the difference between $\nabla_\mu V^\nu$ and $X^\mu \nabla_\mu V^\nu$ ?

This is the same difference : the first is like a "differential" (in that it has a new covariant index), while the second is like a "directional derivative" (in that this index is contracted with the direction in which we are differentiating).
Now, we wish to do the same for vectors. We want a way to differentiate a vector field $Y^\nu$, giving a $(1,1)$ tensor $\nabla_\mu Y^\nu$, which we could then contract with some $X^\mu$ to get the (covariant) directional derivatives $X^\mu \nabla_\mu Y^\nu$.
In coordinates, we can always use the same expressions from flat space, using the partial derivatives $\partial_\mu$. However, this is not covariant : $\partial_\mu Y^\nu$ is not a tensor.
It turns out that there are always ways to do this but (on a general manifold), no canonical way to do it : we need to add some new structure. A covariant derivative is an operator which does exactly that : it takes a vector field $Y^\nu$ to a $(1,1)$ tensor field $\nabla_\mu Y^\nu$ (and satisfies the Leibniz rule).
In coordinates, specifying a covariant derivative is the same as giving connection coefficients $(2)$ which transform in the right way when changing coordinates.

If the connection coefficients don't describe path dependence and are local, then what do they describe/quantify?

In short, the connection coefficient give us a way to differentiate vector fields.
Then, once we can do this, we can make sense of the sentence "the vector field $Y$ is constant along the path $\gamma$" (ie it is parallel transported). The equation transcribing this statement is $(1)$ (or $(3)$). It depends on the path $\gamma$ and on the covariant derivative we chose.
In general, there are many different connections on a manifold. However, if we have a (pseudo-)Riemaniann metric, there is a canonical way to construct a connection from it, the Levi-Civita connection.
Comment: I have two questions. If the connection coefficients don't describe path dependence and are local, then what do they describe/quantify?
The second question is what's the difference between $\nabla_\mu V^\nu$ and $x^\mu \nabla_\mu V^\nu$?
And, yes, I did mean the generalization of the directional derivative by the covariant derivative, even though I'm now confused by what they both mean.
Comment: The connection coefficients and the covariant derivative only give you the infinitesimal change of the transported vector in one location. One still has to integrate this along the chosen path. This is where the path dependence comes in.
Comment: @QuantumAI I don't merely mean to reduce this to words and dispense with the actual mathematics, but how accurate is the following? $x^\mu \nabla_\mu V^\nu$ is the infinitesimal change in $V$ at a point along a curve with tangent $x^\mu$
Comment: And the covariant derivative $\nabla_\mu V^\nu$ measures the infinitesimal change of V at some location in space. Therefore, successive application of the covariant derivative corresponds to measuring how $V$ changes along a given coordinate and then along the second coordinate. And the noncommutativity is what characterizes curvature. Is that a fair summary?


how does electronic conductance of a metal change with density?

Question: The electronic conductance of a metal depends on its density.Does this mean that if we increase the density of the metal,its electronic conductance will increase?How does it happen?
Answer: You cannot change the density of a metal without also changing other properties.
Brass is a mixture of several elements. It can have different densities depending on the mixture of the elements. I haven't researched it, but the electronic conductance would likely be different for each type of brass.
Do you have a source for your statement?

The electronic conductance of a metal depends on its density.
Comment: It's given in a reference book of chemistry.
Comment: @user47568 I'd be curious what the book is. On the one hand, I can imagine that making a less dense metal (i.e., adding impurities, voids, filling with air, etc.) would likely create a less conductive material, I don't think compressing a metal and increasing the density necessarily makes a more conductive material. Maybe this is true in some cases, but recent experiments and quantum calculations have shown complicated effects with high pressure materials.


What level of enchantment gives me the best chance for Aqua Affinity or Respiration?

Question: As I understand it, dumping 30 levels into a Diamond Helmet actually gives me a non-optimal chance to get Aqua Affinity or Respiration specifically. Assuming I'm not mistaken, what level of enchantment should I be applying to maximize my chances of receiving these specific enchantments?
Answer: Actually, you are mistaken. I have run 1 million enchantments for each level from 1 to 30 and counted the number of times I got each particular enchantment. Here are the results for diamond helmet:

You can clearly see that 30 level enchanting gives the maximum chance of getting Respiration or Aqua Affinity.
Running the same test for a golden helmet (which has better enchantability) gives almost the same picture - Aqua affinity actually peaks on level 28, but Respiration III is rising significantly on levels 29 and 30, so still a better strategy is to enchant on level 30:

Here is the raw data including all diamond helmet enchantments if you'd like to play around with it. I have used MCP 9.03 (Minecraft 1.7.2) to generate the results, but I'm not aware of any changes in the enchantment probabilities since then. Even in the upcoming 1.8 where the enchanting mechanic is changed, the probabilities and enchantment selection were not changed (according to Jeb). It is possible however that the enchanting will be revisited once more before the final 1.8 release.
I guess I could include the book enchantment probabilities for completeness, but they are lower than the helmet ones by an order of magnitude:
Comment: @poepje I didn't do this manually, I used [Mod Coder Pack](http://mcp.ocean-labs.de/) to decompile the game and wrote a Java program that invokes the enchanting code. The method I used is mentioned in the answer. But the thought of me sitting in front of stacks of anvils, filling tens of thousands of double chests of helmets and then counting the enchantments made me giggle, so thanks :)
Comment: Holy SCIENCE batman!
Comment: So you spent weeks on running the same enchantment over and over again? Quite unlikely you did.
Comment: @Kcats Oh sorry, I didn't know that was possible. While I'm at it though, I still don't understand how this works completely. I've tried to enchant a bunch of different armors and weapons at and around lvl30, yet I ALWAYS get the exact same basic enchantments. As for (iron/gold) helmets, not once did I get anything different than protection I and blast protection I. Do you know how this can happen?
Comment: @poepje It is pretty much impossible to get Protection I on level 30. If you are getting Protection I and Blast Protection I, you are probably doing a low level enchanting. Are you sure you are pressing the button for level 30 (the lowest of the three) and that you have the required 15 bookshelves?
Comment: @Kcats Ehh no, I don't have bookshelves and honestly didn't know they were required... I then assume you ran the tests with bookshelves?
Answer: Well I'm not to sure, but you could try enchanting a book to level 30. As far as I know books are much more enchantable than armour. Or you could just enchant a gold helmet which is more enchantable than books.
Hope it helps...
P.S. You also might want to check on the Minecraft Forums.
Comment: More "Enchantable"?
Comment: @peper757 The item material has effect on the enchantment probabilities, gold being the 'most enchantable' material


TFPT unshelve & Migrate: What is the Base version for merging?

Question: I am trying to use tfpt unshelve /migrate to unshelve my shelveset on to a different branch.  When it does the unshelve, it also attempts to merge the file with the file in the target branch.  I do not understand where its getting the base version of this file.  Can anyone tell me what version is base?
Answer: According to this post, it is a baseless merge:
http://blogs.msdn.com/b/mohamedg/archive/2009/04/30/how-to-move-a-shelveset-to-another-branch.aspx
Answer: I never really found an answer to this, so i'm just left with my guess:
tfpt looks at the different versions of the file and constructs (in memory only) a 'base version' of the file.  In some cases, perhaps this works well, but for me it did not work at all.  I was unable to use it for merge and migrate.


Why are pianists taught to play in "positions"

Question: I am doing a piano course and am currently about 90% of the way to the end. In the beginning of the course they teach C position, D position and G position in both main octaves and then later it extends to other positions. In the beginning pretty much all the melodies you play stay within a 5 note range and then later on you do pinky stretches and thumb stretches until, towards the end of the course, it really seems that there are no positions because the hand is moving around so much. So my question, is why do they teach you these positions when in most songs, the melody will never stay in such a small range. Is playing in a "position" just a beginners thing? Or do advanced players use positions?
Comment: I was never taught positions :o
Comment: Yeah not all piano players are taught positions. I've never even heard of that before. Seems to me like it would not be the best teaching method for all students and types of music.
Comment: @ToddWilcox I was just taught to view the upcoming group of notes and space your fingers for best convenience with them and so you can properly walk your fingers if you need your hand to move. It was one of the most convenient things I found about piano compared to something like the violin where it you actually need to know the position you are in since there are no visual markers on the instrument and it can be very unclear what position is most convenient from looking at the sheet music.
Answer: It sounds like you are learning "five-finger position." It depends on the passage, but you could extend out with fingers 1 or 5...

There are also basic positions for playing chords with your fingers spaced out. Eventually you learn techniques for changing between positions. This uses a few positions...

...first a chord position on C, then a five-finger portion that would conceptually be on F, then another five-finger position on G.
Comment: yes 5 finger positions but in the later part of the course, the changes seem void because the fingers don't really correlate with the positions I learned instead serve to make the song more comfortable to play.. that is why I ask myself, if the positions are really necessary, or should you look at each phrase for what it is and work your fingers so they can get to all notes as easily as possible?
Comment: You can't play complex pieces just by working your fingers, you will need to use your wrist and arms too, and that is where positions come in.
Comment: @armani - we have to start somewhere, and simplicity is usually key. Once the five fingers over five notes is embedded, the next stage is needed. And so on.
Comment: @armani, "...serve to make the song more comfortable to play..." in a nutshell that is the goal of good fingerings. I would say it's common for the hand to change position as frequently as once every beat or two beats. The result may seem to never be in a position, because it's constantly in flux. Please post a specific example of fingering/position you don't understand.
Answer: Positions are a way of orienting yourself on the keyboard.
With increasing range, you simply need to switch between positions. But at any given point in time, you will still be playing with a position and need to know how that position works.
(Am bassist but we basically have the same problem.)
Comment: I would also add that the C and G notes are used the most often, and it gives a basic layout of the keyboard. Another reason would be to make it easier to learn transposition, later on, **_and_** it helps learn scales.
Comment: @10Rep - that's a doubtful statement - all 3 parts of it!
Answer: I never learned "positions."  I did learn fingering.  I believe they serve the same purpose.  They strive to teach you habits that you will need for more complex songs.
At a lower level, you can be quite inefficient with your fingering choices and still make music.  The songs are simple enough for that.  As you progress, the songs get more complex.  Eventually they start pushing the physical limits of what the human body can do.  If you are being inefficient with your fingering, you simply wont be able to hit the notes you need to hit (or at least not with the tone quality and precision needed to sound great).
Of course, we can't start on songs that demonstrate this complexity.  We need to start simple.  So every piano course I am aware of has some constraint that they apply to force you to do the "right" fingering.  I put "right" in quotes, of course, because there often isn't a "right" fingering.  But what you do have is a fingering which the developers of the curriculum found were effective in teaching the habits that you are going to want to have later on.
And, on one day, it will indeed matter, like this delightful little message found in Jon Schmidt's All of Me:

Comment: And, if there was any question as to whether the concept of "positions" is sacrosanct, 2:18 in the linked video should dispel any rumors.
Answer: position is a mean for trans-position!
E.g.: block chords, motifs, passages etc.
Mind how often we have to play an imitation of the subject from another degree like the dux and comes in a fugue. In all such cases of imitation or development of a figuration you are very comfort to know the positions.It also helps to analyze and  memorize a piece. You just realize this is the imitation of the theme on another tone or degree, e.g. diatonic transposition, and you don't read and mind the single notes but the whole figure and pattern recognizing the interval of transposition and sequenzes.
Answer: I guess, the idea is to accustom the student to choosing efficient fingerings for a melody. I've never been taught the concept of positions, but I've been taught to choose my fingering in a way that

prefers positioning fingers on adjacent diatonic notes

avoids any jumps (sometimes not possible, techniques for changing position are helpful here)

moves the hand around the least amount possible.

If you play by these rules, you'll quickly realize that you are doing exactly what you've been taught by doing positions. With the only difference that you've only been taught the results, not the principles. (I'm thankful to my teachers that they taught me the principles, for they can be applied in a much broader way without needing to remember so much.)
Answer: I was taught classical piano in Poland - and we have no notion of "positions" you speak of, nor any tradition of teaching them (that's the first time I hear about them). Pianists are expected to play scales and passages (there are separate exams for that) using the established fingering, but there's no "fingering theory" at any stage.
Probably the rules are learned through osmosis - and in real pieces they would be MUCH more complex than what you are describing. The only two pieces of "theory" I recall is: "try avoid 1 and 5 on black keys", "use whatever the book suggests". At later stages, when working with harder pieces, finding the best possible fingering is considered a part of student's work - each hand is a bit different and sometimes finding the "right" fingering makes a tricky passage playable.
Comment: Your 2nd sentence sounds like something rather unnecessary - why would it be best for every pianist to adhere to the established fingering? Which I presume for the exam would be written verbatim.
Comment: @TIm Well, that's how it was. The "Scales and Arpeggios" (http://www.antykwariatlibra.pl/shop/nuty-1/gamy-i-pasaze-na-fortepian-1-ukosnik-30488-ukosnik)  was THE bible with THE only approved fingerings.  Poland was a communist state back then - there was a SINGLE, national music publisher, publishing countless editions of the same book for the single ministry-approved curriculum (and state-mandated piano exams). I didn't even realize that other fingerings were possible :)
Comment: @Tim: By the way: it was the same with the theory of music. There was a single, authoritative book on harmony - two volumes by Kazimierz Sikorski (author of the original orchestration of our national anthem, btw). Since 1948 there were over 20 editions of the book (and there were no other books on the topic, due to there not being any non-state owned publishing houses...), it was the only basis for the theory of music curriculum.
Comment: @Tim this could be the source of our disagreements concerning theoretical questions here on music se. I developed a strong allergy to any suggestions that "there is one official way" to describe something in music theory, or to play something on the pianio.
Comment: So, do we agree, or agree to disagree? I am totally aginst any idealism that says there's only one way - my way. ' Cos patently, there isn't.
Answer: For complete beginners - children in particular - the concept of anchoring the hand is a good one - I use it, but it's never too long before it gets out of hand, literally. So plan B comes out - look at the next set of notes, and decide where a good anchor point can be. And it can't always work!
Answer: This sounds like 'over-thinking' things to be honest. With stringed instruments, positions are a 'thing' in that you think about starting frets maybe more than with a piano, where any note is more-or-less available quickly.
It would be more constructive to ensure firstly that all five fingers in each hand, particularly the left, are strong and nimble. Most amateur pianists have weak fourth and fifth fingers, particularly in the left hand, and this leads them to awkward fingering in an attempt to avoid using those fingers.
Instead, I would purchase a copy of Hanon's exercises and practice these for half an hour a day - yes, boring, I know but they will greatly strengthen those weak fingers and then encourage you to actually use them. At that point to be honest fingering is more an issue of preference than some kind of divine law and if you also practice your scales as well as Hanon you'll soon start using the patterns you memorise when playing pieces of music.
Finally, remember the Prime Directive. It is far far better to play the wrong note at the right time than the right note at the wrong time. If you are rhythmically all over the place pausing to find notes, you need to slow down until you can play a piece with accurate rhythm. The odd wrong note is something you just gloss over and plough on - even professional musicians make mistakes, they just don't stop to think about them. Now go have fun!.