Publishing paper in a journal from another field

Question: Am doing a PhD in computer science.
Can I publish my paper in an international journal of pure and applied mathematics?
Comment: Doing PhD ... you should ask your advisor.  Even car mechanics and waitresses "can" publish in IJPAM.  Few do, however, because their papers usually fail to meet the standards of the journal.
Answer: Based on How good is the International Journal of Pure and Applied Mathematics? (http://www.ijpam.eu/) it does not sound like IJPAM is a good place to publish at all.
Also their website has a banner at the top that says "[2018-04-01] The journal stops consideration of any new submissions."  And their "submission center" links are either broken or have no apparent way to actually submit a paper.
Their editorial board is listed only as "Hacked... Annon+". (!)
So I don't think you could publish your paper here even if you wanted to, which hopefully you don't anymore.  This journal is no more, it has ceased to be, it's expired and gone to meet its maker, etc.
Look for a different journal for your paper, and be more choosy this time.  Submitting to a predatory journal will only waste your money and not help your career.
Comment: Following my advisor's sage words: there are some journals with a  negative impact factor.... Also +1 for the Monty Python reference :)
Answer: The criteria for being accepted in any journal are based solely on the content of the submitted paper:

relevance of the topic w.r.t the scope of the journal
quality and originality of the contribution
compliance with the editorial policy

The author's field of study is not relevant (and won't even be asked).
Publishing in mathematics journals is usually regarded as a strength in CS. However, if you plan to apply for academic positions in CS later, publishing only in mathematics journals might be an issue. Ideally, your publication record should reflect the profile you want to have depending on your target career.


Why is this question off topic?

Question: Why was this questions considered off topic and what needs to be done to make it on-topic for Stack Overflow?
https://stackoverflow.com/questions/57997174/vb-dotnet-displays-no-such-column-using-sqlite-as-database
Comment: The question when it was closed is https://stackoverflow.com/posts/57997174/revisions
Comment: @EricSchneider As others have said: You have a valid question here, but when you come and attack people (no matter how valid your viewpoint may seem), they sometimes will close, downvote, and delete your question (even though it's on topic here).  I can't do anything about the downvotes, but we can at least edit your question to remove the inflammatory bits and get support for the issue you're having.
Answer: The first revision was a textbook case of searching for a textbook:

I have been searching for vb.net ebooks on sqlite but i am not finding one.Can someone please help me with any Vb.net ebook which focuses more on sqlite.

Whenever you see a question closed that you think shouldn't be, it helps to see the original one so you know what changed.

For what it's worth, moderator ChrisF says this about (question banned) users who overwrite their  questions:

Now if the question has no answers it's not really a problem. Yes, it's abuse of the system but no one has been disadvantaged by this and if the new question is any good it might actually help the OP get out of their ban.

(Whether or not you agree with this stance is a discussion for a different question.)
Comment: @EricSchneider replacing the question with a different one isn't allowed. https://meta.stackoverflow.com/a/317450
Comment: @EricSchneider Why don't you? You asked, and you're already involved in the comments. Summoning a meta flock is, aside inefficient and slow, unnecessary.
Comment: Adding up: No one will stop anyone from providing feedback, but one must _not_ expect people to do it as if it were some kind of duty. It's actually a right not to comment at all.
Comment: @EricSchneider when a post is edited, it says "Edited x  ago". It's blue, it's a link, and if you click it, you see revisions. You can also manually find it by going to `https://stackoverflow.com/posts//revisions`
Comment: yes, but he improved question.
Comment: ok, so tell him, help him, new users don't know all these things
Comment: @EricSchneider You *do* know why it was blocked initially. It's a resource request. If you want to guide the user to the rules of the site, *do that*; if you're not willing, then the "oppressor" in this scenario is *more you than anyone else*. Why should others pick up the burden you yourself are not willing to bear?
Comment: because I see a new user trying to solve a problem, and I have seen this many times. I didn't know why it was block originally.
Comment: I don't know how or maybe not able to see revisions
Answer: The OP is currently question banned; likely because of the downvotes on their question (it is at -6; likely with the meta attention pushed them over the edge).  The VB.NET "Find me a book on SQLite" question can never be on topic for Stack Overflow; and I'd prefer the user edit that question into a question that can be upvoted, since as it stands they wouldn't be able to get out of their question ban with the question being rolled back to its original revision.
We tell users to fix their questions to get un Q-banned.  In the case of blatant "can never be on topic questions", I'm OK with them changing their question to be one that can be on-topic in the case where there are no answers to the question yet.  It doesn't actually seem like they'd be able to get out of their ban otherwise, ever -- and that doesn't seem very fair to tell a user.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackoverflow.com/rooms/199779/discussion-on-answer-by-george-stocker-why-is-this-question-off-topic).

Why is this question off topic?


How do enemies scale with the player level?

Question: In Fallout: New Vegas, enemies get stronger as you level up. But which of their stats increase, and in which scale?
Comment: When I was around level 20+, I fought the Legendary Deathclaw on Very Hard and it would kill me in two to three hits. Now, at level 46, an ordinary Deathclaw kills me in four hits on Normal. :P
Comment: They got stronger?  I thought they all had certain levels in certain areas of the game.  You'd know if you shouldn't be there if you were nowhere near their levels.
Comment: @Jeff: There's level scaling in New Vegas, but it's within ranges -  enemies do have certain minimum and maximum values on their levels/stats to maintain a variety of difficulty levels in different regions.
Comment: @LessPop_MoreFizz: Ah I guess that would explain it then, when I played the game, I spent a lot of time in one area to level up a lot before moving on.  I'd usually be 5-10 levels above the enemies in the next area.  So you could see why that would confuse me.  :)
Comment: @LessPop_MoreFizz do you have any information over these scale ranges?
Comment: And I've just seen that Deathclaws at the Divide scale until level 50: http://fallout.wikia.com/wiki/Deathclaw_(Fallout%3A_New_Vegas)#Deathclaw_.28The_Divide.29
Answer: Enemies level up kind of like the player character. Many have a cap on how high in level they can get and some have a floor value which is their minimum level.
What stats increase depends on the class of the npc.
If you fire up the constructionset thingie for fallout and look at how the npc's / monsters are scripted its easier to understand.
Answer: Enemy leveling is the entire basis of the Logan's Loophole trait. Many people believed you were making your character weaker by missing out on those extra perks, etc. Due to the wasteland leveling with the character and the benefits of chems with no UMON (addiction) it completely compensates for the lost levels and perks. When you can pop chems like candy for better SPECIAL stats, DT, rad resistance, energy resistance, etc and have them last an absurd amount of time with day tripper challenge, chemist perk, etc then you become just as overpowered versus your similarly level locked enemies than someone that is level 45+.
Answer: The guy above me is wrong. I played fallout for very long maybe like 400 hours I don't know how long exactly, but there is no level scaling mobs don't level its just like an MMORPG there are strong mobs in this place and weak mobs in this place. Most mobs re-spawn after a long time. Like there are fire ants in some dry lake even if your'e level 45 cap they're still the same fire ants. and there are deathclaws at some mine place they are still the same deathclaws if you're level 1.
Comment: Actually Jonas B is correct. While the class of NPC is dependent on location (as you describe), the "variant" (read: level) is based on the level of the player. For instance, Spore Carriers can be normal, or brutes, or runts: http://fallout.wikia.com/wiki/Spore_carrier Similarly, Deathclaws can be babies, young, blind, normal, legendary etc.


Designing a PCB with multiple supply voltages

Question: I'm in a process of designing a 2 layer PCB for my device. The device is a master control board, and there will be 10 daughter boards. Various peripherals and things will be connected there: I need 3V3 for all my STM32 micros, 12V for the MOSFET drivers, 5V for the relays, and also there will be another voltage from a programmable bench PSU. All of these voltages will have common grounds, except for the 5V for the relays, which are optocoupled. What is the best strategy when routing my PCB? Should I just place a big ground plane on the bottom and connect everything? Or perhaps a star topology?
Comment: Will your design contain any sensitive, small value voltages and / or high frequencies ( > 100 MHz) "? I guess not, the components you list are all "large signal", digital and low frequency. Then **I** would just make one ground plane to keep it simple.
Comment: We can assume that the product is something that has to pass EMC tests. Having 3 different regulators and a fine pitch MCU on 2 layers ain't gonna happen, it will have "antennas" all over the place. There's no reason to use 2 layers for this anyway, the cost argument is some 20 years obsolete.
Comment: Even a micro at 80 MHz I consider "low frequency", but yeah, I now work on RF circuits at 26 GHz ;-). So the "one ground plane" advise still holds. Don't forget to add plenty of supply decoupling capacitors! Add a few extra here and there that will remain unpopulated (no capacitor on these yet). But if you need some extra caps later, you will be happy if the pads on the PCB are already there.
Comment: There's a large micro clocked @ 80MHz, other than that some UART streams, but these will be quite loq speed (<100kHz)
Comment: Thank You for the answers! I never laid a 4 layer PCB out, so I guess it's the time. I'm was gonna use external power supply modules for everything, I have a couple of these nearby on the DIN rail nearby. Or would it make more sense to use just one supply, then add some local regulation on board?
Answer:
Should I just place a big ground plane on the bottom and connect
  everything? Or perhaps a star topology?

Big ground planes are best in most designs. They reduce inductance and resistance of return currents because there is more copper for the current to flow on. They also increase the amount of capacitance to other traces/planes which is good to knock down high frequencies by shunting high frequencies to ground.
A point where you would not want to use a solid ground plane is if you have large currents that could run on the ground plane through a sensitive area (like low level analog or if the voltage needs to be maintained to less than 100uV) because the resistance of the plane can create a voltage offset. In this case you could either move the components away from the return current on the ground plane, create a slot or split plane. Slots and split planes come with their own problems (can become radiators) so use them with caution.
If the design is purely digital, a solid ground plane would be recommended.


IP address + domain name

Question: I have an IP address, xx.xx.xx.xx, for which ping works. But when I do an nslookup for that IP address it is failing. Is there a way to find the domain name of the machine with the IP address xx.xx.xx.xx?
Answer:
The machine will not necesserily have a domain name.
Try traceroute
Answer: The only way to do this is via a reverse DNS lookup. However, if you are saying that nslookup is failing then (unless there is a local issue with you having bad DNS servers listed on your local machine), then a reverse lookup will not work.
The various tools that other posters have mentioned, all ultimately do exactly the same the nslookup will do from your machine. They do a reverse DNS lookup via the "in-addr.arpa" address range (this is a special domain reserved in DNS for reverse lookups).
Answer: You need to use a "reverse DNS lookup". Try this one online, or Google further for other options.
Answer: Yep, it's called Reverse DNS! Perhaps try: http://remote.12dt.com/
Also consider DNSStuff: http://www.dnsstuff.com/ great website for troubleshooting DNS issues.
Comment: I doubt this will work. nslookup is doing exactly this type of reverse lookup when yu type in an ip address. Unless there is a local issue on the client with DNS entries, it will yield the same results.
Answer: In order for an IP address to resolve to a hostname, a PTR record must exist in DNS.  For example:
18.104.22.168.in-addr.arpa. 3570  IN      PTR     h00c0f06bacf1.ne.client2.attbi.com.

The ISP that owns the netblock including your IP (or its delegated zone authority) must set this up.

IP address + domain name


Debugging web app in iPad Simulator

Question: I am developing a  web app for iPad and testing it on Safari on Mac and Safari on iPad Simulator. Now there are some issues with CSS in iPad Simulator which work quite well in Safari on Mac.
Now my question is,
 Is there a powerful debugging tool for Safari in iPad Simulator?
Comment: As of iOS 6 Remote Debugging is available: http://stackoverflow.com/a/12762449/72428
Answer: When running safari in an XCode device simulator, the desktop Safari (v6) Develop menu shows those devices.  From there, you can fire up the developer tools (DOM browser etc.) for the mobile browser.  This helped me debug an mobile safari css issue without hardware.
Comment: Just to add to @t1m0 answer, you may need to turn the Develop menu on by going to Safari->Preferences->Advanced->and check "Show Develop menu in menu bar".
Answer: Note: As of iOS6 this is not the correct way of doing remote debugging, leaving this answer for  historical reasons but you should look into remote inspection with Safari, here is a good article: http://jeffreysambells.com/2012/09/22/ios-safari-web-inspector
Have a look at this, (a bash script I wrote) https://gist.github.com/2241976. It will allow you to open the iPad simulator and run Webkit's remote inspector, which will look just like this.
Comment: You should [disclose](http://meta.stackexchange.com/a/59302/130268) that this is your project.
Answer: iWebInspector is quite a powerful tool for the iOs simulator's Safari.
It uses the same inspector as Chrome and it works nicely (I've used it myself and found it really helpful).
From their website

iWebInspector is a free tool to debug, profile and inspect web
  applications running on iOS Simulator (iPhone or iPad). You can check
  resources, see and change HTML & CSS, use breakpoints on JavaScript
  code, create charts and more just as if you were on Safari for
  Desktop, Chrome or Firebug.
It works for any web in Safari -the web browser-, for a chrome-less
  webapp (full-screen) and also for apps using UIWebView -including
  PhoneGap applications-.

Debugging web app in iPad Simulator


SharePoint Access Requests List Change Default Permission

Question: We are using SharePoint 2013, we have a library with contribute permission on it and when we try to share a document the default requested permission level in Access Requests list is edit how to change it to read?.
Thanks in advance.
Answer: When you create a document library, it by default, inherits permissions from the parent site. This means all the groups continue to have the same access on the doc lib that they have on parent site. However, you can set unique permissions on a doc lib and set necessary access to selected groups.
Manage permissions for a list, library, folder, document, or list item


Run web site from home

Question: I want to set up the web server at my home. I already have registered for the domain name. I do not want to use hosting services. How should I set up the Apache and the settings with the registrar of the domain name so that my site is up and running?
Answer: Please note that hosting at home is disallowed in the Terms of Service by many Internet Service Providers, and some may even disconnect you for this or charge fines.
If you are allowed to home-host according to your provider's terms of service, you should set up a webserver (from your question I already see that your choice has fallen on Apache) at home which runs on your public IP (usually you will need to forward port 80 in your router to your server's internal IP). The installation of Apache differs per operating system. For an easy Apache installation under Windows, I would recommend XAMPP, available at: http://www.apachefriends.org/en/xampp.html
Next, you should point your domain's A record to your public IP. (Hopefully, your ISP provides a static one, which many ISPs which allow home-hosting do). It is recommended to also do this for the www. subdomain.
Comment: Thanks for the reply, Niek! I dont need the website to run 24/7. So dynamic IP should not be a problem. I would use DynDNS or Opendns for that.
Answer: If you are using Linux, the easiest (but not the best) thing to do is install Apache (and Mysql/PHP if you want dynamic) then install Webmin as this will give you a nice interface to everything.
If using Windows, Try downloading the Web Platform Installer which should get you installed with IIS, SQL Server, ASP.Net (and I think PHP) Very quickly.
Next step would be to go to your DNS records and set an A record for your domain that points to your IP, and a Cname that points to your domain.
Lastly, you want to forward port 80 on your router to the machine that has the webserver.
That should be it! If you do not understand any stage, please say in comments and I will be happy to help.
Comment: Thanks for the reply. Okay, are you saying that I have to set the name server with the registrar? I saw Cname in wikipedia. In the registrar form, it asks to enter two nameservers. How to enter two name servers when I have only one instance of Apache running? Please elaborate.
Comment: Most registrars give DNS services, if yours doesn't, use ns1.everydns.net and ns2.everydns.net and then set up an account with everydns.net and type your domain there. then set an A record with value of your IP and a Cname with the name of www.domain.com and a value of your domain .com if you need any more help, just say.
Answer: A WAMP, or LAMP, depending on your OS, should install everything needed for a website. You then point the DNS at your IP (You DO have a static IP address, right?) and everything should go ok.
Comment: Thanks for the reply. And NO! I don't have a static IP. Very rarely do I shut down my computer which keeps my IP address same for many days. Also I can use some services like dyndns (which my router has builtin support for) or opendns if I continue to have dynamic IP.

Run web site from home


Satisfaction relation in Intuitionistic Logic

Question: I would like to clarify what concerns me in satisfaction relation in Kripke frames for intuitionistic logic (INT). Firstly, is it a true statement that given a Kripke Model $$M = \langle W, R, \models \rangle$$ for INT Logic, the fact that $$M, w \not\models \phi$$ is logically equivalent to the fact that $$M, w \models \neg \phi$$ ?
And secondly, is it like in INT Logic that we consider a world $$w \in W$$ in which neither $$M, w \models \phi$$ nor $$M, w \models \neg \phi$$? I mean the case in which we do not "know" anything about satisfaction of some formula in a possible world. The distinction between the two is following. In the first part I am asking about satisfaction relation property (or lack of this property). In the second part I am ciurious about something related but not exactly the same. Whether it's possible that in a specific Kripke Model neither a formula $\phi$ nor a formula $\neg \phi$ is valuated as logical truth.
Comment: $M,w\nvDash \phi$ does *not* directly mean $M,w\vDash \lnot\phi$: $M,w\vDash \lnot\phi$ if and only if $M,v\nvDash \phi$ for all $v\ge w$; so $\lnot\phi$ holds at $w$ when no node after $w$ does not satisfy $\phi$.
Comment: Your two questions seem to be the same one, can you clarify the distinction between the two ?
Answer:
Is $w \not \vDash \phi$ logically equivalent to $w \vDash \neg \phi$?

No. $\vDash \neg$ implies $\not \vDash$, but not vice versa.
$w \nvDash \phi$ means that it is not the case that $w \vDash \phi$.
$w \vDash \neg \phi$ means that for all subsequent worlds $w' \geq w$, $w' \not \vDash \phi$. This is a stronger statement.

Can there exist $M, w$ such that $w \not \vDash \phi$ and $w \not \vDash \neg \phi$?

Yes. In fact, this is what leads to the invalidity of the law of the excluded middle ($\phi \lor \neg \phi$) in intuitionistic logic.
Consider the following counter model:
$M = \langle W, \leq, \vDash \rangle$ with
$W = \{w_0, w_1\}$
$\leq = \{\langle w_0, w_0 \rangle, \langle w_0, w_1 \rangle, \langle w_1, w_1 \rangle\}$
$\vDash$ such that $w_0 \nvDash p$ and $w_1 \vDash p$
In this model, $w_0 \not \vDash p$: $p$ does not hold at state $w_0$, so we can not claim it to be true.
However, with $w' = w_1$, there exists a future state $w' \geq w_0$ such that $w' \vDash p$, hence we can not claim either that $p$ is false (since that would require that $p$ is false in all subsequent states), and we have $w_0 \not \vDash \neg p$.
Since neither $w_0 \vDash \phi$ nor $w_0 \vDash \neg \phi$, we also have that $w_0 \not \vDash p \lor \neg p$.
Hence $M$ is a counter model of the intuitionistically invalid statement $p \lor \neg p$: It is possible that neither $p$ nor the negation of $p$ holds at a world (and thus, in a model).


What happens when you upload a binary to Apple's iTunesConnect?

Question: EDIT: ...and I'm asking because: it might point to things we can do to speed-up the process.
About a year ago, this process went from being "slow because Apple's servers were under-powered" to being "very slow because Apple used 3 times the bandwidth required to send the binary".
e.g. I submitted a 90Mb app recently, and Xcode4 uploaded over 350Mb of data to Apple.
e.g. just now I submitted an 8Mb binary, and Xcode4 uploaded over 40Mb of data to Apple.
There have been big improvements in the uploader recently (e.g. during one of those uploads above, I lost DSL connection partway. It took Apple about 30 seconds to recover and resume the upload - but previous versions would just crash in that scenario).
But I'm wondering: what is Apple actually doing during upload? The process runs on our local machines - has anyone tried peeking at the net traffic? or at the processes?
I saw a couple of different phases, just by monitoriing 'ps':

unzip (for re-doing the code signing)
codesign (ditto)
Java (for the uploader interface, I believe)
then ascp (Apple SCP, I'm guessing?)
Answer: Speculation: it uses the same WebDAV implementation as Finder, which is very slow.


How often do users of social websites use viral inviters, like gmail/twitter/facebook integrations to invite friends?

Question: I'm thinking about developing a viral invite type function to allow users to invite some of their contacts from popular OAuth services like gmail, facebook, twitter, linkedin, etc.  Before I go there, though, is there any research on how often users use these functions if they are around?
Answer: I've never used such a feature, nor have I seen any data one how often such a feature is used.
But I do have a strong hunch that in many (and possibly the majority of) cases when the address-book inviter is enacted, the user does not have full awareness of its implications, and is often pushed into it somewhat coercively.  Developers often prey on less-sophisticated users with these features.
I know that I have been rather annoyed in the past by invitations to obscure web services sent to me by obscure former contacts.  I know that I would be mortified were I to somehow unintentionally spam my address book.  And I know that I am quite turned off by websites that aggressively promote such features.
Bearing this in mind, recognize that such a feature could lend your service a certain air  of sleaziness.  Thus, if you are certain that your service is of such high appeal that your users would affirmatively desire to invite their contacts by automated means, implementing this feature in a fully transparent and explicitly optional manner is crucially important.
The obnoxiousness of the inviter can be somewhat ameliorated with clever implementation, such as allowing the user to selectively invite only certain contacts.  But a machine-generated invitation will always be inherently spammier than the personal email that would constitute a true recommendation of a service.
Comment: Yeah, this would be something where you see your address book and have to select each contact individually, and then are encouraged to add a personal comment.  The more I think about it, the spammier it sounds.  I probably won't end up doing it, but I wanted to get some opinions.
Comment: Selecting contacts improves the situation a lot... One thing that might make the situation feel a whole lot less spammy is requiring your user to write a personal message on the invitation.  This would make it clear that they are purposefully inviting you.
Answer: Users will add contacts if they needed.
If you observe facebook peoples added contacts in games where they needed conection.
I think it's all depends on Where ? .


When does a drone do a laser scan?

Question: It seems like it does laser scans quite often. Is it so it can identify enemies, and, if so, why did it not do a scan on Jack before he said "Tech Four-Nine. Jack Harper."?
Comment: When in the movie did this happen?
Comment: I believe he did it just to identify himself before the drone had a chance to fully activate. It might also have been the last step to activate the drone after he fixed it. By identifying himself first, the drone would not have had to scan him but know him right off. From a plot side of the equation, by Jack stating his name and tech # prior to full power-on of the drone, it provides a way for when Jack finds his wife in the stasis pod later in the movie. It makes it so we are used to the process. Not sure this is a complete or definitive answer, so putting it into the comments.
Answer: Drone #166 (the very first one Jack repairs, and the one I assume you are referring to) actually does a scan on Jack. Not with its lasers, but with its "eye".
The drones are equipped with both an "eye", which seems to be mainly used for navigation and close range scans, and lasers, which seems to be used for long range scans as well as to scan in multiple directions at once.
As for the second meeting with the drone (down in the New York Public Library,) the second scan, which is done with the lasers, is just there for some extra seconds of doubt to make the audience unsure about whether the drone will actually recognize him or not.
Answer: Drones scan objects and surroundings in order to find Scavengers. (Navigation probably is done by GPS and/or radar, because drones do not scan during flight.)
As for why Jack identifies himself, there could be multiple reasons. I think it is just human nature to prove innocence against an armed opponent and it could be a reflex of Jack on the just "awoken" drone. Furthermore, maybe Jack identifies himself just to speed up the scanning process in order to get the drone in normal operation mode quickly. But most important: it could also be protocol, because later on we learn that the drones are ordered to eliminate all humans.
Comment: There's nothing indicating that the drones didn't scan during flight. Sure, they obviously use some kind of GPS technology to navigate between markers/beacons, but they'd definitely need some kind of scanner to navigate in caves and buildings, and to avoid things that might enter or already be in their flight path
Answer: When Jack repair first drone i.e 166, it scan Jack after activated Jack said "Jack Harper, Tech 49" because scan process take time.

When does a drone do a laser scan?


could eating something boiled with onions have caused her death

Question: My dog ate chicke skins that were boiled with a piece of onion. She got to the plate that had the skins on them there was no actual onions on the plate just the skins. Could that have caused her to pass away with in 5 to 10 minutes
Comment: How big is your dog? And what were the size of the skins, and also did she eat any of the actual skins? And when she died, did she show any anemic signs like weakness, coughing, or were her gums pale?
Comment: She was a 25lb frenchie it was chicken thigh skins 3 pieces but no onions pieces no caughing she stood for a lil bit and sat down and then fell over I didnt look at her gums
Answer: Onions are poisonous to dog and cats, I've read many articles before on this but that long ago so I'm not entirely sure what they do just I remember reading they have a chemical that attacks red blood cells and causes symptoms of anemia. Even though their poisonous, a lot of things we don't consider poisonous ARE if eaten at the right amount. I've fed my cats onion products before (2 weighed 16 lbs. and one was about 25 lbs.) and one eats an onion product almost daily if not twice a day and all my cats are fine and that cat that continues to eat onions actually weighs less than your dog.
There are considerations to take into account though that makes your situation differ from mine. First is species, generally if a cat can't eat something, than a dog can eat more of that something before dying from it (so you already have that in your favor). Next is weight, like I said your dog weighs more than my one cat who eats onions all the time so that's good, means he is likely more able to tolerate the toxins in onions. Unfortunately though what wasn't on your dog's side is breed. Aren't French Bulldogs respiratory impaired? And like I said onions basically attack the respiratory system. By going after the blood, you don't have enough oxygen in your system to supply your organs with, putting your lungs on overdrive to make up for this sudden demand of oxygen. But there is also an unknown variable. And that is the individual. I only have one cat that still eats onions and that's because the other two (both of which weigh more than him) started showing pale gums which is a sign of anemia, proving to me that they can't handle their onions.
All that being taken into consideration, my gut feeling is that it SHOULDN'T have killed your dog. Even all my cats could've eaten what you described (and if I'm understanding right, your dog didn't actually eat the physical onions) and they would've been just fine. Cooking with onions probably does increase the risk factor of eating that food even if you don't eat the onions, but it would be INCREDIBLY SMALL. But since the two coincided together, I do feel inclined to say yes, since that is just too much of a coincidence otherwise. It probably was the onions and you just got really unlucky in that your dog happened to not be able to tolerate onions at all. Maybe your dog had a pre-existing condition that was aggravated by the onions (i.e. something wrong with the lungs or heart)? But without knowing if your dog was affected by anemia before she died, it's really hard to say anything for certain. There is always the chance that it wasn't something you did and it really was just a VERY unfortunate coincidence.
Comment: I understand, I can only imagine that kind of pain and it is literally my worst nightmare. But it could still just be a coincidence, I've had pets (young ones too) just suddenly drop dead and nothing happened leading up to it to imply it was something I did, so sudden death though terrible does happen.
Comment: Thank you for your answer I just feel so guilty I feel I killed her and it hurts
Answer: From what I could find quickly regarding toxicity, there is no general rule for dogs for dangerous dosage, but it is known that they will show signs of poisoning after ingesting 15g-30g per kilogram body weight in onions.
Some breeds are more susceptible to onion poisoning, the source specifically listing Shiba Inu and Akita here.
Other factors that can increase toxicity are existing medical conditions, e.g. poorly managed diabetes or weakened liver function.
All in all, a smallish onion on its own may very well be lethal for a smallish dog.
Ingesting much smaller dosages over a prolonged period of time can also build up, much in the same way as drinking tap water from old lead pipes will lead to chronic lead poisoning.
With many poisonous plants, cooking something in them without feeding the plant directly is not safe, as many toxins such as alkaloids are soluble in water, and as such can be transferred by cooking.

However, the source lists a lot of general symptoms of poisoning (i.e. salivating, stomach cramps, vomiting, diarrhea, etc), and the time passing until lethal anemia setting in as up to a week.
While I'm not a veterinarian, I would think that just 10 minutes until the dogs passing does not sound very plausible for poisoning being the main factor here, especially if no symptoms were showing prior to the dog passing.
At the very least, I would think that there must have been a serious medical condition that was undiscovered for this to lead to such an outcome, on top of breed having constricted airways to begin with as another answer mentions.

Or something more mundane but equally tragic, choking from getting a piece of chicken skin stuck in the airways from eating them too hastily, with the piece dislodging and going down only after a couple of minutes.
I know one case from an acquaintance where their dog fatally choked on a doggy cookie which are supposed to be perfectly safe, but nothing is in case of a freak accident.
Comment: @csalas1228 I feel for you, but it really is very unlikely the onions caused this, it happened way too quickly for lethal onion poisoning, and telltale first symptoms of poisoning were not observed. Take it from someone who is absolutely religious about eliminating dangers for pets in their home, even superhuman efforts will leave a few cracks open for danger to creep through. For what it's worth, I think what Elmy suggests is spot on, most likely scenario. And nothing you could have done, sadly.
Comment: Thank you for answering I just feel like it's my fault I have so much guilt
Comment: Thank you @bgse just miss my sweet crazy girl I have been reading some other posts and it's been common I just cant help but wonder thinking back on that day she did pant a few times randomly maybe it was signs that she was going through something but frenchies always breathe heavily at times
Answer: To add my two cents, you write

no caughing she stood for a lil bit and sat down and then fell over

There is no way the onion caused her death.
I'm not a vet, but this sounds like a heart attack or something similar. I've heard similar descriptions from people who had dogs with a congenital heart disease. One moment the dog is ok, then suddenly they pause, stand around or sit down as if they blacked out and that's it. They are just gone.
I'm sorry for your loss, but as far as I know there is nothing you could have done.
Comment: Thank you for your thoughts and comment ❤


"to give in" (phr v) a homework meaning?

Question: "to give in" in this sentence: "Have you given in your homework yet?" What means?
I have no ideas how to translate it into Russian.
thanks
Comment: In the US we say "hand in" or "turn in" for submitting homework to the teacher.
Answer: I would presume it means to submit your homework to your teacher.
But as StoneyB says, we normally say "turn in" or "hand in".
In general, to "give in" means to surrender, to let someone else have their way. Like, "Al wanted to go the car show but his girlfriend Mary wanted to go to the ballet. Finally Al gave in and they went to the ballet."
Answer: In your example

to give in your homework

the equivalent phrases would be

hand in your homework
turn in your homework
submit your homework
pass in your homework
check in your homework (digital)
deposit your homework (digital)
send in your homework (digital, possibly remote)


Best practices: syncing between threads

Question: Is if almost always required to have thread syncing (i.e. use of mutex, semaphores, critical sections, etc.) when there is cross-thread data accessing, even if it's not required after going through a requirements analysis?
Comment: If it's not required it's not required. What exactly are you asking?
Comment: If it's required (to avoid data corruption), do it.  If it's not required don't do it...
Comment: Whether I should lock threads when accessing data across threads regardless of whether it's required or not?
Answer: I would always recommended going with the simplest, most straightforward synchronization scheme until analysis shows you should do otherwise - this usually means a few large locks versus many fine-grained locks or lockfree.
The issue is that determining if lock-free code is correct is much more difficult than determining if the corresponding code with locks is correct.  This creates a large burden on maintainers of your code, and there is a good chance they will get it wrong and introduce bugs.  Even if you know that lock-free is safe with how your code is currently used, this could change in the future by people who aren't as aware.
Secondly, in many cases, the difference in performance between code with locks and lock-free code is neglible - until you know there is an issue with lock contention, you should not consider lock-free.  Even if there are contention problems, lock-free is not necessarily the best solution.
Comment: Thanks for your explanation. I guess using a lock would be the best practice for future source code usability reasons.
Answer: Even if you don't need a mutex, semaphore, critical section, etc. for their normal locking semantics, you may still need a memory barrier. The former constructs usually imply a memory barrier, which is why removing them can change the program. In addition, these problems can be extremely hard to debug, as a different scheduling of the involved threads can make the problem vanish and appear. In the simplest case, this means the mere act of running a completely separate program changes the behavior of yours.
Answer: The other model that makes sense is called share-nothing.  erlang and scala are probably the chief representatives of this model with erlang processes and scala actors.
The idea is that you send messages to other threads, where messages are data that no reference of is kept by the sender.  In practice there is a small amount of locking needed for the send/receive queues, but the rest of the code can be lock free w/o any concerns.
Such models can be implemented in C++ and other languages.
http://www.scala-lang.org/node/242
http://lambda-the-ultimate.org/node/1742
http://docs.python.org/library/multiprocessing.html#module-multiprocessing

Best practices: syncing between threads


Do I have to treat the wood before I assemble it?

Question: I am planning on making a sofa. I have my tools and my wood. Do I have to apply any type of treatment to the wood before I assemble it? I mean at the end I'm going to be stapling textiles on it and adding pillows and cushions.
Comment: You're fine leaving it completely bare, regardless of the wood species.
Comment: You might want to be sure to sand it to a nice, smooth finish so you're not snagging any stuffing or tearing the fabric as you stretch it across the framing. Even if those snags/tears are on the inside at the bottom - the tear in the fabric will spread over time.
Answer: Since a sofa will almost surely be an indoor piece of furniture, completely protected from the weather, you are fine leaving it untreated. Every commercial sofa that I have seen the inside of is constructed of untreated wood.


The Rif and the Rosh on Nazir and Sotah

Question: Where can I find the commentaries of the Rif and of the Rosh on Tractates Nazir and Sotah? They're not in my gemara (Oz v'Hadar), and I was wondering if they were appended to a different tractate?
Comment: http://www.otzar.org/wotzar/book.aspx?10213
Comment: Are you sure they exist?
Comment: Do you mean the halachic compendia? (Or, e.g., _Tos'fos Harosh_?)
Comment: I've added an answer, but am still open to receiving more information about this if anybody knows anything that they would like to add. The compendium that I was referring to was Pisqei haRosh, which was compiled by his son. I don't know why it exists for Menachot (for example) and not for Nazir. I don't see how Menachot lends itself more to halakha lemaaseh than do those tractates that are missing this invaluable resource.
Comment: Wow - thanks, @Michoel! I wonder why it wasn't included in the Oz v'Hadar version of the gemara, seeing as they saw fit to cram in just about everything else.
Answer: To my surprise, it turns out that neither the Rif nor the Rosh ever penned commentaries to those two masekhtas. According to the Jewish Encyclopedia articles ("Alfasi, Isaac ben Jacob" and "Asher ben Jehiel", respectively), the Rif's Sefer haHalakhot covers only Berakhot, Shabbat, Eruvin, Pesachim, Ta'anit, Beitzah, Rosh haShana, Yoma, Sukkah, Megillah, Mo'ed Qatan, Yevamot, Ketubot, Gittin, Qiddushin, Nedarim, Chullin, Bava Qamma, Bava Metzia, Bava Batra, Sanhedrin, Makkot, Shevu'ot and Avodah Zarah (link).
The commentary of the Rosh covers only Seder Zeraim (except for Berakhot), tractates Nedarim and Tamid, and all of Seder Taharot. The digest of those commentaries that was composed by his son, titled "Pisqei haRosh", is appended to a range of other tractates as well (just taking a few randomly from the shelf, I found it on Bava Qama, Sanhedrin and Menachot), though is evidently not appended to all of them. The Jewish Encyclopedia article doesn't list which tractates it is found on and which it is not, though it appears then to be totally absent from Nazir and Sotah amongst others (link). How many others, I don't know.
Comment: Ok, this is getting confusing. Here's what's going on: The Rosh wrote four things: (1) A commentary on parts of the Talmud. This is **not** what he is famous for; many people hardly know it exists. (2) A Talmudic Halchic "digest" (i.e. a summary of the halachic sections of the Talmud). This is what he is famous for, and it is appended to the back of virtually all *masechtos* in the Vilna Shas. Now the Piskei HaRosh is a point-by-point summary of the halachic "bottom-lines" that come out of this "digest" of the Rosh. That was written by his son, the Tur. [cont]
Comment: [cont] (3) Tosafos HaRosh, which is basically the Rosh's version of *tosafos* on many *masechtos*, and it is very similar to the "regular" *tosafos* on the side of the page in the Vilna Shas. (4) Responsa.  Please edit this answer (and the question too for that matter) to be clearer with exactly what works of the Rosh you are referring to.
Comment: Rosh (Rabeinu Asher) or Rash (R' Shimshon)?
Comment: Are you talking about the Tosfos Harosh? (I think that he wants the piskei harosh)
Comment: @ShmuelBrin - Rabbeinu Asher ben Yechiel. Why do you ask?
Comment: Which peirush are you referring to, the Piskei Harosh or the Tosfos Harosh?
Comment: Pisqei haRosh. I'm actually not familiar at all with Tosafot haRosh.
Answer: As Shimon bM's already answered:

The Rif's Sefer haHalakhot covers only Berakhot, Shabbat, Eruvin, Pesachim, Ta'anit, Beitzah, Rosh haShana, Yoma, Sukkah, Megillah, Mo'ed Qatan, Yevamot, Ketubot, Gittin, Qiddushin, Nedarim, Chullin, Bava Qamma, Bava Metzia, Bava Batra, Sanhedrin, Makkot, Shevu'ot and Avodah Zarah

According to Wikipedia, there is an opinion that the halachic compendium of the Rosh (his best known work) is a commentary on the Rif, rather than a commentary directly on the talmud. As such it seems to me that wouldn't exist on any masechta that the Rif didn't write about (Wikipedia cites the Shach, as quoted in Kelalei HaRif, Rabbeinu Asher VeTur printed before the Rosh on Shabbat, Klal 2). The existance of the Rosh on any masechta that the Rif didn't write about would disprove this opinion of the Shach. (There is a differing opinion that the Rosh wrote on the Talmud directly - Wikipedia cites the S'dei Chemed klallei haposkim s.v. Rosh.)
Since the Piskei HaRosh (compiled by his son) is a summary of the halachic conclusions in the aforementioned compendium, it wouldn't exist on any masechta where the Rosh didn't write (and by implication, any masechta where the Rif didn't write).
Comment: See for example the preface to the Rosh on Berachot by the Mechaber of the Maadanei Yom Tov, second to last paragraph here: http://hebrewbooks.org/pdfpager.aspx?req=37952&pgnum=142
 -- There he says that the Rosh is based on the Rif

The Rif and the Rosh on Nazir and Sotah


Do comercial spectrum analyzers show a single-sided spectrum?

Question: If I use a Bessell function to compute sidelobe power - do I need to double this power to get the power I will read on the specan?
Answer: There are many types of SA's but all that are designed to operate in your carrier range will detect your SSB as expected.
Ignoring FFT's for now, the most common SA's have an extremely wide sweep range. The input channel is up converted from fmin ~ fmax with a fixed Local oscilator such that f >> 2fmax . The internal sweep VCO now only has a smaller tuning ratio.
The Lower sideband is passed onto a 2nd IF channel where you can tuned the BW and resolution of the AM detector LPF.
Now your spectrum is rendered accurately for scalar values with the spectral density function using a 6~10 decade log amp where noise depends on BW and LPF resolution of the detector as well input attentuation and LO drive levels control.
It operates much the way most UHF radios work that have a wide tuning range for AM.  YOu can detect FM and PM by using the skirt of the 2nd IF BPF slope. For vector spectrum special detectors are employed to display PM and AM in the typical constellation after center f is tuned.  YOu can even watch SSB TV signals with any wire near a window.
So a Spectrum Analyzer (SA) is a smart radio tool to analyze your signals and capable of rendering them accurately.
There are also FFT SA's, VNA's and many other types.
Thank you for letting me assist you in this explanation, so you can understand how it works like a radio.


HoTT and isomorphisms

Question: I have heard that Homotopy Type Theory makes it so that isomorphic objects are "equal". I wonder how this squares with a lot of mathematical examples from Algebra and Set Theory, where the nature of the isomorphism, or a certain class of isomorphisms, and how they interact with other morphisms, is relevant. How can you do any of this math if you just say "isomorphic objects are equal" and that's that?
Comment: Relevant: https://math.stackexchange.com/questions/2401540/question-about-the-univalence-axiom
Comment: Univalence (a simple paraphrase) is not that equivalence is *equal* to equality, rather that equivalence is *equivalent* to equality.
Answer: In type theory identity types are allowed to have more than one element. Univalence implies that the type of proofs that two structures are equal is equivalent to the type of isomorphisms between them. This more careful phrasing is consistent with the fact that the set of isomorphisms is non trivial. E.g. if there are many isomorphisms between two structures, then the identity type will have multiple distinct elements (exactly one for each isomorphism).
Answer: An equivalence relation in a theory can be called 'equality' when it satisfies the classical principle of "Indiscernability of identicals", that is to say, for our purpose, the "Indiscernability of equivalent objects".
With the way type equivalence is defined in Homotopy Type Theory, "the nature of isomorphisms" is unchanged. But the theory is built so that we have an indiscernability of equivalent types, and therefore type equivalence is, in this theory, a type equality.
More accurately, the HoTT book axiomatizes first identity types, that define a type equality. Type equivalence is then defined based on identity types, and, without the Univalence axiom, it almost satisfies the property of "indiscernability of equivalent types", with the exception of the reflexivity constructor of type identity, that is "too strict".
The Univalence axiom introduces a sort of "alternative constructor" for type identity, making it less strict, more rich, so that type equivalence now satisfies the criteria of "indiscernibility of equivalent types", and therefore becomes a type equality. Moreover, the univalence axiom ensures that the two resulting concepts of equality, namely type identity and type equivalence, are themselves... equivalent!

HoTT and isomorphisms


Are customs liable if they break something doing their job?

Question: I watched a reality show on the Australian border controle where they destroyed an object in a mail package and found drugs. The destruction wasn't really subtle, you couldn't use the object afterwards (it was a bowl). Them doing it was legit, since the object indeed contained contraband. However, if the sending would have been legit, how liable would they have been for destroying your property?
The same applies when customs go to your luggage and destroy something, can you get reimbursed?
Comment: @andra no, you can't. And I seriously doubt that even if they're on paper liable, that in most countries you'd get any compensation. There's always "we had a strong suspicion" or something like that. Nothing to do with the state of lawfulness of the country in question, just bureaucrats covering each other which is universal.
Comment: @jwenting do you know this for a fact or is it your gut feeling?
Comment: All this would depend on the country in question. Formally, I would assume that in most cases the rules are *not* contingent on their finding contraband (cf. the rules regarding arrests or search of persons, even if customs are not necessarily covered by the same statutes than law enforcement).
Comment: @relaxed couldn't you generalise to democratic, less corrupt countries?
Comment: @not from customs, but from other "official agencies", yes. And from other groups breaking your stuff at airports, like luggage handlers. They always either have an excuse that limits their liability or you get sent from one agency or company to the next, each blaming someone else external to themselves, until you give up.
Answer: Most customs agencies in modern countries have some method for you to claim in the event of damage caused to your posessions / luggage / souvenirs.
For example, since you mention Australia, on their Australian Customs and Border Protection Service website they have a publically published Policy for dealing with allegations of damage at Cargo and Container Examination Facilities.  This includes information on how to make a claim, what evidence to provide, and the reasons that they may have for deliberately causing damage, and when this would make them not liable for damage/destruction of your property.
So yes, sometimes they can be liable, and there is usually a means of claiming for this.
Comment: @KateGregory I nearly put in an anecdote, left it out, but will now as it's an example.  My brother had a plant-material hat from Thailand, and they were inspecting to see what sort of leaf it had.  It was one leaf-type throughout, but they pulled it apart - damaging the hat. There was no careful prying before the rip :(
Comment: You said in most "modern countries", did you check most of them or it was just an assumption? And did you check the "non modern" countries as well and made sure none of them offers the same? Or it was an assumption because they are non modern?
Comment: Typically the agents on the Border Security shows start with non destructive tests (eg xrays) then make a tiny hole or pry open one seam, test what they find, then  finally rip the whole thing apart. They need a reason to proceed.
Comment: @KateGregory Sounds like a protocol that only protects the luggage of a smuggler. When no contraband is in your luggage they'll have to go all the way.
Comment: @andra there are two kinds of searches. Those based on how you're behaving and those based on what they see. Eg for mail (the subject of the question) there is only what they see. Looks weird on xray? Investigate. See some powder? Take tiny sample and test. Tests positive? Rip it apart. The exact opposite of what you're saying.
Answer: I agree with the initial response - that there are probably laws (variations on the same - for each country)but hard to enforce or redress. I recently experienced the same situation - unnecessary damage to property by customs.
I was shipping a busker Organ (street organ)from Panama to the UK for repairs.  The recipient discovered the packaging was in good shape ans therefore assumed a safe delivery. But once opened saw that parts were severely damaged: Pictures taken showed - The top which was screwed in place had been ripped off.  The top was pried off when screws could have been unscrewed and lifted off. A protective grill for shipping was removed and the decorative protective grill broken and organ pipes were crudely removed There were also other minor scratches and dents to the fine wooden finish. The repairs for which I sent the organ were quickly done but the damage caused by Customs took much longer, required fine craftsmanship and cost much more.
All this and actually no recourse.  Panama denied opening the package and blames the UK. and the same in reverse in the UK, blaming Panama. One even accused, that since I was shipping the organ for repairs that perhaps these were the damages that needed repairing.
Answer: The US Customs and Border Protection's website describes the process for filing a claim for "property damage or loss, or personal injury or death".

If you would like to make a claim for property damage or loss, or personal injury, or death resulting from the negligent acts or omissions of an employee of U.S. Customs and Border Protection (CBP),  you may file an administrative tort claim against the agency. CBP processes administrative tort claims in accordance with the Federal Tort Claims Act (FTCA), 28 U.S.C. § § 2671, 2680.
Claimants who wish to file an administrative tort claim against CBP may complete a Standard Form 95, Claim for Damage, Injury or Death (SF-95) (see attached) and submit it, along with supporting documentation, to the CBP port of entry or Border Patrol station nearest the geographic location where the incident is alleged to have occurred.

It seems like a fairly straightforward process, though you'd likely need to consult a lawyer first for specific advice, which raises the entry-barrier somewhat. Of course this is a good reason to have insurance for high-value goods and not to import sentimental items out-of-sight (at least that way you can personally instruct a customs official on how to safely open or disassemble an item).


Running Canon 120 LiDE scanner on Ubuntu 14.04

Question: I am running Ubuntu 14.04 and Windows 7 virtually. I know that the Canon 120 LiDE cannot run on Ubuntu, but would I be able to run it through Windows 7 virtually?
Answer: Now the canon LiDE 120 runs on Ubuntu 14.04 and tested in 16.04 as well, for this you have to do the following:
To add the SANE PPA so that you have the latest version of SANE (proposed)
or for (backport), check out the following links
https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-release and
https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git accordingly.
And now open your terminal and type
$ sudo add-apt-repository ppa:rolfbensch/sane-release

then run
$ sudo apt update

then (assuming the user has the sane and all sane libraries installed) do a full-upgrade by
$ sudo apt full-upgrade

If you do not have sane and all its libraries installed then install it by executing the following.
$ sudo apt -y install sane libsane libsane-common sane-utils libsane-extras

Now your scanner should work with any frontends like simple-scan or gscan2pdf.
or you can compile sane-backend from the latest source, for that you can follow https://help.ubuntu.com/community/CompileSaneFromSource.
and it will help your system recognizing your device https://help.ubuntu.com/community/sane, and the current sourcecode is hosted here https://gitlab.com/sane-project/backends
Comment: I can confirm that this worked. Every other approaches failed.
Comment: Did this version of SANE reach the official repositories? It would be useful to update http://www.sane-project.org/sane-mfgs.html#Z-CANON which says LiDE 120 is unsupported. It is listed as supported in the git version though: http://www.sane-project.org/lists/sane-mfgs-cvs.html
Answer: You try to edit a file /lib/udev/rules.d/40-libsane.rules:
Open a terminal,Press Ctrl+Alt+T
Run it:
sudo nano /lib/udev/rules.d/40-libsane.rules

In te open file add the following 2 lines:
# Canon CanoScan Lide 120
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="190e", ENV{libsane_matched}="yes"

Ctrl + O, save file. Ctrl + X, close nano.
Close the terminal,
Reboot.
And run:
sudo sane-find-scanner -v -v

Answer: # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.
# Not checking for parallel port scanners.
# Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
done
zorin@zorin-E2050-2391:~$ -L
-L: Befehl nicht gefunden.
zorin@zorin-E2050-2391:~$ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


What would be the meaning of the 「筋」in 「親戚筋」?

Question:
「もちろん偶然苗字が一緒だっただけとか、名前を騙ってるだけって可能性もゼロではねーですけども、何らかの関わりがあるという前提で考えるのなら、私や兄様の親戚筋ってところですかね?少なくとも、私や兄様と面識があるみてーですし」

What would be the meaning of the 「筋」in 「親戚筋」? Are there any other examples of this usage of 「筋」?
Answer: I think the 「筋」is used in the sense, if I were to give it a definition, of "an undefined set of people who shares a particular attribute". It means something like "quarter", "circle" or "community" in English.「評論家筋」("the critical community/circle") and「左翼/右翼筋」("the left/right-wing community/circle") are a couple of examples.
Here is the closest definition on デジタル大辞泉:

12 そのことに関係のある方面。「確かな―からの情報」「消息―」

(The literal translation of the definition: "a quarter related to a given matter".)
From this meaning derives a use of the word, which I think is relevant here, as a means to avoid a direct reference to a specific person by instead naming the circle/community/quarter they belong to.
On this point, the prestigious 広辞苑 is more observant. On my digital copy, in its entry for「筋」, it has this:

 ⑥具体的に名をあげず、ぼかして指示するのに使う語。つながりのある方面・関係の者。

(And for good measure, it gives「親類筋」 as an example for this sense.)
So, to address the sentence in question,

私や兄様の親戚筋ってところですかね

reads like "I guess they must be someone from the circle of relatives of me and my brother's"
while

私や兄様の親戚ってところですかね

would have read like  "I guess they must be a relative of me and my brother's."
I'm hardly confident that I was able to illustrate the effect of the「筋」fully and naturally with the comparative translation, so let me try to supplement it by adding that the version with「筋」sounds even more speculative and tentative about the identity of the mysterious person than the 「筋」-less one.
Answer: I think 筋{すじ} here means something along the lines of "family line" or "lineage". Jisho.org defines it as:

Noun 7. lineage; descent

Google/Oxford 日本語辞書:

血統。血縁。
 「源氏の―を引く家柄」

デジタル大辞泉(小学館):

家系。家柄。「貴族の―を引く」

親戚筋 means relatives from a common family line. There are some similar/related words:

家筋{いえすじ}: roughly means "family" or "pedigree"

血筋{ちすじ}: "lineage", "blood", "bloodline".


Do you get a bonus action from dual wielding?

Question: I have been playing D&D 5e for a while now and I recently made a new Fighter with 2 weapons. I already read many things and the PHB but I can't figure out if I get a bonus action from my first attack so I can make a second attack or if I have to already have a bonus action. If so wouldn't it be really bad on a fighter, at least in the early game? And how do I get this Dual wielding thing so that I get to wield normal weight weapons?
Comment: its not a duplicate i already read that and i couldnt figure out if i realy get the bonus action just by attacking. It just sounded wrong to me.
Comment: It's a duplicate because it's the same question. If you aren't able to solve the issue with the answers there, you may need to ask a question about the *exact* wording you need clarified.
Answer: You do
But you can take only one bonus action, and only on your turn.
See Basic Rules, Bonus Actions:

You can take a bonus action only when a special ability, spell, or other feature of the game states that you can do something as a bonus action. You otherwise don't have a bonus action to take.
You can take only one bonus action on your turn, so you must choose which bonus action to use when you have more than one available.

Attacking with a Light weapon explicitly allows you to take such an action.
See Player's Handbook, Two-Weapon Fighting:

When you take the Attack action and attack with a light melee weapon that you're holding in one hand, you can use a bonus action to attack with a different light melee weapon that you're holding in the other hand

For more info see Two-Weapon Fighting & Bonus Actions
Comment: @AxelLP The second attack's damage lacks your ability modifier (by default), so it deals greatly reduced damage if it hits. You could have a more damaging two-handed weapon instead, or a bigger (non-light) one-handed weapon and a shield. It's not OP, but it's definitely strong in some situations, eg. for rogues who benefit from having more chances to perform their Sneak Attack.
Comment: It's not the same as two attacks. The second attack is weaker, since you don't add the damage bonus. Please read the "Two-Weapon Fighting" chapter.
Comment: @AxelLP We have a number of Q&A on this site that addresses how the two weapon fighting style looks good from levels 1-4, but once the second attack feature comes at level 5 it does not look anywhere near as good. [Like this one](https://rpg.stackexchange.com/q/130182/22566) . It's best not to assess features due to their impact on levels 1-4 as that is "introductory adventuring ..."
Comment: Isnt it a little op then i mean as far as i did understand you get to basically do 2 attacks in 1 turn starting at lvl 1 with fighter. But i think i played it wrong cuz i added my dex mod to both my hit and dmg roll
Comment: But the two weapon fighting fighting style that the fighter and ranger has allows me to add the mod to the damage of the second attack but not to my atk dc (d20) right? Didnt write that i got that as my fighting style sorry for that, its my first question on a forum.


Isomorphism between $Hom$ and $\mathbb{Z}_n$

Question: What is the isomorphism between
$$\mathrm{Hom}(Z_n,\mathbb Q/\mathbb Z) \ \ \text{and} \ \ Z_n?$$
I guess its not very hard, but I can't find anyone.
Comment: How about $x+n\mathbb{Z}\mapsto \frac{x}{n}+\mathbb{Z}$?
Answer: Here's an approach you can take: any homomorphism $\Bbb Z_n\to\Bbb Q/\Bbb Z$ is uniquely determined by the image of $\bar 1\in\Bbb Z_n$. Define a homomorphism $f:\Bbb Z\to Hom(\Bbb Z_n,\Bbb{Q/Z}$) by sending $1\mapsto \varphi$ where $\varphi(\bar 1)=\overline{1/n}$. You need to check $(1)$ that this map $\varphi$ is actually a homomorphism, $(2)$ that $f$ is surjective (which amounts to showing $\varphi$ generates $Hom(\Bbb Z_n,\Bbb{Q/Z})$), and $(3)$ that $f$ has kernel $n\Bbb Z$.


Why does the preterite of verbs such as "deal", "feel" and "dream" have a devoiced dental suffix?

Question: I am trying to explain the morphology of some irregular weak verbs. I could explain "leave-left" as the result of assimilation with v being originally intervocalic f, but I can't see the reason for the verbs as mentioned in the title. The only thing I notice is that they all have their stems ending in a liquid or a nasal. Any suggestions for this?
Comment: Similar, possibly relevant: [Send, sent; end, *ent?](https://english.stackexchange.com/questions/44610)
Comment: @sumelic Many of these were class 1 weak verbs which mean that all their stem vowels were affected by i-mutation. "burn" comes from a strong verb that was weakened. "send" could have underwent the same process, but I believe in OE its preterite cannot be differentiated from its present except when the personal ending is different (due to the dental in the stem), so why did its present tense form not become "sent" as well?
Comment: @sumelic Just to add, that could also be the result of analogy.
Answer: It seems to be unclear overall, but related to the phonological structure of these words in Old English through modern English. Aside from the nasal/liquid consonant generalization you mentioned, it seems all of the affected verbs had heavy rather than light roots in Old English. In addition, since they were (either generally or always? I'm not quite sure) class I weak verbs, most have front vowels (there is at least one exception, burn~burnt).
I read a paper about it, The Dental Preterites in the History of English (Aditi Lahiri) that has the following to say:

...The new process of open syllable lengthening is evident in these data, applying in the past tense forms of verbs with light roots (see also Lahiri and Dresher 1999; Lahiri and Fikkert 1999; Fikkert et al. 2006), for example, OE fremede > ME frēmed.
The lengthy literature on the split in behavior in the dental preterite, illustrated above, contains several possible explanations. For example, it has been suggested that the use of [t] in the preterite is an extension of the OE 3p.sg (thus sendeþ > sent) (Morsbach 1896) or was borrowed from verbs like ME cepte (Moore and Marck- wardt 1951). What remains unexplained, however, is why the [t] was extended only to the class of heavy roots, even when the roots ended in a sonorant (cf. ME felte > felte) class. The loss of the final schwa in the original trisyllabic past tenses like fremede > frēmed is also unclear, as is the absence of intermediate forms like frēmede. Brunner (1960), taking a pessimistic attitude toward these explanations, simply says that the reasons for these changes are not quite clear.
(517)

Lahiri's explanation is as follows:

Moore and Marckwardt (1951) observe that the /t/ was generalized based on words like cepte; the question, however, is why. The explanation offered here is that it had become necessary to unambiguously mark the difference between the two past tenses, whose distribution was no longer transparent. By the time of the loss of the schwa, the original light verb roots had either been restructured as having an underlyingly long vowel (e.g., hōp-) or an underlying geminate (dinn-), which later degeminated. The past suffix assimilated to the root with the loss of schwa and forms like hōpt surfaced from hōped, clashing with forms like cept. That is, the surface forms did not reflect the difference between hōp(e) ~ hōped > hōpt and cēp ~ cept. One way of distinguishing the suffixes was to keep the underlying forms apart (i.e., not just allomorphs)—one suffix as /d/ and the other as /t/, introducing a distinction between -ed and -t with root-final sonorants, as in felt versus healed.
Another important reason for /t/ to be the special plural morpheme was that the only source for preterite /t/ was assimilation to root-final voiceless consonants in heavy roots that could later be shortened, as in cept. Thus, /t/ was always associated with vowel shortening and could be easily interpreted as indicating the special status of the level I suffix. (521)

I don't know if I really follow the argument, since by the time forms like hōpt occured preterite /t/ was not always associated with vowel shortening.
Lahiri mentioned earlier on that

In past tense forms with heavy roots, the preterite /d/ assimilates in voicing to the preceding, root-final consonant. This is the only context in Old English in which the coronal past tense marker is voiceless. (510)


Code readability vs extensibility and flexibility, what is the relation?

Question: I have been reading a bit about code readibility and found conflicting information about the following: some say that flexibility (and-or extensibility) actually increase readability, while some others claim it decreases. Is there any generally accepted opinion about that?
Answer: There is one relationship: Code that is not readable is inflexible and hard to extend. It may in theory be flexible and extendible, but since it's not readable you won't be able to figure out how.
Answer: There is no generally accepted truth about these trade offs because that would be like boiling down the entire art of software into a meme. Software is a living, growing thing that has these trade offs being made constantly during development.
There are cases where readability and extensibility go together. For example, breaking out a small bit of code into a subroutine function. Hiding the nested loops and if statements as a named subroutine is readable. It also makes the code flexible for reuse.
In the other extreme, code that is engineered to be hyper extensible can be seen as overly complex due to the many layers of abstractions required to achieve that level of extensibility. A programming language compiler is a good example of this. I doubt there is any compiler code which is famously readable.


How to setup Mysql master-slave replication with the slave meant for testing where divergence is OK

Question: Problem:
I have a staging DB server on which functionality is tested before pushing it to the production environment. Now, we want to start doing VA/PT (Vulnerability Analysis and Penetration Testing) on our application, but since that can be destructive on the staging DB server, we want to make a separate Testing environment with a VAPT web+DB server.
Requirements:

The data from the staging DB server must be replicated onto the VAPT DB server automatically so that specific new use cases, features, etc can be tested for vulnerabilities.

Due to VAPT activities (testing data, SQL Injection, possibly DROP TABLE exploits, etc) the VAPT DB server itself will also have its own data changes, i.e. divergence from Staging DB (Master)

So, if I use simple Master-Slave replication as below I am assured of #1:
Staging DB (Master) -> VAPT DB (Slave)
But if I do #2, the slave will eventually diverge, which is fine for the testing environment, but, will it interrupt or mess with the Master-Slave replication as per #1?
An obvious example where divergence will cause errors is a VA/PT activity that causes DROP TABLE users so that the Staging DB (Master) users table trying to INSERT/UPDATE data will cause replication errors. Some UPDATEs/DELETEs might cause errors too.
In particular,
If I use ROW-based replication divergence will happen quickly causing frequent errors.
If I use STATEMENT-based replication, since ids will not match, it is possible that some data will break because ids are essential to link data in related tables even though we do not use foreign keys.
Alternatively, instead of replication, I could manually dump the Staging DB into the VAPT DB daily, which would be cumbersome to automate.
OR,
I could make copy DBs and setup various partial copy operations, but that would complicate matters too much, given that I am not a developer and that my developers often make and revert changes of various sizes randomly.
EDIT: The data directory varies between 20-25 GB on Staging
Surely someone has come across this problem in their work so far and there might be a set of best practices for this situation i.e. maintaining a match between staging and testing environments in real-time while allowing testing freedom to play with the data.
I tried googling for a while but the right phrasing for google escapes me. All I get is howtos for master slave replication, handling unwanted drift/divergence and so on. Nothing much about desired/accepted drift and divergence or partial replication.
Thanks in advance.
Answer: Given the situation that you've described, any form of replication will fail spectacularly within minutes of a rigorous pen test. Having a completely isolated database instance for this purpose alone is the most logical solution.
Here are a couple of reasons why:

as you said, someone issues a DROP TABLE and, because there's no RI in your database to prevent this and because it sounds like the application is using a user account with full privileges, the command is carried out. Replication won't "fix this" for you.
Someone creates a new record on the replicated instance. Are all primary keys GUIDs? If so, you might be lucky enough to never run into a primary key collision but if you're using incremental integers, there will be overlap (even if the replica is configured to use a higher range of numbers)
Someone deletes a record
Someone adds a column, then that same column is later added to the main server
Someone truncates a table
And on and on and on …

Automated restores of your production database should already be something that the company is doing as part of its backup verification process, so I don't see how this would be cumbersome or difficult to automate. Every operating system under the sun can handle a little script that takes a recent backup and restores it to a database. Unless your system is already many hundreds of gigabytes in size, this would be a very simple and cost effective way forward.
As an added bonus, this script would make refreshing the development database(s) an absolute breeze
Comment: Thanks for the quick and convincing reply! I do have automated hotbackup (percona xtrabackup) and a script to restore from hotbackup upon running it manually. And I also test it from time to time (once a month or two). There was an issue with minor versions (5.6.33 vs 5.6.41) due to which I did not do this right away. I'll look into this. Meanwhile I will hold on for just a little while before closing the question because it has been just a few days (there might be some tools / scripts out there that I might find in other answers)


What documentation shows the associated numbers for linux signals like SIGTERM and SIGKILL?

Question: I can look around the internet and find that the associated number for SIGKILL is 9, but is there linux documentation (such as, a man page) showing the complete list of signals and their numbers?
Answer: The signal(7) man page (at least the one I have) shows multiple possible numbers for some of the signals.  If you can get kill to list the numbers, they should be correct for the running system.  Try:
kill -l

or
kill -L

In both cases, that's an "ell" (for "list"), not a "one".  Bash's built-in kill -l shows a nice numbered table.  Linux's procps kill -l shows a terse list of names without numbers, but -L shows a table with the numbers.  BSD kill seems to only understand -l, and won't show you the numbers.
Comment: The `-L` option is better because it also shows the numbers associated with the signal names, and puts them in a nice table format. My version of procps is **3.2.8**.
Comment: @Tshepang: Thanks!  Answer updated.  I hadn't actually thought to try anything but Bash's built-in `kill`.
Answer: man 7 signal
Comment: The kill(1) man page should refer to the signal man page in the "SEE ALSO" section
Answer: Also look in /usr/include/signal.h and either scan the #define or #include statements (which on Ubuntu 10.10 tells you to look in /usr/include/bits/signum.h).  Note that the SIGRTMIN/SIGRTMAX are placeholders for kernal and unused signals and should not be called by the shell or a program.


Javafx Gridpane Cell Background Colors

Question: So I have a javafx program which procedurally creates text nodes and inserts them into a GridPane. Each of these text nodes is given a CSS class. I used a stylesheet, to try to make the cells of each class a different color. However, I can only use the -fx-fill property to change the text color, which is good, but I cannot find anything online as to how to change the background of each cell through CSS or Java. I have also tried the fx-background-color property in the CSS, but that doesn't work. Any help would be appreciated; thanks.
Answer: You need to use a Region, or some subclass of Region, in order to set the background color.
Either:
Use a Label instead of a Text. You can set the text color with -fx-text-fill and the background color with -fx-background-color.
Or:
Create a StackPane for each Text; add the Text to the StackPane and the StackPane to the GridPane. You can set the text color with -fx-fill on the Text and the background color with -fx-background-color on the StackPane. You will probably need to call
GridPane.setFillHeight(myStackPane, true);
GridPane.setFillWidth(myStackPane, true);

on each StackPane to get the StackPane to fill the GridPane cell.
Answer: You can use stackpane as well change background color of stackpane. Add the node of single cell in stackpane and after you need to add stackpane in grid
grid.getChildren.add(pane,0,1);

Javafx Gridpane Cell Background Colors


Best sensor for breathing activity?

Question: those who are much cleverer than me please help me with this.. Which sensor would be best suited for measuring the intensity of in and out of a person's breathing at rest when the sensor is to be positioned under his nose?
Answer: Probably a thermistor to look at the temperature change between inhaled and exhaled breath would be easiest.  If you're really interested in flow, then a thermistor in self-heating mode to be cooled by inhales and exhales.  the latter is trickier, as inhaled and exhaled breath will be two different temps, so the flow sensitivity for each phase will probably be different.
Moving up the line, you can also look at chest inflation using skin plethysmography, which is essentially the broadcasting of a small sin wave, and looking at the reception at a distant location on the chest.  The sine wave should really be isolated.
Comment: Thank you for your quick reply! I will explore down that path!
Answer: Ultrasonic flow measurement may actually be the highest spatiotemporal resolution, the lowest cost, and fastest implementation time due its commercial availability.
It was used to great effect in this paper to monitor infants for congenital airway defects.
Comment: Sure, if you have the full airstream captured by a mask, that's one way to go.  You'd need all the air, or at least a constant fraction, moving through a tube for ultrasound.

Best sensor for breathing activity?


Customized facebook login page

Question: Can we customize facebook login/authentication page?
I want to use my own customized pop up for receiving 'Email' and 'Password' input from user so that it is consistent with the GUI of my application. Is there a facebook API to which I can pass the Email/Password details received from user?
Answer: Looking at https://developers.facebook.com/docs/reference/api/user/#permissions  you cannot "create" new permissions. This has to go through Facebook so they know what permissions have been granted. This ensures that you're not just granting permissions on behalf of a user without them having actively granted them. This therefore stands to reason that you cannot style their page.
Alternatively, you could just make sure users register via an account on your site (You want a password so I assume you don't mean their facebook password) and then ask them to connect their facebook account to it. You would need to ask for their email in your form, get them to login, then connect via facebook and associate their facebook id with their account on your site.

Customized facebook login page


Use OpenStreet Maps in my blackberry application

Question: I would like to use openstreet maps in my blackberry application. The idea is the application fetches the current location through GPS/cell tower. The user has an option to click on a button and load the map within the application (same display) below. I have researched a little and BlackBerry maps seem to be limited and Google Maps requires installing a seperate API. I am hoping to fetch and load the maps through http connection (something like a webservice). Can somebody please guide?
Comment: Guys, can anyone please help. I am unable to sort this one out.
Answer: I use the nutiteq library its usefull and it implements the openstreet maps in my blackberry. Here are some links quick start nutiteq RIM BlackBerry Mapping API SDK


Correlation coefficient of Wiener process

Question: First, I'm not majoring mathematics. I'm studying economics and during reading a thesis I can't understand the 'wiener process' well.
I read some books about it and understand the main idea and standard formula, but the thesis says
$\frac{dS}{S}=\mu dt+\sigma_1 dz_1$
$\frac{dD}{D}=r dt+\sigma_2 dz_2$
where $S,D$ are geometric brownian motion, and
 $z_1,z_2$ are standard brownian motion (wiener process), then
$dz_1 dz_2=\rho dt$
where $\rho$ denotes the correlation coefficient between the two Wiener processes.
I want to know how to derive the last one-correlation coefficient- becuase the books that I read there were no information about $\rho$.
Can anyone help me to understand?
Comment: There are entire courses dedicated to this.  You arent going to understand SDE's from a single answer on a QA site...
Comment: @rmh52 Then can you recommend me any book to study that part? In my book, it covers $var$ and $cov$ but not $corr$...
Comment: If you know about variance and covariance, then the correlation $\rho$ of two random variables $X,Y$ is just $\rho = \operatorname{Cov}(X,Y)/\sqrt{\operatorname{Var}(X)\operatorname{Var}(Y)}$.  See http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
Comment: http://www.amazon.com/gp/aw/d/3540047581
Comment: The solutions for the exercises in this text are almost all available online (sorry I don't have a link) which makes it great for self study or supplementing another text.
Answer: Although @rmh52 is mostly correct, I'll take a stab at it. Viewing stochastic processes such as Geometric Brownian Motion (GBM) as limits of discrete time processes helps to build intuition about all of its components. For example, as you mention above GBM satisfies the SDE: $$dS_t = \mu S_t dt +\sigma S_t dW_t$$ which you can think about approximating by starting with $S_0$ at time $0$ and adding, at time $t$, for each increment $\Delta t$ in time, a small amount $\Delta S_t=\mu S_t+ \sigma S_t \Delta W_t$, where the change $\Delta W_t$ in the Wiener process is normally distributed with variance $\Delta t$ and independent of the other increments to the Wiener process you have performed thus far.
Taking this one step further is to think about a two-dimensional system of GBM - which you have described above as: $$dS_t = \mu D_t dt +\sigma_1 D_t dZ_t$$ $$dD_t = rD_t dt +\sigma_2 S_t dW_t$$ How would you simulate this system, in particular how would you generate the increments to the Wiener processes $W_t,D_t$? These should both be normally distributed with variance $\Delta t$, but they do not necessarily have to be independent - you can correlate them with any constant $-1\leq \rho\leq 1$ to introduce correlation between the two Brownian motions!
This is applicable, for example, when applying multi-dimensional GBM models to stock prices. You may want to assume that the stock prices for, say, Ford and GM are GBMs - but you want the movements of these two companies to be (to a certain extent) correlated - that is, when Ford moves up GM generally does also, and vice versa. This is possible with correlation!


"Number of lines for editing" for my announcement new column does not have any effect

Question: I have created a new column for my Announcement App, and I defined the "Number of lines for editing: " = 1. But when adding new item to the announcement, user can enter more than one line for this new column ? Any idea why is this happening ?
Answer: That doesn't have any effect on how much content a user can enter, it only effects how large the input field is rendered on the new/edit pages. If you want to limit the amount of text, you'd either have to set it as a single line of text field (which caps at 255 characters) or create a validation sccript that checks for a max number of characters and prevents the item from being saved if it exceeds it.
Comment: Thanks for the answer. It's things like this that make me hate SharePoint with a burning passion.

“Number of lines for editing” for my announcement new column does not have any effect


How do I take a screenshot and paste it in a file?

Question: I am trying to follow these instructions but not succeeding in what they are supposed to instruct.  Can somebody please shed light on how to do this?
Answer:
⌘ cmd + ⇧ shift + 3 will screenshot the entire screen and save it to your desktop. (You should hear a camera sound when you do this.)
⌘ cmd + ⇧ shift + 4 will give you crosshairs to use to select an area for copying. Move the crosshairs to the location that you want to copy and click the upper left, dragging the crosshairs to the lower right of the area you want. When you release, you will hear the same camera sound, and the screenshot will save to your desktop.
Also, ⌘ cmd + ⇧ shift + 4, then Space, then clicking any window will save that window to a screenshot.

To change the location of the saved screenshot, launch Terminal and use the following command:
defaults write com.apple.screencapture location /path/ && killall -HUP SystemUIServer

Make sure you change /path/ to be the location where you want your screenshots to go.
Answer: If you take screenshots to the clipboard, you can paste them into the message and not deal with the intermediate file.
Use ⌘ cmd control ⇧ shift 4 to go to clipboard. (Add control to the other shortcut.)
Note that creating the file is more reliable than pasting for cross-platform messages.


with MySQL, are multiple single column indexes faster than one multi-column index?

Question: I have a performance related question, in MySQL, are multiple single column indexes faster than one multi-column index?
Comment: Come on guys.  The question is clear.  It is a commonly asked question.  The novice does not understand that that is the question to ask.  Plus several good answers were posted before you "closed" it.
Answer: SHORT ANSWER

Only as a last resort

LONG ANSWER
Having multiple indexes can be a rather arduous adventure for MySQL Query Optimizer.
I have written about this before

Sep 18, 2012 : How are multiple indexes used in a query by MySQL?
Apr 19, 2014 : Optimizing indexes (Under the Heading ANSWER TO QUESTION #2)

In essence, MySQL will do lookups along multiple indexes and perform an index merge of the results. This would only be done as a last resort if there are no compound indexes that are usable for your query's WHERE, GROUP BY, and ORDER BY clauses.
The order of the columns in the multiple-column index also has a bearing. If you have the following:

Table with indexes (a),(b),(c)
Same table with index (a,b,c)

The three-column index would be better if the WHERE, GROUP BY, and ORDER BY clauses harness the indexed columns in the order inside the index (a,b,c). Anything different combination could possibly result in an index range scan of (a,b,c). Next best choice could be full index scan of (a,b,c) . If these are not possible, the last resort becomes the merge of searching (a),(b),(c) separately.
Answer: If you are testing a and b, INDEX(a, b) is likely to be better.
Indexing a flag (by itself) is almost never useful.
Please provide SHOW CREATE TABLE and a few WHERE clauses; I will give specific advice.
Here's a quick cookbook for building an INDEX that will often be optimal.  Given a WHERE with a bunch of expressions connected by AND:

List all the columns (if any), in any order, that are compared to a constant and not hidden in a function.
You get one more chance to add to the index; do the first of these that applies:

2a. A column used in a 'range' -- eg, BETWEEN, LIKE without leading wildcard, '>', etc.
2b. All the columns, in order, of the GROUP BY.
2c. All the columns, in order, of the ORDER BY if there is no mixing of ASC and DESC.
There are exceptions where this simplified cookbook fails, but I think it covers a large percentage of cases.  Two notable exceptions are "covering indexes" and OR clauses.  And it does not admonish you not to add redundant indexes.
Answer: There is no clear answer to your question, as it really depends on the query. BUT: If you like to filter e.g. for two colums a combined index will have a better effect.
Answer: When a query plan is constructed, MySQL finally decides to use only one of the indexes on the table which means that multiple single column indexes will never be used in a single query. However, if you have multi-column single index which covers all the required fields (coverage index), the database will never have to read from the disc which will make the query very fast
table:   ID|Name|age|sex
query:  select sex from table where name= 'x' and age ='y';

in this query, if you have 3 seperate indexes on name, age and sex only the most useful one(calculated by the optimizer) will be used whereas if you have a single index on name-age-sex, it will be much fast.
It is also very important to note that the indexes are evaluated from left to right in the query, that is, if you have an index on age-name-sex, it will not be used as name is checked before age in the query.
Comment: *"multiple single column indexes will never be used in a single query"*: Not true. In rare cases, MySQL will use multiple indexes.
Comment: @ypercube, thanks for pointing that out. could you please mention a scenario ?
Comment: See the links in Rolando's answer about index-merge algorithms.


Creating a hibernation partition on Windows 7

Question: I have a laptop which comes with a 20GB SSD hibernation partition, but I want to install Linux and use half of that SSD drive as a swap partition. In the case that it breaks, during installation, how would I recreate a new hibernation partition?
Comment: I didn't realize moving the hiberfile in Windows from the root of C: was supported short of trickery, huh.
Answer: To create a hibernation Partition you can use This tool and follow this tutorials ! =)
The 0x84 file system ID is commonly used for hibernation partitions. Using BootIt BM, you can assign this ID to a partition and thereby enable the use of that partition by an operating system.
To assign the 0x84 file system ID, follow these steps:

Run BootIt BM.
Open the Work with Partitions window by clicking the Partition Work
icon on the BootIt BM desktop.
Access the File System text box:
If the hibernation partition already exists, double-click its entry,
or select the entry and then click the Properties button. A
Properties window will appear and will contain a File System text
box/drop-down list.
If the hibernation partition does not exist, select the appropriate
Free Space block and click the Create button. A Create window will
appear and will contain a File System text box/drop-down list.
Put the cursor in the File System text box and enter: 0x84
Make any other changes desired (for example, if you are creating a
partition, set the desired Size - MB value). Click OK when finished.
Answer: First open cmd.exe and type in "diskpart"
At the DISKPART> prompt, type the following commands:
DISKPART>list disk

DISKPART>select disk X
(X is the disk number where you want to create the store partition. Refer to results from "list disk"
for exact disk number. Disk must be an SSD)

DISKPART>detail disk

DISKPART> select Volume Z
(Z is Volume of your store partition. Refer to results from "detail disk" for exact volume number)

DISKPART>set id=84 override


objective c: Unable to enable a publish_stream inside our application

Question: I have an application that require a publish stream permission. I managed to use the openActionSessionWithReadPermission and open the Facebook session, but when calling the reauthorizedWithPublishPermission I have an error reading like this:

error = The operation couldn't be completed. (com.facebook.sdk error
  2.)

This is the code I written to do the authorization process.
<code>return [FBSession openActiveSessionWithReadPermissions:[NSArray arrayWithObjects: @"user_photos", nil]
                   allowLoginUI:allowLoginUI
                   completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {

                   switch (state)
                   {
                        case FBSessionStateCreated:
                        case FBSessionStateCreatedTokenLoaded:
                        case FBSessionStateOpen:
                             [[FBSession activeSession]  reauthorizeWithPublishPermissions:[NSArray arrayWithObjects:@"publish_actions", nil]                                                                  defaultAudience:FBSessionDefaultAudienceFriends
                                                            completionHandler:^(FBSession *session, NSError *error) {
                                                            [self sessionStateChanged:session
                                                                                state:state
                                                                                error:error
                                                                                success:success failure:failure];
                                                            }];
                                                        break;

                                                   }
                                                }];
</code>
I have a code that just use the openActiveSessionWithPublishPermission but still have the same result.
What does the error mean ?
Additionally, if I use openActiveSessionWithPublishPermission, and not passing publish_stream permission i can manage to open the session but under the app setting on Facebook website I won't see the option saying "This app can also -- Post on your behalf" settings. But if I add that on, same problem occur.
Answer: You need to declare permission like this
<code>[NSArray arrayWithObjects: @"user_photos", @"publish_stream",nil]
</code>


production site routes to staging site after cloning

Question: Hello I am new to wordpress, our website was down (due to plugin update) I was not even able to access the admin panel due to this, so I went to the directory and copied from our staging directory (the only working directory) to the public_html directory (Production Directory).
This did fix access to the website but now when I access the website the home page is referencing the correct directory (non staging) but when I navigate to any tabs I am re-routed to the staging site (staging directory) which I do not want.
Does anyone know how to fix this in order to stop the public html from redirecting to the staging html?
Comment: If you copied over all the files from staging's `public_html` then that means you also copied over the `wp-config.php` file.  That files tells WordPress which database to use. So when you first load the site, it's loading WP because that's what's in the root directory (`public_html`).  You have to either get the `wp-config.php` from a back-up of the live site and replace that, or you have to edit the file so that it connects to the right database:  https://wordpress.org/support/article/editing-wp-config-php/
Next time, only copy over the `wp-content` folder.
Comment: Thank you very much, this did seem to be the issue!
Answer: Check your production site's wp-config.php file for one or both of these lines:
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

...and set them as appropriate if they exist.
These constants will override the settings in the database if they're present. See Editing wp-config.php for details.