Using For+noun, in conversations

Question: I'm currently studying English in the US and I heard a lot of people start sentences with 'for~'.
For me, it sounds like it means 'as for' or 'when it comes to'. Is that right?
 If so, is it common and grammatically correct?
Ex)
'For Question number 2, I think~'
'For the essay we wrote yesterday, is it going to be graded?'
Answer: It is common, but you should be aware that English people use for dialogue  is different than Proper English. While it may be relatively ok to use slang when talking it's not a good idea in reports, technical writing or anything like that where clarity of what's being said is important. 'For' in those situations is being used exactly what you're saying. It requires context to make sense which is why it's really only useful in dialogue.
Even though it means the same thing one proper way to ask your last example would be "I'm wondering if the essay we wrote yesterday is going to be graded?". 'For' isn't used here because context is provided in the sentence. Since it requires more effort to say this most people don't talk like this anymore except in certain settings.

Using For+noun, in conversations


What is the proper way to move a database from one drive to another in SQL Server 2005?

Question: I'm not looking to relocate the database to another server entirely, but just move the data file(s) and log file to another drive with more space. I've seen conflicting directions on how to do this, so I'm looking for the recommended proper way of doing it.
Answer: Detach the Database:
use master
go
sp_detach_db 'mydb'

Move the Database files (Xcopy through xp_cmdshell shown):
DECLARE @SRCData nvarchar(1000)
SET @SRCData = N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\mydb.mdf';
DECLARE @SRCLog nvarchar(1000)
SET @SRCLog = N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\mydb_log.ldf';
DECLARE @FILEPATH nvarchar(1000);
DECLARE @LOGPATH nvarchar(1000);
SET @FILEPATH = N'xcopy /Y ' + @SRCData + N' D:\Data';
SET @LOGPATH = N'xcopy /Y ' + @SRCLog + N' E:\Log';
exec xp_cmdshell @FILEPATH;
exec xp_cmdshell @LOGPATH;

ReAttach Database:
sp_attach_db 'mydb', 'D:\Data\mydb.mdf', 'E:\Log\mydb_log.ldf'

There's more detail at this Microsoft KB article.
Answer: Another way - detach database files (database->tasks->detach), move them to new drive and then attach again.
But way described by Jay S is the simpliest.
Comment: Attaching database won't be supported going forward. So please avoid using it.
For the above case refer
https://msdn.microsoft.com/en-us/library/ms345483.aspx
Comment: @Varun they recommend the ALTER DATABASE procedure, but I cannot find a statement about it not being supported in the future.
Comment: @Stijn: Sorry I should have written that procedure won't be supported.
"you can use the sp_attach_db or sp_attach_single_file_db stored procedure. However, these procedures will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. We recommend that you use CREATE DATABASE … FOR ATTACH instead."
Comment: Here is a link where it says that sp_attach_db will be removed in the future. https://msdn.microsoft.com/en-us/library/ms179877.aspx
Answer: To be absolutely safe, I would do the following:

Backup the database to a BAK file.
Take the current database offline, or delete it if you want to.
Restore the database and change the location of the MDF and LDF files.

Scripts sample:
-- Get the file list from a backup file.
-- This will show you current logical names and paths in the BAK file
RESTORE FILELISTONLY FROM disk = N'C:\Backups\MyDatabaseName.bak'

-- Perform the restore of the database from the backup file.
-- Replace 'move' names (MDFLogicalName, LDFLogicalName) with those found in
-- the previous filelistonly command
restore database MyDatabaseName
from disk = N'C:\Backups\MyDatabaseName.bak'
with move 'MDFLogicalName' to 'D:\SQLData\MyDatabaseName.mdf',
     move 'LDFLogicalName' to 'D:\SQLLogs\MyDatabaseName_log.ldf',
replace, stats=10;

Notes
The first script will get you the current names and paths that you'll need in the second script.  The second script restores the database back to the name you want it to have, but you can change where you want to store.  In the example above, it moves the MDF and LDF files to the D: drive.
Comment: Agreed, but whenever I start messing around with the databases, especially when there are so many developers or websites dependent on them, I like to go through backup files just in case something goes wrong and I need to get back to a good state.
Comment: One problem with this approach is that it requires much more time for the backup/restore. Restores will always take longer than copying the mdf/ldf and reattaching. It can become prohibitive with DBs of any significant size
Comment: What I like about this method is that at no point does the database disappear from the system.  Any logins with default database set to your database will not be affected, as they would be during a detach operation.
Answer: I'd rather not enable xp_cmdshell on my SQL Server instance, so I wrote a function to do this using Powershell instead; it was especially useful when I had to move a large number of databases.
function Move-Database
{
    param ($database, $newPath)

    $paths = Invoke-SqlCmd "SELECT master_files.physical_name as Path
        FROM sys.databases
        JOIN sys.master_files ON master_files.database_id = databases.database_id
        WHERE databases.name = '$database';";

    $paths = $paths | % { $_.Path };

    if (!$paths)
    {
        throw "Unknown database '$database'";
    }

    Write-Host "Setting $database to single-user mode...";
    Invoke-SqlCmd "ALTER DATABASE [$database] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;";

    Write-Host "Detaching $database";
    Invoke-SqlCmd "EXEC sp_detach_db '$database';";

    if (!(test-path $newPath))
    {
        [void](mkdir $newPath);
    }

    $clauses = @();

    foreach ($oldFile in $paths)
    {
        $filename = [System.IO.Path]::GetFileName($oldFile);
        $newFile = [System.IO.Path]::Combine($newPath, $filename);

        $clauses += "(FILENAME = `"$newFile`")";

        Write-Host "Moving $oldFile to $newFile";
        mv $oldFile $newFile;
    }

    $clauses = $clauses -join ", ";

    Write-Host "Re-attaching $database";
    Invoke-SqlCmd "CREATE DATABASE [$database] ON $clauses FOR ATTACH;";
    Write-Host "All done!";
}

You can use it like so:
Move-Database -database "MyDatabase" -newPath "D:\SqlData";

I also think this method is a bit more robust than the others - what if your database is split into many files or you have a strange naming convention for logs for example?
Answer: I needed to move multiple databases within same server, so I expanded the accepted solution a bit, to avoid copying and pasting or retyping commands. This allows moving data files in one script run, only changing the database name. Note this assumes that advanced commands are enabled; if not, use sp_configure. The data and log files are assumed to be in the same directory.
use master

DECLARE @DBName nvarchar(50)
SET @DBName = 'YOUR_DB_NAME'

DECLARE @RC int

EXEC @RC = sp_detach_db @DBName

DECLARE @NewPath nvarchar(1000)
SET @NewPath = 'E:\Data\Microsoft SQL Server\Data\';

DECLARE @OldPath nvarchar(1000)
SET @OldPath = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\';

DECLARE @DBFileName nvarchar(100)
SET @DBFileName = @DBName + '.mdf';

DECLARE @LogFileName nvarchar(100)
SET @LogFileName = @DBName + '_log.ldf';

DECLARE @SRCData nvarchar(1000)
SET @SRCData = @OldPath + @DBFileName;

DECLARE @SRCLog nvarchar(1000)
SET @SRCLog = @OldPath + @LogFileName;

DECLARE @DESTData nvarchar(1000)
SET @DESTData = @NewPath + @DBFileName;

DECLARE @DESTLog nvarchar(1000)
SET @DESTLog = @NewPath + @LogFileName;

DECLARE @FILEPATH nvarchar(1000);
DECLARE @LOGPATH nvarchar(1000);
SET @FILEPATH = N'xcopy /Y "' + @SRCData + N'" "' + @NewPath + '"';
SET @LOGPATH = N'xcopy /Y "' + @SRCLog + N'" "' + @NewPath + '"';

exec xp_cmdshell @FILEPATH;
exec xp_cmdshell @LOGPATH;

EXEC @RC = sp_attach_db @DBName, @DESTData, @DESTLog

go

Answer: You also need to make sure the user under which the SQL Server process is running has access to the folder. For SQL2014, the default user process is "NT Service\MSSQL$SQL2014".


Tub drain p trap angle

Question: Installing a new tub and needed to move the ptrap. Please let me know if the proposed angle poses any problems.
Comment: Why does the joist with the hole look skinnier than the other joist? Am I hallucinating that? It looks substantially skinnier.
Comment: Off hand, it looks to be a 1" board put in as a patch after cutting out the joist there. On the other hand, there appears to be vinyl tile floor directly below the lumber, like this is a raised section over an old floor, so it may not really be a joist as such.
Answer: If the large vertical offset to the drain is only for the picture, (because you have't cut that pipe to connect to, yet) this is fine - the P trap can be contorted in any way horizontally without changing its function.
But if there's a vertical drop of one pipe diameter (or somewhat less, depending on the applicable code) into the drain, that makes it an S trap, and those tend to siphon dry and give your tub sewer gas problems.
Using a sanitary Tee laid on its side rather than a Wye to enter the larger pipe is a pre-existing code violation.

Tub drain p trap angle


Who is the first school idol group ever featured in anime?

Question: In the Love Live! series, UTX High School's A-RISE is the first school idol group featured. But, is A-RISE the first school idol group ever featured in the history of anime? If not, who is the first school idol group?
Comment: I'm not sure what kind of answer you expect, do you mean within *Love Live* or anime in general? Sorting the [idol](http://anidb.net/perl-bin/animedb.pl?show=tag&tagid=2438) tag in AniDB to display the oldest first I find [Idol Boueitai Hummingbird](http://anidb.net/perl-bin/animedb.pl?show=anime&aid=840) from 1993 on the second page which comes close or at least may be a title to include in an answer, if I didn't get your question wrong. (I haven't watched this, it says military, so it doesn't actually qualify as a school setting.)
Comment: Anime in general. I did say "in anime history" in the question, right ;-)
Comment: what do you mean by school idol group? as in am idol group formed by people who goes to a school or an idol group formed by people from the same school? how much does the school have to feature in a series to qualify (as the series about a group of teenagers who are in school may not necessary show or reference the school)
Comment: Going with how it was depicted in Love Live, I'd say that a school idol is an idol group formed by students from the same school and identify themselves as one.
Answer: It's been 3 months since the question existed, well, if you still haven't found the answer yet, here it is.

1983

Magical Angel Creamy Mami is the oldest Idol anime I could find. It has 52 TV epsidoes + 4 OVA aired back in 1983. It's a school idol group, but unfortunately I can't find the name of the group.

Creamy Mami is about a young girl, Yuu, who after seeing a spaceship is given the power to use magic for one year. She is also given 2 cats, Poji and Nega, to watch over and guide her. Using her magic powers to transform into the idol Creamy Mami, Yuu must work hard at acting, singing, helping her parents at their crepe shop, fighting aliens and bad guys, going to school, plus try to get the affections of her childhood friend Toshio.

2003

Wandaba Style is the possible oldest Idol anime with a group name, yes, finally, but wait, it is not a school idol!

A J-pop group named Mix Juice consisting of four girls: Ayame, Yuri, Sakura & Himawari attempt to make it big by playing the first concert on the moon. Bankrolling this endeavor is the 13 year old billionare Susumu Tsukumo and his android, Kiku 8 who propose to go to space in an eco-friendly way.

2006

Lemon Angel Project is about a group of high school girls forming a new Lemon Angel Idol Group, I think that is it, I'm surprised that the first school idol group was created only 10 years ago.

Lemon Angel was once the greatest girl band of Japan, but then it broke up and most of its members vanished. When a music producer decides to put together a new Lemon Angel, average high schooler Tomo Minaguchi is approached to audition for the group. Little does she know of the mystery behind the original Lemon Angel...
Answer: "School idols" aren't a real thing; the notion was invented for the Love Live! franchise.
Hence, it must be the case that the first school idol group in anime is whichever one is first featured in Love Live! - and as you point out, A-RISE is that group.
Comment: I was going to point that out but you beat me to it. However, there might have been other anime with similar concepts before, I guess.
Answer: I know this is years late, but the first idol anime ever is Sasurai no Taiyou (1971).
Comment: Welcome to Anime and Manga. consider [editing](https://anime.stackexchange.com/posts/50729/edit) your answer to add more information, looking at the plot summary i don't see how a series about 2 girls being switched at birth and living in different social classes yet having the same dream to be a singer is the same as a school idol group


Cloud Computing and my company's data

Question: I am looking into Cloud Computing for my company. The one question that I can't seem to get out of my head is; What happens to my data and the ability to use it if the Cloud computing company goes out of business?
Comment: This question appears to be off-topic because it is about business
Answer: Obviously, you should pick a provider that you think is solid and unlikely to go out of business however the real answer is that you should have a replacement provider lined up and a plan for how you're going to switch if the main provider goes bust. The key parts of such a plan are:

Make sure you own and control the domain names, and use a completely independent provider to run your DNS
Set up a completely automated backup system which moves all data off your primary provider.
Have the backup provider ready-to-run at all times with just a DNS switch
Test your switchover process periodically

An outsourced server farm is really no different to any other outsourced function. You just need to make sure you're not locked into a single supplier.
Answer: Pick a solid provider and make regular backups of your data outside of the cloud.
Answer: I would say that it depends on the company.  I wouldn't assume anything about you being able to retrieve it if the company goes out of business.  Even if you have a legal right to do so, it will probably take months of going through court orders and procedures to get at it after the company fails.
After the company goes bankrupt, I also wouldn't assume there would be any security protocols in place to protect it.  Even if they say there will be, when a company goes under all bets are off.
A think to also remember is that even the most "well known" companies can fail in a heartbeat (Enron anyone).  You never really know how well a company is doing until the financial statements (if any) are released.
Answer: Why don't you just keep a local backup of some sort? Also, you might want to stick with well known companies like Amazon where they probably wouldn't go out of business.
EDIT:
As stated in the comments, even if Amazon stopped offering their cloud computing service it's unlikely that they wouldn't give users ample time to move their data off of their servers.
Comment: While it is true that Amazon, MicroSoft,Google are unlikely to go out of business it is also a much more real possibility that they might give up on offering cloud computing when they realize the margins are terrible.
Comment: Yes, but a company dropping cloud computing will probably honor contractual obligations about ending the service.  Don't count on Joe's Bait Shop And Server Farm doing that after a serious minnow shortage.
Answer: You aren't alone. There are a lot of people asking this same question. Some advice to make sure you aren't left out in the cold.
1) Examine the terms of service carefully. Even some of the bigger players like Amazon reserve the right to terminate service with no more than 30 days notice. If you had your whole network infrastructure on a particular cloud, 30 days isn't a long time to build a new data center or move to another provider. This brings us to my second point...
2) Portability between providers is important. Proprietary cloud solutions (Microsoft Azure, Google NetApps, and to a lesser extent Amazon AWS) make it hard to transition easily to another provider if forced to. A promising option on the horizon is VMWare who is taking the approach of providing the cloud software and letting partners host it. This would theoretically give you a lot of portability between providers and potentially even let you use multiple providers at once so you have a failover. Also, since they are likely to use standard VMDK images, if you have an ESX server you could always pull the Virtual machines back locally if absolutely necessary.
3) Backups. Hopefully the cloud provider offers some method for creating backups, but it is advisable to have an offline version as well. The newer hybrid-cloud architectures where only some of your infrastructure lives on the cloud is attractive for this. That is, you could backup locally from the cloud.
Here is a good article wherein the author predicts the collapse of the Cloud marketplace and a rebuttal by GoGrid.com. Very interesting read since you get both sides of the issue.
"Don't buy cloud computing hype: Business model will evaporate"
Chuck Goolsbee – Dec 2008
http://searchdatacenter.techtarget.com/news/article/0,289142,sid80_gci1343864,00.html?track=sy540#
GoGrid.com's rebuttal
Michael Sheehan – Jan 2009
http://blog.gogrid.com/2008/12/31/dissecting-searchdatacentercoms-dont-buy-cloud-computing-hype-post/
Answer: Amazon and MSFT aren't going to shut down shop overnight.

Cloud Computing and my company's data


Can all types of honey be used to make mead?

Question: What is the difference between raw and wild honey? Is it raw because of honey collected from apiary domesticated bees, and wild when collected from the forests? Can any honey be used to make mead?  More specifically, what about wild honey, such as Tualang Honey?
Answer: To address your 'headline' question: Yes, any kind of honey can be used to make mead, however the mead may have a significantly different flavor depending on the honey chosen. Orange Blossom honey will create a sweeter mead that is lighter in color (like a lager beer) where buckwheat honey will produce a mead that has more earthy tones (like an amber).
Raw honey is 'straight out of the hive' without any processing and sometimes without even any filtering. "Regular" honey has been pasteurized and always filtered. "Wild" honey doesn't have an "official" meaning, but is probably the same as "raw". It is likely just a marketing/branding label.
note: I did find one reference to 'wild honey' being from bees 'in the wild', I find this unlikely as collecting honey from 'wild' beehives is not very efficient, is destructive to the hive and not at all good for the bees.
Comment: Hallucinogenic Red honey from the The Himalayas might be problematic. http://awesci.com/the-hallucinogenic-honey-from-the-himalayan-bees/  The strain of honey can be found all the way to Turkey IIRC.
Comment: @ChrisH I suspect they are playing around with the definition of "wild". If you let bees 'go free' in an orange grove, but they 'choose' to return to your manufactured hive (cuz that's where the queen is) to 'make honey' are they "wild" or not? I believe this comes down to word games..
Comment: @WayfaringStranger ... Problematic, yes... but if you could get enough of it, you _could_ make mead from it. It might have an effect more like absinthe :)
Comment: I've had honey from wild bees before. I can't find the brand I've tried but here's one that claims to be (at least partly): https://www.amazon.co.uk/Tropical-Forest-Organic-Zambia-Honey/dp/B006JO30G2
Comment: That's why I was trying to find the one I had before.  I recall much more explicit wording which would rule out your interpretation.


What led to people looking at phase spaces?

Question: In basic physics, the emphasis is  calculating total forces, and going from that to the position function of the body as a function of time by integration. Now, from this prespective, how did people reach the idea to look at phase spaces?; What is the historical motivation for this?
Comment: Would "analytical mechanics" be enough of a response? Other than that I think the development of Liouville's theorem (1838) is an event where the importance of phase space became definitive
Comment: People did not reach the idea from the perspective of single body dynamics, not even Hamiltonian dynamics. Although it is implicit in the work of Liouville and Jacobi, the concept of phase space was only introduced by Boltzmann in his 1872 work on statistical mechanics of gases. It was developed by Gibbs, also in the context of statistical mechanics, who came up with the metaphor of phase flow, see [What is the etymology of "phase space" of a dynamical system?](https://hsm.stackexchange.com/a/11523/55)
Answer: Since the initial conditions of a mechanical system involve positions (configuration space) and velocities (or momenta),
the space of initial conditions is the phase space. This was realized by Hamilton who rewrite the second order equations of motion as a first order system of double size.


Calculate hours between 2 date/time fields x staff on site

Question: Works on site have a log-on and log-off time, I have fields set up to capture these times, plus a field for number of staff on site. I want to create another field that will show me chargeable hours, as the first hour on site cannot be charged, and just to complicate things further if 2 staff attend site I can charge full rates for the second person on site but I still have to take off 1 hour for the first person. I was trying to set up a formula of: log-off time minus log-on time multiplied by staff on site minus 1 hour (I.e. 10am-12pm for 2 staff: total 2 hours x 2 staff = 4 hours less 1 hour I can't charge for so total chargeable hours = 3). I can't figure this one out as I have date/time fields and a number field so I keep getting errors. Is this type of formula possible?
Comment: so if 10 staff persons came, only 1st person's 1 hour should be reduced and the remaining 9 persons every hour should be taken to consideration...Is that right?
Comment: If you are using Date/Time Fields means, better you should go with Apex Trigger. You can't seperate Only time from Date/Time Fields in validation rule or formula field
Answer: Considering

Both the fields are Date/Time fields
You would need Business Hours from this calculation

Here's the formula you can use

((ROUND(11*(
(5*FLOOR((DATEVALUE(Out_Time__c)-DATE(1996,01,01))/7) +
MIN(5,
    MOD(DATEVALUE(Out_Time__c)-DATE(1996,01,01), 7) +
    MIN(1, 24/11*(MOD(Out_Time__c-DATETIMEVALUE('1996-01-01 13:00:00'), 1)))
))
-
(5*FLOOR((DATEVALUE(DateTime__c)-DATE(1996,01,01))/7) +
MIN(5,
    MOD(DATEVALUE(DateTime__c)-DATE(1996,01,01), 7) +
    MIN(1, 24/11*(MOD(DateTime__c-DATETIMEVALUE('1996-01-01 13:00:00'), 1)))
))
), 0))* NumberOfEmployees )-1

Out_Time__c = LogOff Time
DateTime__c = Log In Time


effects of different materials on golem construction

Question: The most common material to be used in the creation of golems is clay due to it being the most easy to work with and because it is commonly associated with the creation and imitation of life. However clay is not always readily available forcing many crafters to use alternate materials in the construction of golems which can have varying effects on the golem's skills, intelligence, capabilities, and weaknesses among other things. What do you think the different effects of the listed materials (other than clay) would be on golems and what do you think would be the best materials overall and for a given situation.
Golem construction materials:
wood,
hay,
cloth,
mud,
sand,
glass,
stone,
brick,
ice,
copper,
iron,
silver,
crystal,
aluminum,
and paper.
Comment: "What do you think the different effects .. would be"  Based on what?  The question doesn't give any frame of reference on which to base a comparison.  You mention "skills, intelligence, capabilities, and weaknesses" and while some materials certainly have obvious vulnerabilities (weaknesses) such as paper, hay, and ice being vulnerable to heat/flame, none of them have any direct relation to skills, intelligence, or capabilities, so any answer would be pure opinion.  I'd suggest providing additional details about what aspects of a material might influence skills, intelligence, capabilities
Comment: Part of this will likely depend heavily on whatever magic system you have. For example, in the Mistborn series metals like copper, aluminum, and iron can be used by allomancers for certain effects, so it would make sense for a golem made of one of those materials to have some ability related to that effect.
Comment: This question is too broad. Firstly we know nothing of your magic system that creates the golems. Secondly due to the first issue we can only tell you the basic stuff googling materials will yield (gold is malleable and conducts electricity, iron rusts and is brittle,...) Third there is no one super material; stone is cheap and easy to get, but isn't the strongest stuff around. Steel is far stronger, but depending on setting almost impossible to get. Best answer you will probaly get is that the best golems are made by the best golem makers. After all why is stone inferior to say steel or gold?
Answer: The disparity in material quality would be enough to virtually guarantee that golems would be tiered. Thus, without further ado:
Bottom Tier
Here reside the golems that can be made with the greatest ease or at the lowest cost. They will have the lowest intelligence and lowest utility. From best to worst:

Cloth Golem: A lumbering, soft creation. A well made one can perform most household chores with ease(ie cleaning), but your average one cannot surpass the level of an interactive children's toy.
Hay Golem: The poor man's scarecrow. A fragile, but easily replaced creation, suitable for at most a few months of use before the weather gets to them. That is, if they manage to retain their structural integrity long enough for decay to set in. Due to the low cost nature of this golem, it would be incredibly unintelligent, taught to perform only the task it was made for and nothing else.
Mud Golem: A barely sufficient, but very widely available and cheap facsimile of clay, mud would the universal training material for golem creation. As such most mud golems would be malformed, both in body and mind, and really wouldn't exist out of some sort of training ground.

Mid Tier
Here live the golems accessible to the average man. With a reasonable cost to effort ratio, these, without a doubt, would be society's workhorses. From best to worst:

Wood Golem: A widely available, yet very strong material, wood is the epitome of price to performance. Wood golems could be used for a variety of tasks, from pushing plows to assembling buildings. Thanks to their durable nature, most creators deem wood golems worthy to be imbued with a high intellect, for a golem at least. But different types of wood are good for different task, and thus the properties of wood golems would change with the type of wood used. (thanks Renan for the idea)
Paper Golem: At first glance these lumbering towers of parchment may seem fragile and useless. And for most of society they are. But, these golems would have the highest available intellect of all golems. With the potential to hold many hundreds of books worth of knowledge, academia makes good use of these magical monsters as walking, living, learning, libraries.
Sand Golem: Barely able to hold its shape, these golems hold favor with emergency services. Capable of doing everything from supporting collapsing structures to putting out fires, to absorbing toxic chemicals, the arrival of a sand golem heralds the imminent end of the catastrophe at hand. Due to their temporary nature, these golems aren't given any substantial measure of intellect, but their high utility separates them from their brothers in the lower tier.
Ice Golem: This tier's equivalent of the mud golems. Again only present at training facilities, the ice golem's short life span only makes it suitable as a training utility to educate up and coming golem makers how to work with hard materials. It is this difficulty increase that allows them to reside in mid Tier.

High Tier
The golems in this tier bring the highest utility to society, but they usually come with a bill too big for all but the richest people to handle. Thus these golems are often owned by unions or companies. From best to worst:

Iron Golem: These hulking behemoths are second in size only to the sand golems. In strength, however, they are without rival. Advances in engineering allow these to be the first golems to be made out of skeletonized parts, similar to how bridges are made. Used in heavy industry, like mining and drilling, the iron golem is a key part in enabling the opulence of modern society.  Due to the type of work they perform and the significant investment required to make one, these golems are given the best of the best in abilities, strength, and intellect.
Aluminum Golem: Similar to their iron brothers in form and function, aluminum golems are held back only by the softer nature of their material. Similar to the iron golem, these are made of fully skeletonized parts, but are deliberately kept small. Used in the same industries, aluminum golems do all the leg work when it comes down actually processing what the iron golems dug up. Operating in close proximity to the most valued golems of society, they are similarly given the best golem-making has to offer.
Silver Golem: With the most absurd price on the market, the silver golem is by far the most optimized of all the metal golems. Made at sizes barely larger than newborn infants, silver golems are used to perform maintenance in conditions where other materials would be eaten away. Since brute force is not required to do maintenance, they are given only a high intelligence to perform their jobs. They are on their way out, losing market share to much more economical options, like the Teflon golem.
Glass Golem: With the strength of glass increasing by leaps and bounds every year, the glass golem managed to climb its way here from the middle of low tier in less than a decade. However contrary to the glass golems of yore, modern glass golems are made of glass fibers. Essentially walking transmission centers, glass golems are popular among the server farm folk for their ability to quickly and efficiently link up new machines to the existing networks. Like the silver golem, the glass golem requires only a high intellect for its job and thus everything else is usually omitted to cut costs.

Elite Tier
To make elite tier, a golem must have an insane price associated with it, but must perform an equally important task. From you provided list only one golem makes this rank.

Crystal Golem: This golem comes in 2 main materials, diamond and obsidian. Coming in at the top of the hardness scale, diamonds are a huge asset when cutting through tough materials. The diamond golem is the jeweler's best friend. Capable of transferring intricate designs from paper to metal with machine precision, a good diamond golem's work matches a laser cutter in quality. However the diamond golem is not what puts the crystal golem in elite tier. With obsidian shards having the sharpest naturally occurring edge ever discovered by man, the obsidian golem has found its niche in the medical field. Matching the machine-like precision off the diamond golem, even the most experienced surgeon will defer to an obsidian golem for a complex procedure. Often times, obsidian golems are made with one part out of paper so they can receive knowledge more easily. These golems lose in intelligence only to pure paper golems.
Retired Golems
Stone Golem: The predecessor to the now ubiquitous iron golem, its size weight and cost relative to the iron golem put it at a distinct disadvantage. As stone golems wore out, they were retired and never remade. The remains of these moving mountains can be seen near old mines and quarries.
Copper Golem: These golems are made with one sole purpose; they take a  shape, and retire. Made with the most human form of all golems, some of the best statues throughout history have been retired Copper golems.

But Why Tier
There is no good reason to ever make this golem type.

Brick Golem: Since bricks are effectively baked clay, making a brick golem will make you the laughing stock of society for wasting perfectly good materials on something as brittle as brick.
Comment: Could a hay golem be used in a discussion as a straw man? ;)
Answer:
wood: golem strength and tenacity will depend on the kind of wood used. Will be weak against fire, compared to other materials. Also small furry or feathered animals may want to build nests on and inside it.
hay: seen in The Wizard of Oz. Golem may have trouble standing up.
cloth: commonly featured in Erfworld. May actually be quite strong and useful, and will gain bonuses in the presence of a dollamancer.
mud: I believe D&D had these. Nothing of notice to say.
sand: seen in Naruto, where a special kind of golem exists that is called a clone. Easily destroyed into grains.
glass: seen in The Order of Tales. Golem will be beautifully transparent, but fragile. I believe this was also a thing in D&D.
stone: a stronger golem. A sure D&D thing, also seen in Erfworld.
brick: never seen one, but I imagine they would be quite tenacious.
ice: I believe this has been a thing in D&D, Naruto and maybe Diablo. Weak against fire, attacks do cold damage on top of regular damage. Minecraft has snow golems that melt on water.
copper: slightly stronger golem, nice electricity conductor.
iron: much stronger golem. A thing in Diablo 2.
silver: weaker than iron, but resistant to acids. Can severwly damage werewolves. Ends contests in second place.
crystal: stronger rock golem, but weak against vibration.
aluminum: crackpot golem that believes in conspiracy theories due to top of cranium being made of tinfoil. Weaker than iron golem, and explodes in contact with acid.
paper: a thing in Naruto. Weak against most everything, but can destroy rock golem in one move.
Comment: "Ends contests in second place."  Awesome!  Though I'm surprised you didn't go with "...while weak against most everything, paper golems can, inexplicably, defeat stone golems..."
Comment: @Dalila thanks for helping me improve my answer, I incorporated that into it :)
Comment: Darn it!  No scissors golem.
Comment: @pojo-guy it can be the iron one ;)
Answer: From classical sources:

A clay golem from Jewish tales
Arguably, Frankenstein's Monster.
The Bronze Colossus from Greek myth

However the biggest list that I could find is a list of golems used in D&D.
Wiki List of Golem types.
Here are the types.  In the wiki, each type has a link to the full description.
<code>3.1 From 3.5 Edition Monster Manual
    3.1.1 Flesh Golems
    3.1.2 Clay Golems
    3.1.3 Stone Golems
        220.127.116.11 Greater Stone Golems
    3.1.4 Iron Golems
3.2 From 3rd Edition Monster Manual II
    3.2.1 Brass Golems
    3.2.2 Chain Golems
    3.2.3 Dragonflesh Golems
    3.2.4 Stained Glass Golems
3.3 From Monster Manual III
    3.3.1 Alchemical Golems
    3.3.2 Planar Golems
        220.127.116.11 Gloom Golem
        184.108.40.206 Prismatic Golem
        22.214.171.124 Amorphion
        126.96.36.199 Ash Golem
        22.214.171.124 Battleglory
        126.96.36.199 Gear Golem
        220.127.116.11 Mindstrike Golem
        188.8.131.52 Perfector
        126.96.36.199 Sentinel of Mithardir
        220.127.116.11 Shacklelock Golem
        184.108.40.206 Valorhammer
        18.104.22.168 Woodwrath Golem
    3.3.3 Hangman Golems
    3.3.4 Mud Golems
    3.3.5 Shadesteel Golems
        22.214.171.124 Greater Shadesteel Golems
    3.3.6 Web Golems
3.4 Ffrom Monster Manual IV
    3.4.1 Fang Golems
3.5 From 3rd Edition Fiend Folio
    3.5.1 Blood Golems of Hextor
    3.5.2 Brain Golems
    3.5.3 Demonflesh Golems
    3.5.4 Hellfire Golems
3.6 From 3rd Edition Draconomicon
    3.6.1 Dragonbone Golems
    3.6.2 Drakestone Golems
    3.6.3 Ironwyrm Golems
3.7 From Libris Mortis
    3.7.1 Grave Dirt Golems
    3.7.2 Tombstone Golems
3.8 From Frostburn
    3.8.1 Ice Golems
3.9 From Sandstorm
    3.9.1 Sand Golems
3.10 From Stormwrack
    3.10.1 Coral Golems
3.11 From Epic Level Handbook
    3.11.1 Adamantine Golems
    3.11.2 Mithril Golems
3.12 From Arms and Equipment Guide
    3.12.1 Equine Golems
3.13 From Magic of Incarnum
    3.13.1 Incarnum Golems
3.14 From Heroes of Horror
    3.14.1 Cadaver Golems
3.15 From Serpent Kingdoms
    3.15.1 Serpentflesh Golems
</code>


Is Gid Hanasheh issur hanaah

Question: According to Halacha, is Gid Hanasheh considered issur hanaah, prohibited to benefit from, or merely prohibited to eat? Or is it similar to non kosher meat which is generally prohibited to make a business out of but may be sold occasionally?
Answer: This is a dispute in the Talmud (Pesachim 22a) and Shulchan Arukh (YD 65:10) rules general benefit is permitted.

Is Gid Hanasheh issur hanaah


Convert binary from ms access into Image for Imagelist

Question: I have just converted a bitmap thumbnail into binary code to store into my MS Access Database. I am now trying to convert that binary data back into the image format to store into my Imagelist. My code right now is.
private void Form1_Load(object sender, EventArgs e)
    {
        vcon.Open();
        string get = "Select Path, Images FROM IMGSTR";
        OleDbCommand cmdget = new OleDbCommand(get, vcon);
        OleDbDataReader reader;
        reader = cmdget.ExecuteReader();

        while (reader.Read())
        {
            string path = reader["Path"].ToString();

            // should I convert binary into a string?
            string thumbnail = reader["Images"].ToString();

            // How to convert the binary data from the
            // MS database back to a bitmap image.

            //I need to convert the binary back to bitmap to work
            //in this imagelist.
            this.imageList1.Images.Add(thumbnail);

        }

    }

If anyone can help me that would be great. Thanks!
Answer: You need to cast it to a byte array:
Image.FromStream(new MemoryStream((byte[]) reader["Images"]))


How do I convert my 3D model into a 2D texture image?

Question: I may just be being stupid here and missed something, but I'm having a problem with something. I have a model for something I made and am going to make it into a mesh, though the colors don't transfer so of course I have to make it into a texture. the only problem is I have no idea how to. I basically want the model and colors separate so I can add it later back on. If you need to know, I'm trying to do this for Roblox. I have seen someone with the same question but the answer was honestly just too much tech talk for me to understand.
Yes, I'm dumb, But I hope to get better at this over time.
Comment: Are you able to give us a screenshot or test files? I want to know how did you put colours on the model? Did you use only materials or did you paint the model?
Answer: It's extremely easy.
Just select your object, switch the render engine to Cycles, and bake the textures from here:

You can play with the options to get your desired result. You can bake your colour texture (named diffuse in the dropdown), the emission (Emit), the Roughness, the Normals, and a long list of more texture maps. You can also control if the scene lights affect our textures or not from the influence section, and which texture maps also. Then after modifying the settings to what you want, (remember that you also have output settings!) press the Bake button and tada! (Ignore the selected to active for now). Also, remember to open a image editor window so you can save your file from there:


Sample size / power calculation for logrank survival test

Question: I have really little idea of survival analysis. I am aware that logrank is a special case of Cox' proportional hazards model, and that tons of R packages and scripts address the problem of power / size calculations. However, I didn't manage to make head or tails of all that.
The problem is simple: we have two groups of animals, treated and controls. The treated animals die, and we would like to be able to detect effect such that instead of 20%, 80% of animals will die in the treated group, with power 0.8 and alpha=0.05. Group sizes are equal and no other parameters are given.
What is the necessary group size?
I have found many answers. It seems that it is easy to calculate the number of deaths required from the basic equation:
$n_d = \frac{4(z_{1-\alpha/2}+z_{1-\beta})^2}{\theta^2}$
And $\theta = \log(\frac{\log(0.8)}{\log(0.2)}) = -1.98$
so $n_d = 8$ (EDIT: I had an error in my calculations before; hence I was calculating for power 0.9 and not 0.8).
Also, I'm quite at loss as to what to do further, and furthermore, I have no idea where the above formula is derived from.
EDIT
I used the ssizeCT.default function from the powerSurvEpi R package. Based on the explanation in the package manual, this calculates (in my simple case) the required sample size in a group as follows:
$n = \frac{m}{p_E + p_C}$
where $p_E$ and $p_C$ are, respectively, probabilities of failure in the E(xpermiental) and C(ontrol) groups. I assume that in my case I should use 0.8 and 0.2, respectively, so $n=m$.
$m$ is calculated as
$m=\big(\frac{RR+1}{RR-1}\big)^2(z_{1-\alpha/2}+z_{1-\beta})^2$
Where $RR=exp(\theta)=0.139$; thus $m=18.3$. This seems reasonable (based on previous experience). Do you think these calculations are correct? Can you help me understanding what actually I am doing?
Comment: check out R package "LogrankPower"
Answer: According to the problem you described, you want to set the death rate =20% for the reference or control group, effect.size=-3 (this will help set the death rate in the treated group to 80%) in LRPower() function:

LRPower(100, reference.group.incidence=0.2, effect.size = -3, simulation.n = 5000)

[1] 0.9948

LRPower(40, reference.group.incidence=0.2, effect.size = -3, simulation.n = 5000)

[1] 0.797
Thus, you need 20 control and 20 treated animals to distinguish 80% death rate in treated from 20% death rate in control group with 79.7% power while holding significance level at 0.05. In LRPower() function, the default type I error is 0.05, and the default group.sample.size.ratio=1.
For the reason why you need to set effect.size = -3, please check out the method file here: https://github.com/RongUTSW/Methods/blob/master/LRPowerSimulation.pdf


Use momentary switch to switch between three devices

Question: I need a solution to use one momentary switch to switch between modes on a pump. Off (NC) | Low | High. What I mean is you push the pushbutton once to turns pump on low, push it again for high and again for off (NC).  Additionally on low I'd really like the switch light to flash slow, and on high the switch light to flash fast. I've seen it done with Raspberry pi (https://www.youtube.com/watch?v=LOwnG5Vhzcs) but would like a simpler (maybe relay) option.
Comment: PIC10LF322 in SOT-23-6.
Comment: Using a microcontroller is the simpler option but overall probably not by much.
Comment: you said nothing about the pump ... how would the speed change be accomplished?
Comment: Could be done with some relay logic, but LED indicators  complicate the task. It needs DC power supply. In that case using microcontroller make the task easier.
Comment: Although you've stated your goal, you've forgotten to actually ask a question in your "question"
Answer: No need for a MCU even, simple 74HC logic would work just fine.

De-bounce the switch with RC filter. Normally open, ie press switch=voltage comes through.
Give it as input to a decade counter IC like 74HC4017. Ouput pin 0=off, 1=low, 2=high, 3= wire to chip select of the IC, use a BJT or similar to inverse polarity of the signal.
Add some driver IC or MOSFET to the outputs, then let these drive 5V coil relays. Flyback diode across the coil.
Decoupling caps and TVS on the usual appropriate places.
For blinking lights you can use LEDs with built-in flashing logic. Supply these from the relay outputs.
Answer: Thank you so much guys. That helped awesomely. I'm going to get a pcb board made up with the inner workings (including a decade counter IC) on low voltage and  then send the power to bigger relays to run the pumps. Should work fine.
Answer: Here's one, using two magnetic latch relays K1 & K2, three momentary push button switches S1, S2 & S3 and a diode matrix.

Freewheeling diodes and LEDs are not shown.
Using two LEDs to indicate 'Low' and 'High', instead of a single LED blinking at two frequencies, would keep the circuit quite simple.
Answer: Your did not really explain what you want to do, but based on title (switching between three devices), perhaps simpler solution without complete DIY circuit might be to use ready-made microcontroller device such as Shelly or Sonoff. I know for fact that Shelly can be configured to control two devices with one momentary switch. This assumes that you control your motor speed with two separate On/Off switches and not via PWM or any other type of regulation.
As for light, it is really not clear what you want, however shelly again can trigger web request when something happens (e.g. switch is pressed), you could use it to change the light (via other shelly, or even simpler controller).
Answer: These days, the simplest solution to almost any non-trivial logic control problem is a small microcontroller.  For a one-off prototype, look at something off-the-shelf, such an Arduino.  For mass production there are many tiny little microcontrollers available at low cost.
Anything electro-mechanical with relays, solenoids and switches is going to end up bigger and more expensive.
Answer: Many cheap Chinese rechargeable lithium ion battery torchlight and fan use 1 momentary switch and 6 or 8 pin ic( e.g LP78070) . 1 momentary switch is pressed repeatedly gives low, medium, high and off modes(fan) or high, low, flashing and off modes(torchlight). Some of the torchlight are cheap($2). The pc board of those torchlight or portable fan can be used. The output from the ic (wire going to the load(LED or fan motor) can be connected to mosfet or bjt of appropriate amperage/voltage(i.e amplified) to meet the motor need. The modes(off, low, medium and high speed) of the motor speed can be achieved by pressing 1 button repeatedly.
Oscilloscope and dmm can be used to view or measure waveform/voltage of each mode to see difference(frequency or voltage)
In one of the fan I checked, at off =0v, low speed=3.5v, medium speed=4.4v, high speed=5.9v. This can be connected to the gate of a mosfet(low Vgate threshold type) to switch high current


Design of the baseplate of mobile robot

Question: I need to construct a Mobile robots preferably circular type of diameter 30 cm, it will be carrying a payload of 5kg. What will be optimal thickness the baseplate considering the material as aluminium? How to calculate these kind of these kind of problems
Answer: To be able to select the right material. You will need to estimate the maximum forces that will be applied to it and make sure that it's stronger than that expected maximum.
There's a range of ways to achieve this.
At one extreme, you can create a full model and run finite element analysis on the whole thing and iterate until you have every part of the system to be stronger than the maximum expected load.
In the middle you can do some back of the hand computations to find the worst configuration loads and the weakest points for those loads and make sure that you have a safety margin.
And at the experimental end, you can take a guess, build it and test it in realistic situations and iterate to see if you need stronger or lighter. And iterate on the design.
Each one of these approaches has tradeoffs. More time in the design, more time in fabrication. Or more "optimal" design capabilities. You need to make your own tradeoffs as to what your full optimization function is including design and fabrication time.
Answer: Unless the robot is going to have an unusually heavy payload or be subject to excessive forces, you will probably be OK with any reasonable thickness aluminum plate.
It does not provide any real benefit to calculate that you need a plate with a thickness of 1.45657 mm to provide just enough strength for your payload since you cannot purchase aluminum plate with that precise thickness and it would be prohibitively expensive to machine down a plate that precisely.
You would be better off simply checking with your supply house and get what they have already in stock such as 2.6 mm (about 0.1 inch) plate of 6061.

Design of the baseplate of mobile robot


Why have some of my Pokecoins disappeared?

Question: I purchased 1200 Pokecoins which showed up in the game.  Later I discovered they were down to 880, without me ever authorizing any purchases.  What is going on?
Comment: Did you never make any purchases at all?
Comment: If I did, it wasn't apparent to me! Given the choices in the store I would have had to make 4 individual purchases of single items.  Could I have been that clumsy? Or was the UI misbehaving? I do see 6 incense items, but I don't know how I got them.  I visited a number of Poke Stops.  I just know I didn't buy them voluntarily.
Comment: There's a bug (possibly only on Android) where a purchase sometimes gets duplicated when you make it and too many coins get spent (resulting in purchasing extra items).
Answer: If you go into the Help Center in the app (Main PokéBall icon : Settings : Help Center), click the "Submit a Request" button in the upper right corner and one of the choices there is "Help with PokéCoins and premium items". That will let you send an e-mail to Niantic about the problem. Report the same thing that you said here. (It's also highly advisable to read the various general and specific FAQ/help entries you'll pass along the way, in case any of them are applicable.)
In theory they may be able to check the logs of shop transactions for your account and figure out what happened. In practice, given that they've really got their hands full with this game, they might just replace the missing coins to make the problem go away.
Comment: Thanks.  I did as you suggested.  They replied that they will follow up in a few days.
Answer: It maybe that you had your phone on another account or you may have accidentally hit something. It is most likely that your account was on someone else's phone and they used 400 of your Poke Coins. I am sorry for your loss of Poke Coins and if that wasn't the case report it to Niatic


What exactly is the difference between a clearing house and a counterparty clearing house?

Question: I know this may sound like a stupid question but I have not yet found an adequate definition of the two that can clearly tell me the difference between them.
Answer: Sometimes a clearing house is called a CCP or Central Counterparty.  For exchange traded options, the Clearing House or CCP is the counterparty to every transaction.
I am not aware of any distinction though have not specifically heard the term "counterparty clearing house" on its own.
Answer: The main different is I supposed on its legal standing, a CCP novate the trade from two parties - thus become a part of trade, while clearing house guaranteed the trade settlement (not directly become part of the trade)
Comment: What is "novate"?
Comment: Novate means replacing an agreement with another.
Answer: I would say they differ for the market in which operate and obviously for the regulation.
CCP operates for Over The Counter markets so it is the Clearinghouse (Clearing corporation) for OTC and non standard contracts. They both allows counterparties to meet each other and also gaurantee the solvency of the long and short trader.
Answer: I understood this from the John C Hull book on options, futures and other derivates. I think everything is same between clearing house and central couterparties, except that in CCP, first the contract has to be agreed and decided by both the parties, which will then be presented to CCP, and they may accept the transaction on their discretion. After that CCP, acts as a clearing house.


Details about sudo commands executed by all user

Question: From which log can I get details about sudo commands executed by any user. It should contain the working directory, command, user.
It will be helpful if you could provide me a shell script to do so
Answer: Depending on your distro; simply:
$ sudo grep sudo /var/log/secure

or
$ sudo grep sudo /var/log/auth.log

which gives:
Nov 14 09:07:31 vm1 sudo: pam_unix(sudo:auth): authentication failure; logname=gareth uid=1000 euid=0 tty=/dev/pts/19 ruser=gareth rhost=  user=gareth
Nov 14 09:07:37 vm1 sudo: gareth : TTY=pts/19 ; PWD=/home/gareth ; USER=root ; COMMAND=/bin/yum update
Nov 14 09:07:53 vm1 sudo: gareth : TTY=pts/19 ; PWD=/home/gareth ; USER=root ; COMMAND=/bin/grep sudo /var/log/secure

The user running the command is after the sudo: - gareth in this case.
PWD is the directory.
USER is the user that gareth is running as - root in this example.
COMMAND is the command ran.
Therefore, in the example above, gareth used sudo to run yum update and then ran this example.  Before that he typed in the incorrect password.
Note also that there may be rolled log files, like /var/log/secure*
On newer systems:
$ sudo journalctl _COMM=sudo

gives a very similar output.
Comment: This is a great answer for users that use `sudo` for each individual command, but for a user that does `sudo -i` (for example), you get no such details. At least on my Debian-based system, I see `session opened` and `session closed` - but nothing in between. I wonder if that's down to a setting in the `sudoers` file?
Answer: A "results filter" for Gareth's solution. (for those that arrived by title of post, not description)
Gives you a clean list of commands-only, run as sudo, by all users.
$sudo journalctl _COMM=sudo  | sed -e '/COMMAND/!d' -e 's/.*COMMAND=//' -e 's/.*bin\///'

Workaround if sed unavailable
$sudo journalctl _COMM=sudo | grep COMMAND

C&P results into Google sheets
In cell B1 C&P this formula
=arrayformula(REGEXREPLACE(A1:A,".*AND=/usr/bin/(.*)","$1"))


Non-transverse intersection of submanifolds

Question: What can we tell about non-transverse intersection points of (smooth) submanifolds?
Especially, in the case of complementary dimensions, how can we define and calculate the ''multiplicity'' of an isolated intersection point, i.e. the number of transverse intersection points collapsed in a nontransverse one?
What kind of other invariants of the intersection are known? What can we know about the classification, and what are the obstructions of it?
I guess, some survey literature would be the most helpful for me about this topic.
Here I sketch a reduction of the question which leads to a generalization at the same time.
Without loss off generality we can can assume that

we are in $ \mathbb{R}^n$,

one of the manifolds is a coordinate plane $ K=\mathbb{R}^k$.

the other manifold $L$ is the image of a non-singular map (germ) $ f: (\mathbb{R}^l, 0) \to (\mathbb{R}^n, 0)$.

The intersection point we want to study is the origin.

The first assumtion is satisfied if we study a small neighborhood of the intersection point. The second one can be reached by a choice of the coordinates in $ \mathbb{R}^n$. Note that the second and the third assumptions implicitly contains that the type of the intersection point is meaningful up to ''left-right'' equivalence, i.e. smooth change of the local coordinates on the three submanifolds.
We get a more general question by omitting the nonsingularity assumpion of $f$. Morover, we can also change the first manifold to a map germ $ g: (\mathbb{R}^k, 0) \to (\mathbb{R}^n, 0)$.
Some known related results (assume that $k+l=n$):

If $k=0$, $K$ is the origin, the question reduces to the index of a vector field: How to compute the index of a vectorfield defined by analytic formula?

If $n=2$, $k=1$, $K$ is the $x$-axis, $f$ is non-singular, and the intersection is non-transverse, then locally the image of $f$ is the graph of  a germ $h: (\mathbb{R}, 0) \to ( \mathbb{R}, 0) $. Assume that $f$ and $h$ are analytic. Then -- I guess -- the order of the power series of $h$ is the total invariant in some sense.

Globally the intersection number is an invariant: if $K$ and $L$ are closed oriented submanifolds of an oriented manifold $N$, their intersection number is the algebraic number of their transverse intersection points. No matter, how they moved to transverse position, the intersection number depends only on the homology classes represented by $K$ and $L$.

In the complex case the order of the power series of a power series $h: ( \mathbb{C}, 0) \to ( \mathbb{C}, 0) $ is equal to the number of zeros of  a stable perturbation of $h$. That is, for $ f: ( \mathbb{C}, 0) \to ( \mathbb{C}^2, 0)$, $f(z)=(z, h(z))$, the number of the transverse intersection points of the $x$-axis in $ \mathbb{C}^2$ and the image of a stable perturbation of $f$  is equal to the order of the power series of $h$.

Questions:

Is there a local version of the intersection number (see 3.), kind of order of tangency? I can see two candidates for it, the first one is the order of the power series, the second one is the algebraic number of intersection points of a stable perturbation. The second one seems meaningful in general -- is it? What does the order of the power series mean in general, which power series should we consider? The two candidates are equal in the complex case (see 4.), but not in the real case (see 2., e.g. $f(x)=(x, x^3)$, the order is $3$, the algebraic number is $1$). What can we tell about these numbers, what is the most general situation?

Let $K= \{x_{k+1}=x_{k+2}=\dots =x_n \} $ and $f=(f_i)_{i=1, \dots, n}$, assumed to be analytic. Then the intersection set is defined by $f(\{f_{k+1}=f_{k+2}=\dots =f_n=0 \})$. It seems that the composition of $f$ with the projection to the $x_{k+1}-x_{k+2}-\dots -x_n$-plane is enough to determine the type of the intersection point, in this way can we reduse the question to the $k=0$ case? Does the ideal generated by $f_i$'s ($i=k+1, \dots, n$), or the factor of the local ring with this ideal have any interesting meaning?

If $k=l$ and $f$ composed with the projection onto the $x_1-\dots-x_k$-plane is a bijection, then the image of $f$ is the graph of a germ $h: (\mathbb{R}^k, 0) \to (\mathbb{R}^k, 0)$. How can we use this germ $h$ to determine the type of the intersection point?

I feel that the question leads naturally to singularity theory, i.e. classifying singularities of germs of maps or spaces, but I cannot see the direct connection: which map or which zero-set should I consider? Another difficulty is that everything is real, not complex.

Order of tangency along directions / curves...
Answer: There is a generalisation of transversality called clean intersection, used by Bott, Quillen and others. I gave some references in my answer to Reference for base change of cohomology pull-push for clean intersections.. That might be a notion worth exploring.
Comment: The definition I've heard is that submanifolds $N_1$ and $N_2$ in $M$ intersect cleanly if the intersection is a submanifold, and $T_x(N_1\cap N_2)=T_x(N_1)\cap T_x(N_2)$. For example, any submanifold intersects itself cleanly.
Comment: Thank you for the answer. If I understand it right, clean intersection is ''intersection without tangency'': if the tangent spaces has a common direction, then there is curve in the intersection of the manifiolds in this direction. An example is an embedding of an originally transverse intersection into higher dimension. Are there other examples?


How did I get a checkmate in this game?

Question:
This is a position from an endgame I played that I do not understand. How did I get a checkmate in this game? Is this a glitch? I ask this because I am pretty sure that Black's queen could take my White queen.
Comment: The graphics are awful -- please use FEN (which this site supports) rather than a screenshot. With bad graphics and bad programming, I would just delete that app and get something better such as e.g. shredder.
Answer: The position shown is not checkmate. As you say, the queen can be captured. Even if that wasn't the case, there are two squares the king can escape to, and there's also a pawn that could move to block the check.

How did I get a checkmate in this game?


Running Windows 7 in a VM for tinkering

Question: Is there any kind of dev edition VM image of Windows 7 to play around with to avoid messing up my normal install?
Answer: You can get a 90 eval of Windows 7 Enterprise here.  I am not aware of any developer editions, or anything specific to running inside a VM.
Answer: You can get images of WinXP or Vista (intended for testing various versions of IE) that expire after a period of time: http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en
Microsoft currently updates these as the old ones expire - I'm not sure how long they'll continue to do that.
But as far as I know there's nothing similar with Win7 - you'd need to just install a demo version (or your own licensed version) in a VM. You can use any of the normal channels to get an install image (TechNet, MSDN, MAPS, retail, whatever)

Running Windows 7 in a VM for tinkering


Is it possible that Allah will not ask for the account of some people on the day of judgement

Question: Is it possible that Allah SWT will not ask for the account of some people on the day of judgement, because some people do add it to their prayers that Allah SWT should not ask for their account on the day of judgement
Answer: Asalaam Alaikum
YES, it is possible. there are numerous authentic ahadith mentioning the people who will enter jannah without bein taken into account. such narrations are there in sunan ibn majah, sahih al-bukhari and sahih muslim. i'll mention the narration in sunan ibn majah as this hadith is more related to the part in your question where people keep asking Allah the mighty and sublime to make them among one of them. (those who will be not held accountable).
Abu Umamah Al-Bahili said:
I heard the Messenger of Allah (ﷺ) say: My Lord has promised me that seventy thousand of my nation will enter Paradise without being brought to account or punished. With every thousand will be (another) seventy thousand, and three handfuls of my Lord, the Glorified.
[sunan ibn majah 4286]
(this hadith is graded hasan by Darussallam)
please reffer to hadith 6472 in sahih al-bukhari and hadith 218b in sahih muslim to have more understanding of those who will enter jannah without reckoning.
may Allah the glorified and exalted grant you mercy and guide you to the straight path.
Allah knows best.


Stack Overflow Careers API

Question: SO has an API for most of the site (questions, members, etc.), but I was unable to find any information on a public API for the Careers site. Does one exist? If not, are there any plans for one?
Answer: For jobs, our "API" is the RSS feed. You can get a feed of any search of jobs, look for the RSS icon below the search results, e.g. here:

We also have an API for employers to post jobs.
What use cases are you hoping for in an API for Careers?
Comment: +1 for API for resumes. It is not easy to keep in synch: CV, linkedin, and careers profile.
Comment: Is there an API for resumes too? I'd love to be able to snag all the data in my resume and use it on my personal site.
Comment: +1 for API for CV/resume. I'd like to have my details in one place (a plain text file) and then sync that with Stackoverflow, LinkedIn etc. At the moment I don't really use SO Careers because it's too much effort to keep yet another profile in sync.
Comment: But it seems that RSS only contains the most recently posted 25 jobs.It would be great if there's a way to get all the listings easily. (e.g. like [Github Jobs API](https://jobs.github.com/positions.json?page=1)
Comment: I have the same use case as @Skarab except I'm using SO Career as the single source of true for my CV data.  I'd like to have an API around it to auto sync to LinkedIn, AngelList, a concise PDF copy, etc.
Comment: I am writing an API library that gets job postings for a number of websites that have public APIs.  I've done a number of sites, and decided to look at SO.  In the end, I am simply looking for a way to programmatically get a list of the jobs on the Careers site.  This would include a list of the jobs using the search parameters, but also an API call to get the information on a specific job.  Seems that the RSS feed can give me the jobs, but I don't really see a way to get the job information other than scraping the HTML from the page.
Comment: +1 on that one. I'd love to see an API for updating my profile / resume. I'm using SO careers, LinkedIn, ResearchGate and others, as well as posting my CV as a pdf on my own site. Having to update them all manually is a pain. Often, it just doesn't get done. :-/ So I'm writing some scripts to update my profiles everywhere from a single source.
Comment: Looking at the API for employers, it would be great to be able to make an API call and get [this](https://careers.stackoverflow.com/api/demodata?apiAction=Post) back for an individual job.
Comment: Any progress with this?
Comment: what about the user profile API ?
Comment: I can get maximum 1000 in the feed
Comment: The RSS feed seems like it sucks - the API for entering jobs has a bunch of fields that don't make it through to the RSS; company name, logo, salary, remote, relocation, etc.
Comment: An API that would allow us to push resume/CV contents into SO would be great - I maintain mine as a [jsonresume](https://jsonresume.org/schema/) document so having an API I could use to sync this to SO Careers would be really good news.
Comment: I was hoping to run analytics on the job postings. Each year we see what techs we're using, but I'd like to see the number of times a specific tech is included in a job post, and what the average pay offerings are, and testing the trends year over year. We can cURL, (or Invoke-WebRequest) it from https://stackoverflow.com/jobs?q={}, but I'm not sure SO want's us running so many requests with so much html markup just to parse and tally counts, techs, salaries, etc...

Stack Overflow Careers API


After Peter Parker was bitten, what happened to the rest of the radioactive spiders?

Question: Did Peter Parker take part in, or have knowledge of what happened to the rest of the radioactive spiders? Were they disposed of or are they are still hanging around in a lab somewhere?
Comment: They escaped and eventually bred with common spiders... the results can be seen in the movie [Arachnophobia](http://www.imdb.com/title/tt0099052/).
Comment: I'm confused about which canon this question covers: standard (616) universe, Ultimate universe, the first movie trilogy, the latest movie...
Comment: Though you give the nod to Wilerson, your question led me to believe you were talking about the Cinematic Universe particularly since you used the plural 'spiders.' In the original work, there was only one spider, so I inferred the cinematic version of the origin.
Comment: @Wilerson I thought I had narrowed it down when I tagged it with marvel comics.
Comment: @MajorStackings That would be my assumption, but the answer references the latest movie.
Comment: @Thaddeus My bad. My question was flawed. You answered it nicely, but the other guy beat you to the line regarding the comic edit.
Answer: Amazing Spider-Man (Cinematic Universe)
When the question indicated spiders (plural), my assumption was the recent Amazing Spider-Man movie which featured dozens of transgenic spiders weaving for Norman Osborn. In most versions of the canon story, there was only one spider, which was irradiated.
As far as I can tell, the spiders are still at Osborn's laboratory being used for whatever insidious and yet financially profitable scheme they were commissioned for. In this particular instance, I don't believe they were strictly radioactive, let's call them transgenic spiders.
Their bite, while painful, does not appear to offer superhuman abilities to anyone besides's Peter Parker indicating, perhaps a greater purpose or genetically engineered process being held within or released through the bite of the spider.
Though it was not clearly stated the radioactive spiders would not have had the same effect on anyone else that they had on Peter. It was meant to be revealed during the course of the movie that Parker's powers were not an accident as they appeared but something done intentionally.
To cover the whole conspiracy theory properly, you need to see: Was the Untold Story Cut from the Amazing Spider-Man?
Amazing Spider-Man (Marvel Earth-616)
If you are talking about the Marvel Earth-616, there were no known "other spiders" after the first one bit Peter Parker. It died from radiation poisoning soon after spreading its radiation-activated powers to an unwitting recipient.
Comment: Nice all around answer, but I'm handing the cigar to Wilerson for his Marvel Comic response because he beat out your edit.
Comment: "whatever insidious and yet financially profitable scheme" ... I need to use this phrase somehow :)
Comment: The Earth-616 spider that bit Peter was reconnected as also biting his classmate Cindy Moon before dying so 2 unwitting recipients.  Still only the one spider though.
Comment: Also, after the spider died it was found by a bully of Peter called Carl King. He had seen Peter get bitten and receive powers and figured the spider was the cause. Carl tried to get powers himself by eating the spider, and eventually mutated into the villain Thousand.
Answer: I'm not sure whether this was retconned (and how many times...), so I'm going by what was shown on Spidey's first appearance, on Amazing Fantasy #15.
According to that, there were no other radioactive spiders. One single spider was accidentally irradiated, and it has bitten Peter Parker:

Apparently, spiders were insects in 1962
The spider was dying due to the amount of radiation it absorbed, so we can assume its body was disposed (by the janitor?).
Answer: If we're speaking about the spiders [plural] from the Sam Raimi trilogy, its somewhat unknown. It Was said that traits from various spiders were taken and recombined into "These 15 genetically altered super spiders"  to which Mary Jane pointed out "There are only 14; one's missing," [not counting the one that escaped and bit Peter]. But after that school visit, I don't believe any further thought or mention was given to them, even to finding the one that escaped.

To be fair, these weren't "Radioactive" spiders, and the one that bit Pete just wondered off. Thinking about it, this is a Severe ball drop on Peter's part; presuming they were all genetically and structurally identical, any one of those spiders could then imbue someone else with Peter's powers! Not an ideal situation....
Answer: Ultimate Universe (Marvel Earth-1610)
In this alternate comic universe, the spider was a test subject for an attempt by OzCorp to create a new super soldier serum, and is listed as OZ EXPERIMENT 56, ARACHNID NO. 00. This, and other frames indicate that other animal testing was ongoing and that there was a possibility of other spiders existing.
Source: Ultimate Spider-Man 2000-2009 #1
It is initially unclear as to what happens to the other test animals (if any are even spiders), as Norman Osborn moves onto human testing soon after and the lab is destroyed soon after.
Much later we get a new Spider-Man, Miles Morales, also bitten by a radioactive spider.
It turns out that this spider is number 42 (it has 42 printed on its back, where Parker's has 00), and has been living in the ruins of the lab ever since. Given the numbering, we can presume there are a fair few unaccounted for. Given the enhanced durability that the Oz formula seems to confer, it is quite possible that many survived for quite some time.
Source: Ultimate Comics Spider-Man 2011-2013 #1

 Since the second Secret Wars the remaining spiders are probably a moot point since the Ultimate Universe no longer exists.
Comment: Ouch, Spoiler alert on the last paragraph!


Printing Issues under Terminal Services (Win32)

Question: For our application, we need to be able to print output at a specific location on a page.  For example, we need to be able to print some text at exactly (1.00", 1.00") relative to the top left corner of the page.  The problem lies in the fact that all coordinates in the various GDI calls are not relative to the upper left corner of the display, but are rather relative to a device dependent offset, which one obtains with code like:
<code>int cx = ::GetDeviceCaps(hDC, PHYSICALOFFSETX);
int cy = ::GetDeviceCaps(hDC, PHYSICALOFFSETY);
</code>
These, of course, are in device units, so you convert them to logical units as desired.  And then, you may adjust your coordinates in other API calls to get the output exactly where you need it.
This works like a charm when running under Windows directly.  However, when using Terminal Services to print to a redirected printer on Windows Server 2008, the DeviceCaps functions no longer report correct information, at least for a large number of different printers.  Device offsets are reported as 0, and when querying the printable region on a page, incorrect information is returned (the APIs overstate the amount of available real estate).  Worse, it appears that either MS or the printer driver vendor is aware of the issue, because when the print job spools to your local machine (so that it can then spool to your local printer), all of the output is shifted by some compensating amount; an amount that appears to be a hack as it is nowhere close to the correct value reported by GetDeviceCaps when querying printer capabilities locally.
So, the result is that printed output gets shifted off the page ...
Has anyone else seen issues of this sort?  Am I crazy to want precise control over printed output?  Certainly, in order to paginate correctly, one needs an accurate value for the amount of available printable space, no?  Any help or pointers would be appreciated.
Answer: The Microsoft Knowledgebase issue 959442 and the included hotfix should resolve the problem:
"The edges of a document are truncated when you try to print the document by using Terminal Services Easy Print from a client computer that is running Windows XP SP3, Windows Vista SP1, or Windows Server 2008"


Can we have more than one app catalog in a single tenant?

Question: Can we have more app catalog in a single tenant. If yes, please clarify.
Answer: You cant have more than 1 app catalog in one tenant, in your situation what i think.

You should go to multi tenant environment, one for Dev, one for QA
and one for Production. once your testing complete then you can
deploy your app in Prod Tenant.
Other is solution dont install the app in prod but it has some risk.
If users have permission and they see it and install without
informing anybody.
Answer: There is a recently introduced feature, called a site collection app catalogs that allows you to do this.


Are there certain pronunciations that characterize the speech of speakers from former Soviet republics?

Question: Are there any clear identifiers in speech, i.e. shibboleths, that people from former Soviet republics manifest in their speech? For instance, I've noticed that in certain former republics, they pronounce "что" as "чи-то", "шо"/"шё", while others roll their r's more forcefully and longer than in "standard" Russian.
Answer: Ukrainian Russian is the only clearly identifiable one, a language variety unto itself somewhat like Irish English (and not to be confused with the Ukrainian language in the same way you also have an Irish language, although Ukrainian is better compared to Scots in terms of similarity). A significant number of people from Kazakhstan, including ethnic Kazakhs fluent in Russian, have Southern Russian vowel patterns (сказал [skə'zal] rather than [skɐ'zal]), but that's not consistent. Any other differences would register as a foreign accent or, if they're minor ones, pass under the radar.
Comment: Kazakhstan residents also have a kind of a stiff and strain pronunciation and peculiar intonation resembling the Caucasian
Comment: I noticed that people from the southern part of Russia, particularly Samara, pronounce "позже"like  "позжа".
Answer: That depends on how detailed you want to be. Even a native speaker will be surprised at the variety of dialects and nuances upon opening a linguistic atlas.

The "чё" or "шо" that you mentioned are quite prevalent in speech in some regions of Russia. But the distribution isn't even, and also depends somewhat on socio-educational factors, as these variations are often considered improper by purists, if not downright wrong.
So it's not always possible to make the "clear" distinction you're looking for. That said, some dialects are easily identifiable, such as Ukrainian (Ukrainian Russian) by their fricative Ukrainian 'г' and many other characteristic features.


Is This compound stable at room temperature?

Question:
This compound is planar conjugated and has 8 pi electrons on its periphery so it can be anti aromatic but if we polarize the pi bond at the bottom of the right ring the left ring will become aromatic making it stable. are there any theories or data indicating toward stability of this compound at room temperature? any kind of input is appreciated!
Answer: This is pentalene. It is indeed antiaromatic, and highly unstable tending to dimerize even at -100°C. With smaller rings the antiaromaticity and instability are much stronger than in the 8-pi electron system cyclooctatetraene.
There are two ways to stabilize this molecule. One is to introduce substituents that sterically hinder reactions such as tert-butyl, or that disperse the antiaromatic coupling such as cumulated benzene rings. The second method is to add two electrons, forming a dianion with the correct pi electron count to make an aromatic system.


Meaning of 的 in 只有三个得满分的

Question: The full sentence is
他考得很好,得了满分。听说只有三个得了满分的。
I get a bit confused with 的. I understand that the sentence means "there are only 3 people that get full marks."
Please help me out. Thank you guys :D
Answer: 听说只有三个(考生)得了满分 -- I heard that only three (examinees) got full marks
听说只有三个得了满分的(考生)--  I heard that there are only three (examinees) who got full marks
The object 考生 was omitted
考生 = examinee
得了满分的考生 = examinee who got full mark
'得了满分的' is an adjectival phrase that describes '考生'
Comment: Can I say "听说只有得了满分的三个."?
Comment: "听说只有得了满分的三个." (I heard only the three  who got full mark) sounds like  an incomplete sentence. A complete sentence  would be something  like  "听说只有得了满分的三个(考生) 可以升上特進班" 0r " 听说只有得了满分的三个(考生) 有全額獎學金"
Answer: 听说只有三个得了满分的。
As Tang Ho has said, (考生) was implied in the original sentence.
The full sentence should be 听说只有三个得了满分的(考生)。
To understand this sentence fully, a diagram is required. I'll analyze the fragment: 只有三个得了满分的(考生)。
/-----Predicate-----\
只有三个得了满分的(考生)。

Predicate contains the verb and the object.
——————————————————————————————————————————

/-Predicator-\/-----Object-----\
     只有      三个得了满分的(考生)。

Predicator is the verb.
——————————————————————————————————————————

/-Adverbial-\/-Head-\
     只         有

The adverbial 只 (only) describes 有 (exist)

/-Modifier-\/----Head----\
    三个     得了满分的(考生)

三个 modifies 得了满分的(考生). There are three of (examinees who have attained full marks)
——————————————————————————————————————————

/-Modifier-\        /-Head-\
   得了满分     的     (考生)
\-Predicate-/

得了满分 modifies 考生. Examinees who have attained full marks.

I'll stop analyzing this sub-predicate (得了满分) for now.

——————————————————————————————————————————

Can I say "听说只有得了满分的三个。"?

No. You would have said "I heard that only the three (examinees) who have attained full marks."
The explanation is quite long.
As explained above, 考生 was the implied object and that we can further reduce the sentence if there was a question in front which states the context. For example:
Q: 有多少个得了滿分的(考生)? How many (examinees) were there who have attained full marks?
A: 听说只有三个(得了滿分的考生)。 (I) heard that there were only three (who have attained full marks).

The aim of the question was to ask how many there were. And so, the answer conveyed the number.
Let us further analyze your sentence: 只有得了满分的三个(考生).
With the same logic before, using the (Modifier)的(Head) pattern, we can deduce:

Modifier: 得了满分
Head: 三个考生

This has the meaning of: "(The three examinees) who (have attained full marks)". This would make the modifier 得了满分 more important than 三个, which is not the point of the statement. These word orders change the meaning of the sentence analytically. It would only make sense in the following conversation.
Q: 哪些考生可以收到獎品? Who in the examinees can receive prizes?
A: 只有得了满分的(三个考生)。 Only those (three examinees) who have attained full marks.

However, you can reverse the order of the sentence, into:
听说得了满分的(考生)只有三个。 ≈ 听说只有三个得了满分的(考生)。

The only difference here is the focus/stress. The original sentence focuses more on the quantity of three and this reversed sentence focuses more on the state of attaining full marks. But this difference is quite subtle.
Comment: Wow it is very kind of you to get me understand. Thank you so much!

Meaning of 的 in 只有三个得满分的


Can I (or should I) use a MacBook charger on my iPhone?

Question: I recently got a MacBook with the USB-C charger. It comes with a 29-watt power brick, and I was wondering if I should use this to charge my iPhone. I've heard that the iPad power brick (I think 10 watts) charges the phone faster. I don't expect to be able to charge the phone proportionally faster, but would the MacBook brick damage the phone? I would rather only have to carry around one charging brick around campus. Also, I have a USB to USB-C converter.
Comment: Check out Apple's own statement about it: https://support.apple.com/en-us/HT202105 seems to be tested and safe.
Comment: Hi. Could you possibly add pictures of the connectors (the port on the MacBook, both ends of the cord, the port on the "power brick") for those who are curious but have never seen the new MacBook model nor a USB-C cable yet? Thanks. PS: This is really amazing if Apple is going to embrace a common (though not widespread so far) standard finally...
Answer: Unless there is some reason to the contrary that I'm not aware of, yes, you can use your MacBook charger with your iPhone. The power adapter will only convert as much power as is drawn, and the iPhone will only draw as much power as it needs.
(Note that it is not a good idea to charge your MacBook with an iPhone or iPad charger!)
Comment: I apologize, but I am confused. Your comment links to a question like this one, which asks whether it's ok to charge an iPhone with a high-powered adapter. My question is about charging a MacBook with a lower-powered adapter. This answer says that it is **not** a good idea, without elaborating why. To get a clear answer, I have asked [my own question](http://apple.stackexchange.com/q/273560/3367). I'd appreciate it if you could write an answer there. Thanks!
Comment: for the same reasons addressed here: http://apple.stackexchange.com/q/2017/12285
Comment: Can you elaborate (or link to a source) why it's not a good idea to charge a MacBook with an iPhone charger?
Comment: @phihag See my comment above.
Comment: @phihag Simply, an iPad requires twice as much power as an iPhone charger provides, and a MacBook Pro requires an *order of magnitude* more power than an iPhone charger provides.
Answer: This video shows that you can use MacBook 12" 29W USB-C Power Adapter with iPad and iPhone.
https://www.youtube.com/watch?v=fWzbaH24Q0Y
Comment: I am sorry Max Ried. I just edited my answer.
Answer: Yes, at least for the iPhone 6S using the Apple USB-C to Lighning 2m cable. I just started using it this week with mine and haven't had any issues.
For a few years I've charged my iPhone with an iPad charger. Not sure if the 29W charger is faster, but at least it seems just as fast.
Also, I heard in a podcast about videos warning about USB-C to USB converters. As long as you trust the one you have and it's not sketchy, I think it should be OK.
Comment: Yeah, I bought the proprietary one from Apple because I was worried about it. Thanks!
Answer: My Macbook Pro 13inch Late 2016 61W USB-C Power brick says output: 20.3V/3A, 9V/3A or 5.2V/2.4A.
So yes you can charge your iphone with the Macbook charger.
The people at the Apple store just don't know what they are selling.
Answer: Using a USB-C to USB-A adapter and a USB-A to Lighting cable to your MacBook charger means your iPhone gets no more power than using a common 12 watt USB-A charger, both cases means the phone sees 5 volts @ 2.4 amps.
With the MacBook 29 watt charger and a USB-C to Lightning cable the iPhone sees more power but Apple doesn't say how much more.  It's safe or Apple would not allow it.  I charge my iPhone from my 61 watt and 87 watt MacBook chargers regularly with nothing wrong that I can see.
If you wish to carry around just one charger then I would suggest getting something bigger to charge both.  With the phone plugged into the laptop, and the laptop plugged into the charger there's potential to charge both more quickly with a power powerful power supply.
A quick look at the Apple store shows me that Apple discontinued all but three USB-C chargers, 30W, 61W, and 96W.  This makes a bit of sense because there's not much need to keep a 87 watt supply around when it's going to be about the same size, mass, and cost of their 96 watt supply.  It's really impossible to get a supply that's too big because the phone and laptop will take only so much power and a bigger supply isn't going to damage anything.  Too small though and you will be waiting for your devices to charge when you would not have to with a larger charger.
With a 30 watt charger being the default for either device it would seem logical that to charge both at the same time with their maximum charge rate it would take the 61 watt charger.  The MacBook will pass power just fine to the phone so both can charge quickly.  Charging either alone with the charger will be fine as well.
If a new charger is something that you might not see a need for at this time then that's fine, the charger you have will not overheat or anything.  The phone and laptop are smart enough to share the power and still charge, if just more slowly than with a larger charger.
Answer: Yes you can. https://support.apple.com/en-us/HT208137

You can fast charge your iPhone 8 and later up to 50 percent battery in around 30 minutes.
Fast charging works when you use an Apple USB-C to Lightning cable and one of these adapters:

Apple 18W, 20W, 29W, 30W, 61W, 87W, or 96W USB-C Power Adapter
A comparable third-party USB-C power adapter that supports USB Power Delivery (USB-PD)